Skip to main content

Module section

Module section 

Source
Expand description

Section management utilities for UCM documents.

This module provides utilities for working with document sections, including clearing content, integrating blocks, and finding sections by path.

The module supports undo operations by preserving deleted content in DeletedContent structures that can be used for restoration.

Structs§

ClearResult
Result of a section clear operation with undo support
DeletedContent
Represents deleted content that can be restored.

Functions§

clear_section_content
Clear all children of a section, preparing it for new content.
clear_section_content_with_undo
Clear all children of a section with undo support.
find_section_by_path
Find a section by path (e.g., “Section 1 > Subsection 2”).
get_all_sections
Get all sections (heading blocks) in the document.
get_section_depth
Get the depth of a section in the document hierarchy.
integrate_section_blocks
Integrate blocks from a source document into a target section.
restore_deleted_content
Restore previously deleted content to a document.