Every extension
heading
Parses h1, h2, h3, h4, h5, h6 · renders h1.
Adding it
import { createEditor, document, paragraph, text, heading } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, heading],
element: document.querySelector('#editor'),
})
There is no separate package · heading is already in @matrajs/core, and an extension you do not import is not in your bundle. document, paragraph and text are the floor every document needs.
Commands
-
editor.commands.setHeading() -
editor.commands.toggleHeading()
Keys
- Mod-Alt-1 ·
- Mod-Alt-2 ·
- Mod-Alt-3 ·
- Mod-Alt-4 ·
- Mod-Alt-5 ·
- Mod-Alt-6 ·
Attributes
-
level· defaults to1
HTML
-
Parses
h1h2h3h4h5h6 -
Renders
h1