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

This commit is contained in:
Hans Pagel
2020-11-06 14:49:45 +01:00
16 changed files with 454 additions and 34 deletions

View File

@@ -80,6 +80,7 @@ Have a look at all of the core commands listed below. They should give you a goo
| Command | Description |
| ----------------------- | --------------------------------------------------------- |
| .clearNodes() | Normalize nodes to a simple paragraph. |
| .extendMarkRange() | Extends the text selection to the current mark. |
| .removeMark() | Remove a mark in the current selection. |
| .removeMarks() | Remove all marks in the current selection. |
| .removeMarks() | Remove all marks in the current selection. |

View File

@@ -0,0 +1,33 @@
# Highlight
Use this extension to render highlighted text with `<mark>`. You can use only default `<mark>` HTML tag, which has a yellow background color by default, or apply different colors.
Type `==two equal signs==` and it will magically transform to <mark>highlighted</mark> text while you type.
## Installation
```bash
# With npm
npm install @tiptap/extension-highlight
# Or: With Yarn
yarn add @tiptap/extension-highlight
```
## Settings
| Option | Type | Default | Description |
| ------ | ------ | ------- | -------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
## Commands
| Command | Options | Description |
| --------- | ------- | ----------------------------------------------------------- |
| highlight | color | Mark text as highlighted, optionally pass a specific color. |
## Keyboard shortcuts
* Windows/Linux: `Control`&nbsp;`E`
* macOS: `Cmd`&nbsp;`E`
## Source code
[packages/extension-highlight/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-highlight/)
## Usage
<demo name="Marks/Highlight" highlight="3-8,48,67" />