1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 02:19:52 +02:00

Fix docs on queries to show editor argument (#2285)

This commit is contained in:
Alan Christopher Thomas
2018-10-20 02:05:53 -05:00
committed by Ian Storm Taylor
parent 53fd59bc62
commit 175b25ae51
3 changed files with 6 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ For example, you might define an `getActiveList` query:
```js
const plugin = {
queries: {
getActiveList(value) {},
getActiveList(editor) {},
},
}
```
@@ -73,8 +73,7 @@ const plugin = {
And then be able to re-use that logic easily in different places in your codebase, or pass in the query name to a plugin that can use your custom logic itself:
```js
const { value } = change
const list = change.getActiveList(value)
const list = change.getActiveList()
if (list) {
...