react-code-editor

0.0.17 • Public • Published

react-code-editor

Feature

  1. Code Highlight
  2. Cmd/Ctrl + D (Duplicate Line or Selection)
  3. Cmd/Ctrl + / (Append/Remove Inline Comment)

Options

static defaultProps = {
    prefixCode: '',
    prefixCodeClassName: 'prefix-code',
    // Web Worker for fast
    workerUrl: null,
    contentEditable: true,
    // whether inject preset style?
    mountStyle: true,
    // the language of code
    language: '',
    tabSize: 4,
    code: '',
    className: '',
    style: {},
    // true: TabKey performance is switching active item.
    ignoreTabKey: false,
    onChange: code => {},
    // ...rest props of dom
};

Todo

  • worker.js ?

Readme

Keywords

none

Package Sidebar

Install

npm i react-code-editor

Weekly Downloads

8

Version

0.0.17

License

MIT

Unpacked Size

98 kB

Total Files

26

Last publish

Collaborators

  • moyuyc