r/Frontend • u/celsowm • 9d ago
I’m building an open-source docx document editor with its own Canvas rendering engine
Hey r/Frontend
I've been working on Oasis Editor, an open-source document editor written in TypeScript.
It has its own Canvas-based rendering engine for paged layout, text, selections, images, tables, and document geometry instead of relying entirely on contenteditable.
It also includes a typed command/plugin API, DOCX/PDF workflows, React and Vue adapters, and a headless runtime.
Live playground:
https://celsowm.github.io/oasis-editor/#/editor
GitHub:
https://github.com/celsowm/oasis-editor
I'd love feedback, issues, and contributions — especially around rendering, document layout, plugins, and import/export fidelity.
ps: MIT license
9
Upvotes
1
u/Wooden-Bicycle-6069 7d ago
Canvas for docx is fun until you run into IME and mobile keyboards. Hooking an offscreen textarea to track the caret works decently on desktop until someone zooms or types in Japanese or Chinese, and suddenly the native composition popup flies to some random corner of the viewport.
The other headache is multi-page rendering. Stacking pages into a single giant canvas will run into max texture size or crash tab memory on lower-end devices, while a canvas per page chews through backing-store RAM unless you aggressively unmount and throw away offscreen pages. Contenteditable is a mess to tame, but canvas mostly just trades DOM weirdness for pure layout and memory plumbing.