tiptap/docs/api/nodes/hard-break.md

1.5 KiB

HardBreak

Version Downloads

The HardBreak extensions adds support for the <br> HTML tag, which forces a line break.

Installation

# with npm
npm install @tiptap/extension-hard-break

# with Yarn
yarn add @tiptap/extension-hard-break

Settings

Option Type Default Description
HTMLAttributes Object {} Custom HTML attributes that should be added to the rendered HTML tag.
keepMarks Boolean true Decides whether to keep marks after a line break. Based on the keepOnSplit option for marks.

Commands

Command Parameters Description
setHardBreak Add a line break.

Keyboard shortcuts

  • Shift Enter
  • Windows/Linux: Control Enter
  • macOS: Cmd Enter

Source code

packages/extension-hard-break/

Usage