Skip to content

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

Class: BlockService<_Model>

Extended by

Type parameters

_Model extends BlockModel = BlockModel

Constructors

new BlockService(options)

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

Parameters

options: BlockServiceOptions

Returns

BlockService<_Model>

Source

packages/framework/block-std/src/service/index.ts:20

Properties

disposables

readonly disposables: DisposableGroup

Source

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


flavour

readonly flavour: string

Source

packages/framework/block-std/src/service/index.ts:16


specSlots

readonly specSlots: BlockSpecSlots

Source

packages/framework/block-std/src/service/index.ts:18


std

readonly std: BlockStdScope

Source

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

Accessors

collection

get collection(): DocCollection

Returns

DocCollection

Source

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


doc

get doc(): Doc

Returns

Doc

Source

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


host

get host(): HTMLElement

Returns

HTMLElement

Source

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


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Source

packages/framework/block-std/src/service/index.ts:38


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Source

packages/framework/block-std/src/service/index.ts:42

Methods

bindHotKey()

bindHotKey(keymap, options?): void

Parameters

keymap: Record<string, UIEventHandler>

options?

options.global?: boolean

Returns

void

Source

packages/framework/block-std/src/service/index.ts:73


dispose()

dispose(): void

Returns

void

Source

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


handleEvent()

handleEvent(name, fn, options?): void

Parameters

name: "click" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "cut" | "copy" | "paste" | "beforeInput" | "blur" | "focus" | "drop" | "contextMenu" | "wheel"

fn: UIEventHandler

options?

options.global?: boolean

Returns

void

Source

packages/framework/block-std/src/service/index.ts:61


mounted()

mounted(): void

Returns

void

Source

packages/framework/block-std/src/service/index.ts:51


unmounted()

unmounted(): void

Returns

void

Source

packages/framework/block-std/src/service/index.ts:55