From 8283c76700fbe6d605b14747c6f69fdb127ada6a Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 17 Nov 2020 15:15:21 +0100 Subject: [PATCH] docs: update inline command example --- docs/src/docPages/api/commands.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/docPages/api/commands.md b/docs/src/docPages/api/commands.md index 8414eac7..579a966e 100644 --- a/docs/src/docPages/api/commands.md +++ b/docs/src/docPages/api/commands.md @@ -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() ```