Skip to content

Placeholder definitions #987

@bigbug

Description

@bigbug

The definition of the Types does not allow settings apart from the base position props.
However, the code allows other settings like the color.

export interface PlaceholderProps {

In the following code the "color" key is highlighted by typescript since the type definitions do not allow color. However the color in the resulting power point is shown properly. So I guess the definition just has to be adjusted properly.

pptx = new pptxgen();
    pptx.layout = "LAYOUT_WIDE";
    pptx.defineSlideMaster({
      title: "PLACEHOLDER_SLIDE",
      background: { color: "000000" },
      objects: [
          { text: { text: "Status Report", options: { x: 0, y: 0, w: 6, h: 0.75 } } },
          {
              placeholder: {
                  options: { name: "body", type: "body", x: 0.6, y: 1.5, w: 12, h: 5.25, color: "FFFFFF" },
                  text: "(custom placeholder text!)",
              },
          },
      ],
      slideNumber: { x: 0.3, y: "95%" },
    });

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions