How to use the @json-editor/json-editor.JSONEditor function in @json-editor/json-editor

To help you get started, we’ve selected a few @json-editor/json-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github housepower / ckman / frontend / src / views / loader / manage.vue View on Github external
createInstence() {
      this.editor = new JSONEditor(this.$refs.jsonEditor, {
        theme: "bootstrap4",
        iconlib: "fontawesome4",
        schema: this.schema,
        startval: this.originValue,
        required_by_default: true,
        disable_array_reorder: true,
        no_additional_properties: true,
      });
      this.editor.on("change", () => {
        const errors = this.editor.validate();
        if (errors.length) {
          this.$message.error("json语法有误,请检查");
        } else {
          const json = this.editor.getValue();
          this.originStrinfyVal = JSON.stringify(json, null, 2);
        }

@json-editor/json-editor

JSON Schema based editor

MIT
Latest version published 2 months ago

Package Health Score

92 / 100
Full package analysis

Popular @json-editor/json-editor functions