Use the new storage feature for the CollaborationCursor extension (#2096)
* extension-collaboration-cursor: make use of the new storage feature, deprecate users command and onUsers callback, clean up * docs: update the jobs page
This commit is contained in:
@@ -43,11 +43,15 @@ A render function for the cursor, look at [the extension source code](https://gi
|
||||
|
||||
## Commands
|
||||
|
||||
### user()
|
||||
An object with the attributes of the current user. It expects a `name` and a `color`, but you can add additional fields, too.
|
||||
### updateUser()
|
||||
Pass an object with updated attributes of the current user. It expects a `name` and a `color`, but you can add additional fields, too.
|
||||
|
||||
```js
|
||||
editor.commands.user({ name: 'Philipp Kühn', color: '#000000' })
|
||||
editor.commands.updateUser({
|
||||
name: 'Philipp Kühn',
|
||||
color: '#000000',
|
||||
avatar: 'https://unavatar.io/github/philippkuehn',
|
||||
})
|
||||
```
|
||||
|
||||
## Source code
|
||||
|
||||
Reference in New Issue
Block a user