Package detail

react-ace-builds

manubb9.4kMIT7.4.1

A react component for Ace Editor

ace, ace editor, react-component, react

readme

React-Ace-Builds

logo

npm version Build Status jsdeliver Coverage Status

A set of react components for Ace

DEMO of React Ace-Builds

DEMO of React Ace-Builds Split Editor

DEMO of React Ace-Builds Diff Editor

Notice

This repository contains a fork of securingsincity/react-ace where unmaintained brace is replaced with ace-builds. This was motivated by a pull request created by @dennisoelkers.

Install

npm install react-ace-builds

Basic Usage

import React from "react";
import { render } from "react-dom";
import AceEditor from "react-ace-builds";
import "react-ace-builds/webpack-resolver-min";

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

// Render editor
render(
  <AceEditor
    mode="java"
    theme="github"
    onChange={onChange}
    name="UNIQUE_ID_OF_DIV"
  />,
  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

changelog

Changelog

7.4.1

  • Use ace-builds@1.31.1

7.3.6

  • Use ace-builds@1.4.12

7.3.0

  • Use ace-builds@1.4.8

7.2.6

  • Use ace-builds@1.4.7
  • Bump dependencies

7.2.0

  • Remove umd build
  • Use babel@7
  • Add webpack-resolver-min.js to use ace minified modules

7.0.0

  • Replace brace with ace-builds

6.2.1

  • Add editor to onFocus event as per issue #389
  • Upgraded webpack
  • Add exec argument in ts #535
  • Prettier as part of the build

6.2.0

  • Support for React 17
  • Upgraded dependencies
  • AceOptions interface adds debounceChangePeriod
  • update types

6.1.4

  • Fixes #479 Diff component does not refresh when value prop changes

6.1.3

  • Fixes #300 where users were not able to set annotations for multiline text that is changed

6.1.2

  • Additional Diff documentation
  • Add className to diff
  • Add Logo to docs
  • upgrade dev dependencies

6.1.1

  • Fixes typo in console.warn
  • Adds style property to typings

6.1.0

  • Onchange support in diff editor
  • Debounce Prop support in split editor

6.0.0

  • Adds Diff editor

5.10.0

  • Upgraded many build dependencies
  • Split editor adds UndoManager

5.9.0

  • First value resets undo manager. Closes #339 and #223
  • Updated split editor documentation

5.8.0

  • Upgrade brace to 0.11
  • More loose comparison for componentDidMount for default value. Closes #317. Thanks @VijayKrish93

5.7.0

  • Adds debounce option for onChange event
  • Add support onCursorChange event
  • Adds editor as second argument to the onBlur

5.5.0

  • Adds the onInput event

5.4.0

  • 285: Added the possibility to change key bindings of existing commands. thanks to @FurcyPin

5.3.0

  • Adds support for React 16 thanks to @layershifter
  • Removes react and react-dom from build. thanks to @M-ZubairAhmed

5.2.1 and 5.2.2

  • Remove Open Collective from build

5.2.0

  • Add support for events in onBlur and onFocus callbacks
  • Adds onValidate callback

5.1.2

  • Resize on component did mount and component did update. Fixes #207 and #212.

5.1.1

  • Fix TypeScript definitions for EditorProps

5.1.0

  • Editor options do not get reverted due to default props #226
  • Markers can be unset to an empty value #229
  • Typescript update to set state to empty object instead of undefined

5.0.1

  • Fixes file extension issue related to 5.0.0.

5.0.0

  • Support for a Split View Editor - see more about the Split View editor here
  • Ace Editor will now warn on mispelled editor options
  • All new documentation

4.4.0

  • Ace's resize method will be called when the prop width changes

4.3.0

  • Adds support for onSelectionChange event
  • Add the Event as an optional argument to the onChange prop
  • All new examples

4.2.2

  • [bugfix] should not handle markers without any markers

4.2.1

  • Use prop-type package instead of React.PropType

4.2.0

  • Fix ref related error

4.1.6

  • Reverse PureComponent use in AceEditor back to Component

4.1.5

  • Add ability to set scrollMargins

4.1.4

  • TypeScript Definitions