Skip to content

BlockSuite API Documentation / @blocksuite/blocks / SurfaceRefBlockService

Class: SurfaceRefBlockService

Extends

Constructors

new SurfaceRefBlockService(options)

new SurfaceRefBlockService(options): SurfaceRefBlockService

Parameters

options: BlockServiceOptions

Returns

SurfaceRefBlockService

Inherited from

BlockService.constructor

Source

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

Properties

_rendererMap

private _rendererMap: Map<string, SurfaceRefRenderer>

Source

packages/blocks/src/surface-ref-block/surface-ref-service.ts:7


disposables

readonly disposables: DisposableGroup

Inherited from

BlockService.disposables

Source

packages/framework/block-std/dist/service/index.d.ts:14


flavour

readonly flavour: string

Inherited from

BlockService.flavour

Source

packages/framework/block-std/dist/service/index.d.ts:13


specSlots

readonly specSlots: BlockSpecSlots

Inherited from

BlockService.specSlots

Source

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


std

readonly std: BlockStdScope

Inherited from

BlockService.std

Source

packages/framework/block-std/dist/service/index.d.ts:12

Accessors

collection

get collection(): DocCollection

Returns

DocCollection

Source

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


doc

get doc(): Doc

Returns

Doc

Source

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


host

get host(): HTMLElement

Returns

HTMLElement

Source

packages/framework/block-std/dist/service/index.d.ts:19


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Source

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


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Source

packages/framework/block-std/dist/service/index.d.ts:21

Methods

bindHotKey()

bindHotKey(keymap, options?): void

Parameters

keymap: Record<string, UIEventHandler>

options?

options.global?: boolean

Returns

void

Inherited from

BlockService.bindHotKey

Source

packages/framework/block-std/dist/service/index.d.ts:28


dispose()

dispose(): void

Returns

void

Inherited from

BlockService.dispose

Source

packages/framework/block-std/dist/service/index.d.ts:22


getRenderer()

getRenderer(id, doc, stackingCanvas): SurfaceRefRenderer

Parameters

id: string

doc: Doc= undefined

stackingCanvas: boolean= false

Returns

SurfaceRefRenderer

Source

packages/blocks/src/surface-ref-block/surface-ref-service.ts:9


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

Inherited from

BlockService.handleEvent

Source

packages/framework/block-std/dist/service/index.d.ts:25


mounted()

mounted(): void

Returns

void

Inherited from

BlockService.mounted

Source

packages/framework/block-std/dist/service/index.d.ts:23


removeRenderer()

removeRenderer(id): void

Parameters

id: string

Returns

void

Source

packages/blocks/src/surface-ref-block/surface-ref-service.ts:20


unmounted()

unmounted(): void

Returns

void

Inherited from

BlockService.unmounted

Source

packages/framework/block-std/dist/service/index.d.ts:24