Horizontal Rule
The horizontalRule
node is used to represent a thematic break <hr>
in the document, typically rendered as a horizontal line.
import { defineHorizontalRule function defineHorizontalRule(): HorizontalRuleExtension
} from 'prosekit/extensions/horizontal-rule'
const extension const extension: HorizontalRuleExtension
= defineHorizontalRule function defineHorizontalRule(): HorizontalRuleExtension
()
Commands
Section titled “Commands”insertHorizontalRule
Section titled “insertHorizontalRule”editor const 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`. ()
Keyboard Interaction
Section titled “Keyboard Interaction”Type three hyphens (---
) on an empty line. This will automatically create a horizontal rule.