Skip to main content

clear_section_content_with_undo

Function clear_section_content_with_undo 

Source
pub fn clear_section_content_with_undo(
    doc: &mut Document,
    section_id: &BlockId,
) -> Result<ClearResult>
Expand description

Clear all children of a section with undo support.

This is like clear_section_content but preserves the deleted content for potential restoration using restore_deleted_content.

§Arguments

  • doc - The document to modify
  • section_id - The block ID of the section to clear

§Returns

  • Ok(ClearResult) - Contains removed IDs and preserved content
  • Err(Error) - If the section doesn’t exist