I would like to change the block widget content when mouse hovers on the dom that generated the block widget. Is there an easy way to do it?
What does “the dom that generated the block widget” mean?
Sorry for not being clearer. I meant: change block widget content when the mouse hover over a code block.
There’s no automated way to do that – you’ll have to listen to mouse events to detect the hover, and replace the widget.
Yes but how can i update the widget content inside the event handler. I wonder what triggers the widget update?
You should be able to use a plugin that exposes decorations, change the decoration set on the appropriate DOM effects, and call
view.update() to have the view redraw the decorations.