Just for the record, we discussed something similar here:
https://groups.google.com/forum/#!msg/elm-discuss/YKz8rgffoWc/k6WIihXRBAAJ;context-place=forum/elm-discuss
Le jeudi 13 octobre 2016 10:09:58 UTC+2, Bulat Shamsutdinov a écrit :
>
> Thank you everyone! I'm currently studying Draft.js to
Thank you everyone! I'm currently studying Draft.js to see their way of
implementing rich text edit.
--
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
You should read this article to see why existing solutions generally do not
work very
well: https://medium.engineering/why-contenteditable-is-terrible-122d8a40e480
I am pretty sure draft.js has a good underlying data model that copes with
mapping to the DOM well. Perhaps looking into how that
Everything you need to do this should be available with the notable
exception of the Selection API
(https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection),
which would allow you to manipulate the cursor and selected text
programatically.
--
You received this message because
This is also what I do for a CMS'ish style of interface in something at
work, using elm-markdown to render a real-time view of what is being
created.
Even pre-markdown back in decades past I still opted two have two panes,
one where (at the time) html was put in, and the other showing the
If your users understand markdown, you could use markdown input and maybe
even render a preview.
This is what I am doing for a project of mine. (This of course circumvents
the problem of writing a rich text editor but might help with your original
problem.)
Am Montag, 10. Oktober 2016