aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/data/schemas/dictionary-term-bank-v3-schema.json3
-rw-r--r--ext/js/display/sandbox/structured-content-generator.js2
-rw-r--r--test/data/dictionaries/valid-dictionary1/term_bank_2.json2
-rw-r--r--types/ext/structured-content.d.ts1
4 files changed, 8 insertions, 0 deletions
diff --git a/ext/data/schemas/dictionary-term-bank-v3-schema.json b/ext/data/schemas/dictionary-term-bank-v3-schema.json
index f4b4faa5..8243f2a7 100644
--- a/ext/data/schemas/dictionary-term-bank-v3-schema.json
+++ b/ext/data/schemas/dictionary-term-bank-v3-schema.json
@@ -320,6 +320,9 @@
"enum": ["start", "end", "left", "right", "center", "justify", "justify-all", "match-parent"],
"default": "start"
},
+ "textShadow": {
+ "type": "string"
+ },
"margin": {
"type": "string"
},
diff --git a/ext/js/display/sandbox/structured-content-generator.js b/ext/js/display/sandbox/structured-content-generator.js
index b74674fc..f38f2ed3 100644
--- a/ext/js/display/sandbox/structured-content-generator.js
+++ b/ext/js/display/sandbox/structured-content-generator.js
@@ -354,6 +354,7 @@ export class StructuredContentGenerator {
borderWidth,
verticalAlign,
textAlign,
+ textShadow,
margin,
marginTop,
marginLeft,
@@ -376,6 +377,7 @@ export class StructuredContentGenerator {
if (typeof backgroundColor === 'string') { style.backgroundColor = backgroundColor; }
if (typeof verticalAlign === 'string') { style.verticalAlign = verticalAlign; }
if (typeof textAlign === 'string') { style.textAlign = textAlign; }
+ if (typeof textShadow === 'string') { style.textShadow = textShadow; }
if (typeof textDecorationLine === 'string') {
style.textDecoration = textDecorationLine;
} else if (Array.isArray(textDecorationLine)) {
diff --git a/test/data/dictionaries/valid-dictionary1/term_bank_2.json b/test/data/dictionaries/valid-dictionary1/term_bank_2.json
index d46b4c14..30e5418c 100644
--- a/test/data/dictionaries/valid-dictionary1/term_bank_2.json
+++ b/test/data/dictionaries/valid-dictionary1/term_bank_2.json
@@ -103,6 +103,8 @@
{
"tag": "span",
"style": {
+ "color": "#dd2121",
+ "textShadow": "0.5px 0.5px 1px gray",
"textDecorationLine": "underline",
"textDecorationStyle": "wavy",
"textDecorationColor": "red"
diff --git a/types/ext/structured-content.d.ts b/types/ext/structured-content.d.ts
index c9ad87f6..879a1a60 100644
--- a/types/ext/structured-content.d.ts
+++ b/types/ext/structured-content.d.ts
@@ -63,6 +63,7 @@ export type StructuredContentStyle = {
borderWidth?: string;
verticalAlign?: VerticalAlign;
textAlign?: TextAlign;
+ textShadow?: string;
margin?: string;
marginTop?: number | string;
marginLeft?: number | string;