All configuration options and events for real-time collaboration. If you need to combine collaboration with headless SDK automation, see SDK collaboration sessions.Documentation Index
Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
You manage the Yjs provider: works with SuperDoc Yjs, Liveblocks, Hocuspocus, etc.Use
modules.collaboration = { ydoc, provider } when the editor should start
in collaboration mode. If you want to open the document locally first and
create a shared room later, use
superdoc.upgradeToCollaboration()
instead.Your Yjs document instance
Any Yjs-compatible provider
User configuration
Current user information for presence/awareness
Color palette for user cursors and selections. Users are automatically assigned colors from this palette.
Media upload
Handle image uploads in collaborative documents:Events
onCollaborationReady
Fired when collaboration sync is complete.
onAwarenessUpdate
Fired when users join, leave, or update their presence.
states array item properties:
| Property | Type | Description |
|---|---|---|
clientId | number | Unique session ID |
name | string | User’s display name |
email | string | User’s email |
color | string | Assigned cursor color (hex) |
onLocked
Fired when the document is locked or unlocked.
| Property | Type | Description |
|---|---|---|
isLocked | boolean | Whether the document is locked |
lockedBy | Object | User who locked the document |

