A set of react components for Ace / Brace

React-Ace

A set of react components for Ace / Brace.

Live Demo

http://securingsincity.github.io/react-ace/

http://securingsincity.github.io/react-ace/split.html

Install

npm install react-ace

Basic Usage

import React from 'react';
import { render } from 'react-dom';
import brace from 'brace';
import AceEditor from 'react-ace';

import 'brace/mode/java';
import 'brace/theme/github';

function onChange(newValue) {
  console.log('change',newValue);
}

// Render editor
render(
  <AceEditor
    mode="java"
    theme="github"
    onChange={onChange}
    name="UNIQUE_ID_OF_DIV"
    editorProps={{$blockScrolling: true}}
  />,
  document.getElementById('example')
);

Examples

Checkout the example directory for a working example using webpack.

GitHub