Introduction to Real-time Collaboration (RTC)
What is RTC and what can it doContribute to this page
Important: TinyMCE’s Real-time Collaboration (RTC) plugin will be retired and deactivated on December 31, 2023, and is no longer available for purchase.
Note: This feature is only available for TinyMCE 5.9 and later.
The Real-time Collaboration (RTC) plugin for TinyMCE allows 2 or more users to collaborate on the same content in TinyMCE at the same time.
The RTC plugin is designed to use the Tiny Cloud for communicating between the collaborator’s editors, with all data encrypted by the user’s web browser using a local encryption key. This ensures that no-one, including Tiny, can read the user’s content. The content in the editor can still be retrieved as HTML so TinyMCE can still be used for web forms, creating and editing content in Content Management Systems (CMS) and Learning Management Systems (LMS), or any application requiring a rich-text editor.
The following example shows two editors that are collaborating using the TinyMCE Real-time Collaboration plugin. All network requests made by these editors, real or simulated, are being logged to the browser console. To view the network requests, open the browser console using the F12 keyboard key and navigate to the Console tab.
Collaborator (user in the other editor):
Collaborator (user in the other editor):
The Real-time Collaboration (RTC) plugin encrypts all content sent between clients. Clients are assigned a random presence ID when they connect, which is used to transmit their cursor position, along with their JWT user ID. This means the TinyMCE cloud services can not read any data transferred or know who is editing. Content and user data is only available to the page running TinyMCE.
Some cloud services for TinyMCE require setting up JSON Web Token (JWT) authentication. JWTs are a common solution for communicating user authorization with web services. JWTs are used to communicate to TinyMCE that the user has been authorized to access Tiny Cloud services.
For general information on JWTs, visit: https://jwt.io/.
For information on using JWT authentication with the Real-time Collaboration (RTC) plugin, see: JWT authentication.
The Real-time Collaboration (RTC) plugin exports a presence API to enable tracking when users enter and leave the collaboration session. The only user information shared through the RTC server is the user id stored in the JWT
sub claim. Other details such as the user’s full name are resolved locally so the Tiny Cloud will never see who is actually connecting. User resolution is performed through the
rtc_user_details_provider option. Presence events can be received through either configuration callbacks or editor events.
- The initial content is set using the HTML within the element replaced by the editor, or using the initial content option.
The editor requests and receives the following on behalf of the user:
- A JSON Web Token (JWT) from your server.
- The encryption details from your server.
The JWT and encryption details are stored in the browser until required.
- The editor encrypts the content using the encryption details.
- The encrypted content and the JWT (but not the encryption details) are sent to the RTC server.
- The RTC server verifies that the JWT was signed by the same private key as the public key stored on the RTC server.
- Once verified, the content is sent to collaborating editors where the editor will decrypt the content using the encryption details provided when the user opened the editor.
- Once decrypted, the plugin will merge the local content and the content from the server.
- When the content is submitted, it will be sent to your server. If snapshotting option is configured, no submission is needed as snapshots of the content will be sent to your server from the editors automatically.
For instructions for getting started with TinyMCE Real-time Collaboration, see: Getting started with Real-time Collaboration (RTC).
Thanks for the feedback!
Can't find what you're looking for? Let us know.