createShapesForAssets

See source code

A helper function for an external content handler. It creates bookmarks, images or video shapes corresponding to the type of assets provided.

function createShapesForAssets(
  editor: Editor,
  assets: TLAsset[],
  position: VecLike
): Promise<TLShapeId[]>

Parameters

NameDescription

editor

The editor instance

assets

An array of asset Ids

position

the position at which to create the shapes

Returns

Promise<TLShapeId[]>
Prev
createMediaAssetInfoSkeleton
Next
downsizeImage