Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Jeet Mandaliya
2021-06-18 23:14:05 +05:30
72 changed files with 1499 additions and 1312 deletions

View File

@@ -16,11 +16,11 @@ yarn add @tiptap/extension-dropcursor
```
## Settings
| Option | Type | Default | Description |
| ------ | -------- | --------- | --------------------------------------------------------------------- |
| color | `String` | `'black'` | Color of the dropcursor. |
| width | `Number` | `1` | Width of the dropcursor. |
| class | `String` | | One or multiple CSS classes that should be applied to the dropcursor. |
| Option | Type | Default | Description |
| ------ | -------- | ---------------- | --------------------------------------------------------------------- |
| color | `String` | `'currentcolor'` | Color of the dropcursor. |
| width | `Number` | `1` | Width of the dropcursor. |
| class | `String` | | One or multiple CSS classes that should be applied to the dropcursor. |
## Source code
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-dropcursor/)

View File

@@ -18,11 +18,11 @@ yarn add @tiptap/extension-text-align
```
## Settings
| Option | Type | Default | Description |
| ---------------- | -------- | ---------------------------------------- | -------------------------------------------------------------------- |
| types | `Array` | `['heading', 'paragraph']` | A list of nodes where the text align attribute should be applied to. |
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
| defaultAlignment | `String` | `'left'` | The default text align. |
| Option | Type | Default | Description |
| ---------------- | -------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| types | `Array` | `[]` | A list of nodes where the text align attribute should be applied to. Usually something like `['heading', 'paragraph']`.|
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
| defaultAlignment | `String` | `'left'` | The default text align. |
## Commands
| Command | Parameters | Description |

View File

@@ -50,6 +50,8 @@ Most of the core extensions register their own keyboard shortcuts. Depending on
| Right align | `Control` `Shift` `R` | `Cmd` `Shift` `R` |
| Justify | `Control` `Shift` `J` | `Cmd` `Shift` `J` |
| Code block | `Control` `Alt` `C` | `Cmd` `Alt` `C` |
| Subscript | `Control` `,` | `Cmd` `,` |
| Superscript | `Control` `.` | `Cmd` `.` |
<!--| Toggle task| `Control`&nbsp;`Enter` | `Cmd`&nbsp;`Enter` | -->

View File

@@ -25,6 +25,10 @@ yarn add @tiptap/extension-subscript
| toggleSubscript | — | Toggle subscript mark. |
| unsetSubscript | — | Remove subscript mark. |
## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`,`
* macOS: `Cmd`&nbsp;`,`
## Source code
[packages/extension-subscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-subscript/)

View File

@@ -25,6 +25,10 @@ yarn add @tiptap/extension-superscript
| toggleSuperscript | — | Toggle superscript mark. |
| unsetSuperscript | — | Remove superscript mark. |
## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`.`
* macOS: `Cmd`&nbsp;`.`
## Source code
[packages/extension-superscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-superscript/)

View File

@@ -42,10 +42,11 @@ And yes, we plan to support React, too. Meanwhile, you can roll your own `ReactR
Its also possible to use Vanilla JavaScript, but that is probably a lot more work.
## Settings
| Option | Type | Default | Description |
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
| Option | Type | Default | Description |
| -------------- | -------- | -------------------------- | --------------------------------------------------------------------- |
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
| renderLabel | `String` | `({ options, node }) => …` | Define how a mention label should be rendered. |
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
## Source code
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)

View File

@@ -2,7 +2,7 @@
[![Version](https://img.shields.io/npm/v/@tiptap/extension-task-list.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-task-list)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-task-list.svg)](https://npmcharts.com/compare/@tiptap/extension-task-list?minimal=true)
This extension enables you to use task lists in the editor. They are rendered as `<ul data-type="task_list">`. This implementation doesnt require any framework, its using Vanilla JavaScript only.
This extension enables you to use task lists in the editor. They are rendered as `<ul data-type="taskList">`. This implementation doesnt require any framework, its using Vanilla JavaScript only.
Type <code>[ ]&nbsp;</code> or <code>[x]&nbsp;</code> at the beginning of a new line and it will magically transform to a task list.