Skip to content

Hard Break Plugin

The HardBreakPlugin adds line break support within blocks. Press Shift+Enter to insert a <br> element without creating a new block.

import { HardBreakPlugin } from '@notectl/core';
new HardBreakPlugin()

No configuration is needed.

CommandDescriptionReturns
insertHardBreakInsert a line break at the cursorboolean
editor.executeCommand('insertHardBreak');
ShortcutAction
Shift+EnterInsert a hard break

The hard break is an InlineNode — an atomic, width-1 element in the document model:

TypeDOM ElementDescription
hard_break<br>Line break within a block

Unlike regular block splits (Enter), a hard break keeps content within the same block. This is useful for multi-line content inside headings, list items, or table cells.

The HardBreakPlugin uses the InlineNode system. InlineNodes are atomic elements that occupy exactly one position in offset space. They are rendered with contenteditable="false" and behave as indivisible units for selection and deletion.