ReferenceFormatParagraph Formatting
Paragraph Formatting operations
Paragraph-level direct formatting: alignment, indentation, spacing, borders, shading, and more.
22 operations. Names, descriptions, and behavior flags come from the canonical contract.
Operations
format.paragraph.applyBatchApply an explicit ordered paragraph action program target-major to 1..1000 unique existing targets in one story, atomically. Accepts 1..1000 closed actions, at most 32000 expanded writer calls and 1048576 JSON bytes, cumulative across batches in an atomic plan. Uses existing writer validation; omitted groups are preserved. No nested plans, per-action targets/options or dry run. Expected revision is consumed once at batch start; live freshness is checked again before publication. Shared sessions support direct identity-preserving writes only.mutatesformat.paragraph.clearAlignmentRemove direct paragraph alignment, reverting to style-defined or default alignment.mutatestrackedformat.paragraph.clearAllTabStopsRemove all tab stops from a paragraph.mutatestrackedformat.paragraph.clearBorderRemove border for a specific side or all sides of a paragraph.mutatestrackedformat.paragraph.clearDirectionRemove explicit paragraph direction, reverting to inherited or default (LTR).mutatestrackedformat.paragraph.clearIndentationRemove all direct paragraph indentation.mutatestrackedformat.paragraph.clearShadingRemove all paragraph shading.mutatestrackedformat.paragraph.clearSpacingRemove all direct paragraph spacing.mutatestrackedformat.paragraph.clearTabStopRemove a tab stop at a given position.mutatestrackedformat.paragraph.resetDirectFormattingStrip all direct paragraph formatting while preserving style reference, numbering, and section metadata.mutatestrackedformat.paragraph.setAlignmentSet visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.mutatestrackedformat.paragraph.setBorderSet border properties for a specific side of a paragraph.mutatestrackedformat.paragraph.setDirectionSet paragraph base direction (LTR or RTL via w:bidi). Optionally align text to match.mutatestrackedformat.paragraph.setFlowOptionsSet paragraph flow flags: contextual spacing, page-break-before, suppress-auto-hyphens, and the advanced layout toggles auto-space-DE, auto-space-DN, adjust-right-indent, and snap-to-grid.mutatestrackedformat.paragraph.setIndentationSet paragraph indentation properties (signed left/right, firstLine, hanging) in twips.mutatestrackedformat.paragraph.setKeepOptionsSet keep-with-next, keep-lines-together, and widow/orphan control flags.mutatestrackedformat.paragraph.setMarkRunPropsSet the paragraph mark's run properties (w:pPr/w:rPr), e.g. the font size or specVanish carried by the paragraph-end mark.mutatesformat.paragraph.setNumberingAttach numbering (numId + level) to an existing paragraph or heading so it joins a numbered sequence. Numbering is a paragraph property; the node and its style are otherwise unchanged, though any direct paragraph indent is cleared so the numbering level controls indentation. Direct edits only; tracked mode is unsupported.mutatesformat.paragraph.setOutlineLevelSet the paragraph outline level (0–9) or null to clear.mutatestrackedformat.paragraph.setShadingSet paragraph shading (background fill, pattern color, pattern type).mutatestrackedformat.paragraph.setSpacingSet paragraph spacing properties (before, after, line, lineRule) in twips.mutatestrackedformat.paragraph.setTabStopAdd or replace a tab stop at a given position.mutatestracked