jsoneditor-for-react
v0.0.1
Published
React wrapper for josdejong/jsoneditor
Downloads
529
Readme
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