API 參考

@univerjs/preset-docs-collaboration

此 API 頁面目前提供英文內容。程式碼簽名與識別符不隨介面語言變更。
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  enableDefaultConflictUI?: boolean}

enableDefaultConflictUI defaults to true. Set it to false when your application handles the CollaborationConflict event and protects unacknowledged edits before reloading. See plugin and preset configuration.

你覺得這篇文檔如何?

© 2026 DreamNum Co., Ltd.