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

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

Properties

disposables

readonly disposables: DisposableGroup

Source

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


flavour

readonly flavour: string

Source

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


specSlots

readonly specSlots: BlockSpecSlots

Source

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


std

readonly std: BlockStdScope

Source

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

Accessors

collection

get collection(): DocCollection

Returns

DocCollection

Source

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


doc

get doc(): Doc

Returns

Doc

Source

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


host

get host(): HTMLElement

Returns

HTMLElement

Source

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


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Source

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


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Source

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

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


dispose()

dispose(): void

Returns

void

Source

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


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?

options.global?: boolean

Returns

void

Source

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


mounted()

mounted(): void

Returns

void

Source

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


unmounted()

unmounted(): void

Returns

void

Source

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