ParagraphCollection Class
A collection of the Paragraph objects.
Declaration
export class ParagraphCollection extends Collection<Paragraph>
Inheritance
Collection<T>
ParagraphCollection
Methods
create(position) Method
Creates a new Paragraph object with the specified settings and adds it to the collection.
Declaration
create(
position: number
): Paragraph
Parameters
Name | Type | Description |
---|---|---|
position | number | A position to insert a new paragraph. |
Returns
Type | Description |
---|---|
Paragraph | The newly created paragraph. |
find(position) Method
Returns a list of paragraphs that traverse the specified position or interval.
Declaration
find(
position: number | IInterval
): Paragraph[]
Parameters
Name | Type | Description |
---|---|---|
position | number | IInterval | A document position or interval. |
Returns
Type | Description |
---|---|
Paragraph[] | A list of paragraphs. |