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

collaborative-ace

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collaborative-ace

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

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

Ace editor collaborative editing binding

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

Usage

Installation:

npm install json-joy ace-builds collaborative-ace

Usage:

import {bind} from 'collaborative-ace';
import {Model} from 'json-joy/es2020/json-crdt';

// ...

const unbind = bind(str, editor);

// When done, unbind the binding.
binding.unbind();

React Usage

Installation:

npm install json-joy ace-builds collaborative-ace react-ace react react-dom

Usage:

You use the <CollaborativeAce> component exactly the same as the <AceEditor> component from react-ace, with the only difference that you pass a str node from a JSON CRDT document instead of a plain string value prop.

import {Model, s} from 'json-joy/lib/json-crdt';
import {CollaborativeAce} from 'collaborative-ace/lib/CollaborativeAce';

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

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

Preview

  • See demo.

Keywords

ace

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