interface
EmbeddedSchemaFormProps
Props for rendering the ordinary fields of an existing embedded item inside the parent document form.
Example
import type { EmbeddedSchemaFormProps } from '@riducms/plugin';
function blockFormProps(
identity: string,
recordEdit: (fields: Record<string, unknown>) => void
): EmbeddedSchemaFormProps {
return { treeKey: 'blocks', identity, onChange: recordEdit };
}Props
| Property | Type | Description |
|---|---|---|
onChange | (payload: Record< | Receive detached field data after a child edit so your editor can record that edit in its own history and serialized value. |
treeKey | string | The embedded tree key declared by the Go plugin field. |
identity | string | The existing item's stable identity; it stays the same when the item moves. |
readOnly | boolean | Display 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
interface EmbeddedSchemaFormProps { ... }Methods
EmbeddedSchemaFormProps.onChange()Record a child-field edit in the plugin editor's history and serialized value.