wysiwyg-editor
wysiwyg-editor copied to clipboard
html.get() returns content without <p> tags containing zero width space character
Expected behavior.
html.get should return html content as it exists in the editor.
Actual behavior.
When keepFormatOnDelete flag is set to true, hitting the enter key at the start of a paragraph creates new lines that have a p tag with a zero-width space character
When trying to get the content with html.get, we get the paragraph but not thetags before it.
Steps to reproduce the problem.
- Open the JSFiddle https://jsfiddle.net/sndjkahdaskds/3mpyu19t/4/
- Have the browser console open
- Put your cursor at the start of the content
- Hit enter
- Hit the get html button
- Watch the result in the console
Editor version.
Reproducible in version 2 and version 3
OS.
macOS Catalina 10.15.1
Browser.
Reproducible in Firefox and Chrome
This is the same issue with table cells. If you double click the text content inside a cell to select the text and then delete it with the delete key, the content is replaced with ZeroWidthSpace. But html.get returns the HTML with the entire cell missing. I'll make another issue for this, but just wanted to bring it up here.
+1
Issue is being fixed in V4.0.5: https://froala.com/wysiwyg-editor/changelog/#4.0.5