BlockSuite API Documentation / @blocksuite/blocks / DNDAPIExtension
Class: DNDAPIExtension
Generic extension. Extensions are used to set up the dependency injection container. In most cases, you won't need to use this class directly. We provide helper classes like CommandExtension
and BlockViewExtension
to make it easier to create extensions.
Extends
Constructors
new DNDAPIExtension()
new DNDAPIExtension(
std
):DNDAPIExtension
Parameters
std
Returns
Overrides
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:38
Properties
mimeType
mimeType:
string
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:37
std
readonly
std:BlockStdScope
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:36
Methods
decodeSnapshot()
decodeSnapshot(
dataTransfer
):SliceSnapshot
Parameters
dataTransfer
DataTransfer
Returns
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:40
encodeSnapshot()
encodeSnapshot(
json
,dataTransfer
):void
Parameters
json
dataTransfer
DataTransfer
Returns
void
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:41
fromEntity()
fromEntity(
docId
,blockId
?):null
|SliceSnapshot
Parameters
docId
string
blockId?
string
Returns
null
| SliceSnapshot
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:42
setup()
static
setup(di
):void
Parameters
di
Container
Returns
void
Overrides
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:39