A collaborative rich-text editor, built in.
Rune is a rich-text editor with real-time collaboration built in. A Yjs-based layer lets many people edit one document at once — over the network or in-process — with live presence, threaded comments, tracked-change suggestions, and offline-first persistence. It stays entirely out of your bundle until you opt in, so the core editor remains dependency-free.
Live presence
cursors · selections · typingSee every collaborator's caret, selection highlight and typing indicator move in real time, each in their own colour.
Comments
anchored threadsAnchor threaded comments to any selection. They follow the text as the document changes and resolve when you're done.
Tracked suggestions
accept / reject changesSuggestion mode records edits as proposed changes. Reviewers accept or reject them inline — no overwriting each other's work.
Offline-first
IndexedDB persistenceKeep editing offline; changes persist locally and sync automatically when the connection returns. Full block coverage — incl. per-cell tables.
How collaboration works
Rune binds the editor's document to a Yjs CRDT, so concurrent edits merge without conflicts. You bring the transport — a WebSocket provider, WebRTC, or the in-process memory hub used in the demo above — and Rune handles presence, merging, and persistence.
- 01
Bind a Yjs document
Connect the editor to a Y.Doc. Every block — including per-cell table edits — is represented as shared CRDT state, so two people can type in the same paragraph without overwriting each other.
- 02
Add an awareness provider
Awareness broadcasts each user's cursor, selection, and identity. Rune renders live carets and selection highlights in each collaborator's colour, with typing indicators.
- 03
Persist and sync
Changes persist locally via IndexedDB and sync automatically when the connection returns. Comments and tracked suggestions ride on the same document, so review survives reconnects.
import * as Y from 'yjs'; import { WebSocketProvider } from '@parityfox/rune-editor/collab/provider.js'; import { bindParagraphSpike } from '@parityfox/rune-editor/collab/paragraph-binding.js'; import { bindPresence } from '@parityfox/rune-editor/collab/presence.js'; const doc = new Y.Doc(); const provider = new WebSocketProvider('ws://localhost:1234', 'my-doc', doc); bindParagraphSpike(editor, doc); bindPresence(editor, doc, provider.awareness, { name: 'Alice', color: '#2563eb', });
Turn it on in one line.
Collaboration is opt-in — the core editor ships zero dependencies until you enable it. Read the setup guide or grab the package.