You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Break blot for empty newlines is rendered as <p><br></p> in the editor, which correctly shows multiple sequential newlines, but this becomes <p></p> when converted to HTML with getSemanticHTML(). This causes a discrepancy in the output.
Steps for Reproduction
Visit the Quill playground
Enter some newlines
Check inspector
Run getSemanticHTML()
Expected behavior:
Semantic HTML will include <br> tags
Actual behavior:
Semantic HTML does not include <br> tags
Platforms:
Tested on MacOS Sonoma on Firefox and Chrome
Version:
2.0.1
The text was updated successfully, but these errors were encountered:
I would appreciate if anyone has a quick fix to this that can be implemented with Parchment/Registry. I don't want to have to do replaceAll() on the HTML output to fix this.
Hey ^^, One way i found was to make the p become a div, and then replace the empty <div></div> with <div><br></biv> when i export the html using the getSemanticHTML()
You can use this to make the p tag become a div and then when you want to export you can do this quill.getSemanticHTML().replace(/<div><\/div>/g, '<div><br></div>')
The Break blot for empty newlines is rendered as
<p><br></p>
in the editor, which correctly shows multiple sequential newlines, but this becomes<p></p>
when converted to HTML withgetSemanticHTML()
. This causes a discrepancy in the output.Steps for Reproduction
getSemanticHTML()
Expected behavior:
Semantic HTML will include
<br>
tagsActual behavior:
Semantic HTML does not include
<br>
tagsPlatforms:
Tested on MacOS Sonoma on Firefox and Chrome
Version:
2.0.1
The text was updated successfully, but these errors were encountered: