3 ms·
Everyone who's ever build on top of contenteditable has war stories, my first bash with it was about 19 years ago. But tools like Prosemirror and Lixical solve
by samwillis 3y ago
Everyone who's ever build on top of contenteditable has war stories, my first bash with it was about 19 years ago. But tools like Prosemirror and Lixical solve most of those issues and separate the content from the presentation. 99% of the time they do what you want, but that 1% is impossible (page breaks!). Personally I'm a fan of TipTap, it's a great abstraction over the lower level complexities of Prosemirror. The TipTap/ProseMirror/Yjs combination is insanely good for being able to build collaborative editing.
Amused by the nod to the Ladybird WASM idea at the end, I'm taking credit for that: https://news.ycombinator.com/item?id=35521878 https://news.ycombinator.com/item?id=35521878. Good ideas spread. (Joe, apologies for not getting back to your email, it's been a rather busy few months)
- ignoramous 3y agoOnce Flutter fully supports WASM, then that's another viable path forward, as well: https://docs.flutter.dev/platform-integration/web/wasm https://docs.flutter.dev/platform-integration/web/wasm
- unshavedyak 3y agoAs someone interested in exploring this area -- specifically writing a very thin input highlighter/wysiwyg-lite thing -- i keep hearing about war stories but i'm curious how much people have discussed it, talked about it, etc. Are there any documented best-practices for writing your own? (aside from "don't" hah) I get that common wisdom says it is kind of insane, but i'd like to learn why, concretely. It's possible a fraction of what i want is not the "hard part", so i feel compelled to at least explore it.
- braden-lk 3y agoWe use Tiptap/Prosemirror/Yjs at LegendKeeper. It’s a great setup, but TipTap is a very shallow abstraction over PM. (Not knocking it at all, it’s still a great library.) To anyone looking at Tiptap, just know you’ll need to learn Prosemirror pretty thoroughly, too, if you want to do more sophisticated stuff.