Merge branch 'main' into feature/text-style-mark
This commit is contained in:
@@ -18,7 +18,7 @@ While that’s perfectly fine and does make the selected bold, you’d likely wa
|
||||
Most commands can be executed combined to one call. First of all, that’s 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.
|
||||
|
||||
@@ -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 there’s 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)
|
||||
:::
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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` `Shift` `L` Left
|
||||
* `Ctrl` `Shift` `E` Center
|
||||
* `Ctrl` `Shift` `R` Right
|
||||
* `Ctrl` `Shift` `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" />
|
||||
|
||||
@@ -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><‐</code> to an arrow `←` . |
|
||||
| rightArrow | Converts <code>‐></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><‐</code> to an arrow `←` . |
|
||||
| rightArrow | Converts <code>‐></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" />
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Collaborative editing
|
||||
|
||||
:::premium Requires pro extensions
|
||||
:::premium Requires Pro Extensions
|
||||
We kindly ask you to sponsor us, before using this example in production. [Read more](/sponsor)
|
||||
:::
|
||||
|
||||
@@ -10,10 +10,10 @@ It connects client with WebRTC and merges changes to the document (no matter whe
|
||||
|
||||
If you want to learn more about collaborative text editing, [check out our guide on that topic](/guide/collaborative-editing). Anyway, it’s showtime now:
|
||||
|
||||
:::warning The content of this editor is shared with other users from the Internet.
|
||||
Don’t share your password, credit card numbers or other things you wouldn’t make public.
|
||||
:::warning Shared Document
|
||||
Be nice! The content of this editor is shared with other users from the Internet.
|
||||
:::
|
||||
|
||||
<!-- <demo name="Examples/Collaboration" :show-source="false"/> -->
|
||||
<!-- <demo name="Examples/CollaborativeEditing" :show-source="false"/> -->
|
||||
|
||||
<demo name="Examples/CollaborativeEditing" />
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Focus
|
||||
|
||||
<demo name="Examples/Focus" highlight="15,37-40,42" />
|
||||
@@ -1,3 +0,0 @@
|
||||
# History
|
||||
|
||||
<demo name="Examples/History" highlight="4-9" />
|
||||
1
docs/src/docPages/guide/advanced-node-views.md
Normal file
1
docs/src/docPages/guide/advanced-node-views.md
Normal file
@@ -0,0 +1 @@
|
||||
# Advanced node views
|
||||
@@ -1,4 +1,4 @@
|
||||
# Build your editor
|
||||
# Create your editor
|
||||
|
||||
## toc
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Use Vue Components
|
||||
12
docs/src/docPages/guide/working-with-typescript.md
Normal file
12
docs/src/docPages/guide/working-with-typescript.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Working with TypeScript
|
||||
|
||||
## toc
|
||||
|
||||
## Introduction
|
||||
|
||||
|
||||
## Options type
|
||||
|
||||
|
||||
## Create a command
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Renderless rich-text editor
|
||||
---
|
||||
|
||||
:::error Don’t try this at home
|
||||
Nothing here is production-ready, don’t use it anywhere.
|
||||
:::
|
||||
|
||||
Reference in New Issue
Block a user