4 ms·
Indeed. Contenteditable is awful, especially when collaboration is involved, since different browsers produce different HTML. I wrote a similar rich text editor
by devongovett 11y ago
Indeed. Contenteditable is awful, especially when collaboration is involved, since different browsers produce different HTML. I wrote a similar rich text editor for the Storify editor when we introduced real time collaboration, about a year ago. We intercept all of the editing events, perform whatever actions are necessary on our internal document format, and then manually sync those changes into the DOM. Our document format is designed in a way that can be synchronized in real time using operational transformation, which is impossible to do with HTML. This is really the only way to build a good rich text editor IMO.
I'm glad Prosemirror was written, since it sounds like it does similar things. Wish it existed a year ago. ;-)