mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-06 00:42:59 +08:00
docs: make the mark keyboard shortcuts a table
This commit is contained in:
parent
a89e2eed29
commit
bf06eef9f6
@ -25,15 +25,32 @@ yarn add @tiptap/extension-bold
|
||||
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
| ---------- | ---------- | ------------------ |
|
||||
| setBold | — | Mark text as bold. |
|
||||
| toggleBold | — | Toggle bold mark. |
|
||||
| unsetBold | — | Remove bold mark. |
|
||||
|
||||
### setBold()
|
||||
Mark text as bold.
|
||||
|
||||
```js
|
||||
editor.commands.setBold()
|
||||
```
|
||||
|
||||
### toggleBold()
|
||||
Toggle the bold mark.
|
||||
|
||||
```js
|
||||
editor.commands.toggleBold()
|
||||
```
|
||||
|
||||
### unsetBold()
|
||||
Remove the bold mark.
|
||||
|
||||
```js
|
||||
editor.commands.unsetBold()
|
||||
```
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `B`
|
||||
* macOS: `Cmd` `B`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ------------ | ------------------ | -------------- |
|
||||
| toggleBold() | `Control` `B` | `Cmd` `B` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-bold/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-bold/)
|
||||
|
@ -28,8 +28,9 @@ yarn add @tiptap/extension-code
|
||||
| unsetCode | — | Remove inline code mark. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `E`
|
||||
* macOS: `Cmd` `E`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ------------ | ------------------ | -------------- |
|
||||
| toggleCode() | `Control` `E` | `Cmd` `E` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-code/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-code/)
|
||||
|
@ -29,8 +29,9 @@ yarn add @tiptap/extension-highlight
|
||||
| unsetHighlight | — | Removes the highlight. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `Shift` `H`
|
||||
* macOS: `Cmd` `Shift` `H`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ----------------- | ------------------------------- | --------------------------- |
|
||||
| toggleHighlight() | `Control` `Shift` `H` | `Cmd` `Shift` `H` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-highlight/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-highlight/)
|
||||
|
@ -33,8 +33,9 @@ yarn add @tiptap/extension-italic
|
||||
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `I`
|
||||
* macOS: `Cmd` `I`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| -------------- | ------------------ | -------------- |
|
||||
| toggleItalic() | `Control` `I` | `Cmd` `I` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-italic/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-italic/)
|
||||
|
@ -32,8 +32,9 @@ yarn add @tiptap/extension-strike
|
||||
| unsetStrike | — | Remove strike mark. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `Shift` `X`
|
||||
* macOS: `Cmd` `Shift` `X`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| -------------- | ------------------------------- | --------------------------- |
|
||||
| toggleStrike() | `Control` `Shift` `X` | `Cmd` `Shift` `X` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-strike/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-strike/)
|
||||
|
@ -19,15 +19,16 @@ yarn add @tiptap/extension-subscript
|
||||
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
| --------------- | ---------- | ------------------------- |
|
||||
| Command | Parameters | Description |
|
||||
| --------------- | ---------- | ----------------------- |
|
||||
| setSubscript | — | Mark text as subscript. |
|
||||
| toggleSubscript | — | Toggle subscript mark. |
|
||||
| unsetSubscript | — | Remove subscript mark. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `,`
|
||||
* macOS: `Cmd` `,`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ----------------- | ------------------ | -------------- |
|
||||
| toggleSubscript() | `Control` `,` | `Cmd` `,` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-subscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-subscript/)
|
||||
|
@ -26,8 +26,9 @@ yarn add @tiptap/extension-superscript
|
||||
| unsetSuperscript | — | Remove superscript mark. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `.`
|
||||
* macOS: `Cmd` `.`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ------------------- | ------------------ | -------------- |
|
||||
| toggleSuperscript() | `Control` `.` | `Cmd` `.` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-superscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-superscript/)
|
||||
|
@ -32,8 +32,9 @@ yarn add @tiptap/extension-underline
|
||||
| unsetUnderline | — | Remove underline mark. |
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows/Linux: `Control` `U`
|
||||
* macOS: `Cmd` `U`
|
||||
| Command | Windows/Linux | macOS |
|
||||
| ----------------- | ------------------ | -------------- |
|
||||
| toggleUnderline() | `Control` `U` | `Cmd` `U` |
|
||||
|
||||
## Source code
|
||||
[packages/extension-underline/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-underline/)
|
||||
|
Loading…
Reference in New Issue
Block a user