Context: At Storyscript, we’re using ProseMirror to edit “structured code”. So, in this example, we will have three kinds of nodes with content:
hole: "text*"
token: atom
mention: atom
codeLine: "(token|mention)* hole"
Unfortunately, I’m getting into this stuck place when my cursor is inside a hole
, and I backspace to delete a token
, my cursor gets moved from <codeLine><token/><hole>•</hole></codeLine>
to <codeLine>•<hole></hole></codeLine>
which stops me from being able to add text inside the hole.
I recorded the following video showing a few places where I’m seeing strange behaviors.
At 8s, I hit backspace and it moves my cursor to the beginning of the line as opposed to inside the empty hole.
At 12s, I hit backspace to delete the preceding “token” but my cursor is moved out of the hole so I lose my ability to continue typing.
Here’s a better quality mirror of the recording