Add or update text in a Google Slides presentation
Usage
add_text_multi(
slide_obj,
text,
position,
position_base = NULL,
element_id = NULL,
text_style = NULL,
order = c("front", "back"),
pass_strategy = c("one", "all"),
replacement_strategy = get_replacement_strategy(),
match_fn = get_match_fn(),
...
)Arguments
- slide_obj
A Google Slides slide object.
- text
A vector of character strings to add.
- position
A vector of objects of class
r2slides::slide_position- position_base
A vector of objects of class
r2slides::slide_position- element_id
Optional. A vector of string IDs of an existing text element to update. If element_id is
NULLa new element will be created.- text_style
Optional. A vector of text_style or style_rule objects.
- order
Optional. One of
"front"or"back". Controls the Z-order of each created element. Default:"front". Ignored for elements updated viaelement_id.- pass_strategy
Optional. A strategy to pass additional values to style_rule objects.
- replacement_strategy
One of
"add"(default),"replace", or"skip". Overrides the package-wide default set byset_replacement_strategy()."add"always creates a new element."replace"deletes any matching element and creates a fresh one."skip"leaves a matching element untouched and suppresses creation.- match_fn
A function that identifies an existing slide element matching the new one. Must have signature
function(new_spec, existing_elements) -> character(1) | NULL. Seematch_by_type_and_position()for details and the built-in implementation. Overrides the package-wide default set byset_match_fn().- ...
Additional values available to style_rule objects.