Quick Start
Core Parameters
DOM selector or element where SuperDoc will mount
javascript selector: '#editor' // or selector: document.querySelector('.my-editor') Document to load.Can be a
Document (Object), string or FileUse
documents array for multiple documents insteadMultiple documents to load (alternative to single
document)Unique identifier for this SuperDoc instance
Auto-generated UUID if not provided
User & Permissions
Current user information
All users with document access. Used for @mentions and collaboration.
User permission level
Initial document mode
Viewing-mode visibility controls for standard comments
Viewing-mode visibility controls for tracked changes
Override permission checks for comments and tracked changes
Return
false to block an action. Return true or undefined to fall back to the built-in permission matrix.Modules
Configure optional modules
Collaboration Module
Real-time collaboration settings
Comments Module
Comments system configuration
Toolbar Module
Toolbar configuration
Appearance
Document title for exports and display
Colors for user awareness and highlighting
Built-in palette provided by default
Enable page-based layout
Consider using
viewOptions for more control over document layoutDocument view options for controlling layout
Use
'web' for mobile devices and WCAG AA reflow compliance (Success Criterion 1.4.10). When set to 'web', the layout engine is automatically disabled.Legacy layout mode option from v0.x. Mapped values:
'paginated'→viewOptions: { layout: 'print' }'responsive'→viewOptions: { layout: 'web' }
Legacy margin configuration from v0.x.
Show document rulers
DOM element for toolbar
Alternative to
modules.toolbar.selectorAdvanced Options
Additional SuperDoc extensions
Learn how to create your own extensions
here.
Custom image upload handler
Telemetry configuration
Prevent default DOCX styles from being applied
Disable custom context menus
Content Security Policy nonce
Event Handlers
All handlers are optional functions in the configuration:Called when SuperDoc is ready
Called when editor is created
Called on content changes

