🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

collaborative-monaco

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collaborative-monaco

Binding for collaborative editing support in Monaco Editor. Connects JSON CRDT str node to Monaco Editor.

latest
Source
npmnpm
Version
1.6.0
Version published
Maintainers
1
Created
Source

Collaborative editing for Monaco editor

Makes a plain Monaco editor instance collaborative by binding it to a JSON CRDT document str node. This allows multiple users to edit the same document json-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 * as monaco from 'monaco-editor';
import {Model} from 'json-joy/lib/json-crdt';

const model = Model.create(s.str('hello'));

const editor = monaco.editor.create(div, {
  value: 'hello world',
});

const unbind = 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';

const model = Model.create(s.str('hello'));

const MyComponent = () => {
  return <CollaborativeMonaco str={model.s.toApi()} />
};

Preview

  • See demo.

Keywords

monaco

FAQs

Package last updated on 16 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts