I’m looking to create a plugin that will prevent the user from using the arrow keys to move the caret inside of certain marks. aka If I arrow “up” into a mark, the caret should be moved to the beginning of the mark.
The problem I’m having is that the state.selection in
handleKeyDown is the selection prior to the key event being handled by Prosemirror. What is the best way to recreate an “after” hook so that I can check the state once the arrow key event has been applied to the selection?