mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 15:49:23 +08:00
docs: update inline command example
This commit is contained in:
parent
f1b8e06295
commit
8283c76700
@ -38,9 +38,11 @@ In some cases, it’s helpful to put some more logic in a command. That’s why
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.command(({ commands }) => {
|
||||
// put complex logic here
|
||||
return commands.insertText('This is crazy.')
|
||||
.command(({ tr }) => {
|
||||
// manipulate the transaction
|
||||
tr.insertText('hey, that’s cool!')
|
||||
|
||||
return true
|
||||
})
|
||||
.run()
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user