react-ace is a free, open source ides & code editors project written in TypeScript and released under MIT. It has 4,206 GitHub stars, 598 forks and 217 open issues, and was last pushed 21 hours ago. On this registry it ranks #12 of 12 tracked projects in IDEs & Code Editors, with 5 head-to-head comparisons available.

What is react-ace?

React-Ace is a set of React components that wrap the Ace code editor, published on npm under the MIT licence for developers who need an editable code surface inside a React application.

What it is

React-Ace is a library of React components that embed the Ace editor in a React interface. It is distributed through npm and CDNJS, written in TypeScript, and maintained in the securingsincity/react-ace repository. The package exposes AceEditor as its primary component, alongside a split view editor and a diff editor, each with its own documentation in docs/Ace.md, docs/Split.md, and docs/Diff.md. Version 8 ended support for Brace and now depends on ace-builds, and a dedicated migration guide lives at docs/Migrate-v7-to-v8.md.

The concrete problem it solves is bridging Ace's imperative, DOM-oriented API with React's component model. Instead of wiring Ace into a React tree by hand, a developer imports AceEditor, mounts it, and receives the editor contents through an onChange callback. Language modes, themes, and keyboard handlers come from ace-builds directly, for example importing ace-builds/src-noconflict/mode-java, ace-builds/src-noconflict/theme-github, and ace-builds/src-noconflict/ext-language_tools. The bundled example directory contains a working webpack setup, and docs/Modes.md explains how to add further modes, themes, and keyboard handlers.

Key capabilities

  • AceEditor component that embeds Ace in React and reports changes through an onChange callback.
  • Split view editor, documented in docs/Split.md and demonstrated on the React Ace Split Editor demo page.
  • Diff editor for comparing two documents, documented in docs/Diff.md and shown on the React Ace Diff Editor demo page.
  • Mode, theme, and keyboard handler loading through ace-builds imports such as mode-java, theme-github, and ext-language_tools.
  • Publication on npm as react-ace and on CDNJS as a hosted library.
  • Documentation set covering general Ace integration, the split and diff editors, Modes.md, and a Frequently Asked Questions page.
  • TypeScript implementation with a working webpack example under the example directory.

Who uses it and how

  • React teams that need an in-browser code editor and prefer mounting a component over driving Ace imperatively.
  • Applications that present two editors side by side, using the split view component.
  • Tools that must show differences between two versions of a document, using the diff editor component.
  • Projects moving off Brace for version 8, following docs/Migrate-v7-to-v8.md to adopt ace-builds.
  • Contributors to a repository tagged with the hacktoberfest, javascript, react, and reactjs topics.

Getting started

Install with npm install react-ace ace-builds, or yarn add react-ace ace-builds, then import AceEditor together with the ace-builds mode, theme, and extension files the editor needs.

How it compares

No paid products and no competing editor wrappers are named in the supplied facts, so this entry stands alone in this registry. The only related package named is ace-builds, which is the underlying editor dependency rather than a rival component library.

When to use it — and when not to

Self-hosters must remember that this is a browser-side component only: file storage, persistence, and any server-side compilation have to be built separately. Because version 8 dropped Brace, teams pinned to older setups must migrate before upgrading. The README is thin and explicitly notes that its examples are being updated, open issues stand at 217, and adopters should read the linked documentation and live demos rather than relying on the README alone.

project readme (upstream, from github) — read inline

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]

<img src="https://opencollective.com

readme truncated — read the full docs on github

Frequently asked questions

Is react-ace free to use?

react-ace is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does react-ace do?

React Ace Component

What is react-ace written in?

react-ace is primarily written in TypeScript. Its source is publicly available at https://github.com/securingsincity/react-ace, and it has 4,206 GitHub stars.