docs: update inline command example

This commit is contained in:
Hans Pagel 2020-11-17 15:15:21 +01:00
parent f1b8e06295
commit 8283c76700

View File

@ -38,9 +38,11 @@ In some cases, its helpful to put some more logic in a command. Thats why
editor
.chain()
.focus()
.command(({ commands }) => {
// put complex logic here
return commands.insertText('This is crazy.')
.command(({ tr }) => {
// manipulate the transaction
tr.insertText('hey, thats cool!')
return true
})
.run()
```