I have two custom nodes that are of type block*
, each node has a different type.
Whenever I delete the paragraph between the two, they auto join although they have different node types (names). How to prevent this?
{
"type": "doc",
"content": [
{
"type": "customNode1",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello World1"
}
]
}
]
},
{
"type": "paragraph"
},
{
"type": "customNode2",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello World12"
}
]
}
]
}
]
}
nodes:
export default Node.create({
name: 'customNode1',
group: 'block',
content: 'block*',
selectable: true,
defining: true,
parseHTML() {
return [
{
tag: 'customNode1',
},
];
},
renderHTML({ HTMLAttributes }) {
return ['customNode1', mergeAttributes(HTMLAttributes), 0];
},
addNodeView() {
return VueNodeViewRenderer(Component);
},
});
thanks.