mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-01 13:18:29 +01:00
Clarify usage of plugin.render (#649)
This commit is contained in:
parent
8f3889199a
commit
cc26e6c60a
@ -220,7 +220,7 @@ Like `onChange`, `onBeforeChange` is cummulative.
|
||||
### `render`
|
||||
`Function render(props: Object, state: State, editor: Editor) => Object || Void`
|
||||
|
||||
The `render` property allows you to define higher-order-component-like behavior. It is passed all of the properties of the editor, including `props.children`. You can then choose to wrap the existing `children` in any custom elements or proxy the properties however you choose. This can be useful for rendering toolbars, styling the editor, rendering validation, etc.
|
||||
The `render` property allows you to define higher-order-component-like behavior. It is passed all of the properties of the editor, including `props.children`. You can then choose to wrap the existing `children` in any custom elements or proxy the properties however you choose. This can be useful for rendering toolbars, styling the editor, rendering validation, etc. Remember that the `render` function has to render `props.children` for editor's children to render.
|
||||
|
||||
### `schema`
|
||||
`Object`
|
||||
|
Loading…
x
Reference in New Issue
Block a user