Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createEditor({ value, ...rest }) {
if (this.jsonEditor) {
this.jsonEditor.destroy();
}
this.jsonEditor = new JSONEditor(this.htmlElementRef, {
onChange: this.handleChange,
...rest
});
this.jsonEditor.set(value);
}