Giter Club home page Giter Club logo

sharedb-ace's Introduction

Sharedb-ace

https://badge.fury.io/js/sharedb-ace.svg

Sharedb-ace provides two-way bindings between ShareDB and Ace Editor.

Installation

Using npm:

npm install sharedb-ace

Using pre-compiled js from unpkg CDN:

<script src="https://unpkg.com/sharedb-ace@latest/dist/sharedb-ace.min.js"></script>

Documentation

Please see here for internals documentation.

Single Ace-editor Instance

Setup the ShareDB document as a string:

ShareAce.on('ready', function() {
  ShareAce.add(editor, [], [ Plugins, Here ]);
});

Multiple Ace-editor Instances

Your setup may be more complex, and requires the use of multiple ace-instances synchronized over one connection. Setup the ShareDB document to be a JSON object.

For example:

{
  "foo": "",
  "bar": ""
}

Next, connect the two paths to two separate ace editor instances:
ShareAce.on('ready', function() {
  ShareAce.add(editor1, ["foo"], []);
  ShareAce.add(editor2, ["bar"], []);
});

Developing sharedb-ace

  1. Fork or clone this repo:
git clone https://github.com/jethrokuan/sharedb-ace.git
cd sharedb-ace && yarn install

Generating JS Docs

We generate javascript documentation using inline documentation.

jsdoc source/*.js --destination ./docs/

sharedb-ace's People

Contributors

jethrokuan avatar raynoldng avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.