Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1
streamich/collaborative-codemirror
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Makes a plain Codemirror editor instance collaborative by binding it to a JSON CRDTdocumentstr node. This allows multiple users to edit the same documentjson-joy JSON CRDT document concurrently through the Codemirror editor.
Installation:
npm install json-joy codemirror collaborative-codemirrorUsage:
import{EditorView}from'codemirror';import{bind}from'collaborative-codemirror';import{Model,s}from'json-joy/lib/json-crdt';// Create a JSON CRDT model.constmodel=Model.create(s.str(''));// Create a Code Mirror editor instance.consteditor=newEditorView({parent:div});// Connect Code Mirror editor to JSON CRDT document "str" node.constunbind=bind(model.s.toApi(),editor);// When done, unbind the binding.binding.unbind();
- Seedemo.
About
Codemirror support for collaborative editing using JSON CRDT
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Contributors2
Uh oh!
There was an error while loading.Please reload this page.