Skip to content

ParagraphProperties

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

readonly optional alignment?: Alignment

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


readonly optional bidi?: boolean

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

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:256

§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:249

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:225

§17.3.1.11 — the paragraph floats as a text frame.


readonly optional indentFirstLine?: Pt

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


readonly optional indentLeft?: Pt

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


readonly optional indentRight?: Pt

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


readonly optional inheritedRun?: RunProperties

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

§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 keepLines?: boolean

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

ECMA-376 Part 1 §17.3.1.15 — w:keepLines. The paragraph’s lines stand on one page, wherever one page holds them all.


readonly optional keepNext?: boolean

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

ECMA-376 Part 1 §17.3.1.14 — w:keepNext. The paragraph stands on the same page as the start of the one after it: a heading is not left at the foot of a page with its text on the next.


readonly optional numbering?: NumberingReference

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


readonly optional numberingLevel?: number

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

§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:316

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:288

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:263

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:223

§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:258

§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:237

§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:240


readonly optional spacingAfterAuto?: Pt

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


readonly optional spacingBefore?: Pt

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


readonly optional spacingBeforeAuto?: Pt

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

§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:241


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

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


readonly optional styleId?: string

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


readonly optional tableStyle?: ParagraphProperties

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

§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:251

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:231

§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.


readonly optional widowControl?: boolean

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

ECMA-376 Part 1 §17.3.1.44 — w:widowControl. When on, a page or column break that would leave the paragraph’s first line alone at the foot of one page, or its last line alone at the head of the next, is moved so that neither stands alone. Word applies it wherever nothing says otherwise.