Remove placeholder from a slide

remove_slide_ph(
  pptx,
  ph_id,
  index,
  error_call = current_env(),
  verbose = getOption("powerup.verbose", default = FALSE)
)

Arguments

pptx

A PowerPoint wrapped in a <pptx_container> object. see load_pptx()

ph_id

placeholder id

index

index of slide

error_call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

verbose

inform about the removed placeholders

Examples

pptx <- load_pptx() |>
  add_slide(layout = "Title and Content", index = 1, content("hello", ph = ph_title()))
#> → powerup to add 1 content at slide 1.
#> ✔ Successfully added content to placeholder "Title 1".

## remove the placeholder from the slide
pptx <- remove_slide_ph(pptx,
          index = 1,
          ph_id = read_slide_placeholders(pptx, index = 1)$slide_ph_id[1]
        )