I'm using QuillJS text editor which uses document.createElement
to create things like <p>
, <br>
and <img>
. However, I need these to be closed because I need them to be in XHTML format. Is it possible to use JS to self-close the elements that do not require a closing tag?
It doesn't matter if it is done on the client side or server side. If it can be done through PHP, NodeJS or client-side JS, I'd like to know how.