Skip to content

EmbedRegistry

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:9

Extends

Properties

_

_: Record<string, EventsEntry[]>

Defined in: src/obsidian/augmentations/Events.d.ts:5

Inherited from

Events._


embedByExtension

embedByExtension: EmbedRegistryEmbedByExtensionRecord

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:13

Mapping of file extensions to constructors for embeddable widgets

Methods

getEmbedCreator()

getEmbedCreator(file): null | EmbeddableConstructor

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:18

Get the embed constructor for a specific file type

Parameters

file

TFile

Returns

null | EmbeddableConstructor


isExtensionRegistered()

isExtensionRegistered(extension): boolean

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:22

Check whether a file extension has a registered embed constructor

Parameters

extension

string

Returns

boolean


off()

off(name, callback): void

Defined in: obsidian.d.ts:1441

Parameters

name

string

callback

(…data) => unknown

Returns

void

Inherited from

Events.off


offref()

offref(ref): void

Defined in: obsidian.d.ts:1445

Parameters

ref

EventRef

Returns

void

Inherited from

Events.offref


on()

on(name, callback, ctx?): EventRef

Defined in: obsidian.d.ts:1437

Parameters

name

string

callback

(…data) => unknown

ctx?

any

Returns

EventRef

Inherited from

Events.on


registerExtension()

registerExtension(extension, embedCreator): void

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:26

Register an embed constructor for a specific file extension

Parameters

extension

string

embedCreator

EmbeddableConstructor

Returns

void


registerExtensions()

registerExtensions(extensions, embedCreator): void

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:30

Register an embed constructor for a list of file extensions

Parameters

extensions

string[]

embedCreator

EmbeddableConstructor

Returns

void


trigger()

trigger(name, …data): void

Defined in: obsidian.d.ts:1449

Parameters

name

string

data

unknown[]

Returns

void

Inherited from

Events.trigger


tryTrigger()

tryTrigger(evt, args): void

Defined in: obsidian.d.ts:1453

Parameters

evt

EventRef

args

unknown[]

Returns

void

Inherited from

Events.tryTrigger


unregisterExtension()

unregisterExtension(extension): void

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:34

Unregister an embed constructor for a specific file extension

Parameters

extension

string

Returns

void


unregisterExtensions()

unregisterExtensions(extensions): void

Defined in: src/obsidian/internals/EmbedRegistry/EmbedRegistry.d.ts:38

Unregister an embed constructor for a list of file extensions

Parameters

extensions

string[]

Returns

void