Installation
Usage
The Heading extension is included in the StarterKit by default:Configuration
levels
Specifies which heading levels are available in the editor.An array of heading levels to enable. Each level corresponds to an HTML heading tag (h1-h6).
HTMLAttributes
Custom HTML attributes to add to the rendered heading elements.Custom HTML attributes that should be added to the rendered HTML tag.
Commands
setHeading
Converts the current node to a heading with the specified level.toggleHeading
Toggles a heading node with the specified level. If the current node is already a heading with that level, it converts it to a paragraph.Keyboard Shortcuts
- Mod-Alt-1: Toggle heading level 1
- Mod-Alt-2: Toggle heading level 2
- Mod-Alt-3: Toggle heading level 3
- Mod-Alt-4: Toggle heading level 4
- Mod-Alt-5: Toggle heading level 5
- Mod-Alt-6: Toggle heading level 6
Input Rules
The Heading extension supports Markdown-style input rules:- Type
#followed by a space to create an h1 - Type
##followed by a space to create an h2 - Type
###followed by a space to create an h3 - And so on, up to
######for h6