@remirror/extension-yjs
TypeScript icon, indicating that this package has built-in type declarations

3.0.15 • Public • Published

@remirror/extension-yjs

Realtime collaboration with yjs

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

# yarn
yarn add yjs @remirror/extension-yjs

# pnpm
pnpm add yjs @remirror/extension-yjs

# npm
npm install yjs @remirror/extension-yjs

You will also need to install your preferred YjsRealtimeProvider.

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

# yarn
yarn add y-webrtc

# pnpm
pnpm add y-webrtc

# npm
npm install y-webrtc

Usage

The following code creates an instance of this extension.

import { WebrtcProvider } from 'y-webrtc';
import { Doc } from 'yjs';
import { YjsExtension } from '@remirror/extension-yjs';

const extension = new YjsExtension({
  getProvider: () => new WebrtcProvider('global', new Doc()),
});

Dependents (2)

Package Sidebar

Install

npm i @remirror/extension-yjs

Weekly Downloads

26,776

Version

3.0.15

License

MIT

Unpacked Size

99.7 kB

Total Files

10

Last publish

Collaborators

  • ocavue
  • ifiokjr