In the aloha project we are experimenting with new ways to deal with the contentEditable problem that you may find interesting:
* state-based, serializable, replayable change tracking for contentEditable (as opposed to command-based the way it is usually done) using MutationObservers where available: https://github.com/alohaeditor/Aloha-Editor/blob/howling-mad/src/undo.js * React-like virtual-DOM, where a javascript-object tree can be updated without actually touching the DOM (in a referentially-transparent and optionally lazy fashion), and coupled with a very simple difference algorithm can be used to update the dom with a single function call: https://github.com/alohaeditor/Aloha-Editor/blob/howling-mad/src/boromir.js On Tuesday, April 22, 2014 12:58:38 PM UTC+2, Paul Butcher wrote: > After working my way through the various samples and tutorials out there, I’m > about to start on my first Om app (yay!). > > > Possibly foolishly, I’m planning to make heavy use of contentEditable. In > essence, what I need to do is replicate something similar to Word’s “track > changes” functionality. Ideally, I’d like to get this to play nicely with > Om’s undo - the complication being that as well as changes made by the app, > I’d also need to undo changes made by the user (ideally wrapping changes made > by both into a single logical undo). > > > I’ve done quite a bit of searching, and getting React to play nicely with > contentEditable seems to be a largely unexplored area? Chas Emerick’s message > on the React mailing list seems to capture the current state of the art: > > > https://groups.google.com/d/msg/reactjs/ff5YlPKiqmc/ngDTsk_i2mYJ > > > Although this looks promising: > > > http://stackoverflow.com/a/22678516/268371 > > > Is there anything else that I should be aware of? Any words of wisdom or > advice before I dive into this (including “don’t use Om for this - it’s the > wrong tool for the job” :-)? > > > > > > > -- > paul.butcher->msgCount++ > > Silverstone, Brands Hatch, Donington Park... > Who says I have a one track mind? > > http://www.paulbutcher.com/ > LinkedIn: http://www.linkedin.com/in/paulbutcher > Skype: paulrabutcher > > > Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel > http://pragprog.com/book/pb7con -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
