Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.02k stars 614 forks source link

[Feature Request] No sloppy markup #1283

Closed timint closed 1 year ago

timint commented 2 years ago

Hi I would like to propose a change to proper HTML markup.

To turn this: <h1></h1><p>...</p><p><img src="..."></p><p><br></p>

Into:

<h1>...</h1>

<p>...</p>

<p><img src="..." /></p>

<p><br />
</p>

No sloppy coding like <img> and <br>, but instead properly <img /> and <br />. Headers, and paragraphs nicely separated by double \r\n. Line breaks <br /> with \r\n after.

Toggling the source code mode would be much nicer and effective this way.

Alex-D commented 1 year ago

I will not add something like this since it is hard to get it right.