TextBlockComponent Class @beta
Abstract representation of any of the building blocks that make up a TextBlock document - namely Runs and StructuralTextBlockComponents. The TextBlock can specify an AnnotationTextStyle that formats its contents. Each component can specify an optional styleOverrides to customize that formatting.
Extended by
Methods
Name | Description | |
---|---|---|
clearStyleOverrides(_options?: ClearTextStyleOptions): void | Reset any styleOverrides applied to this component. | |
clone(): TextBlockComponent Abstract | Create a deep copy of this component. | |
equals(other: TextBlockComponent): boolean | Returns true if this is equivalent to other . |
|
stringify(options?: TextBlockStringifyOptions, context?: TextBlockStringifyContext): string Abstract | Compute a string representation of the contents of this component and all of its sub-components. | |
toJSON(): TextBlockComponentProps | Convert this component to its JSON representation. |
Properties
Name | Type | Description | |
---|---|---|---|
isEmpty Accessor Abstract ReadOnly | boolean | Returns true if this component has no content or children. | |
isWhitespace Accessor ReadOnly | boolean | Returns true if the string representation of this component consists only of whitespace characters. | |
overridesStyle Accessor ReadOnly | boolean | Returns true if styleOverrides specifies any deviations from the TextBlock's AnnotationTextStyle. | |
styleOverrides Accessor | TextStyleSettingsProps | Deviations in individual properties of the TextStyleSettings in the AnnotationTextStyle. | |
styleOverrides Setter | styleOverrides(overrides: TextStyleSettingsProps): void |
Defined in
Last Updated: 07 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.