Sign up (with export icon)

RootEditableOptions

Api-interface iconinterface

Additional options for the created editable element.

Properties

  • Chevron-right icon

    element : string | HTMLElement | ViewRootElementDefinition | undefined

    A description of the editable root element to create, or an existing DOM element to use.

    Accepted forms:

    • A tag name string (e.g. 'h1').
    • A ViewRootElementDefinition object.
    • An existing HTMLElement. The element is used as-is — createEditable() returns the same element instead of creating a new one, so callers do not need to append it to the DOM.

    When omitted, a default <div> is created.

    Note: an HTMLElement value is local to this client. It cannot be replicated through real-time collaboration, so it is not persisted with the root. Other clients calling createEditable() for the same root receive a fresh element built from the canonical descriptor (or the default <div>), unless they pass their own HTMLElement as well.

  • Chevron-right icon

    label : string | undefined

    The accessible label text describing the editable to the assistive technologies.

  • Chevron-right icon

    placeholder : string | undefined

    Placeholder for the editable element. If not set, placeholder value from the editor configuration will be used (if it was provided).