Hey guys. I'm currently looking into an issue with our NodeViews not handling the deletion of text content correctly when an inline node view has content: 'text*' in it's schema.
After that, the state for the node doesn't seem to update anymore (the nodes length stays 1/0 and the changes done inside are not written into the state).
This doesn't happen, if the content is set to paragraph* for example since then it seems the schema is working correctly.
Now the question would be - is it actually correct to use text directly in a Node? From what I've seen it feels like the state drops the node internally whenever the content is empty - but our node view renderer is not reflecting that change?
Would love to hear some insight - don't need a direct solution but maybe a heads up on what could happen here and if this is even correct Prosemirror behavior / usage.
Hey guys. I'm currently looking into an issue with our NodeViews not handling the deletion of text content correctly when an inline node view has
content: 'text*'
in it's schema.See this issue: https://github.com/ueberdosis/tiptap/issues/3451
You can see inside the codesandbox provided (https://codesandbox.io/s/dazzling-james-xn3fnn?file=/src/App.js) that the node length will stay 1 when each character is deleted one by one or 0 if it's deleted by SelectAll => Backspace.
After that, the state for the node doesn't seem to update anymore (the nodes length stays 1/0 and the changes done inside are not written into the state).
This doesn't happen, if the content is set to
paragraph*
for example since then it seems the schema is working correctly.Now the question would be - is it actually correct to use text directly in a Node? From what I've seen it feels like the state drops the node internally whenever the content is empty - but our node view renderer is not reflecting that change?
Would love to hear some insight - don't need a direct solution but maybe a heads up on what could happen here and if this is even correct Prosemirror behavior / usage.
Thanks! 😀