RangeError: Content hole not allowed in a leaf node spec #4562
Replies: 3 comments
-
same error bro |
Beta Was this translation helpful? Give feedback.
-
const ImageNode = Node.create({ // your code here... }); add atom: true bro it's will fix error |
Beta Was this translation helpful? Give feedback.
-
A "content hole" is Prosmirror's way of describing how to inject content from a prosemirror managed element (i.e. a normal paragraph without a nodeview) to a nodeview managed element (like a custom paragraph component). The "hole" describes the renderHTML({ HTMLAttributes }) {
return ['element', mergeAttributes(HTMLAttributes), 0];
},
//////////////// VS
renderHTML({ HTMLAttributes }) {
return ['element', mergeAttributes(HTMLAttributes)];
}, where the In this case, specifically, the renderHTML method is correct, but you are attempting to use a content hole by providing |
Beta Was this translation helpful? Give feedback.
-
I'm getting this error I have made custom nodes in the Tip Tap editor
can you please describe us what's the issue
Beta Was this translation helpful? Give feedback.
All reactions