feat: setHardBreak now keeps splittable marks by default, fix #1934

This commit is contained in:
Philipp Kühn
2021-09-23 09:34:47 +02:00
parent 6c8ff4dc67
commit 377bbb177d
2 changed files with 37 additions and 5 deletions

View File

@@ -13,10 +13,16 @@ npm install @tiptap/extension-hard-break
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 |
| --------- | ---------- | ----------------- |
| hardBreak | — | Add a line break. |
| Command | Parameters | Description |
| ------------ | ---------- | ----------------- |
| setHardBreak | — | Add a line break. |
## Keyboard shortcuts
* `Shift` `Enter`