Skip to content

Type Editor


Type Editor / @type-editor/commands / insert-hard-break / insertHardBreak

Function: insertHardBreak()

ts
function insertHardBreak(schema): Command;

Defined in: insert-hard-break.ts:13

Creates a command that inserts a hard break (line break) at the current selection.

The hard break replaces the current selection and scrolls the view to ensure the inserted break is visible.

Parameters

ParameterTypeDescription
schemaNodeTypeThe node type for the hard break element to insert.

Returns

Command

A command function that inserts the hard break when executed.