Skip to content

Horizontal Rule Plugin

The HorizontalRulePlugin adds horizontal rule (divider) support with a toolbar button and Markdown-style input rule.

Horizontal rule in the editor

import { HorizontalRulePlugin } from '@notectl/core/plugins/horizontal-rule';
new HorizontalRulePlugin()
interface HorizontalRuleConfig {
/** Custom locale strings. */
readonly locale?: HorizontalRuleLocale;
}
CommandDescriptionReturns
insertHorizontalRuleInsert a horizontal rule followed by a new paragraphboolean
editor.executeCommand('insertHorizontalRule');

The command inserts the <hr> and automatically creates a new paragraph below it, so the cursor has a place to continue typing.

ShortcutAction
Ctrl+Shift+H / Cmd+Shift+HInsert horizontal rule

The plugin registers a toolbar button in the block group with a horizontal line icon. Clicking it executes the insertHorizontalRule command.

PatternResult
--- (three or more dashes + space)Horizontal rule
TypeHTML TagDescription
horizontal_rule<hr>Void block (no editable content)

The horizontal rule is a void block — it has no text content and cannot be edited. It acts purely as a visual divider between content sections.