User (collaboration-core)



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



  • 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.


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


    data : Object

    User data.

    Properties : String

    The ID of the user.

    data.color : Object

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

    [ ] : String

    The name of the user.

    [ data.avatar ] : String

    The URL to the user avatar.