> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

By the end of this page you'll have a working DOCX editor in your app: load a Word file, edit it, export it back as `.docx`.

> [!NOTE]
>
> **Using an AI coding agent?** Run `npx @superdoc-dev/create` in your project. It writes an AGENTS.md with SuperDoc-specific instructions and MCP setup. Then see [Use SuperDoc with AI](https://docs.superdoc.dev/getting-started/ai.md) for the full path picker.

## 1. Install

> [tab] npm
>
> ```bash theme={null}
> npm install superdoc@1 @superdoc-dev/fonts
> ```

> [tab] React
>
> ```bash theme={null}
> npm install superdoc@1 @superdoc-dev/react@1 @superdoc-dev/fonts
> ```

> [tab] CDN
>
> ```html theme={null}
> <link href="https://cdn.jsdelivr.net/npm/superdoc@1/dist/style.css" rel="stylesheet">
> <script src="https://cdn.jsdelivr.net/npm/superdoc@1/dist/superdoc.min.js"></script>
> ```
>
> `SuperDoc` becomes a global: use `new SuperDoc({...})` directly.

> [!NOTE]
>
> `@superdoc-dev/fonts` serves SuperDoc's bundled fallback fonts so Word fonts render without copying assets. It's optional. See [Font support](https://docs.superdoc.dev/getting-started/fonts.md).

## 2. Render the editor

> [tab] JavaScript
>
> ```html theme={null}
> <div id="editor" style="height: 100vh"></div>
>
> <script type="module">
>   import { SuperDoc } from 'superdoc';
>   import { superdocFonts } from '@superdoc-dev/fonts';
>   import 'superdoc/style.css';
>
>   const superdoc = new SuperDoc({
>     selector: '#editor',
>     fonts: superdocFonts,
>   });
> </script>
> ```

> [tab] React
>
> ```jsx theme={null}
> import { SuperDocEditor } from '@superdoc-dev/react';
> import { superdocFonts } from '@superdoc-dev/fonts';
> import '@superdoc-dev/react/style.css';
>
> export default function App() {
>   return <SuperDocEditor fonts={superdocFonts} />;
> }
> ```

That's a blank editor. Give it a document.

## 3. Load a document

Pass a URL, a `File` from an input, or a `Blob` from your API to `document`.

> [tab] URL
>
> ```javascript theme={null}
> new SuperDoc({
>   selector: '#editor',
>   document: '/files/contract.docx',
> });
> ```

> [tab] File input
>
> ```javascript theme={null}
> document.getElementById('file-input').addEventListener('change', (e) => {
>   new SuperDoc({
>     selector: '#editor',
>     document: e.target.files[0],
>   });
> });
> ```

> [tab] Fetch
>
> ```javascript theme={null}
> const response = await fetch('/api/documents/123');
> const blob = await response.blob();
>
> new SuperDoc({
>   selector: '#editor',
>   document: new File([blob], 'document.docx'),
> });
> ```

Tracked changes, tables, images, headers/footers: all working.

## 4. Export it

Default `superdoc.export()` triggers a browser download. To upload to your backend instead, ask for the raw `Blob`:

> [tab] Download
>
> ```javascript theme={null}
> await superdoc.export();
> ```

> [tab] Upload to backend
>
> ```javascript theme={null}
> const blob = await superdoc.export({ triggerDownload: false });
> await fetch('/api/save', { method: 'POST', body: blob });
> ```

For HTML, JSON, or Markdown output, see [Import and export](https://docs.superdoc.dev/getting-started/import-export.md).

## What are you building?

| You want to... | Start here |
| - | - |
| Embed Word editing in a web app | This page (already done) |
| Build a custom toolbar/sidebar | [Custom UI](https://docs.superdoc.dev/editor/custom-ui/overview.md) |
| Use SuperDoc's built-in toolbar/comments | [Built-in UI](https://docs.superdoc.dev/editor/built-in-ui/overview.md) |
| Edit DOCX from backend code | [Document Engine SDK](https://docs.superdoc.dev/document-engine/sdks.md) or [CLI](https://docs.superdoc.dev/document-engine/cli.md) |
| Let Claude/Cursor edit DOCX files | [AI > MCP](https://docs.superdoc.dev/ai/mcp/overview.md) |
| Add real-time collaborative editing | [Collaboration](https://docs.superdoc.dev/editor/collaboration/overview.md) |

## What's next

> [card] [Custom UI](https://docs.superdoc.dev/editor/custom-ui/overview.md)
>
> Build your own React toolbar, comments sidebar, and review panel

> [card] [Document Engine](https://docs.superdoc.dev/document-engine/overview.md)
>
> Programmatic DOCX editing from Node, Python, CLI, or AI agents

> [card] [Framework guides](https://docs.superdoc.dev/getting-started/frameworks/react.md)
>
> React, Vue, Nuxt, Angular, Laravel, Vanilla JS

> [card] [Examples](https://github.com/superdoc/docx-editor/tree/main/examples)
>
> Working demos on GitHub


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.