How to prevent two same adjacent mark merging into one? #4759
-
For example we have the following text in the editor: ABC Select "A" and call <foo>A</foo>BC Then select "B" and do the same we now have <foo>AB</foo>C I'm wondering whether there is a way to prevent them merging into a single mark, producing the following HTML? <foo>A</foo><foo>B</foo>C I tried to define the custom extension as Node but it seems that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
OK I found a simple solution: just add different attributes to them. <foo data-id="a">A</foo><foo data-id="b">B</foo>C |
Beta Was this translation helpful? Give feedback.
-
I have a content string as : but tiptap is merging them as : It is removing inner span which has class. just for reference I have already created a custom span node which will support all types attributes. Does anybody have any solution how can I prevent them from merging when they are nested as above? |
Beta Was this translation helpful? Give feedback.
OK I found a simple solution: just add different attributes to them.