mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
update docs
This commit is contained in:
@@ -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]
|
||||||
|
Reference in New Issue
Block a user