interface

EmbeddedSchemaFormProps

Props for rendering the ordinary fields of an existing embedded item inside the parent document form.

Example

ts
import type { EmbeddedSchemaFormProps } from '@riducms/plugin';

function blockFormProps(
  identity: string,
  recordEdit: (fields: Record<string, unknown>) => void
): EmbeddedSchemaFormProps {
  return { treeKey: 'blocks', identity, onChange: recordEdit };
}

Props

PropertyTypeDescription
onChange(payload: Record<string, unknown>) => voidReceive detached field data after a child edit so your editor can record that edit in its own history and serialized value.
treeKeystringThe embedded tree key declared by the Go plugin field.
identitystringThe existing item's stable identity; it stays the same when the item moves.
readOnlybooleanDisplay the fields without allowing edits. Access rules can also make them read-only.

How it works

Pass these props to the authoring.schemaForm Svelte snippet. Ridu updates the unsaved parent form; onChange is optional for editors that also keep a separate history, such as rich text.

Full signature

Methods

Related guides