Skip to content

EmbedRegistry

Extends

Properties

_

_: Record<string, EventsEntry[]>

Inherited from

Events._


embedByExtension

embedByExtension: EmbedRegistryEmbedByExtensionRecord

Mapping of file extensions to constructors for embeddable widgets

Methods

getEmbedCreator()

getEmbedCreator(file): null | EmbeddableConstructor

Get the embed constructor for a specific file type

Parameters

file: TFile

Returns

null | EmbeddableConstructor


isExtensionRegistered()

isExtensionRegistered(extension): boolean

Check whether a file extension has a registered embed constructor

Parameters

extension: string

Returns

boolean


off()

off(name, callback): void

Parameters

name: string

callback

Returns

void

Inherited from

Events.off


offref()

offref(ref): void

Parameters

ref: EventRef

Returns

void

Inherited from

Events.offref


on()

on(name, callback, ctx?): EventRef

Parameters

name: string

callback

ctx?: any

Returns

EventRef

Inherited from

Events.on


registerExtension()

registerExtension(extension, embedCreator): void

Register an embed constructor for a specific file extension

Parameters

extension: string

embedCreator: EmbeddableConstructor

Returns

void


registerExtensions()

registerExtensions(extensions, embedCreator): void

Register an embed constructor for a list of file extensions

Parameters

extensions: string[]

embedCreator: EmbeddableConstructor

Returns

void


trigger()

trigger(name, …data): void

Parameters

name: string

• …data: unknown[]

Returns

void

Inherited from

Events.trigger


tryTrigger()

tryTrigger(evt, args): void

Parameters

evt: EventRef

args: unknown[]

Returns

void

Inherited from

Events.tryTrigger


unregisterExtension()

unregisterExtension(extension): void

Unregister an embed constructor for a specific file extension

Parameters

extension: string

Returns

void


unregisterExtensions()

unregisterExtensions(extensions): void

Unregister an embed constructor for a list of file extensions

Parameters

extensions: string[]

Returns

void