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