1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 18:09:49 +02:00

update docs

This commit is contained in:
Ian Storm Taylor
2016-07-11 13:40:46 -07:00
parent 2ed3c7afe8
commit df8e536f24

View File

@@ -33,9 +33,7 @@ These properties are actually an implicit plugin defintion. Internally, they are
#### `onChange(state)` #### `onChange(state)`
A change handler that will be called with the newly-changed editor `state`. You should usually pass the newly changed `state` back into the editor through its `state` property. A change handler that will be called with the newly-changed editor `state`. You should usually pass the newly changed `state` back into the editor through its `state` property. This hook allows you to add persistence logic to your editor.
This is how you can add persistence logic to your editor.
#### `plugins` #### `plugins`
@@ -47,9 +45,7 @@ A [`State`](../models/state) object representing the current state of the editor
#### `...` #### `...`
All of the 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, treated equivalently to passing them as the first plugin in the plugin stack. For example:
They are convenience properties, treated equivalently to passing them as the first plugin in the plugin stack. For example:
```js ```js
const plugins = [somePlugin] const plugins = [somePlugin]