Rich text editor using contenteditable in Elm

@dkodaj Thank you for writing that! I think just setting the HTML and letting the browser handle it is great in a few ways. The biggest one in my eyes is that it side steps issues with the virtual DOM by making it always kept up to date. Also taking advantage of the built in document.execCommand behavior should mean less bugs.

I think the reason why most RTE frameworks don’t use that approach (at least the ones I mentioned above) is consistency between browsers (edit: an example after reading the execCommand documentation I think is in Safari, the header command may not work in your example in Safari because formatBlock with heading is unsupported in that browser?) and the ability to define custom behavior outside of what execCommand lets you do, like updating inline elements to whatever you’d like. This somewhat old stack overflow answer summarizes why CKEditor doesn’t use it: https://stackoverflow.com/questions/12158503/definition-of-execcommand-function-for-bold/12166267#12166267 But actually I haven’t worked out this approach, and perhaps there are ways around these issues while still using execCommand.