Hi @marijn Such a beautiful library, thank you very much for all your work.
I’m creating a wrapper in React, which accepts hashtags and mentions, and I have an issue with inserting text before a node which I create as immutable.
I’ve simplified my code into this example: https://codesandbox.io/s/reverent-banach-d984l The problem is:
- If I erase all the text prior to the “immutable”, making it the first child of the paragraph, I cannot insert a standard text node. It only tries to edit the immutable node, which is being filtered out by design.
- If I put the cursor at the end of the “immutable”, I cannot type in new text. I would like it to start a new text node if that’s the end of the paragraph parent node.
What is the best way to go about it? (naturally, the immutable stands for a more complex hashtag object.) Should it be to switch over to a nodeView (that approach didn’t work for me on mobile) ? to create hidden text nodes? Or appendTransaction to split the nodes whenever new text appears in the beginning or end or an “immutable” node?
For reference, the project I’m working on is here: https://github.com/iswara108/react-prosemirror
Thank you Iswara Chaitanya