Skip to content

BlockSuite API Documentation / @blocksuite/blocks / AttachmentEmbedConfig

Type Alias: AttachmentEmbedConfig

AttachmentEmbedConfig: object

Type declaration

action()?

optional action: (model) => Promise<void> | void

The action will be executed when the 「Turn into embed view」 button is clicked.

Parameters

model

AttachmentBlockModel

Returns

Promise<void> | void

check()

check: (model, maxFileSize) => boolean

Check if the attachment can be turned into embed view.

Parameters

model

AttachmentBlockModel

maxFileSize

number

Returns

boolean

name

name: string

template()?

optional template: (model, blobUrl) => TemplateResult

The template will be used to render the embed view.

Parameters

model

AttachmentBlockModel

blobUrl

string

Returns

TemplateResult

Defined in

packages/blocks/src/attachment-block/embed.ts:16