Despite my searches on SO, it appears that most questions revolve around simply making a div editable using contenteditable="true"
.
I am interested in finding the most effective method for tracking all formatting tags applied to a document. Merely toggling selected text with jQuery seems to cause issues as overlapping tags can corrupt the document after multiple edits.
Would it be more appropriate to separate each character into an array, establish a strategy for adding/modifying/removing tags based on window.getSelection()
, and then generate an output version to insert back into the editable div? Or is there a superior alternative?