Editor: Value is not set to null
if quill content is e.g. <h2><br></h2>
instead of <p><br></p>
#14864
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Describe the bug
The primeng quill wrapper can correctly set the ng controls value to
null
in case the html content of quill is<p><br></p>
. However when pasting smth like<h2>Title</h2>
and deleting it again, quills internal "empty" placeholder is not<p><br></p>
but<h2><br></h2>
. primeng only checks for the paragraph case, so this case is not recognized as empty and required validators that check for''
ornull
don't work as expected.I added a reproducer where I initialized the form with
<h2><br></h2>
. Pasting the content results in the same issue. Type something, delete it again: theh2
stays and quill doesn't recognize the editor as empty.Environment
Quill 1.3.7
Reproducer
https://stackblitz.com/edit/github-isihci-fen4k8?file=src%2Fapp%2Fapp.component.html
Angular version
17.2.2
PrimeNG version
17.7.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
Not applied
Browser(s)
No response
Steps to reproduce the behavior
See reproducer
Expected behavior
The wrapper recognizes actually empty content as empty and writes
null
to the controls value.The text was updated successfully, but these errors were encountered: