diff --git a/src/UI/Studio/SchemaBasedField.svelte b/src/UI/Studio/SchemaBasedField.svelte index 6bcac2151..1552ae587 100644 --- a/src/UI/Studio/SchemaBasedField.svelte +++ b/src/UI/Studio/SchemaBasedField.svelte @@ -56,9 +56,6 @@ if (schema.type === "boolean") { rendervalue = undefined } - if (schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") { - rendervalue = "{tags()}" - } let helperArgs = schema.hints.typehelper?.split(",") let inline = schema.hints.inline !== undefined diff --git a/src/Utils.ts b/src/Utils.ts index 277a84844..8cdecf94a 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -424,6 +424,16 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be v = date.toISOString() } + if (typeof v !== "string") { + if(v["asHumanString"]){ + v = v.asHumanString(true, false) + }else if(typeof v === "object"){ + v = JSON.stringify(v) + } else{ + v = "" + v + } + } + if (useLang !== undefined && v?.translations !== undefined) { v = v.translations[useLang] ?? v.translations["*"] ?? v?.textFor(useLang) ?? v } @@ -438,9 +448,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be v = v.InnerConstructElement()?.textContent } - if (typeof v !== "string") { - v = "" + v - } + v = v.replace(/\n/g, "
") } else { // v === undefined