docx_show_chunk: Show underlying text tag structure

View source: R/docx_replace.R

docx_show_chunkR Documentation

Show underlying text tag structure

Description

Show the structure of text tags at the current cursor. This is most useful when trying to troubleshoot search-and-replace functionality using body_replace_all_text.

Usage

docx_show_chunk(x)

Arguments

x

a docx device

See Also

body_replace_all_text

Examples

doc <- read_docx()
doc <- body_add_par(doc, "Placeholder one")
doc <- body_add_par(doc, "Placeholder two")

# Show text chunk at cursor
docx_show_chunk(doc)  # Output is 'Placeholder two'

officer documentation built on Oct. 10, 2024, 1:06 a.m.