From 646ff2a80ff28b2ea58deaa03521f52974a6d881 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 6 Mar 2019 15:44:41 -0600 Subject: [PATCH] Fix onCommand docs that referenced query instead of command (#2625) --- docs/reference/slate/plugins.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/slate/plugins.md b/docs/reference/slate/plugins.md index 8bce44ed6..2e4679310 100644 --- a/docs/reference/slate/plugins.md +++ b/docs/reference/slate/plugins.md @@ -52,7 +52,7 @@ The `onChange` hook is called whenever a new change is about to be applied to an const { type, args } = command if (type === 'wrapQuote') { - change.wrapBlock('quote') + editor.wrapBlock('quote') } else { return next() } @@ -67,9 +67,9 @@ The `onChange` hook is called whenever a new change is about to be applied to an } ``` -The `onQuery` hook is called with a `query` object resulting from an `editor.query(type, ...args)` or a `change[query](...args)` call: +The `onCommand` hook is called with a `command` object resulting from an `editor.command(type, ...args)` or a `change[command](...args)` call: -The `onQuery` hook is a low-level way to have access to all of the queries passing through the editor. Most of the time you should use the `queries` shorthand instead. +The `onCommand` hook is a low-level way to have access to all of the commands passing through the editor. Most of the time you should use the `commands` shorthand instead. ### `onConstruct`