@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| Member | Type | Summary |
|---|---|---|
| level | number | Outline level (0 = Heading 1, 1 = Heading 2, etc.) |
| pmPos | number | ProseMirror document position of the paragraph node |
| text | string | The text content of the heading |