Important: The Real-Time Collaboration beta is invite only. For information on joining the beta, visit the RTC beta access page.
Prerequisites
- A Tiny Cloud API key from Tiny Account.
- A JSON Web Token (JWT) key generated at https://apps.tiny.cloud/my-account. Temporarily store the generated keys for use in the following procedure.
Basic RTC setup
The following example shows how to get the RTC plugin up and running using hardcoded values. For a production setup, the document ID and secret would be retrieved from your server. This example also assumes that a JWT provider endpoint exists at ‘/jwt’. For information on setting up a JWT endpoint, see: JWT authentication.
const yourDocumentId = 'some-document-id';
const yourSecretKey = 'your secret key';
tinymce.init({
selector: 'textarea',
plugin: 'rtc',
rtc_document_details_provider: () => Promise.resolve({ documentId: yourDocumentId }).
rtc_encryption_provider: ({documentId, sessionId}) => {
return Promise.resolve({ key: yourSecretKey });
},
rtc_token_provider: () => {
return fetch('/jwt', {
method: 'POST'
});
},
rtc_snapshot: ({version, html}) => console.log(version, html)
})
Additional resources
The following resources provide additional information on setting up the RTC plugin for TinyMCE.
- For information on JSON Web Tokens (JWT) and setting up JWT authentication for the RTC plugin, see: JWT authentication.
- For details on the available configuration options, see: Configuration Options.
Need help?
Tiny is striving to make RTC as useful and simple as possible. For support related issues, such as problems with JWT authentication and implementing RTC, contact Tiny Support.
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.