Skip to content

API > @blocksuite/blocks > FileDropManager

Class: FileDropManager ​

Constructors ​

constructor ​

new FileDropManager(_editor): FileDropManager

Parameters ​

ParameterType
_editorAbstractEditor

Returns ​

FileDropManager

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:45

Properties ​

_editor ​

private _editor: AbstractEditor

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:38


_handlers ​

private _handlers: FileDropRule[] = []

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:43


_indicator ​

private _indicator: DragIndicator

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:40


_point ​

private _point: null | Point = null

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:41


_result ​

private _result: null | DropResult = null

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:42

Methods ​

_onDropEnd ​

private _onDropEnd( point, models, result): void

Parameters ​

ParameterType
pointPoint
modelsPartial< BaseBlockModel< object > >[]
resultnull | DropResult

Returns ​

void

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:121


clear ​

clear(): void

Returns ​

void

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:201


findFileHandler ​

findFileHandler(file): undefined | ImportHandler

Parameters ​

ParameterType
fileFile

Returns ​

undefined | ImportHandler

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:187


onDragOver ​

onDragOver(event): void

Parameters ​

ParameterType
eventDragEvent

Returns ​

void

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:58


onDrop ​

onDrop(event): Promise< void >

Parameters ​

ParameterType
eventDragEvent

Returns ​

Promise< void >

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:84


register ​

register(rule): void

Registers a processing function to handle the specified type.

Parameters ​

ParameterType
ruleFileDropRule

Returns ​

void

Defined In ​

packages/blocks/src/_common/components/file-drop-manager.ts:195