UIFieldEditor
See: UIDatetimeFieldEditor for datetime editing
Properties
Name | Type |
---|---|
props | props |
state | state |
new UIFieldEditor(props)
An editor component that lets the user edit text fields on a node.
Param | Type |
---|---|
props | props |
Example
import {UIFieldEditor} from 'writer'
render($$) {
const el = $$('div')
return el.append(
$$(UIFieldEditor, {
node: this.props.node,
multiLine: false,
field: 'title',
placeholder: this.getLabel('Add title here')
})
)
}
UIFieldEditor.props
Properties
Name | Type | Default | Description |
---|---|---|---|
field | string | Array.<string> |
Name of, or path to, the node field to edit | |
node | Node |
The node | |
placeholder | string |
Placeholder of the field | |
[multiline] | boolean |
false |
If set to true enables multine support for field |
[disabled] | boolean |
false |
Set to true to disable field |
[icon] | string |
Icon to display with the field |
UIFieldEditor.state
Properties
Name | Type | Default | Description |
---|---|---|---|
[hasFocus] | boolean |
false |
If the editor has focus |