Loading a document
Pass anything that looks like a document to thedocument option:
Exporting
Defaultsuperdoc.export() triggers a browser download. To upload to your backend instead, ask for the raw Blob:
Format tradeoffs
DOCX preserves tracked changes, comments, complex tables, and section breaks. HTML and Markdown are structure-first: they don’t preserve Word-specific formatting.
What should I store in my backend?
Store the DOCX blob if you want full fidelity (recommended). Store JSON if you want programmatic search/diff and don’t need round-tripping with Word users. Don’t store HTML or Markdown unless you accept losing fidelity.Common pitfalls
- Duplicate downloads.
superdoc.export()triggers a browser download by default. If you want to upload to a backend, pass{ triggerDownload: false }: otherwise you get the file twice. - HTML import without a base DOCX. The
htmlandmarkdownoptions need adocument(a base.docx) for styles. Without one, headings and lists fall back to defaults. - HTML round-trips lose styling. Importing HTML, exporting DOCX, and then importing the resulting HTML back will not produce the original Word styling. For round-tripping, use DOCX or JSON.
Where to next
- Editor > SuperDoc > Import/Export: full API reference (every option, every export flag)
- Editor > SuperDoc > Configuration:
document,html,markdown,jsonOverrideconfig - Editor > SuperDoc > Methods:
superdoc.export(),getHTML(),getJSON(),getMarkdown() - Document Engine: server-side import/export via SDKs and CLI
- Editor > Collaboration > Storage: persistence patterns for collaborative docs

