Sign up (with export icon)

AIRootInfo

Api-interface iconinterface

A snapshot of a single editor root, reported in the rootType property of the editor configuration snapshot.

It tells the AI agent what the root can hold and what surrounds it, so it can keep its edits within the shape of that root: an inline root cannot take block content at all, and a root hosted by a semantic element (a <h1> title, a <span> label) implies a different tone and length than a full-page <div>.

Properties

  • Chevron-right icon

    hostElement: string

    The tag name of the element hosting the root, for example div for a regular rich-text area or h1 for a title mounted on a heading.

    This element surrounds the root - it is not part of the root's content and cannot be edited. It must not be reproduced in content produced for this root.

  • Chevron-right icon

    isInline: boolean

    Whether the root is an inline root, that is, whether it rejects block content and behaves like a single paragraph. Content of such a root must stay inline-only.