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(
data
):SliceSnapshot
Parameters
data
string
Returns
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:40
encodeSnapshot()
encodeSnapshot(
json
):string
Parameters
json
Returns
string
Defined in
packages/affine/shared/dist/services/drag-handle-config.d.ts:41
fromEntity()
fromEntity(
options
):null
|SliceSnapshot
Parameters
options
blockId
string
docId
string
flavour
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