1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 16:44:22 +02:00

update docs

This commit is contained in:
Ian Storm Taylor
2016-07-11 13:33:46 -07:00
parent 081bfa7306
commit 005b83591c

View File

@@ -41,24 +41,30 @@ A [`State`](../models/state) object representing the current state of the editor
#### `...` #### `...`
All other properties of the editor are equivalent to the properties of a [`Plugin`](../plugins). All of the other properties of the editor are equivalent to the properties of a [`Plugin`](../plugins).
They are convenience properties, such that passing any of them will be treated equivalently to passing them on the first plugin in the stack with those properties. They are convenience properties, such that passing any of them will be treated equivalently to passing them on the first plugin in the stack with those properties.
For example: For example:
```js ```js
const plugins = [myPlugin]
<Editor <Editor
onChange={myFunction} onChange={myOnChangeHandler}
plugins={plugins}
state={state} state={state}
/> />
``` ```
Is equivalent to: Is equivalent to passing an additional, first-priority plugin, like:
```js ```js
const plugins = [ const plugins = [
{ myFunction } {
onChange: myOnChangeHandler
},
myPlugin
] ]
<Editor <Editor