@univerjs/preset-docs-collaboration
TypeScript
import { UniverDocsCollaborationPreset } from '@univerjs/preset-docs-collaboration'createUniver({ presets: [ UniverDocsCollaborationPreset({ universerEndpoint: 'https://your-backend.example.com', univerContainerId: 'app', }), ],})The preset registers the collaboration model, browser client, client UI, and Docs history UI in that order. It therefore adds realtime editing, collaboration UI, and document version history as one composition.
universerEndpoint points to your application backend. Compose the required Univer Server SDK modules and expose their protocol routes there; the preset only registers browser plugins. Configure the History Service, Endpoint, storage, and permissions separately to enable version history.
Configuration
TypeScript
interface IUniverDocsCollaborationPresetConfig { universerEndpoint?: string univerContainerId?: string /** Automatically load the unit and type URL query parameters on startup. Defaults to true. */ enableUrlUnitLoader?: boolean}URL auto-loading is deprecated and will be removed in a later version. Set enableUrlUnitLoader: false and call loadDocAsync() after setting the current user. See Docs document loading.
How is this guide?