Skip to content

cupertino-files / ParagraphFormatting

Interface: ParagraphFormatting ​

Defined in: src/tss/stylesheet.ts:108

Properties ​

alignment? ​

optional alignment?: number | TextAlignmentName

Defined in: src/tss/stylesheet.ts:110

0 left, 1 right, 2 center, 3 justified, 4 natural — or the name.


backgroundColor? ​

optional backgroundColor?: Color

Defined in: src/tss/stylesheet.ts:127

Paragraph background. Apple stores a flat colour here, never a gradient.


border? ​

optional border?: Stroke

Defined in: src/tss/stylesheet.ts:129

The paragraph rule / border line.


borderPositions? ​

optional borderPositions?: number

Defined in: src/tss/stylesheet.ts:131

Where border is drawn — see BorderPosition.


decimalTab? ​

optional decimalTab?: string

Defined in: src/tss/stylesheet.ts:153

Character a decimal tab aligns on (locale-dependent: "." or ",").


defaultTabStops? ​

optional defaultTabStops?: number

Defined in: src/tss/stylesheet.ts:151

Spacing of the implicit tab grid used beyond the last explicit stop.


firstLineIndent? ​

optional firstLineIndent?: number

Defined in: src/tss/stylesheet.ts:113


hyphenate? ​

optional hyphenate?: boolean

Defined in: src/tss/stylesheet.ts:122


keepLinesTogether? ​

optional keepLinesTogether?: boolean

Defined in: src/tss/stylesheet.ts:118


keepWithNext? ​

optional keepWithNext?: boolean

Defined in: src/tss/stylesheet.ts:119


leftIndent? ​

optional leftIndent?: number

Defined in: src/tss/stylesheet.ts:114


lineSpacing? ​

optional lineSpacing?: number

Defined in: src/tss/stylesheet.ts:117

Relative line spacing multiple (mode 0).


outlineLevel? ​

optional outlineLevel?: number

Defined in: src/tss/stylesheet.ts:124

Heading outline level (1-based; 0 = body).


pageBreakBefore? ​

optional pageBreakBefore?: boolean

Defined in: src/tss/stylesheet.ts:120


rightIndent? ​

optional rightIndent?: number

Defined in: src/tss/stylesheet.ts:115


roundedCorners? ​

optional roundedCorners?: boolean

Defined in: src/tss/stylesheet.ts:133

Round the corners of a four-sided border.


ruleOffset? ​

optional ruleOffset?: number | { x: number; y: number; }

Defined in: src/tss/stylesheet.ts:147

Distance between the text and its border rules, stored as a TSP.Point. A number writes both slots — they agree in 8637 of the corpus's 8638 instances — and a pair states them separately. The value is relative to the app's 6 pt default gap, and the inspector shows the absolute number: stored 0 displays 6 pt, +12 displays 18 pt and renders the wider gap, negative pulls the rules toward and into the text (−12 overlaps, the stock templates' −3 tightens). undefined clears the field — no corpus style uses the null flag.


ruleWidth? ​

optional ruleWidth?: number

Defined in: src/tss/stylesheet.ts:135

Historical rule width, kept in step with border.width by the apps.


showInToc? ​

optional showInToc?: boolean

Defined in: src/tss/stylesheet.ts:125


spaceAfter? ​

optional spaceAfter?: number

Defined in: src/tss/stylesheet.ts:112


spaceBefore? ​

optional spaceBefore?: number

Defined in: src/tss/stylesheet.ts:111


tabs? ​

optional tabs?: TabStop[]

Defined in: src/tss/stylesheet.ts:149

Explicit tab stops. An empty array clears them.


widowControl? ​

optional widowControl?: boolean

Defined in: src/tss/stylesheet.ts:121


writingDirection? ​

optional writingDirection?: number

Defined in: src/tss/stylesheet.ts:161

Stored raw, and vestigial: no corpus style carries the field, styled values 0/1/2 all render left-to-right, and the app leaves it untouched when flipping a paragraph. The working mechanism is the storage's bidi table — use setParagraphDirection / ParagraphHandle.setDirection instead.

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.