feat(TextRun): add support for formatting (#254)

This commit is contained in:
absidue
2022-12-15 02:48:35 +01:00
committed by GitHub
parent 506834b253
commit 883a023624
3 changed files with 24 additions and 0 deletions

View File

@@ -3,9 +3,15 @@ import NavigationEndpoint from '../NavigationEndpoint';
class TextRun {
text: string;
endpoint: NavigationEndpoint | undefined;
bold: boolean;
italics: boolean;
strikethrough: boolean;
constructor(data: any) {
this.text = data.text;
this.bold = Boolean(data.bold);
this.italics = Boolean(data.italics);
this.strikethrough = Boolean(data.strikethrough);
this.endpoint = data.navigationEndpoint ? new NavigationEndpoint(data.navigationEndpoint) : undefined;
}
}