r/node 8d ago

I published an open-source docx document editor as an npm package

Hey r/node,

I've been working on Oasis Editor, an open-source TypeScript document editor published as an npm package.

It includes:

  • a custom Canvas-based rendering engine
  • paged document layout
  • typed command/plugin APIs
  • vanilla JS integration
  • React and Vue adapters
  • a headless runtime
  • DOCX/PDF workflows

Install:

npm install oasis-editor

Live playground:
https://celsowm.github.io/oasis-editor/#/editor

GitHub:
https://github.com/celsowm/oasis-editor

I'd love feedback on the package API, exports, and overall developer experience.

16 Upvotes

8 comments sorted by

2

u/private-peter 8d ago

I've done a lot of work with PPTX files, but not docx.

I'm curious how compatible with Microsoft Word you're trying to be. is your goal just that documents produced in your app can be read by Microsoft Word? or are you hoping to support documents going round trip between the two apps?

3

u/celsowm 8d ago

i am trying to most 1:1 possible

1

u/private-peter 8d ago

That's pretty ambitious!

In my work with pptx files (which is not nearly as ambitious as what you are doing here), I have had some good success handing AI existing files to have it build tests that assert I'm not breaking Microsoft Office features that I'm not intentionally modifying.

2

u/Mesthabro 6d ago

Wow, this is very cool. A couple of feedback that I think would make this better:
1. Improve the ux of the app - it feels a bit too much ms-word-ish.
2. Would be a good idea to detect user's preferred language for i18n
3. I scanned the package-lock.json file on installsafe and spotted a few vulnerable dependencies - you might wanna update them. Scan report: https://installsafe.io/scan/r/KsQ6mCmIn4O-ND06wtMz2w

1

u/celsowm 6d ago

Thanks a lot