pub fn integrate_section_blocks(
doc: &mut Document,
target_section: &BlockId,
source_doc: &Document,
base_heading_level: Option<usize>,
) -> Result<Vec<BlockId>>Expand description
Integrate blocks from a source document into a target section.
This takes all non-root blocks from the source document and adds them as children of the target section, preserving their relative hierarchy.
§Arguments
doc- The target document to modifytarget_section- The section to add blocks tosource_doc- The source document containing blocks to integratebase_heading_level- Optional base level for heading adjustment
§Returns
Ok(Vec<BlockId>)- List of added block IDsErr(Error)- If the target section doesn’t exist