<SuperDocEditor> component. Only document is required.
Quick start
Document props
Document to load. Accepts a
File, Blob, URL string, or config object.Initial editing mode.
| Mode | Description |
|---|---|
editing | Full editing capabilities |
viewing | Read-only presentation |
suggesting | Track changes mode |
User’s permission level.
| Role | Can Edit | Can Suggest | Can View |
|---|---|---|---|
editor | Yes | Yes | Yes |
suggester | No | Yes | Yes |
viewer | No | No | Yes |
User props
Current user information.
All users (used for @-mentions).
UI props
Custom container ID. Auto-generated if not provided.
Hide the toolbar.
Show or hide rulers. Uses SuperDoc default if not set.
CSS class for the wrapper element.
Inline styles for the wrapper element.
Custom loading UI rendered while SuperDoc initializes.
Event callbacks
Fires when the editor is initialized and ready.
Fires when the ProseMirror editor instance is created.
Fires when the editor is destroyed.
Fires when the document content changes.
Fires on document parsing errors.
Fires on runtime errors.
Advanced props
Configure collaboration, AI, comments, PDF, whiteboard, and other modules.
The component extends
SuperDocConfig — any option from the core configuration can be passed as a prop.Props that trigger rebuild
These props trigger a full instance rebuild when changed:| Prop | Reason |
|---|---|
document | New document to load |
user | User identity changed |
users | Users list changed |
modules | Module configuration changed |
role | Permission level changed |
hideToolbar | Toolbar visibility changed |
documentMode and callbacks are handled efficiently without rebuild.
