BookmarkAssetUtil
Table of contents
Extends AssetUtil<TLBookmarkAsset>.
class BookmarkAssetUtil extends AssetUtil<TLBookmarkAsset> {}Constructor
from AssetUtil
Constructs a new instance of the AssetUtil class
Parameters
| Name | Description |
|---|---|
|
Properties
migrations
static
static migrations: import("@tldraw/store").MigrationSequence;props
static
static props: {
description: import("@tldraw/validate").Validator<string>;
favicon: import("@tldraw/validate").Validator<string>;
image: import("@tldraw/validate").Validator<string>;
src: import("@tldraw/validate").Validator<null | string>;
title: import("@tldraw/validate").Validator<string>;
};type
static
static type: "bookmark";editor
from AssetUtil
editor: Editor;options
from AssetUtil
Options for this asset util. Override this to provide customization options for your asset. Use AssetUtil.configure to customize existing asset utils.
options: {};Methods
configure( )
static
from AssetUtil
Configure this asset util's options.
static configure<T extends TLAssetUtilConstructor<any, any>>(
this: T,
options: T extends new (...args: any[]) => {
options: infer Options;
}
? Partial<Options>
: never,
): T;Parameters
| Name | Description |
|---|---|
| |
| |
Returns
T;acceptsMimeType( )
from AssetUtil
Check whether this asset type accepts a given MIME type.
acceptsMimeType(mimeType: string): boolean;Parameters
| Name | Description |
|---|---|
| |
Returns
boolean;getAssetFromFile( )
from AssetUtil
Create an asset from a file. Return null if this asset type can't handle the file.
getAssetFromFile(_file: File, _assetId: TLAssetId): Promise<Asset | null>;Parameters
| Name | Description |
|---|---|
| |
|
Returns
Promise<Asset | null>;getDefaultProps( )
getDefaultProps(): TLBookmarkAsset["props"];getSupportedMimeTypes( )
from AssetUtil
Get the MIME types that this asset type supports. Return an empty array if this asset type doesn't support files (e.g. bookmarks).
getSupportedMimeTypes(): readonly string[];Prev
ArrowShapeUtilNext
BookmarkShapeUtil