Merge branch 'main' into feature/text-style-mark

This commit is contained in:
Hans Pagel
2020-11-06 16:06:40 +01:00
33 changed files with 377 additions and 344 deletions

View File

@@ -18,7 +18,7 @@ While thats perfectly fine and does make the selected bold, youd likely wa
Most commands can be executed combined to one call. First of all, thats shorter than separate function call in most cases. Here is an example to make the selected text bold:
```js
editor.chain().focus().bold().run()
editor.chain().bold().focus().run()
```
The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Between those two functions, this example combines to different commands.

View File

@@ -1,9 +1,9 @@
# Collaboration Cursor
# CollaborationCursor
This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if theres one).
Open this page in multiple browser windows to test it.
:::premium 💖 Pro Extension
:::premium Pro Extension
We kindly ask you to sponsor us, before using this extension in production. [Read more](/sponsor)
:::

View File

@@ -22,4 +22,4 @@ yarn add @tiptap/extension-focus
[packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/)
## Usage
<demo name="Extensions/Focus" highlight="31-34,12" />
<demo name="Extensions/Focus" highlight="12,34-37" />

View File

@@ -18,9 +18,9 @@ yarn add @tiptap/extension-history
## Commands
| Command | Parameters | Description |
| ------- | ------- | --------------------- |
| undo | — | Undo the last change. |
| redo | — | Redo the last change. |
| ------- | ---------- | --------------------- |
| undo | — | Undo the last change. |
| redo | — | Redo the last change. |
## Keyboard shortcuts
### Undo

View File

@@ -1,4 +1,5 @@
# TextAlign
This extension adds a text align attribute to a specified list of nodes. The attribute is used to align the text.
## Installation
```bash
@@ -10,16 +11,25 @@ yarn add @tiptap/extension-text-align
```
## Settings
*None*
| 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. |
## Commands
*None*
| Command | Parameters | Description |
| --------- | ---------- | ------------------------------------------ |
| textAlign | alignment | Set the text align to the specified value. |
## Keyboard shortcuts
*None*
* `Ctrl`&nbsp;`Shift`&nbsp;`L` Left
* `Ctrl`&nbsp;`Shift`&nbsp;`E` Center
* `Ctrl`&nbsp;`Shift`&nbsp;`R` Right
* `Ctrl`&nbsp;`Shift`&nbsp;`J` Justify
## Source code
[packages/extension-text-align/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-text-align/)
## Usage
<demo name="Extensions/TextAlign" highlight="12,30" />
<demo name="Extensions/TextAlign" highlight="29" />

View File

@@ -4,33 +4,37 @@ This extension tries to help with common text patterns with the correct typograp
## Installation
```bash
# with npm
npm install @tiptap/typography
npm install @tiptap/extension-typography
# with Yarn
yarn add @tiptap/typography
yarn add @tiptap/extension-typography
```
## Rules
| Name | Description |
| ------------------- | ---------------------------------------------------------------- |
| emDash | Converts double dashes `--` to an emdash `—`. |
| ellipsis | Converts three dots `...` to an ellipsis character `…` |
| openDoubleQuote | `“`Smart” opening double quotes. |
| closeDoubleQuote | “Smart`”` closing double quotes. |
| openSingleQuote | ``Smart opening single quotes. |
| closeSingleQuote | Smart`` closing single quotes. |
| leftArrow | Converts <code><&dash;</code> to an arrow `←` . |
| rightArrow | Converts <code>&dash;></code> to an arrow `→`. |
| copyright | Converts `(c)` to a copyright sign `©`. |
| registeredTrademark | Converts `(r)` to registered trademark sign `®`. |
| oneHalf | Converts `1/2` to one half `½`. |
| plusMinus | Converts `+/-` to plus/minus sign `±`. |
| notEqual | Converts `!=` to a not equal sign `≠`. |
| laquo | Converts `<<` to left-pointing double angle quotation mark `«`. |
| raquo | Converts `>>` to right-pointing double angle quotation mark `»`. |
| Name | Description |
| ----------------------- | ---------------------------------------------------------------- |
| emDash | Converts double dashes `--` to an emdash `—`. |
| ellipsis | Converts three dots `...` to an ellipsis character `…` |
| openDoubleQuote | `“`Smart” opening double quotes. |
| closeDoubleQuote | “Smart`”` closing double quotes. |
| openSingleQuote | ``Smart opening single quotes. |
| closeSingleQuote | Smart`` closing single quotes. |
| leftArrow | Converts <code><&dash;</code> to an arrow `←` . |
| rightArrow | Converts <code>&dash;></code> to an arrow `→`. |
| copyright | Converts `(c)` to a copyright sign `©`. |
| registeredTrademark | Converts `(r)` to registered trademark sign `®`. |
| oneHalf | Converts `1/2` to one half `½`. |
| plusMinus | Converts `+/-` to plus/minus sign `±`. |
| notEqual | Converts `!=` to a not equal sign `≠`. |
| laquo | Converts `<<` to left-pointing double angle quotation mark `«`. |
| raquo | Converts `>>` to right-pointing double angle quotation mark `»`. |
| multiplication | Converts `2 * 3` or `2x3` to a multiplcation sign `2×3™`. |
## Keyboard shortcuts
* `Backspace` reverts the applied input rule
## Source code
[packages/typography/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/typography/)
[packages/extension-typography/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-typography/)
## Usage
<demo name="Extensions/Typography" highlight="12,31" />

View File

@@ -5,10 +5,10 @@ Type `==two equal signs==` and it will magically transform to <mark>highlighted<
## Installation
```bash
# With npm
# with npm
npm install @tiptap/extension-highlight
# Or: With Yarn
# with Yarn
yarn add @tiptap/extension-highlight
```

View File

@@ -16,7 +16,7 @@ yarn add @tiptap/extension-heading
| Option | Type | Default | Description |
| ------ | ------ | ------------------ | --------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
| levels | Array | [1, 2, 3, 4, 5, 6] | Specifies which heading levels are supported. |
| levels | array | [1, 2, 3, 4, 5, 6] | Specifies which heading levels are supported. |
## Commands
| Command | Parameters | Description |