make less assumptions about the Y.js provider, fix #70
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
# CollaborationCursor
|
||||
[](https://www.npmjs.com/package/@tiptap/extension-collaboration-cursor)
|
||||
[](https://npmcharts.com/compare/@tiptap/extension-collaboration-cursor?minimal=true)
|
||||
|
||||
This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if there’s one).
|
||||
|
||||
Open this page in multiple browser windows to test it.
|
||||
@@ -39,4 +42,4 @@ yarn add @tiptap/extension-collaboration-cursor
|
||||
:::warning Public
|
||||
The content of this editor is shared with other users.
|
||||
:::
|
||||
<demo name="Extensions/CollaborationCursor" highlight="11,38-44" />
|
||||
<demo name="Extensions/CollaborationCursor" highlight="11,39-45" />
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Collaboration
|
||||
|
||||
[](https://www.npmjs.com/package/@tiptap/extension-collaboration)
|
||||
[](https://npmcharts.com/compare/@tiptap/extension-collaboration?minimal=true)
|
||||
|
||||
@@ -21,9 +20,9 @@ yarn add @tiptap/extension-collaboration yjs y-websocket
|
||||
```
|
||||
|
||||
## Settings
|
||||
| Option | Type | Default | Description |
|
||||
| -------- | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| provider | `Object` | `null` | A Y.js network connection, for example a [y-websocket](https://github.com/yjs/y-websocket) instance. |
|
||||
| Option | Type | Default | Description |
|
||||
| -------- | -------- | ------- | ----------------------------- |
|
||||
| document | `Object` | `null` | An initialized Y.js document. |
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
@@ -47,4 +46,4 @@ yarn add @tiptap/extension-collaboration yjs y-websocket
|
||||
:::warning Public
|
||||
The content of this editor is shared with other users.
|
||||
:::
|
||||
<demo name="Extensions/Collaboration" highlight="10,26-27,34-36" />
|
||||
<demo name="Extensions/Collaboration" highlight="10,27-28,35-37,44" />
|
||||
|
||||
Reference in New Issue
Block a user