slab / quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility
https://quilljs.com
BSD 3-Clause "New" or "Revised" License
42.3k stars 3.31k forks source link

Custom softbreak problem #4228

Open PAkhidue opened 1 month ago

PAkhidue commented 1 month ago

Hello! Just upgraded in my project from Quill 1.3.7 to 2.0.2 and noticed, there's a problem when putting a softbreak at the end of a block.

Steps for Reproduction

Here's a fiddle about the bug: https://jsfiddle.net/PascalAkh/0jat739b/7/

Expected behavior: When pressing the first button in the fiddle it should simply create one list-item with a softbreak both texts.

Actual behavior: It creates two list-items. I've created a matcher in the fiddle that you can uncomment. After that, it creates only one list-item with a softbreak inbetween. But now when you press the right button, it completly breaks when there is a
at the end of a block. (<li>test...<br></li>) (Most likely because there is no \n at the end)

Platforms:

Version:

Quill version: 2.0.2

Thanks for reading! I hope we can find a fix for this.

lkalinowski commented 1 month ago

I have problems with softbreak everywhere. As far as I get is working softbreak in editor but when loading new quill instance with initial content containing softbreak, they are converted into paragraphs :/