-1

In the editor, the Enter key has the following visual effect:

enter image description here

Hitting the Enter key once in the Quill editor results in <p>...</p> in quill.root.innerHTML.

With two consecutive Enter's, the output is now <p><br/></p>.

This resultant HTML from the above entered text would become:

enter image description here

This is quite different from how it looks when in the editor. How do people out there manage this? Do you have to massage quill.root.innerHTML or do you use some other method to display the entered content?

Old Geezer
  • 14,854
  • 31
  • 111
  • 198
  • It'd be nice if you would edit your title be some concise version of the question that you are asking, E.g., "How to display line breaks entered in Quill" or some such. – Solomon Slow Aug 17 '18 at 15:39
  • This sounds like something you should report to the developers as a bug.. – JeffUK Aug 17 '18 at 15:40

1 Answers1

0

Adding the following style:

p { margin-bottom: 0 }

will produce the almost same look as in the editor.

Old Geezer
  • 14,854
  • 31
  • 111
  • 198