Skip to content

Commit

Permalink
chore: update command
Browse files Browse the repository at this point in the history
editor.first -> editor.commands.first
  • Loading branch information
Dhalsimzhao authored Dec 20, 2024
1 parent 9328eba commit 82359fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/editor/api/commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ If you want to run a list of commands, but want only the first successful comman
For example, the backspace key tries to undo an input rule first. If that was successful, it stops there. If no input rule has been applied and thus can’t be reverted, it runs the next command and deletes the selection, if there is one. Here is the simplified example:

```js
editor.first(({ commands }) => [
editor.commands.first(({ commands }) => [
() => commands.undoInputRule(),
() => commands.deleteSelection(),
//
Expand Down

0 comments on commit 82359fa

Please sign in to comment.