Word in web is a pure JS docx editor/renderer benched against MS Word directly. This was largely inspired by Eigenpal going closed source, and some personal frustrations I had with working on complex Word templates, pleading papers, etc... and not having a clean way to view/edit them without owning MS Word (which I did just eventually buy but it sucked).
This was also an exercise in highlighting the value of good evals for Agents to bench against. Instead of just throwing the OOXML standard at an agent and letting it spin, I put together a large corpus of Microsoft Word docs - converted them to pdf and then rasterized them to images. The eval then compared the image diffs measuring the actual differences in the actual pixels. This let me (and more importantly, the agent) catch a lot of the edge cases and optimize aggressively while preventing 'whack a mole' style regressions that would have made this project a lot harder.
Edit: I forgot to mention two things, 1. I published the full eval, including the raw diffs and delta over time so you can see all of the fixtures I actually tested against.
2. On the DX side, it ships as a typed React package and runs entirely in the browser. You can use it as a viewer or editor, customize the styling and visible toolbar features, build your own controls against the API, and decide where the edited DOCX bytes are saved, so it’s relatively easy to drop into another project
This is great. It works well for some docx files I have that don't work well in LibreOffice or any other non MS word. I do also have one that splits across 2 pages that I got down to 1 in MS word.
Thank you for developing this AND thanks a ton for making it Open Source with the MIT license.
Yep all of that was exactly my problem too lol - if you have any docs that render poorly make an issue and I'll work on supporting it.
Very cool!! I'll give it a spin! I've been using a similar approach for building a tool for agents to drive a running instance of MS word. The closed-testing loops are very powerful with agents.
I had this problem too - I just found that the inconsistency of the the LLM vision + pressure of either having to write OOXML from scratch, or control the app via computer use just didn't really give great results (mostly words fault). Ultimately, for non browser DOCX creation I had more success using some kind of IR that compiles to OOXML.
I’m impressed! Did you fork Eigenpal docx editor and build on top?
No this was built ground up.
edit: not to toot my own horn here - but I am definitely squeezing out more perf on longer documents. My upper end bench mark document was ~500 pages and key presses, new line creation etc. all sits around 20ms with this package.
Thanks for this. Looking fwd to try it out.
May I inquire about privacy? All stays local in browser?
yes, projects are saved to local storage in the demo.
Rad. Thanks for sharing! Will give it a spin and check out the repo.
I didn’t know I wanted this until now. Great work.
This is excellent.
Deserves a lot more Github stars!
[dead]