Search Docs
Loading...
Skip to content

Type Alias: DeleteAssetAction

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#

ParameterTypeDescription
params{ sourceId: string; asset: AddImageOptions; }The asset to delete and the id of its source
params.sourceIdstring-
params.assetAddImageOptions-

Returns#

void | Promise<void>

A promise that resolves when the delete operation is complete, or void for synchronous operations