interface

FieldAuthoringHost

Optional services supplied to a plugin field for embedded forms, related documents, and plugin requests.

Properties

PropertyTypeDescription
schemaFormSnippet<[EmbeddedSchemaFormProps]>Render an existing item's ordinary fields in the parent form. Pass onChange when your editor needs to record each child edit in its own history and serialization.
schemaHeaderSnippet<[EmbeddedSchemaHeaderProps]>Render the block-name input and field feedback, without the card chrome. Uses the item's schema, access, visibility and stable identity. An open draft locks the card input. Hidden or unreadable names render no control.
beginSchemaDraft(scope: EmbeddedSchemaFormScope | EmbeddedSchemaVariantScope) => EmbeddedSchemaDraftStart a temporary Apply/Cancel form. Pass { treeKey, identity } to edit an existing item, or { treeKey, caseTag, variantSlug } to prepare a new one using Go-declared field defaults. Creation does not insert anything into your value. Call discard when abandoning a draft; closing the field also cleans it up.
schemaDraftEditorSnippet<[EmbeddedSchemaDraftEditorProps]>Render a draft in Ridu's drawer; your onApply writes the accepted data into your plugin value.
schemaIssues(scope: EmbeddedSchemaFormScope) => readonly ValidationIssue[]Read current parent-form issues for an existing embedded item, for example for a card badge.
copySchemaPayload(scope: EmbeddedSchemaVariantScope, payload: Readonly<Record<string, unknown>>) => Record<string, unknown>Copy an item's ordinary field data and give its schema-declared nested rows/items fresh IDs. Use when duplicating to avoid sharing identities. This does not insert the copy or copy your outer plugin item; update that structure in your editor.
createSchemaPayload(scope: EmbeddedSchemaVariantScope) => Record<string, unknown>Create Go-declared default fields and fresh identity for inline insertion; your editor inserts and serializes the result.
collectionsreadonly SchemaCollection[]The collections value.
documentRevisionnumberThe documentRevision value.
localestringThe locale value.
canCreateDocument(collection: string) => booleanWhether the current admin session may create documents in this collection. This is a presentation hint for create controls, not authorization. Access is checked again by the reference browser and operation engine when work is saved.
referenceBrowserComponent<FieldReferenceBrowserProps, {}, string>The referenceBrowser value.
findDocument(collection: string, id: string, signal?: AbortSignal) => Promise<FieldDocument>The findDocument value.
requestPlugin<Result>(path: string, body: unknown, signal?: AbortSignal) => Promise<Result>The requestPlugin value.

How it works

Check an optional method before using it. Embedded forms edit the unsaved parent document; your plugin editor owns insertion, history, and serialization of its outer value.

requestPlugin is owner-scoped by the framework to the component’s paired backend plugin and routes through the configured SDK transport.

Full signature

Methods

Related guides