4.2 KiB
layout | title | title_nav | description | keywords |
---|---|---|---|---|
default | Introduction to Real-Time Collaboration (RTC) | Introduction | What is RTC and what can it do | rtc introduction overview |
{{site.requires_5_9v}}
{% include rtc/rtc-description.md %}
Interactive example
The following example shows two editors that are collaborating using the {{site.productname}} 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.
{% include live-demo.html id="rtc" %}
Features of TinyMCE Real-Time Collaboration
End-to-end encryption
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 {{site.productname}} cloud services can not read any data transferred or know who is editing. Content and user data is only available to the page running {{ site.productname }}.
JSON Web Token based authentication
Some cloud services for {{site.productname}} 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 {{site.productname}} that the user has been authorized to access {{site.cloudname}} 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.
User Presence API
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 {{site.cloudname}} 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.
Overview of how TinyMCE Real-Time Collaboration works
When a new document is created
-
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.
When the editor content is changed by a user
- 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.
Getting started with Real-Time Collaboration
For instructions for getting started with {{site.productname}} Real-Time Collaboration, see: Getting started with Real-Time Collaboration (RTC).