Skip to content

Vizel API / core/src / VizelOutlineItemSpec

Interface: VizelOutlineItemSpec

Defined in: packages/core/src/builders/outline.ts:14

One entry in a document outline tree.

Each entry corresponds to a single heading node from the editor's document. Entries are nested by heading level: an h2 becomes a child of the nearest preceding h1, an h3 becomes a child of the nearest preceding h2, and so on. Entries at the highest level encountered in the document appear at the top of VizelOutlineSpec.items.

Properties

children

ts
readonly children: readonly VizelOutlineItemSpec[];

Defined in: packages/core/src/builders/outline.ts:26

Headings nested under this entry, in document order.


isCurrent

ts
readonly isCurrent: boolean;

Defined in: packages/core/src/builders/outline.ts:24

Whether the current selection sits inside this heading's node range.


key

ts
readonly key: string;

Defined in: packages/core/src/builders/outline.ts:16

Stable identifier for keyed rendering (heading-${pos}).


label

ts
readonly label: string;

Defined in: packages/core/src/builders/outline.ts:20

Plain-text label derived from the heading's text content.


level

ts
readonly level: number;

Defined in: packages/core/src/builders/outline.ts:18

Heading level, 1-6, as stored in the node's level attribute.


pos

ts
readonly pos: number;

Defined in: packages/core/src/builders/outline.ts:22

Document position of the heading node start.

Released under the MIT License.