'Quill editor loading content with linebreaks issue
I'm using quill editor v 1.3.7 inside primeng Editor. There is a strange behavior with whitespaces before an element. First line is my inout, second line is the content of the editor after reloading the stored string of step 1.
<p>line1</p><p><br></p><ul><li>e1</li><li>e2</li></ul>
<p>line1</p><p><br></p><p><br></p><ul><li>e1</li><li>e2</li></ul>
So I store the content with one linebreak before the lit element, after reloading the content quill editor adds an extra linebreak. Does anybody know how to fix this?
Solution 1:[1]
I was facing the similar issue. On debugging the problem, I found that the problem was occurring because of the faulty CSS.
In the styles.scss, I was trying to override the ul and ol attributes to add custom margin for block-start and block-end. This was the main culprit due to which the extra line break was automatically getting introduced on the editor at the time the data was being populated into it.
On removing the custom css, it fixed the issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Manas Agrawal |
