@remirror/extension-yjs

Realtime collaboration with yjs

Usage no npm install needed!

<script type="module">
  import remirrorExtensionYjs from 'https://cdn.skypack.dev/@remirror/extension-yjs';
</script>

README

@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()),
});