Skip to content

BlockSuite API Documentation / @blocksuite/blocks / EmbedYoutubeBlockService

Class: EmbedYoutubeBlockService

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

Constructors

new EmbedYoutubeBlockService()

new EmbedYoutubeBlockService(std, flavourProvider): EmbedYoutubeBlockService

Parameters

std: BlockStdScope

flavourProvider

flavourProvider.flavour: string

Returns

EmbedYoutubeBlockService

Inherited from

BlockService.constructor

Defined in

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

Properties

disposables

readonly disposables: DisposableGroup

Inherited from

BlockService.disposables

Defined in

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


flavour

readonly flavour: string

Inherited from

BlockService.flavour

Defined in

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


flavourProvider

readonly flavourProvider: object

flavour

flavour: string

Inherited from

BlockService.flavourProvider

Defined in

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


specSlots

readonly specSlots: BlockSpecSlots<BlockService>

Inherited from

BlockService.specSlots

Defined in

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


std

readonly std: BlockStdScope

Inherited from

BlockService.std

Defined in

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


flavour

readonly static flavour: `affine:embed-${string}` = EmbedYoutubeBlockSchema.model.flavour

Overrides

BlockService.flavour

Defined in

packages/blocks/src/embed-youtube-block/embed-youtube-service.ts:14


setLinkPreviewEndpoint()

static setLinkPreviewEndpoint: (endpoint) => void = EmbedYoutubeBlockService.linkPreviewer.setEndpoint

Parameters

endpoint: string

Returns

void

Defined in

packages/blocks/src/embed-youtube-block/embed-youtube-service.ts:18

Accessors

collection

get collection(): DocCollection

Returns

DocCollection

Inherited from

BlockService.collection

Defined in

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


doc

get doc(): Doc

Returns

Doc

Inherited from

BlockService.doc

Defined in

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


host

get host(): EditorHost

Returns

EditorHost

Inherited from

BlockService.host

Defined in

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


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Inherited from

BlockService.selectionManager

Defined in

packages/framework/block-std/dist/extension/service.d.ts:26


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Inherited from

BlockService.uiEventDispatcher

Defined in

packages/framework/block-std/dist/extension/service.d.ts:27

Methods

bindHotKey()

bindHotKey(keymap, options?): void

Parameters

keymap: Record<string, UIEventHandler>

options?

options.global?: boolean

Returns

void

Inherited from

BlockService.bindHotKey

Defined in

packages/framework/block-std/dist/extension/service.d.ts:32


dispose()

dispose(): void

Returns

void

Inherited from

BlockService.dispose

Defined in

packages/framework/block-std/dist/extension/service.d.ts:35


handleEvent()

handleEvent(name, fn, options?): void

Parameters

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

fn: UIEventHandler

options?

options.global?: boolean

Returns

void

Inherited from

BlockService.handleEvent

Defined in

packages/framework/block-std/dist/extension/service.d.ts:36


mounted()

mounted(): void

Returns

void

Overrides

BlockService.mounted

Defined in

packages/blocks/src/embed-youtube-block/embed-youtube-service.ts:32


queryUrlData()

queryUrlData(embedYoutubeModel, signal?): Promise<Partial<EmbedYoutubeBlockUrlData>>

Parameters

embedYoutubeModel: EmbedYoutubeModel

signal?: AbortSignal

Returns

Promise<Partial<EmbedYoutubeBlockUrlData>>

Defined in

packages/blocks/src/embed-youtube-block/embed-youtube-service.ts:21


unmounted()

unmounted(): void

Returns

void

Inherited from

BlockService.unmounted

Defined in

packages/framework/block-std/dist/extension/service.d.ts:40


setup()

static setup(di): void

Parameters

di: Container

Returns

void

Inherited from

BlockService.setup

Defined in

packages/framework/block-std/dist/extension/service.d.ts:31