type DeleteAssetAction = (params) => void | Promise<void>;Action function for deleting an asset from an asset source.
The default implementation opens a confirmation dialog and, on confirm,
calls engine.asset.removeAssetFromSource(sourceId, asset.id) followed by
engine.asset.assetSourceContentsChanged(sourceId). Register a custom
implementation to replace the dialog content, swap in a custom dialog, or
change the deletion behavior entirely. The asset and its source id are
provided so handlers can derive per-asset context (e.g. metadata, page
number) for their custom UI.
Parameters#
| Parameter | Type | Description |
|---|---|---|
params | { sourceId: string; asset: AddImageOptions; } | The asset to delete and the id of its source |
params.sourceId | string | - |
params.asset | AddImageOptions | - |
Returns#
void | Promise<void>
A promise that resolves when the delete operation is complete, or void for synchronous operations