From aafef56ebc5cc18b7505098e5c5cebc7d97a98bf Mon Sep 17 00:00:00 2001 From: Reorx Date: Sun, 5 Feb 2023 00:34:58 +0800 Subject: [PATCH] add more textarea format fields in jsoncv schema --- src/editor/main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/editor/main.js b/src/editor/main.js index 93a1027..d5ab10c 100644 --- a/src/editor/main.js +++ b/src/editor/main.js @@ -15,7 +15,7 @@ import * as jsoncvSchemaModule from '../schema/jsoncv.schema.json'; import { registerIconLib } from './iconlib'; import { registerTheme } from './theme'; -const propertiesInOrder = ['basics', 'education', 'work', 'skills', 'projects', 'languages', 'interests', 'references', 'awards', 'publications', 'volunteer'] +const propertiesInOrder = ['basics', 'education', 'work', 'skills', 'projects', 'sideProjects', 'languages', 'interests', 'references', 'awards', 'publications', 'volunteer'] const basicsPropertiesInOrder = ['name', 'label', 'email', 'phone', 'url', 'summary', 'image', 'location', 'profiles'] // toc elements @@ -72,6 +72,17 @@ traverseDownObject(jsoncvSchema, (key, obj) => { // add format to schema const keyFormatMap = { 'basics.properties.summary': 'textarea', + 'work.items.properties.description': 'textarea', + 'work.items.properties.summary': 'textarea', + 'work.items.properties.highlights.items': 'textarea', + 'projects.items.properties.description': 'textarea', + 'projects.items.properties.highlights.items': 'textarea', + 'sideProjects.items.properties.description': 'textarea', + 'references.items.properties.reference': 'textarea', + 'awards.items.properties.summary': 'textarea', + 'publications.items.properties.summary': 'textarea', + 'volunteer.items.properties.summary': 'textarea', + 'volunteer.items.properties.highlights.items': 'textarea', } for (const [key, format] of Object.entries(keyFormatMap)) { objectPath.get(jsoncvSchema.properties, key).format = format