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
flavourProvider
flavour
string
Returns
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:28
Properties
disposables
readonly
disposables:DisposableGroup
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:20
flavour
readonly
flavour:string
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:21
flavourProvider
readonly
flavourProvider:object
flavour
flavour:
string
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:16
queryUrlData()
queryUrlData: (
embedYoutubeModel
,signal
?) =>Promise
<Partial
<EmbedYoutubeBlockUrlData
>>
Parameters
embedYoutubeModel
signal?
AbortSignal
Returns
Promise
<Partial
<EmbedYoutubeBlockUrlData
>>
Defined in
packages/affine/block-embed/dist/embed-youtube-block/embed-youtube-service.d.ts:7
specSlots
readonly
specSlots:BlockSpecSlots
<BlockService
>
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:22
std
readonly
std:BlockStdScope
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:15
flavour
readonly
static
flavour: `affine:embed-${string}`
Overrides
Defined in
packages/affine/block-embed/dist/embed-youtube-block/embed-youtube-service.d.ts:4
setLinkPreviewEndpoint()
static
setLinkPreviewEndpoint: (endpoint
) =>void
Parameters
endpoint
string
Returns
void
Defined in
packages/affine/block-embed/dist/embed-youtube-block/embed-youtube-service.d.ts:6
Accessors
collection
Get Signature
get collection():
DocCollection
Returns
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:23
doc
Get Signature
get doc():
Doc
Returns
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:24
host
Get Signature
get host():
EditorHost
Returns
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:25
selectionManager
Get Signature
get selectionManager():
SelectionManager
Returns
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:26
uiEventDispatcher
Get Signature
get uiEventDispatcher():
UIEventDispatcher
Returns
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?
global
boolean
Returns
void
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:32
dispose()
dispose():
void
Returns
void
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:35
handleEvent()
handleEvent(
name
,fn
,options
?):void
Parameters
name
"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"
| "blur"
| "focus"
| "contextMenu"
| "wheel"
fn
options?
global
boolean
Returns
void
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:36
mounted()
mounted():
void
Returns
void
Overrides
Defined in
packages/affine/block-embed/dist/embed-youtube-block/embed-youtube-service.d.ts:8
unmounted()
unmounted():
void
Returns
void
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:40
setup()
static
setup(di
):void
Parameters
di
Container
Returns
void
Inherited from
Defined in
packages/framework/block-std/dist/extension/service.d.ts:31