React based editor for JSON Schemas
npm install json-schema-editorGenerates HTML for creating and modifying json schemas. I created this because json-editor is not good at modifying schemas (using the meta schema) and couldn't find any other good UI for making json schemas.
2. Include JSON Schema Editor
- Using npm:
``sh`
npm install json-schema-editor
`
javascript`
var JSONSchemaEditor = require('json-schema-editor');
`
- Old-fashioned style:
html`
3. Add an element to your page to contain the editor
`html`
4. Initialize the component
`javascript`
var element = document.getElementById('container');
var editor = new JSONSchemaEditor(element, {});
editor.setValue(product);
5. Get the value (generally after the user presses a button e.g. save)
`javascript``
editor.getValue();