Skip to content

BlockSuite API Documentation / @blocksuite/affine-block-attachment / AttachmentEmbedConfig

Type Alias: AttachmentEmbedConfig

AttachmentEmbedConfig = object

Defined in: packages/affine/blocks/block-attachment/src/embed.ts:23

Properties

action()?

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

Defined in: packages/affine/blocks/block-attachment/src/embed.ts:32

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

Parameters

model

AttachmentBlockModel

std

BlockStdScope

Returns

Promise<void> | void


check()

check: (model, maxFileSize) => boolean

Defined in: packages/affine/blocks/block-attachment/src/embed.ts:28

Check if the attachment can be turned into embed view.

Parameters

model

AttachmentBlockModel

maxFileSize

number

Returns

boolean


name

name: string

Defined in: packages/affine/blocks/block-attachment/src/embed.ts:24


template()?

optional template: (model, blobUrl) => TemplateResult

Defined in: packages/affine/blocks/block-attachment/src/embed.ts:39

The template will be used to render the embed view.

Parameters

model

AttachmentBlockModel

blobUrl

string

Returns

TemplateResult