User (collaboration-core)
@ckeditor/ckeditor5-collaboration-core/src/users
The representation of a single user that is involved in document editing.
Filtering
Properties
-
avatar : String | undefined
module:collaboration-core/users~User#avatar
The URL pointing to the image with the avatar of the user.
If avatar is not set, default avatar is used.
-
CSS colors classes object for the user.
-
id : String
module:collaboration-core/users~User#id
The ID of the user.
-
initials : String
module:collaboration-core/users~User#initials
The initials of the user.
The initials are composed from the user name's first and last words:
- for
Joe Doe
, the initials areJD
, - for
Anonymous
the initials areA
, - for
Katie John-Newman
the initials areKJ
, - for
Adam Daniel Smith
the initials areAS
.
- for
-
isAnonymous : Boolean
module:collaboration-core/users~User#isAnonymous
Is
true
for the anonymous user,false
otherwise. -
name : String
module:collaboration-core/users~User#name
The name of the user.
Methods
-
constructor( data = { data.id, data.color, [data.name], [data.avatar] } )
module:collaboration-core/users~User#constructor
Parameters
data : Object
User data.
Propertiesdata.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.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.