Cannot instantiate a custom Node #1955
Unanswered
ebuychance
asked this question in
Questions & Help
Replies: 1 comment
-
Ok seems I got past the instantiation error - looked closer to what I was passing. Works on the static content, just not the paste? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I want to be able to paste some html for a custom variable node and have it rendered as said node onPaste.
I created a customNode following the tiptp beta 2 documentation and Node wrapper class.
Then in the
editorProps
handlePaste
method I check the pasted HTML and try to create a custom node and insert it.I fail to create the custom node at this point.
Steps to reproduce the bug
Steps to reproduce the behavior:
<span class='a-variable' data-id='company' title='test' data-val='amazon'>amazon</span>
CodeSandbox
I created a CodeSandbox to help you debug the issue:
https://codesandbox.io/s/tiptap-issue-template-forked-hs0c6?file=/src/components/Tiptap.vue
Expected behavior
pasted HTML should create a new custom Node and render accordingly.
Screenshot, video, or GIF
Environment?
Additional context
I think maybe I could move the handlePaste into the CustomNode? Any insight is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions