Skip to main content

blocks_text_content

Function blocks_text_content 

Source
fn blocks_text_content(blocks: &[GutenbergBlock], texts: &mut Vec<String>)
Expand description

The text a block and everything nested inside it carries, one entry per block that has any.

Blocks hold their text as HTML in a content attribute, which is stripped here: callers render this as plain text, and the markup is several times the size of the words in it. A block with no text of its own (a layout wrapper, an image) contributes only what its children do.