Home
Softono

React Ace Editor

Open source JavaScript
18
Stars
4
Forks
1
Issues
3
Watchers
7 years
Last Commit

 About React Ace Editor

A react wrapper for ace editor

Platforms

Web Self-hosted

Languages

JavaScript

Links

Need Help Installing React Ace Editor?

We provide expert installation service for this software. Our team will install, configure, and secure React Ace Editor on your server. plans start at just $30.

React Ace Editor

View on GitHub

REACT-ACE-EDITOR

Introduction

This is a react wrapper around the Ace Editor Ace Editor Demo Ace Editor Github

Getting Started

npm install --save react-ace-editor

Usage

import ReactAce from 'react-ace-editor';
import React, { Component } from 'react';

class CodeEditor extends Component {
  constructor() {
    super();
    this.onChange = this.onChange.bind(this);
  }
  onChange(newValue, e) {
    console.log(newValue, e);

    const editor = this.ace.editor; // The editor object is from Ace's API
    console.log(editor.getValue()); // Outputs the value of the editor
  }
  render() {
    return (
      <ReactAce
        mode="javascript"
        theme="eclipse"
        setReadOnly=false
        onChange={this.onChange}
        style={{ height: '400px' }}
        ref={instance => { this.ace = instance; }} // Let's put things into scope
      />
    );
  }
}

More Documentation

For all the available method from the Ace Editor, please checkout Ace Editor's API documentation