Skip to content

BlockSuite API Documentation / @blocksuite/block-std / BlockService

Class: BlockService<_Model> ​

Contents ​

Extended By ​

Type parameters ​

• _Model extends BaseBlockModel = BaseBlockModel

Constructors ​

new BlockService(options) ​

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

Parameters ​

• options: BlockServiceOptions

Returns ​

BlockService<_Model>

Source ​

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

Properties ​

disposables ​

readonly disposables: DisposableGroup

Source ​

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


flavour ​

readonly flavour: string

Source ​

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


std ​

readonly std: BlockStdScope

Source ​

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

Accessors ​

page ​

get page(): Page

Returns ​

Page

Source ​

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


selectionManager ​

get selectionManager(): SelectionManager

Returns ​

SelectionManager

Source ​

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


uiEventDispatcher ​

get uiEventDispatcher(): UIEventDispatcher

Returns ​

UIEventDispatcher

Source ​

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


workspace ​

get workspace(): Workspace

Returns ​

Workspace

Source ​

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

Methods ​

bindHotKey() ​

bindHotKey(keymap, options?): void

Parameters ​

• keymap: Record<string, UIEventHandler>

• options?: Object

• options.global?: boolean

Returns ​

void

Source ​

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


dispose() ​

dispose(): void

Returns ​

void

Source ​

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


handleEvent() ​

handleEvent(name, fn, options?): void

Parameters ​

• 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"

• fn: UIEventHandler

• options?: Object

• options.global?: boolean

Returns ​

void

Source ​

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


mounted() ​

mounted(): void

Returns ​

void

Source ​

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


unmounted() ​

unmounted(): void

Returns ​

void

Source ​

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


Generated using typedoc-plugin-markdown and TypeDoc