Class

User (collaboration-core)

@ckeditor/ckeditor5-collaboration-core/src/users

class

The representation of a single user that is involved in document editing.

Filtering

Properties

  • avatar : String | undefined

    The URL pointing to the image with the avatar of the user.

    If avatar is not set, default avatar is used.

  • color : Color

    CSS colors classes object for the user.

  • id : String

    The ID of the user.

  • initials : String

    The initials of the user.

    The initials are composed from the user name's first and last words:

    • for Joe Doe, the initials are JD,
    • for Anonymous the initials are A,
    • for Katie John-Newman the initials are KJ,
    • for Adam Daniel Smith the initials are AS.
  • isAnonymous : Boolean

    Is true for the anonymous user, false otherwise.

  • name : String

    The name of the user.

Methods

  • constructor( data = { data.id, data.color, [data.name], [data.avatar] } )

    Parameters

    data : Object

    User data.

    Properties
    data.id : String

    The ID of the user.

    data.color : Object

    A helper object to generate CSS classes with the user color in the UI.

    [ data.name ] : String

    The name of the user.

    [ data.avatar ] : String

    The URL to the user avatar.