Skip to content

PagePreviewPlugin

Defined in: src/obsidian/internals/InternalPlugins/PagePreview/PagePreviewPlugin.d.ts:5

Extends

Properties

_children

_children: Component[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:9

Child Components attached to current component, will be unloaded on unloading parent component

Inherited from

InternalPlugin._children


_events

_events: EventRef[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:13

Events that are attached to the current component, will be detached on unloading parent component

Inherited from

InternalPlugin._events


_loaded

_loaded: boolean

Defined in: src/obsidian/augmentations/Components/Component.d.ts:17

Whether the component and its children are loaded

Inherited from

InternalPlugin._loaded


addedButtonEls

addedButtonEls: HTMLDivElement[]

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:18

Inherited from

InternalPlugin.addedButtonEls


app

app: App

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:19

Inherited from

InternalPlugin.app


commands

commands: Command[]

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:20

Inherited from

InternalPlugin.commands


enabled

enabled: boolean

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:21

Inherited from

InternalPlugin.enabled


hasStatusBarItem

hasStatusBarItem: boolean

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:22

Inherited from

InternalPlugin.hasStatusBarItem


instance

instance: PagePreviewPluginInstance

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:23

Inherited from

InternalPlugin.instance


lastSave

lastSave: number

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:24

Inherited from

InternalPlugin.lastSave


manager

manager: InternalPlugins

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:25

Inherited from

InternalPlugin.manager


mobileFileInfo

mobileFileInfo: MobileFileInfo[]

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:26

Inherited from

InternalPlugin.mobileFileInfo


onConfigFileChange

onConfigFileChange: Debouncer<[], Promise<void>>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:27

Inherited from

InternalPlugin.onConfigFileChange


ribbonItems

ribbonItems: RibbonItem[]

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:28

Inherited from

InternalPlugin.ribbonItems


statusBarEl

statusBarEl: null | HTMLDivElement

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:29

Inherited from

InternalPlugin.statusBarEl


views

views: Record<string, ViewCreator>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:30

Inherited from

InternalPlugin.views

Methods

addChild()

addChild<T>(component): T

Defined in: obsidian.d.ts:887

Adds a child component, loading it if this component is loaded

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

InternalPlugin.addChild


addSettingTab()

addSettingTab(settingTab): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:32

Parameters

settingTab

PluginSettingTab

Returns

void

Inherited from

InternalPlugin.addSettingTab


deleteData()

deleteData(): Promise<void>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:33

Returns

Promise<void>

Inherited from

InternalPlugin.deleteData


disable()

disable(isDisabledByUser?): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:34

Parameters

isDisabledByUser?

boolean

Returns

void

Inherited from

InternalPlugin.disable


enable()

enable(isEnabledByUser?): Promise<void>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:35

Parameters

isEnabledByUser?

boolean

Returns

Promise<void>

Inherited from

InternalPlugin.enable


getModifiedTime()

getModifiedTime(): Promise<undefined | number>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:36

Returns

Promise<undefined | number>

Inherited from

InternalPlugin.getModifiedTime


handleConfigFileChange()

handleConfigFileChange(): Promise<void>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:37

Returns

Promise<void>

Inherited from

InternalPlugin.handleConfigFileChange


init()

init(): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:38

Returns

void

Inherited from

InternalPlugin.init


load()

load(): void

Defined in: obsidian.d.ts:865

Load this component and its children

Returns

void

Inherited from

InternalPlugin.load


loadData()

loadData(): Promise<null | object>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:39

Returns

Promise<null | object>

Inherited from

InternalPlugin.loadData


onload()

onload(): void

Defined in: obsidian.d.ts:871

Override this to load your component

Returns

void

Inherited from

InternalPlugin.onload


onunload()

onunload(): void

Defined in: obsidian.d.ts:882

Override this to unload your component

Returns

void

Inherited from

InternalPlugin.onunload


register()

register(cb): void

Defined in: obsidian.d.ts:897

Registers a callback to be called when unloading

Parameters

cb

() => any

Returns

void

Inherited from

InternalPlugin.register


registerDomEvent()

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:907

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof WindowEventMap

Parameters
el

Window

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InternalPlugin.registerDomEvent

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:912

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof DocumentEventMap

Parameters
el

Document

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InternalPlugin.registerDomEvent

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:917

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof HTMLElementEventMap

Parameters
el

HTMLElement

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InternalPlugin.registerDomEvent


registerEvent()

registerEvent(eventRef): void

Defined in: obsidian.d.ts:902

Registers an event to be detached when unloading

Parameters

eventRef

EventRef

Returns

void

Inherited from

InternalPlugin.registerEvent


registerGlobalCommand()

registerGlobalCommand(command): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:40

Parameters

command

Command

Returns

void

Inherited from

InternalPlugin.registerGlobalCommand


registerInterval()

registerInterval(id): number

Defined in: obsidian.d.ts:924

Registers an interval (from setInterval) to be cancelled when unloading Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API

Parameters

id

number

Returns

number

Inherited from

InternalPlugin.registerInterval


registerMobileFileInfo()

registerMobileFileInfo(renderCallback): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:41

Parameters

renderCallback

(el) => void

Returns

void

Inherited from

InternalPlugin.registerMobileFileInfo


registerRibbonItem()

registerRibbonItem(title, icon, callback): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:42

Parameters

title

string

icon

string

callback

() => Promise<void>

Returns

void

Inherited from

InternalPlugin.registerRibbonItem


registerScopeEvent()

registerScopeEvent(keymapEventHandler): void

Defined in: src/obsidian/augmentations/Components/Component.d.ts:19

Parameters

keymapEventHandler

KeymapEventHandler

Returns

void

Inherited from

InternalPlugin.registerScopeEvent


registerStatusBarItem()

registerStatusBarItem(): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:43

Returns

void

Inherited from

InternalPlugin.registerStatusBarItem


registerViewType()

registerViewType(type, creator): void

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:44

Parameters

type

string

creator

ViewCreator

Returns

void

Inherited from

InternalPlugin.registerViewType


removeChild()

removeChild<T>(component): T

Defined in: obsidian.d.ts:892

Removes a child component, unloading it

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

InternalPlugin.removeChild


saveData()

saveData(data): Promise<void>

Defined in: src/obsidian/internals/InternalPlugins/InternalPlugin.d.ts:45

Parameters

data

object

Returns

Promise<void>

Inherited from

InternalPlugin.saveData


unload()

unload(): void

Defined in: obsidian.d.ts:876

Unload this component and its children

Returns

void

Inherited from

InternalPlugin.unload