This is something I tried to do early when 0.17 was released. So simple
overview of what I did and what happened:
1. Realized that the view needed to reflect the model (Which is obvious)
but hard in practice
* Update function resets cursor position if using contenteditable so
that was pretty much out of the question unless using innerHtml, but there
are some pain in the ass bugs there not to mention that basically bypasses
the
elm dom updates.
* iframe is a pain because creating an event handler for the input
event within the iframe requires javascript.
The obvious answer for me was to create a mapping from model to view (a
DSL), you also need to keep track of cursor position.
I tried using medium.js as inspiration.
2. Caret positioning & selections need to be stored to refocus cursor or to
keep track of where to add blocks.
I ended up not having enough time to finish this project, it still exists
somewhere under my learning projects but either way it was difficult
getting that far.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.