[Bug]: NodeInputRules - When doc empty, inline node will be replacing whole block #4796
Open
1 of 2 tasks
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Which packages did you experience the bug in?
core
What Tiptap version are you using?
>= 2.1.4
What’s the bug you are facing?
Since this MR (2.1.4): #4341, InputPasteRules now always replace the whole block, which is fine for the one it was fixed for (HorizontalRule - a block node), but I've got a custom extension/node that is inline. Here it still inserts as if it's a block, and will thus replace the whole block (see example).
Nodes_HorizontalRule_React.Mozilla.Firefox.2024-01-17.08-46-32.mp4
What browser are you using?
Chrome
Code example
https://codepen.io/PHillemans/pen/jOJByXX?editors=1111
What did you expect to happen?
For inline Nodes I expect the cursor to also say in the same line (it should only replace the text, not also the entire P)
Anything to add? (optional)
I've seen the MR that caused this issue, and think I've already got a fix inside this PR: #4791
Please take a look and see what you think.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: