Skip to main content

Documentation Index

Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

From zero to a working DOCX editor in under two minutes.
1

Install

npm install superdoc
2

Mount the editor

<div id="editor" style="height: 100vh"></div>

<script type="module">
  import { SuperDoc } from 'superdoc';
  import 'superdoc/style.css';

  const superdoc = new SuperDoc({
    selector: '#editor',
  });
</script>
That’s a blank editor. Now give it a file.
3

Load a document

Pass a URL, a File from an input, or a Blob from your API.
new SuperDoc({
  selector: '#editor',
  document: '/files/contract.docx',
});
You now have a fully functional DOCX editor — tracked changes, tables, images, headers/footers, all working.

Using React?

import { SuperDocEditor } from '@superdoc-dev/react';
import '@superdoc-dev/react/style.css';

function App() {
  return <SuperDocEditor document={file} />;
}
Install with npm install @superdoc-dev/react. If you need to pin the underlying superdoc version, use overrides (or pnpm.overrides) in your app’s package.json. See the full React guide.

What’s next

Framework guides

React, Vue, Angular, Vanilla JS

Configuration

Modes, roles, toolbar, and more

Import / Export

Load and save DOCX files

Examples

Working demos on GitHub