y-prosemirror

The official Yjs binding for the ProseMirror rich-text editor, enabling real-time collaboration

Library
npm
v1.3.7
467 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 96
Maintenance 100
Community 80
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 88
Code Quality 85
Innovation 87
Learning Curve 62

y-prosemirror is the binding library that connects Yjs — a CRDT (conflict-free replicated data type) framework — to ProseMirror, the extensible rich-text editor toolkit. It provides a ProseMirror plugin (ySyncPlugin) that keeps a ProseMirror document in sync with a shared Yjs document, along with additional plugins for collaborative cursors/awareness and CRDT-aware undo/redo.

Because ProseMirror’s own undo history isn’t CRDT-safe (concurrent edits from multiple users break naive undo stacks), y-prosemirror ships a dedicated yUndoPlugin that understands Yjs’s operation history, making it possible to build Google-Docs-style collaborative editors on top of ProseMirror without hand-rolling conflict resolution.

What You Get

  • ySyncPlugin - keeps the ProseMirror editor state synchronized with a shared Yjs document
  • yCursorPlugin - renders other collaborators’ cursors and selections in real time
  • yUndoPlugin - a CRDT-aware undo/redo manager that correctly handles concurrent multi-user edits
  • Transformers for converting between ProseMirror and Yjs document representations
  • Works with any Yjs-compatible network provider (WebRTC, WebSocket, y-websocket, etc.) for the actual transport

Common Use Cases

  • Building real-time collaborative document editors (Notion/Google Docs-style) on top of ProseMirror
  • Adding live multi-cursor presence and selection highlighting to a shared rich-text document
  • Offline-first collaborative editing where edits made offline merge conflict-free once reconnected
  • Powering collaboration features in higher-level editors built on ProseMirror, such as Tiptap or BlockNote

Under The Hood

Architecture: The library is organized as a set of independent ProseMirror plugins (sync-plugin.js, cursor-plugin.js, undo-plugin.js) that each subscribe to Yjs document update events and translate them into ProseMirror transactions, and conversely intercept ProseMirror transactions to apply them onto the shared Yjs type. A transformers/ directory handles the bidirectional mapping between ProseMirror’s node/mark tree and Yjs’s XmlFragment/XmlElement CRDT types, which is the core technical challenge the library solves.

Tech Stack: Plain modern JavaScript (ES modules, type: module), built with Rollup and type-checked via TypeScript’s tsc against hand-written .d.ts declarations rather than being authored in TypeScript directly; depends on yjs and prosemirror-* packages as peers.

Code Quality: The tests/ directory includes dedicated suites for complex scenarios — overlapping marks, attributed nodes, delta conversion, and cursor behavior — reflecting the genuinely hard edge cases in reconciling two independent document models. An ARCHITECTURE.md and CAVEATS.md document known limitations and design decisions explicitly, which is unusually transparent for a library of this size.

API Design: Usage requires wiring several plugins into a ProseMirror EditorState (ySyncPlugin(yXmlFragment), yCursorPlugin(awareness), yUndoPlugin()), plus understanding both ProseMirror’s and Yjs’s own concepts — a real learning curve, though the maintained demo apps (blocknote-demo, tiptap-demo) provide working reference integrations that shortcut a lot of that ramp-up.

Used by 11 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 1 months ago
TypeScript
95%
AGPL 3.0

Docmost

CMS · Collaboration · Note Taking

21,801

Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.

View details
89
Repo Health
70
Technical
69
Dependency
Built with
TypeScript 95%
Updated 1 weeks ago
TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,808

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
HTML 13%
Svelte 13%
Updated 1 weeks ago
TypeScript
61%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,797

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 61%
Svelte 34%
Updated 1 weeks ago
Python
51%
AGPL 3.0

LearnHouse

CMS · Learning Management

2,301

Open-source LMS with AI tutoring, real-time collaboration boards, live code execution, and built-in course monetization — self-hosted in minutes.

View details
90
Repo Health
77
Technical
66
Dependency
Built with
Python 51%
TypeScript 48%
Updated 1 weeks ago
TypeScript
98%
Other

Novu

Developer Tools

40,084

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,337

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
79
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
Python
37%
Other

Open WebUI

AI Agents · AI Assistants

153,390

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python 37%
Svelte 34%
JavaScript 21%
Updated 1 weeks ago
TypeScript
97%
Other

Outline

Collaboration · Knowledge Management

40,729

A fast, real-time collaborative knowledge base for growing teams built on React, Node.js, and ProseMirror.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers