@eigenpal/docx-editor-core/utils/headingCollector

Functions (1)

collectHeadingsfunctionSource ↗

Collect all headings from a ProseMirror document.

Detection logic: 1. Check outlineLevel attr (set by OOXML parsing or style resolution) 2. Fallback to styleId matching /^[Hh]eading(d)$/

declare function collectHeadings(doc: Node): HeadingInfo[];

Interfaces (1)

HeadingInfointerfaceSource ↗

Information about a heading found in the document.

interface HeadingInfo
MemberTypeSummary
levelnumberOutline level (0 = Heading 1, 1 = Heading 2, etc.)
pmPosnumberProseMirror document position of the paragraph node
textstringThe text content of the heading

On this page