I’d like to add a visual cue to my users about the current node (where the cursor is) or the selected nodes so that they have a better notion of where the node(s) start and end.
I was hoping ProseMirror would add a css class to the selected node(s), or current node, but it only adds a
ProseMirror-focused class to the container.
So what would be the best approach for adding a temporary CSS class these nodes? Of course whenever the selection changes or the cursor moves the CSS class should be removed.
I’ve read about decorators but it seems those are tied to particular node types / marks, which I’m not sure is the best approach for handling this.