jsoneditor-for-react
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/jsoneditor-for-react package

0.0.1 • Public • Published

jsoneditor-for-react

React wrapper for jsoneditor

Also you can check the angular version: angular-jsoneditor

Installation

npm install jsoneditor-for-react --save

Usage

import React, { Component } from 'react';
import ReactJsonEditor from 'jsoneditor-for-react';
 
class App extends Component {
  ...
 
  editorChangeHandler = (values) => {
    console.log('new values', values)
    this.setState({values: values})
  }
 
  render() {
    return (
      <div className="App">
        <ReactJsonEditor values={this.state.values} onChange={(values) => {this.editorChangeHandler(values)}}/>
      </div>
    );
  }
}
 
export default App;

TODO

  • support jsoneditor options
  • support ace and ajv
  • examples and demos

/jsoneditor-for-react/

    Package Sidebar

    Install

    npm i jsoneditor-for-react

    Weekly Downloads

    30

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • mixj93