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';
new HorizontalRulePlugin()
interface HorizontalRuleConfig {
/** Render separator after toolbar item. */
readonly separatorAfter?: boolean;
}
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.

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.