Shared data types for building collaborative software
A CRDT framework with a powerful abstraction of shared data
Yjs is a CRDT implementation that exposes its internal
data structure as shared types. Shared types are common data types like Map
or Array with superpowers: changes are automatically distributed to other
peers and merged without merge conflicts.
Yjs is network agnostic (p2p!), supports many existing rich text editors, offline editing, version snapshots, undo/redo and shared cursors. It scales well with an unlimited number of users and is well suited for even large documents.
:construction_worker_woman: If you are looking for professional support, please consider supporting this project via a "support contract" on GitHub Sponsors. I will attend your issues quicker and we can discuss questions and problems in regular video conferences. Otherwise you can find help on our community discussion board.
Please contribute to the project financially - especially if your company relies on Yjs.
This repository contains a collection of shared types that can be observed for changes and manipulated concurrently. Network functionality and two-way-bindings are implemented in separate modules.
| Name | Cursors | Binding | Demo |
|---|---|---|---|
| ProseMirror | ✔ | y-prosemirror | demo |
| Quill | ✔ | y-quill | demo |
| CodeMirror | ✔ | y-codemirror | demo |
| Monaco | ✔ | y-monaco | demo |
| Ace | ✔ | y-ace | |
| Slate | ✔ | slate-yjs | demo |
| BlockSuite | ✔ | (native) | demo |
| Lexical | ✔ | (native) | demo |
| BlockNote | ✔ | y-prosemirror | demo |
| Tiptap | ✔ | y-prosemirror | demo |
| Milkdown | ✔ | y-prosemirror | demo |
| Superdoc | ✔ | (native) | demo |
| valtio | valtio-yjs | demo | |
| immer | immer-yjs | demo | |
| mutative | mutative-yjs | demo | |
| React | react-yjs | demo | |
| React / Vue / Svelte / MobX | SyncedStore | demo | |
| mobx-keystone | mobx-keystone-yjs | demo | |
| PSPDFKit | yjs-pspdfkit | demo | |
| Rows n'Columns | ✔ | @rowsncolumns/y-spreadsheet |
Tools that extend the core functionality of Yjs.
y-utiUndoManager: undo/redo deletes too much after a deleted type is restored (redone item merged with neighbour)
v13.6.29 causes incorrect event paths with multiple deep observers
Denial of Service vulnerability: run-length encoding can be exploited to lock JS threads
A throwing event handler permanently breaks future document events and observers
Undo can restore sequence items with unreachable right origins
Deleting non-empty Y.Map child from Y.Map triggers YMapEvent with **empty Y.Map** as `oldValue`.
ydocs with a lot of deleted map entries (tombstones) leak memory
discuss.yjs.dev is down - Let's Encrypt https certificate expired 5 days ago
README should mention "updateV2" event
YXmlElement.clone() only copies string attribute values / does not support numbers