Important changes to Tiny Cloud pricing > Find out more

RTC events

List of all available RTC specific events.

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.

Note: These events are subject to change based on customer feedback.

RtcUserConnected

This event is fired when a user enters the session.

Event fields: RtcUserConnected

Field Type Description
userId string Unique user ID of the connecting user.
caretNumber integer Caret number assigned to the user.
custom object Custom data object provided by the rtc_custom_user_details option, sent from the connecting user client.

Example of using the RtcUserConnected event

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'rtc',
  setup: (editor) => {
    editor.on('RtcUserConnected', ({userId, caretNumber, custom}) => {
      console.log(`User connected userId:${userId}`);
    });
  }
})

RtcUserDisconnected

This event is fired when a user leaves the session.

Event fields: RtcUserDisconnected

Field Type Description
userId string Unique user ID of the disconnecting user.
caretNumber integer Caret number assigned to the user.
custom object Custom data object provided by the rtc_custom_user_details option, sent from the disconnecting user client.

Example of using the RtcUserDisconnected event

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'rtc',
  setup: (editor) => {
    editor.on('RtcUserDisconnected', ({userId, caretNumber, custom}) => {
      console.log(`User disconnected userId:${userId}`);
    });
  }
})

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.