Skip to content

API > @blocksuite/block-std > BlockService

Class: BlockService<_Model> ​

Extended By ​

Constructors ​

constructor ​

new BlockService<_Model>(options): BlockService< _Model >

Type parameters ​

ParameterDefault
_Model extends BaseBlockModel< object >BaseBlockModel< object >

Parameters ​

ParameterType
optionsBlockServiceOptions

Returns ​

BlockService< _Model >

Defined In ​

block-std/src/service/index.ts:17

Properties ​

disposables ​

readonly disposables: DisposableGroup

Defined In ​

block-std/src/service/index.ts:15


flavour ​

readonly flavour: string

Defined In ​

block-std/src/service/index.ts:14


std ​

readonly std: BlockStdProvider

Defined In ​

block-std/src/service/index.ts:13

Accessors ​

page ​

get page(): Page

Defined In ​

block-std/src/service/index.ts:26


selectionManager ​

get selectionManager(): SelectionManager

Defined In ​

block-std/src/service/index.ts:30


uiEventDispatcher ​

get uiEventDispatcher(): UIEventDispatcher

Defined In ​

block-std/src/service/index.ts:34


workspace ​

get workspace(): Workspace

Defined In ​

block-std/src/service/index.ts:22

Methods ​

bindHotKey ​

bindHotKey(keymap, options?): void

Parameters ​

ParameterType
keymapRecord< string, UIEventHandler >
options?object
options.global?boolean

Returns ​

void

Defined In ​

block-std/src/service/index.ts:65


dispose ​

dispose(): void

Returns ​

void

Defined In ​

block-std/src/service/index.ts:39


handleEvent ​

handleEvent( name, fn, options?): void

Parameters ​

ParameterType
name"cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
fnUIEventHandler
options?object
options.global?boolean

Returns ​

void

Defined In ​

block-std/src/service/index.ts:53


mounted ​

mounted(): void

Returns ​

void

Defined In ​

block-std/src/service/index.ts:43


unmounted ​

unmounted(): void

Returns ​

void

Defined In ​

block-std/src/service/index.ts:47