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:
committed by
Ian Storm Taylor
parent
53fd59bc62
commit
175b25ae51
@@ -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) {
|
||||
...
|
||||
|
Reference in New Issue
Block a user