Paragraph Class
A collection of Runs within a TextBlock. Each paragraph within a text block is laid out on a separate line.
Extends
Methods
Name | Description | |
---|---|---|
applyStyle(styleName: string, options?: ApplyTextStyleOptions): void | Apply the specified style to this Paragraph, and - unless preventPropagation is true - to all of its runs. |
|
clone(): Paragraph | Create a deep copy of this component. | |
equals(other: TextBlockComponent): boolean | Returns true if this is equivalent to other . |
|
stringify(options?: TextBlockStringifyOptions): string | Compute a string representation of this paragraph by concatenating the string representations of all of its runs. | |
toJSON(): ParagraphProps | Convert this component to its JSON representation. | |
create(props: ParagraphProps): Paragraph Static | Create a paragraph from its JSON representation. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
clearStyleOverrides(): void Inherited | TextBlockComponent | Reset any styleOverrides applied to this component's TextStyle. |
Properties
Name | Type | Description | |
---|---|---|---|
runs Readonly | Run[] | The runs within the paragraph. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
overridesStyle Accessor Inherited ReadOnly | boolean | TextBlockComponent | Returns true if styleOverrides specifies any deviations from this component's base TextStyle. |
styleName Accessor Inherited | string | TextBlockComponent | The name of the TextStyle that provides the base formatting for the contents of this component. |
styleOverrides Accessor Inherited | TextStyleSettingsProps | TextBlockComponent | Deviations in individual properties of the TextStyle specified by styleName. For example, if the style uses the "Arial" font, you can override that by settings styleOverrides.fontName to "Comic Sans". |
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.