UIFieldEditor

An editor component that lets the user edit text fields on a node.

See: UIDatetimeFieldEditor for datetime editing Since: 6.0.0 (3.2.0)

Name

Type

Default

Description

field

string | Array.<string>

Required - Name of, or path to, the node field to edit

node

Node

Required - The node

placeholder

string

Required - 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

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')
        })
    )
}

Last updated