News for hackers. Stuff that matters.
Re:Ask HN: How to write a rich text editor? by Leftium on Monday October 24, 2022 @11:00PM (#33325655)
https://prosemirror.net/: A toolkit for building rich-text editors on the web

ProseMirror was written by Marijn Haverbeke, who also wrote (and rewrote!) the much used [CodeMirror] editor. So the design of his "editor toolkits" are based on years of experience developing and maintaining text editors. Marijn is very responsive on all the respective discussion boards.

Examples, including markdown: https://prosemirror.net/examples/

Depending on your design, CodeMirror may be the better choice, especially if you want "parsing." The core of CodeMirror is based on [Lezer], a custom parser designed for editors. ProseMirror is meant to be the rich text editor, but I found my TaskPaper clone was more suited for CodeMirror because it was more focused on plain text. I suppose it would be possible to combine Lezer with ProseMirror, but ProseMirror already has its own [document model].

[CodeMirror]: https://codemirror.net/

[Lezer]: https://lezer.codemirror.net/

[document model]: https://prosemirror.net/docs/guide/#doc

There are no comments on this comment yet.