vyaz-monorepo / core/src / Paragraph
Interface: Paragraph
Defined in: core/src/types/Document.ts:617
A single paragraph (block-level text container).
Contains one or more TextRun children that form the paragraph content.
Example
{
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:623
Inline-level text runs forming the paragraph.
id?
optionalid?:string
Defined in: core/src/types/Document.ts:619
Unique identifier for this paragraph (optional, for debugging).
rule?
optionalrule?:object
Defined in: core/src/types/Document.ts:631
When set, this paragraph is a horizontal rule (<hr>) — children is ignored (should be []) and the paragraph lays out as a single line spanning the full available content width, painted as a horizontal bar thickness px tall instead of text. style.spaceBefore/spaceAfter still apply as the rule's own vertical margin.
color
color:
string
thickness
thickness:
number
style
style:
ParagraphStyle
Defined in: core/src/types/Document.ts:621
Block-level paragraph style.
