BlockSuite API Documentation / @blocksuite/blocks / AttachmentEmbedConfig
Type Alias: AttachmentEmbedConfig
AttachmentEmbedConfig:
object
Type declaration
action()?
optionalaction: (model) =>Promise<void> |void
The action will be executed when the 「Turn into embed view」 button is clicked.
Parameters
model
Returns
Promise<void> | void
check()
check: (
model,maxFileSize) =>boolean
Check if the attachment can be turned into embed view.
Parameters
model
maxFileSize
number
Returns
boolean
name
name:
string
template()?
optionaltemplate: (model,blobUrl) =>TemplateResult
The template will be used to render the embed view.
Parameters
model
blobUrl
string
Returns
TemplateResult
Defined in
packages/blocks/src/attachment-block/embed.ts:16