Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Codemirror support for collaborative editing using JSON CRDT

NotificationsYou must be signed in to change notification settings

streamich/collaborative-codemirror

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.

Usage

Installation:

npm install json-joy codemirror collaborative-codemirror

Usage:

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();

Preview

About

Codemirror support for collaborative editing using JSON CRDT

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp