Vizel API / core/src / buildVizelOutlineSpec
Function: buildVizelOutlineSpec()
ts
function buildVizelOutlineSpec(
editor,
currentNodePos,
locale): VizelOutlineSpec;Defined in: packages/core/src/builders/outline.ts:56
Build the outline spec from an editor's current document.
Walks every node in editor.state.doc, collects each heading, and nests them by level. The active entry is the one whose document range contains currentNodePos; when currentNodePos is null or sits outside every heading, no entry is marked current.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
currentNodePos | number | null |
locale | VizelLocale |