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:
Hans Pagel
2021-10-28 10:00:16 +02:00
committed by GitHub
parent 85cec0d4da
commit b004f1e21d
5 changed files with 54 additions and 38 deletions

View File

@@ -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