@sofereditor/collab
v0.2.0
Published
@sofereditor/collab — Hocuspocus binding for real-time collaboration with the Sofer editor. Bidirectional Y.Doc sync + awareness.
Downloads
55
Maintainers
Readme
@sofer/collab
Hocuspocus binding for real-time collaboration with Sofer.
npm install @sofer/collab @hocuspocus/provider yjsimport * as Y from 'yjs';
import { useCollab } from '@sofer/collab';
const ydoc = new Y.Doc();
const { status, synced, binding } = useCollab({
ydoc,
url: 'wss://your-hocuspocus-server',
name: 'doc-id',
token: jwt,
user: { name: 'Ada', color: '#f59e0b' },
});binding.awareness exposes the Y.js awareness object for cursor overlays.
License
AGPL-3.0-or-later © Rafael Marreca. Part of the Sofer editor monorepo.
