interface
EmbeddedSchemaDraftEditorProps
Options for rendering a draft in Ridu's drawer with Apply and Cancel controls.
Properties
| Property | Type | Description |
|---|---|---|
draft | EmbeddedSchemaDraft | A draft created by this field's authoring.beginSchemaDraft. |
title | string | Optional heading for the drawer. |
onApply | (payload: Record< | 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. |
onCancel | () => void | Close your editor UI after the pending draft has been discarded. |
Full signature
interface EmbeddedSchemaDraftEditorProps { ... }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.