tiptap/docs/src/docPages/api/extensions/collaboration.md

36 lines
1.3 KiB
Markdown
Raw Normal View History

2020-08-20 21:33:16 +08:00
# Collaboration
2020-10-28 23:49:44 +08:00
The Collaboration extension enables you to collaborate with others on one document. The implementation is based on [Y.js by Kevin Jahns](https://github.com/yjs/yjs), which is the coolest thing to [integrate collaborative editing](/guide/collaborative-editing) in your project.
:::premium Pro Extension
2020-12-01 19:03:50 +08:00
We kindly ask you to [sponsor our work](/sponsor) when using this extension in production.
2020-10-28 23:49:44 +08:00
:::
## Installation
```bash
2020-10-30 21:24:16 +08:00
# with npm
2020-12-01 19:03:50 +08:00
npm install @tiptap/extension-collaboration yjs y-websocket
2020-10-30 21:24:16 +08:00
# with Yarn
2020-12-01 19:03:50 +08:00
yarn add @tiptap/extension-collaboration yjs y-websocket
```
## Settings
2020-12-01 19:03:50 +08:00
| Option | Type | Default | Description |
| -------- | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| provider | `Object` | `null` | A Y.js network connection, for example a [y-websocket](https://github.com/yjs/y-websocket) instance. |
## Commands
*None*
## Keyboard shortcuts
*None*
## Source code
[packages/extension-collaboration/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-collaboration/)
## Usage
2020-09-27 03:04:33 +08:00
:::warning Public
The content of this editor is shared with other users.
:::
2020-12-01 19:03:50 +08:00
<demo name="Extensions/Collaboration" highlight="10,26-27,34-36" />