I built a rich-text editor from scratch. No ProseMirror, no dependencies.
Almost every rich-text editor you can install today is a layer over one of a handful of engines: ProseMirror, Lexical, Slate, Quill, Draft.js. That is a sensible way to build one. I wanted to find out what happens if you don't.
So I wrote Trevixal : a WYSIWYG editor engine in about 60,000 lines of TypeScript and SCSS, with the document model, the undo system, the HTML sanitizer, the DOM renderer, the ZIP and XML writers behind Word export, and the LaTeX-to-MathML converter all written in this repository. It is Apache-2.0, and no package it ships has a runtime dependency.
Try it before you read any further: the live editor . Paste something ugly into it and see what happens. That is the best test I know.
It is a building block, not an app
Trevixal is not a finished product you send people to.…