Paragraph Class
Defines a paragraph in the document.
Declaration
export class Paragraph
Properties
index Property
Gets the paragraph’s index in the paragraphs collection.
Declaration
readonly index: number
Property Value
Type | Description |
---|---|
number | The paragraph’s index. |
interval Property
Gets the text buffer interval occupied by the current paragraph element.
Declaration
readonly interval: Interval
Property Value
Type | Description |
---|---|
Interval | An object that specifies the interval settings. |
list Property
Returns a list to which the paragraph belongs.
Declaration
readonly list: List | null
Property Value
Type | Description |
---|---|
List | The list object. |
null | The paragraph does not belong to a list. |
listLevel Property
Returns a list level to which the paragraph belongs.
Declaration
readonly listLevel: number
Property Value
Type | Description |
---|---|
number | The level (maximum 9), or -1 if the paragraph does not belong to a list. |
properties Property
Provide access to the paragraph’s properties.
Declaration
properties: IParagraphProperties
Property Value
Type | Description |
---|---|
IParagraphProperties | A ParagraphProperties object that implements the IParagraphProperties interface and contains paragraph properties. |
Methods
addToList(list) Method
Adds the paragraph to a list at the specified level.
Declaration
addToList(
list: List,
targetListLevel?: number
): void
Parameters
Name | Type | Description |
---|---|---|
list | List | The list where the paragraph should be added. |
targetListLevel | number | The list level. |