Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/collaborne/remirror-extension-yjs
https://github.com/collaborne/remirror-extension-yjs
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/collaborne/remirror-extension-yjs
- Owner: Collaborne
- License: mit
- Created: 2021-12-21T12:25:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-01T12:39:32.000Z (almost 3 years ago)
- Last Synced: 2024-12-06T07:17:22.643Z (23 days ago)
- Language: TypeScript
- Size: 955 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @collaborne/remirror-extension-yjs
> Realtime collaboration with yjs
_Note: This is a fork for the original [@remirror/extension-yjs](https://npmjs.com/package/@remirror%2fextension-yjs), with some adjustments for Collaborne. Likely you want the original extension!_
## Installation
```sh
# npm
npm install yjs @collaborne/remirror-extension-yjs
```You will also need to install your preferred [`YjsRealtimeProvider`](https://github.com/yjs/yjs#providers).
Due to the required peer dependencies this package is not included by default when installing `remirror`.
You will also need to install your preferred yjs protocol
```sh
# npm
npm install y-webrtc
```## Usage
The following code creates an instance of this extension.
```ts
import { WebrtcProvider } from 'y-webrtc';
import { Doc } from 'yjs';
import { YjsExtension } from '@collaborne/remirror-extension-yjs';const extension = new YjsExtension({
getProvider: () => new WebrtcProvider('global', new Doc()),
});
```