Skip to content

n-dev27/react-ace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ce0e79 · Jan 12, 2023
Jan 12, 2023
Jan 20, 2021
Oct 13, 2019
Apr 15, 2022
Mar 9, 2022
May 26, 2019
Oct 7, 2018
Aug 7, 2018
Apr 17, 2022
May 23, 2020
Apr 15, 2022
Jun 15, 2017
May 21, 2017
Nov 29, 2014
May 21, 2017
Jan 12, 2023
Jun 20, 2018
Nov 1, 2022
Oct 31, 2022
May 26, 2019
May 26, 2019
Nov 7, 2019
May 26, 2019
Mar 28, 2021
Mar 28, 2021
Mar 28, 2021

Repository files navigation

React-Ace

logo

Backers on Open Collective Sponsors on Open Collective Greenkeeper badge

npm version CDNJS Coverage Status

A set of react components for Ace

NOTE FOR VERSION 8! : We have stopped support for Brace and now use Ace-builds. Please read the documentation on how to migrate. Examples are being updated.

DEMO of React Ace

DEMO of React Ace Split Editor

DEMO of React Ace Diff Editor

Install

npm install react-ace ace-builds

yarn add react-ace ace-builds

Basic Usage

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

import "ace-builds/src-noconflict/mode-java";
import "ace-builds/src-noconflict/theme-github";
import "ace-builds/src-noconflict/ext-language_tools";

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.

Documentation

Ace Editor

Split View Editor

Diff Editor

How to add modes, themes and keyboard handlers

Frequently Asked Questions

Migrate to version 8

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]