newline character is auto removed by quill
See original GitHub issueSteps for Reproduction
- I am using quill and while rendering the text in quill, last newline character gets removed automatically.
<p>Sales S2s</p><ul><li>Provide over sight over overall sales activities of the desk</li></ul><p><br></p>
. This is the string I am rendering to quill.
Expected behavior:
- last tag
<p><br></p>
should not be removed
Actual behavior:
- last new line br tag is removing while calling setContents function in quill
Platforms: IE, Chrome, Win7
Technologies Angular with Typescript
Version: Quill.1.3.6
Issue Analytics
- State:
- Created 5 years ago
- Reactions:23
- Comments:11
Top Results From Across the Web
Quill Adding Unwanted Line Breaks to Posted Text <p><br></p>
When pasting or typing text Quill is adding unnecessary line breaks to ... newline character is prepended in the delta object for the...
Read more >unwanted line break (\n) in Quill pre-1 after first character typed
When creating an editor, then clicking in it and tapping the first character, quill introduces a line break "automatically", ...
Read more >API - Quill Rich Text Editor
Sets contents of editor with given text, returing a Delta representing the change. Note Quill documents must end with a newline so one...
Read more >quill-2.0-dev | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >Quill: The DOM, Parchment, and Delta views of the document
The most remarkable thing with the Quill editor, ... that relate to blocks are applied only to the newline character(s) in the the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was my silly solution:
It works pretty well… Unfortunately, Quill seems to find any
</br>
,<br>
, or<br/ >
tag I put inside that. Even<p><span /></p>
gets removed. They are pretty good at catching any non-text content in a set of<p></p>
at the end of the paragraph.‍
is the “Zero Width Joiner” that is used in Unicode for languages that have no space between certain unicode characters. Languages like Arabic need the ability to join the two characters together with no space. It’s mostly okay for my use-case.This was my silly solution: if onChange‘s source === ’api‘, return.