Creating an instance
Instance lifecycle
API structure
- Configuration - Settings passed at creation
- Methods - Control the editor, access properties and types
- Events - Lifecycle and change notifications
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Bring your own editor UI. Use SuperDoc as the document engine underneath. Read the announcement →
import { SuperDoc } from 'superdoc';
const superdoc = new SuperDoc({
selector: '#editor',
document: 'contract.docx'
});
// 1. Creation
const superdoc = new SuperDoc(config);
// 2. Ready event
superdoc.on('ready', () => {
// Now safe to use methods
});
// 3. Runtime operations
superdoc.setDocumentMode('suggesting');
superdoc.export();
// 4. Cleanup
superdoc.destroy();
Was this page helpful?
