Closed Iipal closed 3 years ago
Your extension is an atom node (without text content) and it’s not clear how a paragraph (potentially with text) should be transformed to an atom node. Try insertContent
instead!
@hanspagel Thanks, removing atom: true
and using insertContent
like this:
editor.commands.insertContent(`<${AttachmentComponentExtensionName} />`);
fixes my issue.
What’s the bug you are facing?
Can't create a CustomNode from FloatingMenu
How can we reproduce the bug on our side?
call
editor.commands.setNode("CustomNodeName")
from FloatingMenu component withCustomNodeExtenstion
created withuseEditor
Can you provide a CodeSandbox?
https://codesandbox.io/s/thirsty-stonebraker-jmhoi?file=/src/App.tsx
What did you expect to happen?
Expect to see the custom component in Editor just as shown in documentation: https://tiptap.dev/guide/node-views/react
Anything to add? (optional)
Or any other solution for my problem ? To being abble create custom component even between text and draggable as well.
Did you update your dependencies?
Are you sponsoring us?