Skip to content

purrmd


purrmd / commands / isHeading

Function: isHeading() ​

isHeading(state, level?): boolean

Defined in: packages/core/src/core/command/heading.ts:126

Check if the current selection is all headings of a specific level or paragraphs if level is 0.

Parameters ​

state ​

EditorState

EditorState

level? ​

number

Heading level (1-6) or 0 for paragraphs, if undefined checks for any heading level (1-6)

Returns ​

boolean

boolean