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.
Install
< link href = "https://cdn.jsdelivr.net/npm/superdoc/dist/style.css" rel = "stylesheet" >
< script type = "module" >
import { SuperDoc } from 'https://cdn.jsdelivr.net/npm/superdoc/dist/superdoc.es.js' ;
</ script >
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.
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' ,
});
< input type = "file" accept = ".docx" id = "file-input" />
< div id = "editor" style = "height: 100vh" ></ div >
< script type = "module" >
import { SuperDoc } from 'superdoc' ;
import 'superdoc/style.css' ;
document . getElementById ( 'file-input' ). addEventListener ( 'change' , ( e ) => {
new SuperDoc ({
selector: '#editor' ,
document: e . target . files [ 0 ],
});
});
</ script >
const response = await fetch ( '/api/documents/123' );
const blob = await response . blob ();
new SuperDoc ({
selector: '#editor' ,
document: new File ([ blob ], 'document.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