Skip to content
GitHub

Horizontal Rule

The horizontalRule node is used to represent a thematic break in the document, typically rendered as a horizontal line.

import { defineHorizontalRulefunction defineHorizontalRule(): HorizontalRuleExtension
@public
} from 'prosekit/extensions/horizontal-rule'
const extensionconst extension: HorizontalRuleExtension = defineHorizontalRulefunction defineHorizontalRule(): HorizontalRuleExtension
@public
()
editorconst editor: Editor<HorizontalRuleExtension>.commands
Editor<HorizontalRuleExtension>.commands: ToCommandAction<{
    insertHorizontalRule: [];
}>
All {@link CommandAction } s defined by the editor.
.insertHorizontalRule
insertHorizontalRule: CommandAction
() => boolean
Execute the current command. Return `true` if the command was successfully executed, otherwise `false`.
()

Type three hyphens (---) on an empty line. This will automatically create a horizontal rule.