tiptap
tiptap copied to clipboard
[Bug]: Mention extension - copy/pasting mention nodes from same input turns into plain text instead of node
Which packages did you experience the bug in?
extension-mention
What Tiptap version are you using?
2.2.1
What’s the bug you are facing?
From v2.1.12, I was able to copy existing mention nodes and paste them into the same input. Now, the pasted mentions turn into plain text. I'm not sure if this is expected.
It's easy to replicate with official docs: https://tiptap.dev/docs/editor/api/nodes/mention
What browser are you using?
Chrome
Code example
https://tiptap.dev/docs/editor/api/nodes/mention
What did you expect to happen?
When mentioning a user into the input, then copying, then pasting back into the input, I'd a 2nd mention to appear.
It turns into plain text instead.
Anything to add? (optional)
No response
Did you update your dependencies?
- [X] Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- [ ] Yes, I’m a sponsor. 💖
I think this issue is similar to my one. I got incorrect output when I did renderHTML
a document including Mention.
d43c4772496681fccbaeeccfc72aa34c5d8ff2dc's change is not apply HTMLAttributes of renderHTML like data-type
, data-id
. So that can't parsed as Mention.
I temporarily fixed this this by set options.renderHTML
to return string.
This PR #4980 would fix this bug when it gets merged.