@veltdev/quill-crdt-react
v1.0.1
Published
React wrapper for collaborative Quill editors backed by Velt CRDT.
Readme
@veltdev/quill-crdt-react
React wrapper for collaborative Quill 2 editors backed by Velt CRDT.
Install
npm install @veltdev/quill-crdt-react @veltdev/quill-crdt @veltdev/react @veltdev/types quill quill-cursors react react-domLoad Quill CSS in your app:
import 'quill/dist/quill.snow.css';Usage
import { VeltProvider } from '@veltdev/react';
import { QuillCrdtEditor } from '@veltdev/quill-crdt-react';
export function Editor() {
return (
<VeltProvider apiKey="YOUR_API_KEY">
<QuillCrdtEditor documentId="shared-quill-doc" />
</VeltProvider>
);
}API
useCollaboration(config)returns manager state and safe wrapper methods.QuillCrdtProviderprovides the hook value through React context; read it withuseCollaborationContext().QuillCrdtEditorcreates Quill client-side from a React ref.CollaborationManager,createCollaboration, and the base type set are re-exported from@veltdev/quill-crdt.
Runtime Notes
This package does not duplicate the base manager, content, Store, Yjs, y-quill, cursor, selection, highlight, version, persistence, force reset, or REST logic.
The component dynamically imports quill and quill-cursors, so SSR apps should render it only in the browser.
Demo
The repository demo verifies multi-user rich-text edits, Delta-attribute formatting, selections/cursors, highlights, versions, persistence, force reset, cleanup/remount behavior, and REST integration.
