Interface WikiHeading

A parsed wikitext heading.

interface WikiHeading {
    h: HTMLHeadingElement;
    id: string;
    level: number;
    root: Element;
    title: string;
    type: WikiHeadingType;
}

Properties

Properties

The <h*> element of this heading.

id: string

The ID of this heading. Also known as the fragment. On Parsoid, this is the html5 fragment mode (mostly Unicode characters).

level: number

The level of this heading. Goes from 1 to 6, referring to h1 to h6.

root: Element

The root element of this heading. This refers to the topmost element related to this heading, excluding the <section> which contains it.

title: string

The title of this heading. This is the actual text that the reader can see, and the actual text that matters. Unsupported syntax, such as using <math> templates in the heading, may not work.

The type of this heading.