mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-18 04:57:49 +08:00
32 lines
907 B
Markdown
32 lines
907 B
Markdown
|
# Highlight
|
|||
|
Use this extension to render highlighted text with `<mark>`.
|
|||
|
|
|||
|
## 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 | — | Mark text as highlighted. |
|
|||
|
|
|||
|
## Keyboard shortcuts
|
|||
|
* Windows/Linux: `Control` `E`
|
|||
|
* macOS: `Cmd` `E`
|
|||
|
|
|||
|
## Source code
|
|||
|
[packages/extension-highlight/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-highlight/)
|
|||
|
|
|||
|
## Usage
|
|||
|
<demo name="Extensions/Highlight" highlight="3-5,17,36" />
|