0.17.0 • Published 5 years ago

ace-collab v0.17.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Ace Collab

Prerequisites

Make sure that you have installed:

  • NodeJS (v8.10.0)
  • npm (v3.5.2)

Usage

  1. Install ace-collab as a dependency using npm:
npm install ace-collab

Editor

  1. Import Editor from ace-collab:
import Editor from 'ace-collab'
  1. Initialize new Editor instance:
const editorConfig = {
  anchorDOM: document.querySelector('#editor'),
  mode: 'ace/mode/csharp',
  theme: 'ace/theme/monokai',
}

const editor = new Editor(editorConfig)
  1. Initialize new collab session by using init method:
const serverConfig = {
  docId: '', // Provide empty if want to create new session, provide value if want to join existing one
  host: '127.0.0.1',
  port: '3333',
  username: 'John Doe',
  ssl: false,
}
const readOnly = false // if set to true, only admin will be able to modify the code

editor.init(serverConfig, readOnly);

Server

  1. Import and run startServer function from ace-collab:
import startServer from 'ace-collab/lib/server'

const serverConfig = {
  allowedOrigins: [], // Provide empty if want to allow entrance for every host, provide string values if want to allow only few
  host: '0.0.0.0',
  port: 3333,
}

startServer(serverConfig)
0.17.0

5 years ago

0.16.0

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.2

5 years ago

0.13.1

5 years ago

0.13.1-pre0

5 years ago

0.13.0

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago