Library/CollaborativeEditor

CollaborativeEditor

Multi-user text synchronization with broadcast edit layers and typing presence.

Advanced Build
Interactive Preview
Initialising Operative...

Architecture

Component Architecture
CollaborativeEditor/

Prop Usage

PropTypeDefaultDescription
documentIdrequired
stringUnique identifier for the shared document.
userIdrequired
stringCurrent editor user ID.
userNamerequired
stringDisplay name shown in the typing indicator.
initialContent
string""Initial text content to seed the editor.
onSave
(content: string) => voidCalled when the user explicitly saves.

Usage

import { CollaborativeEditor } from '@/ui/features/CollaborativeEditor'; <CollaborativeEditor documentId="doc:abc123" userId={user.id} userName={user.name} initialContent="Start writing here..." onSave={(text) => saveToDatabase(text)} />