slab / quill

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

Bug: Quill duplicates empty paragraph on init under certain circumstances #2079

Closed appelgran closed 6 months ago

appelgran commented 6 years ago

An empty row in Quill looks like <p><br></p>. If such a empty row exists before a heading and one has choosen to comment out/remove the .ql-editor p, ... .ql-editor h6 { margin: 0; } reset rule then Quill inserts another empty row.

Steps for Reproduction

  1. Visit https://jsfiddle.net/pLxzdktL/3/

Expected behavior: There should be one empty row between the paragraphs and the headings in the Quill editor.

Actual behavior: There are two empty rows between the paragraphs and the headings in the Quill editor.

Platforms: Tested on current Firefox and Chrome on Win10.

Version: 1.3.6

appelgran commented 6 years ago

Setting the css rule previously mentioned to margin: 1em 0; does solve the problem. But I'm happy to have the browsers default margins and why shouldn't I be able to?

Haaxor1689 commented 4 years ago

Finally found solution to this and many related issues. https://github.com/quilljs/quill/issues/1379#issuecomment-396114612

TetianaNazarova commented 3 years ago

::ng-deep .ngx-quill-editor p > br display: none p:not(:last-of-type) margin-bottom: 1rem

quill-bot commented 6 months ago

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray: