pub trait DrawingTextBoxExt {
// Required method
fn text_box_texts(&self) -> Vec<String>;
}Expand description
Extension methods for CTDrawing — extract text from DrawingML text boxes.
Modern DOCX text boxes live inside <wp:anchor> elements within a <w:drawing>.
The content path is:
<w:drawing> → <wp:anchor> → <a:graphic> → <a:graphicData> →
<wps:wsp> → <wps:txbx> → <w:txbxContent> → paragraphs
Since CTDrawing captures all children as raw XML (extra_children), this trait
walks the tree recursively to find w:txbxContent elements and parses them.
ECMA-376 Part 1, §20.4.2.3 (anchor) and §20.1.2.2.19 (graphic).
Required Methods§
Sourcefn text_box_texts(&self) -> Vec<String>
fn text_box_texts(&self) -> Vec<String>
Extract the plain text of all text boxes in this drawing.
Returns one String per text box found (anchored or inline).
Each string contains the text of all paragraphs in that text box,
joined with newlines.
Implementors§
impl DrawingTextBoxExt for CTDrawing
Available on crate features
wml-drawings and extra-children only.