From ac49be1c9496274ff7bbc4b7c45eee0dbccab2df Mon Sep 17 00:00:00 2001 From: Reorx Date: Fri, 3 Feb 2023 01:04:52 +0800 Subject: [PATCH] add more options for JSONEditor --- editor/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/main.js b/editor/main.js index 3b3b26c..3cfc6e0 100644 --- a/editor/main.js +++ b/editor/main.js @@ -86,9 +86,12 @@ const editor = new JSONEditor(elEditorContainer, { schema: jsoncvSchema, theme: 'mytheme', iconlib: 'myiconlib', + disable_array_delete_all_rows: true, + no_additional_properties: true, + startval: exampleData, }); editor.on('ready',() => { - editor.setValue(exampleData) + // editor.setValue(exampleData) // add anchor to each schema element document.querySelectorAll('[data-schemapath]').forEach(el => {