Installation
Usage
The HorizontalRule extension is included in the StarterKit by default:Configuration
HTMLAttributes
Custom HTML attributes to add to the horizontal rule element.Record<string, any>
default:"{}"
Custom HTML attributes that should be added to the rendered HTML tag.
nextNodeType
The default node type to insert after the horizontal rule.string
default:"'paragraph'"
Specifies which node type to create after inserting a horizontal rule at the end of the document.
Commands
setHorizontalRule
Inserts a horizontal rule at the current position and automatically positions the cursor after it.Input Rules
The HorizontalRule extension supports multiple Markdown-style input rules:- Type
---followed by a space to insert a horizontal rule - Type
___followed by a space to insert a horizontal rule - Type
***followed by a space to insert a horizontal rule
Behavior
When you insert a horizontal rule:- The rule is inserted at the current cursor position
- If there’s content after the rule, the cursor moves to that content
- If the rule is at the end of the document, a new paragraph is automatically created after it
- The cursor is positioned in the correct location for continued editing