json-editor 中允许注释

This commit is contained in:
rickcole 2020-04-09 10:52:26 +08:00
parent 6af13cdb35
commit c6ca763a03

View File

@ -204,7 +204,8 @@ export class Editor extends React.Component<EditorProps, any> {
// json 默认开启验证。
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
enableSchemaRequest: true,
validate: true
validate: true,
allowComments: true
});
// After initializing monaco editor