5 ms·
I'm not sure what you mean about there being hard limits in place. While the implementation discussed here deals exclusively with paragraphs, the ideas are exte
by morgante 11y ago
I'm not sure what you mean about there being hard limits in place. While the implementation discussed here deals exclusively with paragraphs, the ideas are extensible to far more.
Quill, for example, is pretty feature-rich and has a similar model to that described here.[0]
The core idea is simple: forget about HTML, instead have your own data structure which represents a document in a saner way. Implement a series of functionally pure actions on that data structure and then map UI activity onto those actions (potentially using ContentEditable fields as an input). Then, React-style, your HTML is a pure function of the internal document structure.
I used a similar technique to build a rich text editor at a startup and we definitely didn't encounter anything which couldn't be done, including fairly complex structures (ex. quizzes with photo options and captions.). It definitely worked well and was a lot less error-prone and hacky than TinyMCE.
That being said, it was also a 6 month effort to get a full feature set in place. If you don't have that kind of time and just want something that works (and you don't need to extend it much), TinyMCE is fine.
Agreed that Markdown is a non-starter for almost anyone non-technical.
[0] https://github.com/quilljs/quill https://github.com/quilljs/quill
- andybak 11y agoI'm technical and Markdown enrages me almost daily.