Multiline text is represented by separated lines instead of separate paragraphs
Closed this issue · 5 comments
When typing three lines in Quill the ops become:
[{"insert":"a\nb\nc\n"}]
In Quill's WYSIWYG the three lines are represented by three P
paragraphs.
Actual
quill-delta-to-html
currently outputs <p>a<br/>b<br/>c</p>
, which may break the WYSIWYG aspect.
Expected
<p>a</p><p>b</p><p>c</p>
Notes
In Quill, blank lines are represented by <p><br></p>
I chose to group all consecutive inline ops as one paragraph at the beginning; some other wysiwyg editors was doing it that way and I thought it was better that way. In hindsight, I can see why making a different paragraph would make sense but I just don't feel the energy to change it back and annoy some people as well. Can't you use some CSS tricks to make them look alike?
In our case the styling is under the user‘s control. Also, there are styles (like the indentation of the first line in a paragraph) that cannot be simulated. So, this is not an option for us.
How about a config like „multiLineParagraph“ we can set to „false“?
I will do it when I can
Fixed and pushed as tag v0.10.3. Please note the breaking change
warning in the readme for releases after v0.10.0
oh, thanks for this 👍