BlockSuite API Documentation / @blocksuite/block-std / BlockService
Class: abstract
BlockService
abstract
BlockServiceDeprecated
BlockService is deprecated. You should reconsider where to put your feature.
BlockService is a legacy extension that is used to provide services to the block. In the previous version of BlockSuite, block service provides a way to extend the block. However, in the new version, we recommend using the new extension system.
Extends
Extended by
AttachmentBlockService
BookmarkBlockService
DatabaseBlockService
EmbedGithubBlockService
EmbedLoomBlockService
EmbedYoutubeBlockService
ImageBlockService
ListBlockService
NoteBlockService
ParagraphBlockService
RootService
SurfaceBlockService
SurfaceRefBlockService
ListBlockService
ParagraphBlockService
SurfaceBlockService
Constructors
new BlockService()
new BlockService(
std
,flavourProvider
):BlockService
Parameters
std
flavourProvider
flavour
string
Returns
Overrides
Defined in
packages/framework/block-std/src/extension/service.ts:54
Properties
disposables
readonly
disposables:DisposableGroup
Defined in
packages/framework/block-std/src/extension/service.ts:28
flavour
readonly
flavour:string
Defined in
packages/framework/block-std/src/extension/service.ts:30
flavourProvider
readonly
flavourProvider:object
flavour
flavour:
string
Defined in
packages/framework/block-std/src/extension/service.ts:56
specSlots
readonly
specSlots:BlockSpecSlots
<BlockService
>
Defined in
packages/framework/block-std/src/extension/service.ts:32
std
readonly
std:BlockStdScope
Defined in
packages/framework/block-std/src/extension/service.ts:55
flavour
static
flavour:string
Defined in
packages/framework/block-std/src/extension/service.ts:26
Accessors
collection
Get Signature
get collection():
DocCollection
Returns
Defined in
packages/framework/block-std/src/extension/service.ts:34
doc
Get Signature
get doc():
Doc
Returns
Defined in
packages/framework/block-std/src/extension/service.ts:38
host
Get Signature
get host():
EditorHost
Returns
Defined in
packages/framework/block-std/src/extension/service.ts:42
selectionManager
Get Signature
get selectionManager():
SelectionManager
Returns
Defined in
packages/framework/block-std/src/extension/service.ts:46
uiEventDispatcher
Get Signature
get uiEventDispatcher():
UIEventDispatcher
Returns
Defined in
packages/framework/block-std/src/extension/service.ts:50
Methods
bindHotKey()
bindHotKey(
keymap
,options
?):void
Parameters
keymap
Record
<string
, UIEventHandler
>
options?
global
boolean
Returns
void
Defined in
packages/framework/block-std/src/extension/service.ts:83
dispose()
dispose():
void
Returns
void
Defined in
packages/framework/block-std/src/extension/service.ts:95
handleEvent()
handleEvent(
name
,fn
,options
?):void
Parameters
name
"blur"
| "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "pinch"
| "pan"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "nativeDragStart"
| "nativeDragMove"
| "nativeDragEnd"
| "nativeDrop"
| "beforeInput"
| "focus"
| "contextMenu"
| "wheel"
fn
options?
global
boolean
Returns
void
Defined in
packages/framework/block-std/src/extension/service.ts:100
mounted()
mounted():
void
Returns
void
Defined in
packages/framework/block-std/src/extension/service.ts:113
unmounted()
unmounted():
void
Returns
void
Defined in
packages/framework/block-std/src/extension/service.ts:117
setup()
static
setup(di
):void
Parameters
di
Container
Returns
void
Overrides
Defined in
packages/framework/block-std/src/extension/service.ts:62