This guide outlines two primary use cases for integrating with the collab-provider.
- Full Integration: FE Events and BE API Calls
- For scenarios requiring both front-end events and back-end API interactions, the back-end APIs are hosted by
pf-collab-service
. To determine if API calls are necessary, please refer to the OpenAPI documentation, specifically under theService to Service
section.
- For scenarios requiring both front-end events and back-end API interactions, the back-end APIs are hosted by
- Partial Integration: FE Events Only
- For scenarios where only front-end events are needed, without back-end API interactions.
- Full Integration: FE Events and BE API Calls
- Ensure the provider is initialized with:
-
DocumentService
fromdocument-service.ts
-
Api
fromapi.ts
-
- Ensure the provider is initialized with:
- Partial Integration: FE Events Only
- Ensure the provider is initialized with:
-
NullDocumentService
fromnull-document-service.ts
-
NullApi
fromnull-api.ts
-
- Ensure the provider is initialized with:
For a detailed comparison of these integration approaches, refer to the source code in ../platform/packages/editor/collab-provider/src/provider/index.ts
// Full integration
- setup({getState, onSyncUpError}: {getState: () => EditorState; onSyncUpError?: SyncUpErrorFunction;})
// Partial Integration, initialize the provider with passing config isPresenceOnly as true
- setupForPresenceOnly(clientId: string)
If you have further questions or require assistance, please reach out to the #team-cc-editor-services on Slack.