docs: update inline command example
This commit is contained in:
@@ -38,9 +38,11 @@ In some cases, it’s helpful to put some more logic in a command. That’s why
|
|||||||
editor
|
editor
|
||||||
.chain()
|
.chain()
|
||||||
.focus()
|
.focus()
|
||||||
.command(({ commands }) => {
|
.command(({ tr }) => {
|
||||||
// put complex logic here
|
// manipulate the transaction
|
||||||
return commands.insertText('This is crazy.')
|
tr.insertText('hey, that’s cool!')
|
||||||
|
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
.run()
|
.run()
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user