Supported formats
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.
After initialization
Insert content into an existing document using editor commands.For new code, prefer
editor.doc.insert: it accepts a positional target and returns a typed receipt. The chain command shown below stays supported for apps already wired to activeEditor.commands.*.The content to insert. String for
html, markdown, and text. ProseMirror JSON object for schema.Exporting content
DOCX export
superdoc.export() triggers a browser download by default. If you need the raw Blob (e.g. to upload to a server), pass triggerDownload: false: otherwise you’ll get a duplicate download.Whether to automatically trigger a file download. Set to
false to get a Blob back instead.Additional files to bundle. When multiple files are exported, they are zipped together.
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
CSS classes, IDs, colors, fonts, margins, and other styling are stripped on import.
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

