@veltdev/slate-crdt
v1.0.1
Published
Velt CRDT wrapper for Slate
Readme
Velt Slate CRDT Library
With Velt Slate CRDT Library, you can add powerful multiplayer editing and state synchronization features to any React application using Slate.
The library provides realtime collaboration primitives for Slate:
- One manager API (
createCollaboration) plus a React hook (useCollaboration) - Fully-managed on a scalable realtime backend
- Powered by Yjs (via the official
@slate-yjs/corebinding) for industry-standard conflict resolution
Features include:
- Multiplayer Editing with real-time synchronization
- Collaboration with presence and remote cursors
- Conflict Resolution ensuring document consistency across all clients
- Offline Support with automatic synchronization upon reconnection
- Version History with save, list, and restore APIs
- Collaborative Undo/Redo scoped to each user's own edits
- ... and so much more
Installation
npm install @veltdev/slate-crdt @veltdev/crdt @veltdev/client @veltdev/react react slate @slate-yjs/core yjs y-protocolsUsage
Enhance an existing Slate editor instance:
import { createCollaboration } from '@veltdev/slate-crdt';
const manager = await createCollaboration({
editorId: 'my-document-id',
editor, // your Slate editor (e.g. withReact(createEditor()))
veltClient, // initialized + authenticated Velt client
});Or use the React hook:
import { useCollaboration } from '@veltdev/slate-crdt';
const { editor, manager, synced, status, versions } = useCollaboration({
editorId: 'my-document-id',
editor: rawEditor,
});Documentation
- Read the documentation for setup guides and API references.
Use cases
The Slate CRDT library is used to power:
- Collaborative editing tools
- Real-time document workspaces
- Internal wikis and knowledge bases
- Shared meeting notes and agendas
- Any shared, mutable environment
Resources
- Explore multiplayer editing to see features like collaborative text, whiteboards, and data grids.
- Sample Apps: Check out example implementations for various use cases.
Releases
- See the latest changes.
Security
- Velt is SOC2 Type 2 and HIPAA compliant. Learn more
Community
- X: To receive updates, announcements, and general Velt tips.
