Skip to content
Log in

Types: editor: Text and fonts

AltTextPatch

Import from @reductoai/pptx/editor.

Name Type Description
decorative? boolean
description? string

AltTextView

The one selected object’s alt text.

Import from @reductoai/pptx/editor.

Name Type Description
decorative boolean
description string
key string

CellMargins

Import from @reductoai/pptx/editor.

Name Type Description
bottom number
left number
right number
top number

FontBytes

Import from @reductoai/pptx-editor.

type FontBytes = (id: string) => Uint8Array | null | undefined

OutlineParagraph

One outline line under a slide’s title: a paragraph of a body placeholder.

Import from @reductoai/pptx/editor.

Name Type Description
level number 0 for the title; 1 for a first-level body paragraph, as PowerPoint’s outline indents it.
paragraph number Paragraph index in the story.
start number Frame offset of the paragraph’s first character, for selectText.
story string
text string

ParagraphAlign

Import from @reductoai/pptx/editor.

type ParagraphAlign = "Left" | "Center" | "Right" | "Justify"

ParagraphSpacing

before and after in points. Indentation, also in points: leftIndent is Before text (marL); firstLineIndent is First line, or negative for Hanging (indent).

Import from @reductoai/pptx/editor.

Name Type Description
after? number
before? number
firstLineIndent? number
leftIndent? number
line? LineSpacing

PastedRun

One run of pasted text; a paragraph break is \r inside text.

Import from @reductoai/pptx/editor.

Name Type Description
format? TextFormat
href? string
text string

TextAnchor

Import from @reductoai/pptx/editor.

type TextAnchor = "top" | "middle" | "bottom"

TextAutofit

Format Shape > Text Box > Autofit: Do not Autofit, Shrink text on overflow, Resize shape to fit text.

Import from @reductoai/pptx/editor.

type TextAutofit = "none" | "shrink" | "resize"

TextBoxOptions

Format Shape > Text Box: autofit, the four margins in points and Wrap text in shape.

Import from @reductoai/pptx/editor.

Name Type Description
autofit TextAutofit
bottom number
left number
right number
top number
wrap boolean

TextCase

Change Case: a word in capitals stays, as an acronym.

Import from @reductoai/pptx/editor.

type TextCase = "sentence" | "lower" | "upper" | "capitalize" | "toggle"

TextColumns

Columns in a text frame; spacing is the gap between them in points.

Import from @reductoai/pptx/editor.

Name Type Description
count number
spacing number

TextDirection

Import from @reductoai/pptx/editor.

type TextDirection = "horizontal" | "rotate90" | "rotate270" | "stacked"

TextFormat

Import from @reductoai/pptx/editor.

Name Type Description
bold? boolean
color? string #RRGGBB.
font? string
fontFarEast? string East Asian face (a:ea).
highlight? string | null #RRGGBB; null clears it.
italic? boolean
size? number Points.
spacing? number | null Character spacing in points; null is Normal (CHARACTER_SPACINGS).
strikethrough? boolean
subscript? boolean Lowered 25% (baseline="-25000"); true clears a superscript.
superscript? boolean Raised 30% (baseline="30000"); true clears a subscript.
symbol? string Face of the run’s private-use characters (a:sym), as a symbol font is written.
underline? boolean

Type to search…

escClose