Skip to content

Commit 60d547e

Browse files
authored
feat: override jsonform options (#142)
* Feat: added options to scvhema map * Feat: added options to jsonform * chores: update readme
1 parent 726dcec commit 60d547e

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ globalThis.gitClerkConfig = {
5151
type: "string"
5252
}
5353
}
54+
},
55+
jsonform: {
56+
options: {} // jsonform options
5457
}
5558
},
5659
{

public/config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ const schemaMap = [
6969
content: {
7070
foo: "Initial content for file creation",
7171
},
72+
jsonform: {
73+
options: {
74+
disable_edit_json: false,
75+
disable_properties: false,
76+
},
77+
},
7278
preview: "/example-preview.html",
7379
},
7480
];

src/views/FileEditView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ onUnmounted(() => {
262262
:schema="schemaMetaDetails.schema"
263263
:value="updatedFileContent"
264264
:customEditorInterfaces="customInterfaces"
265+
:options="schemaMetaDetails.jsonform?.options || {}"
265266
@change="onFileChange"
266267
class="d-block fill-height"
267268
></eox-jsonform>

0 commit comments

Comments
 (0)