aboutsummaryrefslogtreecommitdiff
path: root/types/ext
diff options
context:
space:
mode:
authorStephen Kraus <8003332+stephenmk@users.noreply.github.com>2023-12-26 23:54:41 -0600
committerGitHub <noreply@github.com>2023-12-27 05:54:41 +0000
commitadc17f4221a0e48da4450695c655632d37eee2a8 (patch)
treed8d56dc1dfae39e6d7ba47c872fabb7110375263 /types/ext
parent8e95d99e6a1891eaf9331f6384fa3b1a1065b871 (diff)
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 <stephenmk@users.noreply.github.com>
Diffstat (limited to 'types/ext')
-rw-r--r--types/ext/structured-content.d.ts33
1 files changed, 29 insertions, 4 deletions
diff --git a/types/ext/structured-content.d.ts b/types/ext/structured-content.d.ts
index 2144cd84..c9ad87f6 100644
--- a/types/ext/structured-content.d.ts
+++ b/types/ext/structured-content.d.ts
@@ -23,10 +23,14 @@ export type TextDecorationLine = 'underline' | 'overline' | 'line-through';
export type TextDecorationLineOrNone = 'none' | TextDecorationLine;
+export type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy';
+
export type FontStyle = 'normal' | 'italic';
export type FontWeight = 'normal' | 'bold';
+export type WordBreak = 'normal' | 'break-all' | 'keep-all';
+
export type TextAlign = 'start' | 'end' | 'left' | 'right' | 'center' | 'justify' | 'justify-all' | 'match-parent';
export type SizeUnits = 'px' | 'em';
@@ -48,13 +52,30 @@ export type StructuredContentStyle = {
fontStyle?: FontStyle;
fontWeight?: FontWeight;
fontSize?: string;
+ color?: string;
+ backgroundColor?: string;
textDecorationLine?: TextDecorationLineOrNone | TextDecorationLine[];
+ textDecorationStyle?: TextDecorationStyle;
+ textDecorationColor?: string;
+ borderColor?: string;
+ borderStyle?: string;
+ borderRadius?: string;
+ borderWidth?: string;
verticalAlign?: VerticalAlign;
textAlign?: TextAlign;
- marginTop?: number;
- marginLeft?: number;
- marginRight?: number;
- marginBottom?: number;
+ margin?: string;
+ marginTop?: number | string;
+ marginLeft?: number | string;
+ marginRight?: number | string;
+ marginBottom?: number | string;
+ padding?: string;
+ paddingTop?: string;
+ paddingLeft?: string;
+ paddingRight?: string;
+ paddingBottom?: string;
+ wordBreak?: WordBreak;
+ whiteSpace?: string;
+ cursor?: string;
listStyleType?: string;
};
@@ -100,6 +121,10 @@ export type StyledElement = {
data?: Data;
style?: StructuredContentStyle;
/**
+ * Hover text for the element.
+ */
+ title?: string;
+ /**
* Defines the language of an element in the format defined by RFC 5646.
*/
lang?: string;