quill-html-edit-button icon indicating copy to clipboard operation
quill-html-edit-button copied to clipboard

<br> tags are replaced incorrectly

Open athulak opened this issue 1 year ago • 0 comments

In default case

Default Block tag is "P" tag. ✅

quill-html-edit-button replaces <br> tag with <p> </p> ie;

<p><strong>Test1</strong></p><p><br></p><p>Test2</p>

replaced with

<p><strong>Test1</strong></p><p> </p><p>Test2</p>   ✅ works ok (🤔)

(⚠️ notice how <br> is removed)


In case when default Block tag is changed ❌

Default Block tag is "SPAN" tag.

const Block = Quill.import('blots/block')
Block.tagName = 'SPAN'
Quill.register(Block, true)
<span><strong>Test1</strong></span><span><br></span><span>Test2</span>

replaced with

<span><strong>Test1</strong></span><span> </span><span>Test2</span> ❌ not ok

athulak avatar Jun 02 '23 14:06 athulak