Skip to main content
RenderLexical lets a Client Component request and render a rich text field while preserving nested field schemas for blocks, links, files, tables, and drawers. It uses the Admin Panel’s server functions, so render it within the Admin Panel rather than as a standalone editor on a public page.
RenderLexical and its server rendering function are experimental and may change in minor releases.

Use an existing form

When the component is rendered inside a FrogBot form, omit value and setValue. The editor then writes to the form path identified by name, or by path when you explicitly override it. Saving the surrounding form persists that value normally. This component renders an editor at the previewContent form path while using the configured content rich text field as its schema. Because name already matches the JSON field’s form path, no path override is needed:
Configure both the schema field and the form-backed JSON field on the collection. Component paths are resolved from your configured import-map base directory; see Component paths.
RenderLexical accepts these props. Note that schemaPath selects the schema, while name and path decide where the value is stored: The editor is always rendered visible, even when the schema field is hidden. The current user must be signed in and allowed to access the Admin Panel. The schema path format is collection.<collectionSlug>.<fieldPath>. A top-level field uses collection.posts.content; a field nested in a group uses a path such as collection.posts.layout.content.

Control the value yourself

Pass value and setValue when the surrounding component owns the editor state. This mode does not register the value with a FrogBot form and does not save it to the database. Persist it explicitly through an API operation if it should outlive the component.
Resetting changes only the controlled React state. It does not update a record unless your component separately sends the new value to FrogBot.

Use a dedicated schema anchor

If the reusable editor needs a schema that is difficult to address inside arrays or blocks, define a hidden top-level rich text field as its schema anchor:
Use schemaPath="collection.posts.onDemandEditorSchema". The anchor determines editor features and nested schemas; it does not determine where a form-backed or controlled value is stored.