suneditor icon indicating copy to clipboard operation
suneditor copied to clipboard

strange generated HTML

Open rozek opened this issue 1 year ago • 1 comments

Describe the bug When looking into the HTML the SunEditor generates, I am surprised by the amount of "strange" HTML code I find.

To give some examples

  • <br> at the end of a heading (just before the trailing </hx>) or a paragraph
  • &ZeroWidthSpace; in paragraphs
  • lots of unnecessary &nbsp; (which sometimes lead to strange and unexpected formatting)

To Reproduce (sorry, I cannot reproduce - there are too many of them and I usually find them long after they have been created)

SunEditor-Bug

SunEditor-Bug

rozek avatar Aug 14 '24 06:08 rozek

The unwanted <br> tag may be related to https://github.com/JiHong88/suneditor/issues/1317 and https://github.com/JiHong88/suneditor/issues/189

Additional note: if the explicit replacement of whitespace by <br> was motivated by the current cut/cop/paste behaviour, solving the clipboard problem may also allow that replacement to be removed again...

rozek avatar Aug 14 '24 08:08 rozek