How to keep the dom structure of nested html #2270
Answered
by
philippkuehn
wkl007
asked this question in
Questions & Help
-
Hi everyone, I just started to learn TipTap. I have a problem, how to keep the dom structure of nested html . This is the test url. I create a SpanMark const SpanMark = Mark.create({
name: "SpanMark",
priority: 110,
parseHTML() {
return [
{
tag: "span",
},
];
},
renderHTML() {
return ["span", mergeAttributes({}), 0];
},
}); I set the TipTap content: <span>123<span>456</span></span> Tiptap analysis result is: <span>123456</span> I want to get the result: <span>123<span>456</span></span> Please help me , Thank you so much !!! |
Beta Was this translation helpful? Give feedback.
Answered by
philippkuehn
Dec 13, 2021
Replies: 1 comment 5 replies
-
Marks can’t be nested. You probably want to register an inline node for it. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
wkl007
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Marks can’t be nested. You probably want to register an inline node for it.