setUserInfo

Release 3.3.0+

Sets the user information used by the editor.

setUserInfo({ id?: string; name?: string; color?: string; userData?: Object; }): void

Parameters

NameTypeDescription
idstringUser id
namestringUser name
colorstringDisplay color for the user
userDataObjectAdditional user-related info

Example

window.editor.setUserInfo({
  id: 'editor',
  name: 'editor',
  color: '#3C39B8',
  userData: {
    userId: 'userId',                    // e.g. user identifier
    connected: Date.now(),               // e.g. connection time
    profileImage: '/img/path.png'        // e.g. profile image URL
  }
});