Offline-First Editing with CRDTs

Some code from https://github.com/yjs/yjs-demos/tree/main/codemirror


CodeMirror Demo

Yjs and Codemirror demos: y-codemirror / y-websocket / Live Demo

This is a demo of a CodeMirror 5 editor that was made collaborative with Yjs & y-codemirror. Note that CodeMirror 6 is now the latest release.

We use the y-websocket provider to share document updates through a server. There are many more providers available for Yjs - try switching to another provider. See docs.

Future work: adding offline persistence to this demo. Wouldn't it be cool if document updates are persisted in the browser, so you can load your application faster?

Quick Start

npm i
npm start
# Project is running at http://localhost:8080/