Skip to content

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

Class: abstract BlockService

Deprecated

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

Constructors

new BlockService()

new BlockService(std, flavourProvider): BlockService

Parameters

std: BlockStdScope

flavourProvider

flavourProvider.flavour: string

Returns

BlockService

Overrides

Extension.constructor

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 collection(): DocCollection

Returns

DocCollection

Defined in

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


doc

get doc(): Doc

Returns

Doc

Defined in

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


host

get host(): EditorHost

Returns

EditorHost

Defined in

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


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Defined in

packages/framework/block-std/src/extension/service.ts:46


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Defined in

packages/framework/block-std/src/extension/service.ts:50

Methods

bindHotKey()

bindHotKey(keymap, options?): void

Parameters

keymap: Record<string, UIEventHandler>

options?

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: UIEventHandler

options?

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

Extension.setup

Defined in

packages/framework/block-std/src/extension/service.ts:62