SuperDoc
The document engine for DOCX files.
Render and edit DOCX files in the browser. Use the same Document API for server-side automation and agent workflows.
Built directly on OOXML. Edits write back to the XML without an HTML conversion step.
Quick start
npm install superdoc
SuperDoc mounts into elements you provide, so the page needs both before it runs:
<div id="superdoc-toolbar"></div>
<div id="superdoc"></div>
import 'superdoc/style.css';
import { SuperDoc } from 'superdoc';
const superdoc = new SuperDoc({
selector: '#superdoc',
toolbar: '#superdoc-toolbar',
document: '/sample.docx',
documentMode: 'editing',
});
document accepts a URL, a File, or a Blob. Omit it to start with a blank
DOCX. See the documentation or the
React quick start for next
steps.
What SuperDoc does
- DOCX-native. Pagination, sections, headers, footers, and tables stay
- Browser editing. View, edit, suggest, comment, track changes, and
- One Document API. Query, target, change, and inspect receipts in the
- Agent-ready operations. Agents use supported document operations instead
Why V2 is DOCX-native
SuperDoc V1 used ProseMirror as its authoritative browser editing model. A DOCX is a package of related XML parts, relationships, and assets rather than one editor tree. Server use required a simulated browser DOM, and collaboration needed a separate synchronization layer for the rest of the package.
V2 uses an OOXML-backed document model. It reads progressively, renders bounded windows, runs without a browser DOM, and synchronizes document content and package state through one collaboration model.
Contributing
Community contributions start with an issue. Bug reports, feature requests, and technical investigations are welcome. Pull requests are limited to repository collaborators. Read the contributing guide for why and how to help, or join Discord for questions. Report suspected security vulnerabilities privately through GitHub Security Advisories.
Contributors
Thank you to everyone who has helped us build and improve the SuperDoc editor.
License
AGPLv3 for open source use. A commercial license is available for proprietary deployments.
Created and maintained by SuperDoc