guideCollaboration data

# Overview

The collaboration session starts when the first user connects to the document. The content is stored for as long as there is at least one user connected to the document. When the last user disconnects, the server will wait for 60 minutes and then delete the temporary collaboration data.

One of the steps of integrating CKEditor 5 and Real-Time Collaboration with your application is providing saving capabilities of the collaboration data to some permanent storage location and initializing the editor with a new or saved content. There are several solutions for this. This guide will cover the available scenarios of getting and setting the collaboration data.

# Temporary and permanent data

CKEditor Cloud Services remove the collaboration session data 60 minutes after the last user disconnects. This includes any content in the editor that was created by the users. To preserve your content between collaboration sessions, you need to save it on your server or use our Document storage feature.

Some of the data is stored permanently. This includes comments and user data. Thanks to this, comments content, timestamps and user details will be stored between collaboration sessions and the users are not able to modify other users’ data.

The data can be removed manually (e.g. by removing a comment, accepting a suggestion, removing the data using the REST API). Deleting the environment also removes all the data associated with this environment.

If the Document storage feature is enabled, then the collaboration session will be active for 12 hours after the last user disconnects.

# Comments and suggestions

When a user adds a new comment or suggestion, in the editor’s content you will only find a reference to it – two HTML elements marking the start and the end of the suggestion or comment with an additional ID attribute. The rest of the data (the creation time, the user name, the content of the comment etc.) is not visible in the editor data. In the case of Real-Time Collaboration plugins, the comments or suggestions metadata is sent to the Cloud Services server, where it can be securely stored and shared only with the authorized users. Thanks to this approach, users cannot modify other users’ comments and suggestions.

Any comment or suggestion created during the collaboration session is assigned to the document ID, where it was created. You cannot access its data with a different id. Similarly, you cannot access comments or suggestions created in a different environment, even if they are from the same organization or are on the same Cloud Services On-Premises server.

If you open a document containing comments or suggestions created in a collaboration session with a different documentId or in a different environment, it can result in an editor crash with one of the following errors:

  • track-changes-user-not-found
  • Cannot find suggestion abc
  • Comment thread abc not found

The accepted or rejected suggestions and deleted comments will be removed from the database when the collaboration session ends (60 minutes after the last user disconnects or 12 hours in case of enabled document storage). Keeping the data during an active collaboration session allows the users to undo their operation and restore the suggestion or comment. All metadata will be restored as well in the database.

You can use Cloud Services REST API for CRUD operations on suggestions and comments. Example use cases of the suggestions and comments CRUD operations:

  • transferring your existing content into Cloud Services databases,
  • moving the suggestions or comments data between environments,
  • moving the suggestions or comments data from one document to another,
  • adding attributes to the suggestions or comments.

Refer to the REST API documentation for more details.

# Data safety

The data stored permanently by CKEditor Cloud Services is encrypted with a key that differs for each environment. Additionally, in most cases, the system uses identifiers instead of the data that originates from the users. CKEditor Cloud Services uses encryption to protect the communication between the user and the server and provides all communication interfaces using HTTPS or WSS protocols.