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

28 lines
701 B
Markdown
Raw Normal View History

2020-08-20 21:33:16 +08:00
# HardBreak
The HardBreak extensions adds support for the `<br>` HTML tag, which forces a line break.
2020-08-20 21:33:16 +08:00
## Installation
```bash
2020-10-30 21:24:16 +08:00
# with npm
npm install @tiptap/extension-hard-break
2020-10-30 21:24:16 +08:00
# with Yarn
yarn add @tiptap/extension-hard-break
```
2020-09-10 17:52:20 +08:00
## Commands
| Command | Parameters | Description |
| --------- | ---------- | ----------------- |
| hardBreak | — | Add a line break. |
## Keyboard shortcuts
* `Shift`&nbsp;`Enter`
* Windows/Linux: `Control`&nbsp;`Enter`
* macOS: `Cmd`&nbsp;`Enter`
2020-09-21 22:59:28 +08:00
## Source code
[packages/extension-hard-break/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-hard-break/)
## Usage
<demo name="Nodes/HardBreak" highlight="3-5,17,36" />