react-ace
v13.0.0
Published
A react component for Ace Editor
Downloads
1,770,476
Maintainers
Readme
React-Ace
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 Split 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
How to add modes, themes and keyboard handlers
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]