[Bug]: incorrect cursor positioning when using nodePasteRule
for a custom extension
#5175
Open
1 task done
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
Affected Packages
react
Version(s)
2.4.0
Bug Description
We currently have a custom tiptap extension that acts very similar to a
Mention
. We have the following paste rules:For context, createRegexFromOptions looks like this:
This will look for specific tags like
{Name}
and convert into this custom node. When we paste text into the tiptap editor with examples of this, everything works fine, except that the cursor always ends up at the end of the last found custom node, as opposed to the end of the pasted content.Browser Used
Chrome
Code Example URL
No response
Expected Behavior
We'd expect the text to appear at the end of the pasted content, as opposed to at the end of the last found custom node.
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: