diff options
author | Stephen Kraus <8003332+stephenmk@users.noreply.github.com> | 2024-01-15 05:04:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 11:04:46 +0000 |
commit | 9cfa20cbd2289d82a5abf05a2e5ea8af5016222c (patch) | |
tree | 468ff2aa11975d9e34b7231586272500d4fae0ea /ext | |
parent | dcb26a8ef5c62bf6acbf8130895c37f56e8a9d3f (diff) |
Allow `text-shadow` style in dictionary structured content (#527)
Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/data/schemas/dictionary-term-bank-v3-schema.json | 3 | ||||
-rw-r--r-- | ext/js/display/sandbox/structured-content-generator.js | 2 |
2 files changed, 5 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)) { |