3.0.1 • Published 6 years ago

@dr-kobros/react-jsoneditor v3.0.1

Weekly downloads
82
License
BSD-3-Clause
Repository
gitlab
Last release
6 years ago

Json editor component for React

What?

This component is a React wrapper for the jsoneditor NPM package.

Why?

Did not find a reasonable JSON editor component for react. Needed one. Did some research. Found a good editor library. Wrapped it.

How?

import ReactDOM from 'react-dom';
import JsonEditor from '@dr-kobros/react-jsoneditor';

const json = {
  tussin: 'lussutus',
  number: 666,
  array: [
    1,
    2,
    3,
  ],
  obu: {
    lipaiseppa: 'ankkaa',
  }
};

const onChange = json => {
  console.log(json);
};

// Editor configuration. See jsoneditor's API.
const options = {

}

ReactDOM.render(
  <JsonEditor value={json} onChange={onChange} options={options} />,
  document.getElementById('some_element')
);

examples

  • fork repo
  • yarn
  • yarn run storybook
3.0.1

6 years ago

3.0.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago