From adc17f4221a0e48da4450695c655632d37eee2a8 Mon Sep 17 00:00:00 2001 From: Stephen Kraus <8003332+stephenmk@users.noreply.github.com> Date: Tue, 26 Dec 2023 23:54:41 -0600 Subject: Add support for more HTML attributes and style declarations in structured content (#450) * Add support for more HTMl attributes and style declarations * Update test term to use new `margin` property * Allow string values for 'padding' and 'margin' properties * Remove newly added default 'unset' values from term bank schema --------- Co-authored-by: stephenmk --- .../schemas/dictionary-term-bank-v3-schema.json | 69 ++++++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) (limited to 'ext/data/schemas') diff --git a/ext/data/schemas/dictionary-term-bank-v3-schema.json b/ext/data/schemas/dictionary-term-bank-v3-schema.json index 547bde49..f4b4faa5 100644 --- a/ext/data/schemas/dictionary-term-bank-v3-schema.json +++ b/ext/data/schemas/dictionary-term-bank-v3-schema.json @@ -115,6 +115,10 @@ "style": { "$ref": "#/definitions/structuredContentStyle" }, + "title": { + "type": "string", + "description": "Hover text for the element." + }, "lang": { "type": "string", "description": "Defines the language of an element in the format defined by RFC 5646." @@ -263,6 +267,12 @@ "type": "string", "default": "medium" }, + "color": { + "type": "string" + }, + "backgroundColor": { + "type": "string" + }, "textDecorationLine": { "oneOf": [ { @@ -280,6 +290,26 @@ } ] }, + "textDecorationStyle": { + "type": "string", + "enum": ["solid", "double", "dotted", "dashed", "wavy"], + "default": "solid" + }, + "textDecorationColor": { + "type": "string" + }, + "borderColor": { + "type": "string" + }, + "borderStyle": { + "type": "string" + }, + "borderRadius": { + "type": "string" + }, + "borderWidth": { + "type": "string" + }, "verticalAlign": { "type": "string", "enum": ["baseline", "sub", "super", "text-top", "text-bottom", "middle", "top", "bottom"], @@ -290,22 +320,53 @@ "enum": ["start", "end", "left", "right", "center", "justify", "justify-all", "match-parent"], "default": "start" }, + "margin": { + "type": "string" + }, "marginTop": { - "type": "number", + "type": ["number", "string"], "default": 0 }, "marginLeft": { - "type": "number", + "type": ["number", "string"], "default": 0 }, "marginRight": { - "type": "number", + "type": ["number", "string"], "default": 0 }, "marginBottom": { - "type": "number", + "type": ["number", "string"], "default": 0 }, + "padding": { + "type": "string" + }, + "paddingTop": { + "type": "string" + }, + "paddingLeft": { + "type": "string" + }, + "paddingRight": { + "type": "string" + }, + "paddingBottom": { + "type": "string" + }, + "wordBreak": { + "type": "string", + "enum": ["normal", "break-all", "keep-all"], + "default": "normal" + }, + "whiteSpace": { + "type": "string", + "default": "normal" + }, + "cursor": { + "type": "string", + "default": "auto" + }, "listStyleType": { "type": "string", "default": "disc" -- cgit v1.2.3