Skip to content

Interface: PlaceholderBinding ​

A slide object's placeholder binding stated in full: the p:ph it writes, with or without a layout placeholder of that name in the same deck.

The string form of placeholder binds only to a placeholder the deck's own layout defines by name, and takes its idx from there. A slide that fills a placeholder of a layout the deck does not define, such as one from a template it is appended to, needs the idx stated, because PowerPoint matches a slide placeholder to its layout's by idx.

Examples ​

ts
{ idx: 1 } // the content placeholder of PowerPoint's "Title and Content" layout
ts
{ type: 'ctrTitle' } // the title of a title slide

Properties ​

idx? ​

optional idx?: number

p:ph/@idx, a non-negative integer. Omitted, it is the named layout placeholder's index, else none, which PowerPoint reads as 0.


name? ​

optional name?: string

Name of a layout placeholder defined in this deck, as the string form takes it. The object inherits its options and frame, and its type and idx unless they are stated here too.


type? ​

optional type?: "media" | "body" | "dt" | "title" | "chart" | "pic" | "tbl" | "ctrTitle" | "subTitle" | "sldNum" | "ftr" | "hdr" | "obj" | "clipArt" | "dgm" | "sldImg"

p:ph/@type. Omitted, it is the named layout placeholder's type, else none, which PowerPoint reads as obj.