Merge branch 'main' of github.com:ueberdosis/tiptap

This commit is contained in:
Hans Pagel
2021-09-27 22:34:23 +02:00
48 changed files with 676 additions and 620 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`

View File

@@ -1,7 +1,5 @@
# Long texts
This demo has 250 paragraphs and more than 22,000 words, check the performance yourself.
Most of the processing is needed to check the active state of the buttons for the selection. If youd like to optimize for really long texts, try to limit these checks in your toolbar. But honestly, we think its great already, isnt it?
This demo has more than 200,000 words, check the performance yourself.
<tiptap-demo name="Examples/Book"></tiptap-demo>

View File

@@ -136,13 +136,13 @@ All new extensions come with specific commands to set, unset and toggle styles.
| ~~`.bullet_list()`~~ | `.toggleBulletList()` |
| ~~`.code()`~~ | `.toggleCode()` |
| ~~`.code_block()`~~ | `.toggleCodeBlock()` |
| ~~`.hard_break()`~~ | `.toggleHardBreak()` |
| ~~`.hard_break()`~~ | `.setHardBreak()` |
| ~~`.heading()`~~ | `.toggleHeading()` |
| ~~`.horizontal_rule()`~~ | `.toggleHorizontalRule()` |
| ~~`.horizontal_rule()`~~ | `.setHorizontalRule()` |
| ~~`.italic()`~~ | `.toggleItalic()` |
| ~~`.link()`~~ | `.toggleLink()` |
| ~~`.ordered_list()`~~ | `.toggleOrderedList()` |
| ~~`.paragraph()`~~ | `.toggleParagraph()` |
| ~~`.paragraph()`~~ | `.setParagraph()` |
| ~~`.strike()`~~ | `.toggleStrike()` |
| ~~`.underline()`~~ | `.toggleUnderline()` |
| … | … |