Skip to content

Heading

The Heading extension allows you to add a heading to your editor.

Usage

tsx
import { Heading } from 'reactjs-tiptap-editor/heading'; 

const extensions = [
  ...,
  // Import Extensions Here
  Heading 
];

Options

shortcutKeys

Type: string[][]
Default: ['alt', 'mod', '${level}']

Keyboard shortcuts for the extension. To override shortcuts for different heading levels:

tsx
Heading.configure({
  shortcutKeys: [
    ['alt', 'mod', '0'],
    ['alt', 'mod', '1'],
    ['alt', 'mod', '2'],
    ['alt', 'mod', '3'],
    ['alt', 'mod', '4'],
    ['alt', 'mod', '5'],
    ['alt', 'mod', '6'],
    ...      
  ]
});

Source

SourceDocs

Contributors

Changelog

v0.3.28 on 10/13/2025
20125 - feat: add shortcutKeys override(s) to extensions

Made with ❤️