add comments to all commands
This commit is contained in:
@@ -95,18 +95,18 @@ Have a look at all of the core commands listed below. They should give you a goo
|
||||
| .updateNodeAttributes() | Update attributes of a node. |
|
||||
|
||||
### Lists
|
||||
| Command | Description |
|
||||
| ---------------- | ------------------------------------------------------ |
|
||||
| .liftListItem() | Lift the list item into a wrapping list. |
|
||||
| .sinkListItem() | Sink the list item down into an inner list. |
|
||||
| .splitListItem() | Splits a textblock of a list item into two list items. |
|
||||
| .toggleList() | Toggle between different list types. |
|
||||
| .wrapInList() | Wrap a node in a list. |
|
||||
| Command | Description |
|
||||
| ---------------- | ------------------------------------------- |
|
||||
| .liftListItem() | Lift the list item into a wrapping list. |
|
||||
| .sinkListItem() | Sink the list item down into an inner list. |
|
||||
| .splitListItem() | Splits one list item into two list items. |
|
||||
| .toggleList() | Toggle between different list types. |
|
||||
| .wrapInList() | Wrap a node in a list. |
|
||||
|
||||
### Selection
|
||||
| Command | Description |
|
||||
| ------------------ | --------------------------------------- |
|
||||
| .blur() | Blurs the editor. |
|
||||
| .blur() | Removes focus from the editor. |
|
||||
| .deleteSelection() | Delete the selection, if there is one. |
|
||||
| .focus() | Focus the editor at the given position. |
|
||||
| .scrollIntoView() | Scroll the selection into view. |
|
||||
|
||||
@@ -282,6 +282,10 @@ const CustomParagraph = Paragraph.extend({
|
||||
})
|
||||
```
|
||||
|
||||
:::warning Use the commands parameter inside of addCommands
|
||||
All commands are also available through ~~this.editor.commands~~, but inside of `addCommands` you must use the `commands` parameter that’s passed to it.
|
||||
:::
|
||||
|
||||
### Keyboard shortcuts
|
||||
Most core extensions come with sensible keyboard shortcut defaults. Depending on what you want to build, you’ll likely want to change them though. With the `addKeyboardShortcuts()` method you can overwrite the predefined shortcut map:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user