Skip to content

vyaz-monorepo / core/src / Paragraph

Interface: Paragraph

Defined in: core/src/types/Document.ts:551

A single paragraph (block-level text container).

Contains one or more TextRun children that form the paragraph content.

Example

ts
{
  id: "p-1",
  style: { alignment: "left", lineHeight: 1.4, spaceBefore: 0, spaceAfter: 12 },
  children: [
    { text: "Hello ", fontFamily: "Arial", fontSize: 16, fontWeight: "bold", color: "#000" },
    { text: "world!", fontFamily: "Arial", fontSize: 16, fontWeight: "normal", color: "#333" },
  ]
}

Properties

children

children: TextRun[]

Defined in: core/src/types/Document.ts:557

Inline-level text runs forming the paragraph.


id?

optional id?: string

Defined in: core/src/types/Document.ts:553

Unique identifier for this paragraph (optional, for debugging).


style

style: ParagraphStyle

Defined in: core/src/types/Document.ts:555

Block-level paragraph style.

Released under the MIT License.