News for hackers. Stuff that matters.
Re:The poor, misunderstood innerText by zimbatm on Thursday April 02, 2015 @05:49AM (#9309576)
Have you thought of intercepting keyboard strokes to maintain your own internal state of the text ?

Instead of having Keyboard-->HTML-(extract)->innerText you would have Keyboard-->innerText-(render)->HTML. Contenteditable is a honey pot, it makes you think that implementing a text editor will be easy, until you hit all the corner cases.

Re:The poor, misunderstood innerText by kangax on Thursday April 02, 2015 @07:43PM (#9313827)
Unfortunately not possible since the editor is part of a browser extension and is activated on any page with textarea/contenteditable. Text could change at any time by other scripts, and the only way to intercept those changes is via MutationObserver. MutationObserver gives you changed node and its text (without getting entire plain text, we can't really "transposition" this all onto a global text to figure out what changed).