diff --git a/docs/src/demos/Extensions/Heading/index.vue b/docs/src/demos/Extensions/Heading/index.vue index c3dd7808e..015bda501 100644 --- a/docs/src/demos/Extensions/Heading/index.vue +++ b/docs/src/demos/Extensions/Heading/index.vue @@ -44,10 +44,10 @@ export default { }), ], content: ` -
*
, -
or +
at the beginning of a new line and it will magically transform to a bullet list.
+## Installation
::: warning Use with ListItem
The `BulletList` extension is intended to be used with the [`ListItem`](/api/extensions/list-item) extension. Make sure to import that one too, otherwise you’ll get a SyntaxError.
:::
-## Installation
```bash
# With npm
-npm install @tiptap/extension-bullet-list
+npm install @tiptap/extension-bullet-list @tiptap/extension-list-item
# Or: With Yarn
-yarn add @tiptap/extension-bullet-list
+yarn add @tiptap/extension-bullet-list @tiptap/extension-list-item
```
-## Options
+## Settings
| Option | Type | Default | Description |
| ------ | ------ | ------- | -------------------------------------------- |
| class | string | – | Add a custom class to the rendered HTML tag. |
diff --git a/docs/src/docPages/api/extensions/code-block-highlight.md b/docs/src/docPages/api/extensions/code-block-highlight.md
index 0d8e7d994..f5eb1540b 100644
--- a/docs/src/docPages/api/extensions/code-block-highlight.md
+++ b/docs/src/docPages/api/extensions/code-block-highlight.md
@@ -1,7 +1,7 @@
# CodeBlockHighlight
Enables you to use the `` HTML tag with auto-detected syntax highlighting in the editor. -## Options +## Settings *None* ## Commands diff --git a/docs/src/docPages/api/extensions/code-block.md b/docs/src/docPages/api/extensions/code-block.md index 9208fcbe6..995098829 100644 --- a/docs/src/docPages/api/extensions/code-block.md +++ b/docs/src/docPages/api/extensions/code-block.md @@ -16,7 +16,7 @@ npm install @tiptap/extension-code-block yarn add @tiptap/extension-code-block ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/code.md b/docs/src/docPages/api/extensions/code.md index ad39a2934..5a908fe84 100644 --- a/docs/src/docPages/api/extensions/code.md +++ b/docs/src/docPages/api/extensions/code.md @@ -12,7 +12,7 @@ npm install @tiptap/extension-code yarn add @tiptap/extension-code ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/hard-break.md b/docs/src/docPages/api/extensions/hard-break.md index 3e3a24dea..9853559bd 100644 --- a/docs/src/docPages/api/extensions/hard-break.md +++ b/docs/src/docPages/api/extensions/hard-break.md @@ -10,7 +10,7 @@ npm install @tiptap/extension-hard-break yarn add @tiptap/extension-hard-break ``` -## Options +## Settings *None* ## Commands diff --git a/docs/src/docPages/api/extensions/heading.md b/docs/src/docPages/api/extensions/heading.md index dc47e60cf..4f1081b29 100644 --- a/docs/src/docPages/api/extensions/heading.md +++ b/docs/src/docPages/api/extensions/heading.md @@ -1,7 +1,7 @@ # Heading The Heading extension adds support for headings of different levels. Headings are rendered with ``, `
`, `
`, `
`, `
` or `
` HTML tags. By default all six headline levels are enabled, but you can pass an array to only allow a few levels. Check the usage example to see how this is done. -Type `# ` at the beginning of a new line and it will magically transform to a headline, same for `## `, `### `, `#### `, `##### ` and `###### `. +Type
#
at the beginning of a new line and it will magically transform to a headline, same for##
,###
,####
,#####
and######
. ## Installation ```bash @@ -12,7 +12,7 @@ npm install @tiptap/extension-heading yarn add @tiptap/extension-heading ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------------------ | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | @@ -35,4 +35,4 @@ yarn add @tiptap/extension-heading [packages/extension-heading/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-heading/) ## Usage -+ diff --git a/docs/src/docPages/api/extensions/history.md b/docs/src/docPages/api/extensions/history.md index ac27723d2..f4f877740 100644 --- a/docs/src/docPages/api/extensions/history.md +++ b/docs/src/docPages/api/extensions/history.md @@ -10,8 +10,10 @@ npm install @tiptap/extension-history yarn add @tiptap/extension-history ``` -## Options -*None* +## Settings +| Option | Type | Default | Description | +| -------------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| historyPluginOptions | Object | {} | Supports the following configuration options:
**depth:** The amount of history events that are collected before the oldest events are discarded. Defaults to 100.
**newGroupDelay:** The delay between changes after which a new group should be started. Defaults to 500 (milliseconds). Note that when changes aren't adjacent, a new group is always started. | ## Commands | Command | Options | Description | @@ -20,6 +22,7 @@ yarn add @tiptap/extension-history | redo | — | Redo the last change. | ## Keyboard shortcuts +### Undo * Windows & Linux: `Control` + `Z` * macOS: `Command` + `Z` diff --git a/docs/src/docPages/api/extensions/horizontal-rule.md b/docs/src/docPages/api/extensions/horizontal-rule.md index 39abe8759..2363e8b5a 100644 --- a/docs/src/docPages/api/extensions/horizontal-rule.md +++ b/docs/src/docPages/api/extensions/horizontal-rule.md @@ -1,7 +1,7 @@ # HorizontalRule Use this extension to render a `
` HTML tag. If you pass `
` in the editor’s initial content, it’ll be rendered accordingly. -Type three dashes (`---`) or three underscores and a space (`___ `) at the beginning of a new line and it will magically transform to a horizontal rule. +Type three dashes (---
) or three underscores and a space (___
) at the beginning of a new line and it will magically transform to a horizontal rule. ## Installation ```bash @@ -12,7 +12,7 @@ npm install @tiptap/extension-horizontal-rule yarn add @tiptap/extension-horizontal-rule ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/italic.md b/docs/src/docPages/api/extensions/italic.md index 2d92c53f8..238fcb399 100644 --- a/docs/src/docPages/api/extensions/italic.md +++ b/docs/src/docPages/api/extensions/italic.md @@ -1,6 +1,8 @@ # Italic Use this extension to render text in *italic*. If you pass ``, `` tags, or text with inline `style` attributes setting `font-style: italic` in the editor’s initial content, they all will be rendered accordingly. +Type `*one asterisk*` or `_one underline_` and it will magically transform to *italic* text while you type. + ::: warning Restrictions The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text marked italic, regardless of the method will be normalized to `` HTML tags. ::: @@ -14,7 +16,7 @@ npm install @tiptap/extension-italic yarn add @tiptap/extension-italic ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/link.md b/docs/src/docPages/api/extensions/link.md index cbf58a601..a9844c095 100644 --- a/docs/src/docPages/api/extensions/link.md +++ b/docs/src/docPages/api/extensions/link.md @@ -10,7 +10,7 @@ npm install @tiptap/extension-link yarn add @tiptap/extension-link ``` -## Options +## Settings | Option | Type | Default | Description | | ----------- | ------- | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/list-item.md b/docs/src/docPages/api/extensions/list-item.md index 9b990e1db..dacf64ed3 100644 --- a/docs/src/docPages/api/extensions/list-item.md +++ b/docs/src/docPages/api/extensions/list-item.md @@ -14,7 +14,7 @@ npm install @tiptap/extension-list-item yarn add @tiptap/extension-list-item ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | \ No newline at end of file diff --git a/docs/src/docPages/api/extensions/ordered-list.md b/docs/src/docPages/api/extensions/ordered-list.md index 0d0cb59d1..b995d6eee 100644 --- a/docs/src/docPages/api/extensions/ordered-list.md +++ b/docs/src/docPages/api/extensions/ordered-list.md @@ -1,20 +1,20 @@ # OrderedList Enables you to use the `` HTML tag in the editor. -::: warning Restrictions -This extensions is intended to be used with the `ListItem` extension. +## Installation +::: warning Use with ListItem +The `OrderedList` extension is intended to be used with the [`ListItem`](/api/extensions/list-item) extension. Make sure to import that one too, otherwise you’ll get a SyntaxError. ::: -## Installation ```bash # With npm -npm install @tiptap/extension-ordered-list +npm install @tiptap/extension-ordered-list @tiptap/extension-list-item # Or: With Yarn -yarn add @tiptap/extension-ordered-list +yarn add @tiptap/extension-ordered-list @tiptap/extension-list-item ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/paragraph.md b/docs/src/docPages/api/extensions/paragraph.md index 479bd940d..e57d8e546 100644 --- a/docs/src/docPages/api/extensions/paragraph.md +++ b/docs/src/docPages/api/extensions/paragraph.md @@ -1,6 +1,10 @@ # Paragraph Yes, the schema is very strict. Without this extension you won’t even be able to use paragraphs in the editor. +:::warning Breaking Change from 1.x → 2.x +Tiptap 1 tried to hide that node from you, but it has always been there. You have to explicitly import it from now on (or use `defaultExtensions()`). +::: + ## Installation ```bash # With npm @@ -10,7 +14,7 @@ npm install @tiptap/extension-paragraph yarn add @tiptap/extension-paragraph ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/strike.md b/docs/src/docPages/api/extensions/strike.md index 2db6b9a58..7c321d72e 100644 --- a/docs/src/docPages/api/extensions/strike.md +++ b/docs/src/docPages/api/extensions/strike.md @@ -1,7 +1,7 @@ # Strike Use this extension to render ~~striked text~~. If you pass `
`, ``, `` tags, or text with inline `style` attributes setting `text-decoration: line-through` in the editor’s initial content, they all will be rendered accordingly. -Type `~text between tildes~` and it will be magically ~~striked through~~ while you type. +Type~text between tildes~
and it will be magically ~~striked through~~ while you type. ::: warning Restrictions The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text striked through, regardless of the method will be normalized to `` HTML tags. @@ -16,7 +16,7 @@ npm install @tiptap/extension-strike yarn add @tiptap/extension-strike ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/docPages/api/extensions/text.md b/docs/src/docPages/api/extensions/text.md index b61650746..d6664a5fa 100644 --- a/docs/src/docPages/api/extensions/text.md +++ b/docs/src/docPages/api/extensions/text.md @@ -2,7 +2,7 @@ **The `Text` extension is required**, at least if you want to work with text of any kind and that’s very likely. This extension is a little bit different, it doesn’t even render HTML. It’s plain text, that’s all. :::warning Breaking Change from 1.x → 2.x -Tiptap 1 tried to hide that node from you, but it has always been there. +Tiptap 1 tried to hide that node from you, but it has always been there. You have to explicitly import it from now on (or use `defaultExtensions()`). ::: ## Installation diff --git a/docs/src/docPages/api/extensions/todo-item.md b/docs/src/docPages/api/extensions/todo-item.md index f1a8cef7c..cd7f171a7 100644 --- a/docs/src/docPages/api/extensions/todo-item.md +++ b/docs/src/docPages/api/extensions/todo-item.md @@ -5,7 +5,7 @@ It renders a single toggleable item of a list. This extensions is intended to be used with the `TodoList` extension. ::: -## Options +## Settings | Option | Type | Default | Description | | ------ | ------- | ------- | ------------------------------------- | | nested | Boolean | false | Specifies if you can nest todo lists. | diff --git a/docs/src/docPages/api/extensions/todo-list.md b/docs/src/docPages/api/extensions/todo-list.md index 620a80110..0fe0b3009 100644 --- a/docs/src/docPages/api/extensions/todo-list.md +++ b/docs/src/docPages/api/extensions/todo-list.md @@ -5,7 +5,7 @@ Renders a toggleable list of items. This extensions is intended to be used with the `TodoItem` extension. ::: -## Options +## Settings *None* ## Commands diff --git a/docs/src/docPages/api/extensions/underline.md b/docs/src/docPages/api/extensions/underline.md index 6913e46e9..1b6f2f68f 100644 --- a/docs/src/docPages/api/extensions/underline.md +++ b/docs/src/docPages/api/extensions/underline.md @@ -1,6 +1,8 @@ # Underline Use this extension to render text underlined. If you pass `` tags, or text with inline `style` attributes setting `text-decoration: underline` in the editor’s initial content, they all will be rendered accordingly. +Be aware that underlined text in the Internet usually indicates that it’s a clickable link. Don’t confuse your users with underlined text. + ::: warning Restrictions The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text marked underlined, regardless of the method will be normalized to `` HTML tags. ::: @@ -14,7 +16,7 @@ npm install @tiptap/extension-underline yarn add @tiptap/extension-underline ``` -## Options +## Settings | Option | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | diff --git a/docs/src/templates/DocPage/style.scss b/docs/src/templates/DocPage/style.scss index b7067efdd..f298c8e77 100644 --- a/docs/src/templates/DocPage/style.scss +++ b/docs/src/templates/DocPage/style.scss @@ -150,11 +150,17 @@ &.warning { border-color:#ffd8a8; background-color: #fff4e6; + color: #ca9c63; + } + + &.info { + border-color:#a5d8ff; + background-color: #e7f5ff; + color: #228be6; } .remark-container-title { font-weight: 600; - color: #ca9c63; } }