Open marsee339 opened 2 weeks ago
Describe the bug
After editor.blocksToHTMLLossy - the stylization of both blocks has been correctly preserved
<p data-text-color="red">All text</p> <p><span data-text-color="red">Part </span>of text</p><p></p>
After editor.tryParseHTMLToBlocks - the color (text or background) attributes for 'p' will be removed, but they will remain for span
<p>All text</p> <p><span data-text-color="red">Part </span>of text</p><p></p>
To Reproduce Reproduced on the demo https://www.blocknotejs.org/docs/editor-api/converting-blocks#parsing-html-to-blocks with first markup
Or create 2 blocks with a style, e.g. The first block has the text (or background) color set for the whole block, the second block only for part of the text
Describe the bug
After editor.blocksToHTMLLossy - the stylization of both blocks has been correctly preserved
After editor.tryParseHTMLToBlocks - the color (text or background) attributes for 'p' will be removed, but they will remain for span
To Reproduce Reproduced on the demo https://www.blocknotejs.org/docs/editor-api/converting-blocks#parsing-html-to-blocks with first markup
Or create 2 blocks with a style, e.g. The first block has the text (or background) color set for the whole block, the second block only for part of the text