I'm working on a rich content editor. Configuration is set to adding a <p> tag as paragraph separator:
document.execCommand('defaultParagraphSeparator', false, "p");
I have to insert special <span contenteditable='false'> sections:
document.execCommand('insertHTML', false, "<span contenteditable='false'>...</span>");
Insertions are not done as expected.
I expect :
<p>something <span>...</span></p>
I got :
<p>something </p>
<span>...</span>
I can't figure out why the span tag is not inserted in the p tag. Any idea?