Quick start
Core parameters
DOM selector or element where SuperDoc will mount.
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
See the Track Changes extension for accept/reject commands, and the runnable example for a complete workflow.
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
Document 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.Web layout also forces
disableContextMenu: true to prevent long-press context menus on mobile.Show document rulers
CSS selector for the toolbar container (e.g.
'#toolbar'). Shorthand for modules.toolbar.selector.Advanced options
Additional SuperDoc extensions
Custom image upload handler
Override document content with a JSON schema. Used to load documents from a previously exported JSON representation instead of a DOCX file.
Font family used for all SuperDoc UI elements (toolbar, comments, etc.)
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 before an editor is created
Called when editor is created
Called on content changes
Called when the comments sidebar is toggled
Called when an error occurs

