diff --git a/examples/components/Form/Editor.jsx b/examples/components/Form/Editor.jsx index 40ed0d9c..76e2ae6c 100644 --- a/examples/components/Form/Editor.jsx +++ b/examples/components/Form/Editor.jsx @@ -11,23 +11,34 @@ export default { controls: [ { name: "javascript", - type: "javascript-editor", + type: "editor", label: "Javascript", + language: 'javascript', value: "console.log(1, 2, 3);" }, { name: "html", - type: "html-editor", + type: "editor", + language: 'html', label: "Html", value: "Hello

world

" }, { name: "css", - type: "css-editor", + type: "editor", + language: 'css', label: "CSS", value: "body {color: red;}" + }, + + { + name: "json", + type: "editor", + language: 'json', + label: "JSON", + value: `{"a": 1, "b": 2}` } ] } diff --git a/examples/components/Play.jsx b/examples/components/Play.jsx index a067c2c9..c3847a69 100644 --- a/examples/components/Play.jsx +++ b/examples/components/Play.jsx @@ -181,13 +181,6 @@ export default class PlayGround extends React.Component { ); } - handleEditorMount(editor, monaco) { - monaco.languages.json.jsonDefaults.setDiagnosticsOptions({ - enableSchemaRequest: true, - validate: true - }); - } - handleChange(value) { this.setState({ schemaCode: value @@ -239,7 +232,6 @@ export default class PlayGround extends React.Component { value={this.state.schemaCode} onChange={this.handleChange} language="json" - editorDidMount={this.handleEditorMount} /> ); }