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