Skip to content

ParagraphProperties

Defined in: src/core/document-model/types.ts:162

readonly optional alignment?: Alignment

Defined in: src/core/document-model/types.ts:200


readonly optional bidi?: boolean

Defined in: src/core/document-model/types.ts:255

ECMA-376 §17.3.1.6 — w:bidi. Sets the paragraph’s base direction to RTL, so the BiDi paragraph embedding level is 1 and default alignment is right.


readonly optional borders?: CellBorders

Defined in: src/core/document-model/types.ts:218

§17.3.1.24 w:pBdr — rules drawn around the paragraph. w:space is the gap each keeps from the text, carried on the Border as spacePt.


readonly optional contextualSpacing?: boolean

Defined in: src/core/document-model/types.ts:211

ECMA-376 Part 1 §17.3.1.9 — w:contextualSpacing. The space before and after is dropped where the neighbour is a paragraph of the SAME style: a list is written this way, so its items sit together while the list as a whole keeps its space from the text around it.


readonly optional frame?: FrameProperties

Defined in: src/core/document-model/types.ts:187

§17.3.1.11 — the paragraph floats as a text frame.


readonly optional indentFirstLine?: Pt

Defined in: src/core/document-model/types.ts:223


readonly optional indentLeft?: Pt

Defined in: src/core/document-model/types.ts:221


readonly optional indentRight?: Pt

Defined in: src/core/document-model/types.ts:222


readonly optional inheritedRun?: RunProperties

Defined in: src/core/document-model/types.ts:179

§17.7.2 — a run layer that ranks BELOW the paragraph’s own style and below the character style a run names: the w:rPr of the table style the cell is formatted by, or the a:fontRef colour a gallery-drawn shape lends the text inside it (§20.1.4.2.14). Carried on the paragraph because every run of it — and its MARK — reads the same layer.


readonly optional numbering?: NumberingReference

Defined in: src/core/document-model/types.ts:238


readonly optional numberingLevel?: number

Defined in: src/core/document-model/types.ts:245

§17.9.4 — a w:numPr that names a LEVEL and no w:numId: the instance is whatever the style this one is based on refers to. Word’s own Heading 2 says exactly this, and dropped it numbered num-parent-style.docx’s headings 1, 2, 3, 4 where its own text says they should read 1, 1.1, 2, 2.1.


readonly optional outlineLevel?: number

Defined in: src/core/document-model/types.ts:260

ECMA-376 §17.3.1.20 — w:outlineLvl. Outline level 0–8 maps to Heading 1–9; 9 (or absent) is body text. Drives tagged-PDF heading structure (H1–H6).


readonly optional pageBreakBefore?: boolean

Defined in: src/core/document-model/types.ts:250

ECMA-376 Part 1 §17.3.1.21 — w:pageBreakBefore. When true, the paragraph starts on a fresh page even if there is room on the current one.


readonly optional runProperties?: RunProperties

Defined in: src/core/document-model/types.ts:225

The implicit default run properties for runs in this paragraph (w:pPr/w:rPr).


readonly optional sectionBreak?: boolean

Defined in: src/core/document-model/types.ts:185

§17.6.17 — the paragraph’s mark carries a w:sectPr: it is the last paragraph of its section, and the mark IS the section break. One with no content of its own therefore prints nothing, not an empty line.


readonly optional shading?: CellShading

Defined in: src/core/document-model/types.ts:220

§17.3.1.31 w:pPr/w:shd — the paragraph’s own background fill.


readonly optional snapToGrid?: boolean

Defined in: src/core/document-model/types.ts:199

§17.3.1.32 w:snapToGrid — whether the paragraph’s lines stand on the section’s document grid (§17.6.5). Absent ⇒ they do; Word’s header and footer styles are what usually says otherwise.


readonly optional spacingAfter?: Pt

Defined in: src/core/document-model/types.ts:202


readonly optional spacingAfterAuto?: Pt

Defined in: src/core/document-model/types.ts:237


readonly optional spacingBefore?: Pt

Defined in: src/core/document-model/types.ts:201


readonly optional spacingBeforeAuto?: Pt

Defined in: src/core/document-model/types.ts:236

§17.3.1.3/§17.3.1.1 — the gap w:beforeAutospacing/w:afterAutospacing asks the consumer for, already resolved to a length by the reader (it depends on the document’s compatibility mode). Present only when the autospacing flag is ON, and it beats the w:before/w:after beside it. A separate property because style inheritance is per ATTRIBUTE: a style based on one that says beforeAutospacing inherits the flag even when it states a w:before of its own — which is how tdf104354_firstParaInSection gets its 75pt before, and taking that literally spread one page over four.


readonly optional spacingLine?: Pt

Defined in: src/core/document-model/types.ts:203


readonly optional spacingLineRule?: "auto" | "exact" | "atLeast"

Defined in: src/core/document-model/types.ts:204


readonly optional styleId?: string

Defined in: src/core/document-model/types.ts:163


readonly optional tableStyle?: ParagraphProperties

Defined in: src/core/document-model/types.ts:171

§17.7.2 — the w:pPr of the TABLE STYLE the paragraph’s cell is formatted by. It is not the paragraph’s own formatting: the cascade puts it under the paragraph’s style (docDefaults < table style < numbering < paragraph style < character style < direct), so it is carried apart from the direct properties rather than merged into them.


readonly optional tabs?: readonly TabStop[]

Defined in: src/core/document-model/types.ts:213

ECMA-376 Part 1 §17.3.1.37 — the paragraph’s own w:tabs stops.


readonly optional textDirection?: "btLr" | "tbRl"

Defined in: src/core/document-model/types.ts:193

§17.3.1.41 w:textDirection — which way the paragraph’s lines run. btLr reads bottom-to-top, tbRl top-to-bottom; lrTb is the default and is not recorded.