Important changes to Tiny Cloud pricing > Find out more

Getting started with RTC

Getting started with RTC

Contribute to this page

Important: The Real-Time Collaboration beta is invite only. For information on joining the beta, visit the RTC beta access page.

Prerequisites

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.

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.