Input texts should be wrapped in a tag if some of the input content has for parent the contenteditable tag.
- pasted texts should be encapsulated into a tag if it contains element for which the parent is the contenteditable tag.
- same on key pressed.
These points are for both html and source mode.
if you trigger an action on a "section" which has contenteditable for parent tag, all other sections that have contenteditable for parent tag will be impacted (if the action is dealing with parent tag of course). It is not a behavior that a user will expect, and most contenteditable editors do wrap any input text into tags to avoid this issue.
My first section
< div >My second section< / div >
My new section => if the user tries to right align this section, as we apply the action on the parent tag, the first section will be impacted too. It is not the expected user behavior. The user just want to apply the action on the new section.
< div >My third section< / div >