TextContent
Syntax
interface TextContent {
content?: string;
color?: string;
underline?: boolean;
lineThrough?: boolean;
fontFamily?: string;
fontSize?: number;
fontStyle?: string;
fontWeight?: string;
}
Attributes
content
The text content string.
Default value: ''
Example
content: "Dynamsoft Document Viewer",
color
The color of text content string.
Default value: rgb(0,0,0)
Example
color: "#000000",
Remark
Supported string value of color
:
- Named color, for example,
red
,green
, etc. - HEX(
#RRGGBB
), for example,#ff0000
,#008000
, etc. - RGB(
rgb(red, green, blue)
), for example,rgb(255, 0, 0)
,rgb(0, 128, 0)
, etc. - HSL(
hsl(Hue, Saturation, Lightness)
), for example,hsl(0, 100%, 50%)
,hsl(120, 100%, 25%)
,etc.
underline
A line will be displayed under the text
Default value: false
lineThrough
A line will be displayed through the text.
Default value: false
fontFamily
The font family of text content string.
Default value: Helvetica
Example
fontFamily: "Times",
fontSize
The font size of text content string.
Default value: 16
Example
fontSize: 20,
fontStyle
The font style of text content string.
Supported values: normal
, italic
Default value: normal
Example
fontStyle: "italic",
fontWeight
The font weight of text content string.
Supported values: normal
, bold
Default value: normal
Example
fontWeight: "bold",