1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 04:20:26 +02:00

update reference

This commit is contained in:
Ian Storm Taylor
2016-07-12 11:21:20 -07:00
parent 075fa5f9f0
commit b84eaca93d

View File

@@ -8,12 +8,12 @@ import { Placeholder } from 'slate'
A simple component that adds a placeholder to a node. It encapsulates all of the Slate-related logic that determines when to render the placeholder, so you don't have to think about it. A simple component that adds a placeholder to a node. It encapsulates all of the Slate-related logic that determines when to render the placeholder, so you don't have to think about it.
- [Properties](#properties) - [Properties](#properties)
- [`children`](#children-any) - [`children`](#children)
- [`className`](#className-string) - [`className`](#className)
- [`node`](#node-node) - [`node`](#node)
- [`parent`](#parent-node) - [`parent`](#parent)
- [`state`](#state-state) - [`state`](#state)
- [`style`](#style-object) - [`style`](#style)
## Properties ## Properties
@@ -30,26 +30,32 @@ A simple component that adds a placeholder to a node. It encapsulates all of the
</Placeholder> </Placeholder>
``` ```
#### `children: Any` ### `children`
`Any`
React child elements to render inside the placeholder `<span>` element. React child elements to render inside the placeholder `<span>` element.
#### `className: String` ### `className`
`String`
An optional class name string to add to the placeholder `<span>` element. An optional class name string to add to the placeholder `<span>` element.
#### `node: Node` ### `node
`Node`
The node to render the placeholder element on top of. The placeholder is positioned absolutely, covering the entire node. The node to render the placeholder element on top of. The placeholder is positioned absolutely, covering the entire node.
#### `parent: Node` ### `parent
`Node`
The node to check for non-empty content, to determine whether the placeholder should be shown or not. The node to check for non-empty content, to determine whether the placeholder should be shown or not.
#### `state: State` ### `state
`State`
The current state of the editor. The current state of the editor.
#### `style: Object` ### `style
`Object`
An optional dictionary of styles to pass to the placeholder `<span>` element. An optional dictionary of styles to pass to the placeholder `<span>` element.