Remix.run Logo
mapt 7 hours ago

Getting that WYSIWYG editor up and running was a major stumbling block that I overcame to get my school newspaper a PHP-Nuke site ~25 years ago.

It is insane that there isn't a web standard implementation for this passed 15 years ago.

CGamesPlay 6 hours ago | parent | next [-]

There is contenteditable, which is what all these (Wordgard, ProseMirror) are fundamentally built on. The rest is just the UI, and interop with systems that don't desire arbitrary HTML as input.

atombender 4 hours ago | parent [-]

While these use contenteditable, it's not accurate to say they're just contenteditable plus some UI and interop.

None of these modern editors (Wordgard, ProseMirror, Lexical, Slate) use contenteditable for the document model. Rather, they have their own internal document model and use contenteditable as a kind of input layer where the editor monitors what the browser does, then translates that into actual edits.

Early editors like FCKEditor and TinyMCE were only wrappers around contenteditable. They used the DOM as the real document model, then intercepted certain keypresses and events and "fixed" the behavior when it wasn't correct (e.g. double enter inside a bullet list should switch to paragraph mode).

The result was rife with bugs and inconsistencies, and didn't allow for a proper split between the model and the view (e.g. to represent columns, video embeds, and so on).

rubyfan 2 hours ago | parent [-]

I’m not a historian but I think FCKEditor and TinyMCE predated contenteditable. These were solutions wrapping textarea back in the day if my memory serves me.

Tade0 2 hours ago | parent | prev [-]

For the longest time browser vendors couldn't even agree on the details of how just text selection should work.