I’m trying to build a plugin when pressing Command + A will select only the contents of active node, and hitting the Command + A again would select all contents.
I’m pretty new to Prosemirror, any examples/guidance would be really appreciated.
I’m trying to build a plugin when pressing Command + A will select only the contents of active node, and hitting the Command + A again would select all contents.
I’m pretty new to Prosemirror, any examples/guidance would be really appreciated.
You can use a command for this along with the prosemirror-keymap plugin. Just check if the selction is empty (state.selection.empty
) and dispatch a setSelection accordingly.