As I understand it, ProseMirror uses
contenteditable for its front end, so the answer to my question is most likely, “No,” but I’ll ask anyway in hopes there’s a workaround.
I want to implement VIM-like navigation. That means pressing
k keys when in VIM mode should move the caret up and down. In a code editor, that means it would jump to the next “hard” line, but as I’m building a writing tool, where hard lines are paragraphs that could span multiple visual lines, that’s no good. From the user’s perspective, they’d have jumped to the next paragraph.
Instead, I want to move the caret as it would if I had pressed the up or down arrow keys: a wrapped line at a time.
I tried artificially creating the arrow
KeyboardEvents and dispatching them, but the browser ignores them. The event has to come from the user.
Does anyone have other ideas?