ZSSRichTextEditor
ZSSRichTextEditor copied to clipboard
Paragraphs result in <div> sometimes
Sometimes the editor inserts
tags when inserting line breaks.
Correct Handling
- Switch to HTML View, delete all content, and switch back to editor
- Press "P" toolbar button
- Type "Test", then Return, then "Test"
- => The HTML code looks like this:
<p>Test</p>
<p>Test</p>
Wrong Handling 1
- Switch to HTML View, delete all content, and switch back to editor
- Type "Test", then Return, then "Test"
- => The HTML code looks like this:
Test
<div>Test</div>
Wrong Handling 2
- Switch to HTML View, delete all content, and switch back to editor
- Press "UL" toolbar Button
- Type "Test", then Return, then Return, then "Test"
- => The HTML code looks like this:
<ul>
<li>Test</li>
</ul>
<div>Test</div>
Wrong Handling 3
- Switch to HTML View, delete all content, and switch back to editor
- Press "P" toolbar Button
- Press "UL" toolbar Button
- Type "Test", then Return, then Return, then "Test"
- => The HTML code looks like this:
<p>
<ul>
<li>Test</li>
</ul>
<div>Test</div>
</p>
- Now, without typing anything, switch to HTML, then back to WYSIWYG, then back to HTML
- => The HTML code looks like this:
<p>
</p>
<ul>
<li>Test</li>
</ul>
<div>Test</div>
<p>
</p>
Wrong Handling 4
- Switch to HTML View, delete all content, and switch back to editor
- Press "P" toolbar Button
- Type "Test"
- Press "HR" toolbar Button
- Type "Test", then Return, then "Test"
- => The HTML code looks like this:
<p>Test</p>
<hr />Test
<div>Test</div>
The question is if
tags should always be used for line breaks?
@fabb I think that
tags should always be used for line breaks, I will have a look into this.
I am facing same issue and stuck between this <div> tag. Any progress on this or any idea how to solve this issue ?
@imsrc21 I am currently working on fixing this, so far everything I have tried hasn't worked but I am still hoping to have this fix in the next commit that I do.