slab / quill

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

<br> tags are converted to p tags #4194

Open CharlieGreenman opened 2 months ago

CharlieGreenman commented 2 months ago

This is an old issue: https://github.com/quilljs/quill/issues/3065

It was closed as a result of quill 2 via the automated quill bot. I just want to say it is still an issue and that we should look into.

Note, this is also that HTML with a <br> tag will be converted to a <p> tag on quill render as well.

Thank you

kozi commented 2 months ago

Is there currently a good workaround for this?

CharlieGreenman commented 2 months ago

Is there currently a good workaround for this?

I am using tiptap instead

kozi commented 2 months ago

Is there currently a good workaround for this?

I am using tiptap instead

But this is only a "core"-library where I still have to do some things myself, right?

Basically, I think the quill editor is good. However, I wonder how such an essential functionality as <br> or SHIFT+RETURN is not supported.

CharlieGreenman commented 2 months ago

Nope, with tiptap more functionality than quill. I've already solved the br problem with tiptap via importing one of the tiptap extensions.

Napam commented 4 weeks ago

I experience issues with <br> not showing up as well.

In quill 1.3 i used the quill.root.innerHTML to store the quill value (the HTML would be used in other places, so using the Delta format was just inconvenient). But I can't now in quill 2 since the lists aren't semantic HTML anymore, so now I use quill.getSemanticHTML(), but that function removes the <br> tags.