Pure Elm rich text editor

I doubt there is a way to achieve that with pure Elm, you really need to use IME. We discussed this here:

I found these articles to be informative around some on the difficulties of handling input:

https://codemirror.net/doc/internals.html