Skip to content

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

Function: addSiblingAttachmentBlocks()

addSiblingAttachmentBlocks(editorHost, files, maxFileSize, targetModel, place, isEmbed?): Promise<undefined | string[]>

Defined in: packages/affine/blocks/block-attachment/src/utils.ts:214

Add a new attachment block before / after the specified block.

Parameters

editorHost

EditorHost

files

File[]

maxFileSize

number

targetModel

BlockModel

place

"before" | "after"

isEmbed?

boolean

Returns

Promise<undefined | string[]>