wysiwyg-editor
wysiwyg-editor copied to clipboard
Highlighting text in a table cell and then deleting it with the delete key causes onChange to return the HTML with the cell missing, even though it's visible in the editor..
Expected behavior.
When you highlight the text in a table cell and then delete the text with the delete key, the cell should contain a <br> instead of ZeroWidthSpace. This causes the onChange function and html.get to return the HTML with the cell completely missing.
Actual behavior.
The cell contains "ZeroWidthSpace" and the onChange function and html.get returns the HTML with that cell completely missing.
Steps to reproduce the problem.
Create a table. Type some text inside a cell. Double click the text in the cell to highlight it. Then using the delete key to delete that selected text. The onChange method and html.get returns the HTML without the cell (<td>).
Editor version.
4.0.11
OS.
Mac OS Monterey
Browser.
Chrome
I'm pretty sure that this issue is the same: https://github.com/froala/wysiwyg-editor/issues/3822
The only difference is that he's noticing this with p
tags while I'm noticing it with td
tags. However, it's a lot more obvious when an empty table cell is removed versus when an empty p
tag is removed.
This is also happening with a href links. Backspacing and then adding texts will add empty links. Really bad for SEO!
Uploaded a video to show this
https://user-images.githubusercontent.com/97922713/232941500-34689624-7e2f-4e9b-9fd9-a3a410bca295.mov
Also completely undistinguishable, not even a space is present, you can't even highlight the section to remove it. You will only be able to remove it by backspacing the correct location.