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

Collaborative editing support for Monaco editor. Binds JSON CRDT "str" node to a Monaco editor instance.

NotificationsYou must be signed in to change notification settings

streamich/collaborative-monaco

Repository files navigation

Makes a plain Monaco 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 Monaco editor.

Usage

Installation:

npm install json-joy monaco-editor collaborative-monaco

Usage:

import{bind}from'collaborative-monaco';import*asmonacofrom'monaco-editor';import{Model}from'json-joy/lib/json-crdt';constmodel=Model.create(s.str('hello'));consteditor=monaco.editor.create(div,{value:'hello world',});constunbind=bind(model.s.toApi(),editor);// When done, unbind the binding.binding.unbind();

React Usage

Installation:

npm install json-joy monaco-editor collaborative-monaco @monaco-editor/react react react-dom

Usage:

import{Model,s}from'json-joy/lib/json-crdt';import{CollaborativeMonaco}from'collaborative-monaco/lib/CollaborativeMonaco';constmodel=Model.create(s.str('hello'));constMyComponent=()=>{return<CollaborativeMonacostr={model.s.toApi()}/>};

Preview

About

Collaborative editing support for Monaco editor. Binds JSON CRDT "str" node to a Monaco editor instance.

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp