Supported formats
| Format | Import | Export | Round-Trip | Use Case |
|---|---|---|---|---|
| DOCX | Full | Full | Perfect | Word documents |
| JSON | Full | Full | Perfect | Programmatic control |
| HTML | Structure only | Structure only | Visual only | Web content, AI output |
| Markdown | CommonMark | CommonMark | Visual only | Documentation, AI output |
| Text | Plain text | Plain text | Perfect | Simple content |
HTML and Markdown imports preserve structure (headings, lists, links, tables) but strip CSS styles.
Importing content
At initialization
Pass content when creating the SuperDoc instance.The document to load. Strings are treated as URLs. Files and Blobs are used directly.
HTML content to initialize the editor with. Requires a
document for styles.Markdown content to initialize the editor with. Requires a
document for styles.ProseMirror JSON to override the document content with.
After initialization
Insert content into an existing document using editor commands.The content to insert. String for
html, markdown, and text. ProseMirror JSON object for schema.Content type:
'html', 'markdown', 'text', or 'schema'Exporting content
DOCX export
Formats to export
'external' to include comments, 'clean' to remove all commentsCustom filename without extension
Whether to automatically trigger a file download. Set to
false to get a Blob back instead.Export as final version (applies tracked change mode)
Color for field highlights in the exported document
Additional files to bundle. When multiple files are exported, they are zipped together.
Filenames for additional files
HTML export
HTML export is structure-only. Custom CSS styling and Word-specific formatting are not included.
JSON export
jsonOverride.
Markdown export
HTML element mapping
| HTML Element | Imported As | Notes |
|---|---|---|
<h1> to <h6> | Word heading styles | Requires styles in the base document |
<p>, <div> | Normal paragraph | |
<strong>, <b> | Bold | |
<em>, <i> | Italic | |
<a href="..."> | Hyperlink | |
<ul>, <ol> | Word lists | Nesting supported |
<table> | Word table | Structure only |
<img src="..."> | Image | URL preserved |
<blockquote> | Quote style | If style exists in document |
style="text-align: ..." | Alignment | Inline alignment is preserved |
Markdown element mapping
Supported:- Headings (
#through######) - Bold/italic (
**bold**,*italic*) - Ordered and unordered lists
- Links
[text](url) - Images
 - Code blocks
- Blockquotes
>
- Tables, footnotes, task lists, custom syntax extensions

