interface

EmbeddedSchemaDraftEditorProps

Options for rendering a draft in Ridu's drawer with Apply and Cancel controls.

Properties

PropertyTypeDescription
draftEmbeddedSchemaDraftA draft created by this field's authoring.beginSchemaDraft.
titlestringOptional heading for the drawer.
onApply(payload: Record<string, unknown>) => voidReceives checked field data when Apply succeeds. Insert or update the item in your plugin value and call field.set (or serialize your editor's updated state). Close your drawer UI here. Ridu discards the temporary draft after this handler returns; it does not insert data into your plugin value or save the document.
onCancel() => voidClose your editor UI after the pending draft has been discarded.

Full signature

Methods

  • EmbeddedSchemaDraftEditorProps.onApply()

    Receives checked field data when Apply succeeds. Insert or update the item in your plugin value and call field.set (or serialize your editor's updated state). Close your drawer UI here. Ridu discards the temporary draft after this handler returns; it does not insert data into your plugin value or save the document.

  • EmbeddedSchemaDraftEditorProps.onCancel()

    Close your editor UI after the pending draft has been discarded.