Skip to content

App

Defined in: obsidian.d.ts:383

Constructors

new App()

new App(): App

Returns

App

Properties

appId

appId: string

Defined in: src/obsidian/augmentations/App.d.ts:30

ID that uniquely identifies the vault

commands

commands: Commands

Defined in: src/obsidian/augmentations/App.d.ts:38

Contains all registered commands

customCss

customCss: CustomCSS

Defined in: src/obsidian/augmentations/App.d.ts:44

Custom CSS (snippets/themes) applied to the application

dom

dom: ObsidianDOM

Defined in: src/obsidian/augmentations/App.d.ts:48

References to important DOM elements of the application


embedRegistry

embedRegistry: EmbedRegistry

Defined in: src/obsidian/augmentations/App.d.ts:54

Registry that manages the creation of generic media type embeds


fileManager

fileManager: FileManager

Defined in: obsidian.d.ts:399


hotkeyManager

hotkeyManager: HotkeyManager

Defined in: src/obsidian/augmentations/App.d.ts:69

Manages global hotkeys

internalPlugins

internalPlugins: InternalPlugins

Defined in: src/obsidian/augmentations/App.d.ts:75

Manager of internal ‘core’ plugins

isMobile

isMobile: boolean

Defined in: src/obsidian/augmentations/App.d.ts:83

Whether the application is currently running on mobile

keymap

keymap: Keymap

Defined in: obsidian.d.ts:386


lastEvent

lastEvent: null | UserEvent

Defined in: obsidian.d.ts:405

The last known user interaction event, to help commands find out what modifier keys are pressed.


loadProgress

loadProgress: LoadProgress

Defined in: src/obsidian/augmentations/App.d.ts:85


metadataCache

metadataCache: MetadataCache

Defined in: obsidian.d.ts:396


metadataTypeManager

metadataTypeManager: MetadataTypeManager

Defined in: src/obsidian/augmentations/App.d.ts:97

Manages the frontmatter properties of the vault and the rendering of the properties

mobileTabSwitcher

mobileTabSwitcher: null | MobileTabSwitcher

Defined in: src/obsidian/augmentations/App.d.ts:100


plugins

plugins: Plugins

Defined in: src/obsidian/augmentations/App.d.ts:113

Manages loading and enabling of community (non-core) plugins

scope

scope: Scope

Defined in: obsidian.d.ts:388


setting

setting: AppSetting

Defined in: src/obsidian/augmentations/App.d.ts:122

Manages the settings modal and its tabs

title

title: string

Defined in: src/obsidian/augmentations/App.d.ts:132

Name of the vault with version suffix

vault

vault: Vault

Defined in: obsidian.d.ts:394


viewRegistry

viewRegistry: ViewRegistry

Defined in: src/obsidian/augmentations/App.d.ts:147

Manages the construction of appropriate views when opening a file of a certain type

workspace

workspace: Workspace

Defined in: obsidian.d.ts:391

Methods

changeTheme()

changeTheme(theme): void

Defined in: src/obsidian/augmentations/App.d.ts:158

Sets the accent color of the application (light/dark mode)

Parameters

theme

"moonstone" | "obsidian"

Returns

void


copyObsidianUrl()

copyObsidianUrl(file): void

Defined in: src/obsidian/augmentations/App.d.ts:164

Copies Obsidian URI of given file to clipboard

Parameters

file

TFile

File to generate URI for

Returns

void


debugMode()

debugMode(isEnabled): void

Defined in: src/obsidian/augmentations/App.d.ts:170

Toggles debug mode

Parameters

isEnabled

boolean

Whether to enable or disable debug mode

Returns

void


disableCssTransition()

disableCssTransition(): void

Defined in: src/obsidian/augmentations/App.d.ts:174

Disables all CSS transitions in the vault (until manually re-enabled)

Returns

void


emulateMobile()

emulateMobile(emulate): void

Defined in: src/obsidian/augmentations/App.d.ts:180

Restarts Obsidian and renders workspace in mobile mode

Parameters

emulate

boolean

Returns

void

enableCssTransition()

enableCssTransition(): void

Defined in: src/obsidian/augmentations/App.d.ts:184

Enables all CSS transitions in the vault

Returns

void


fixFileLinks(element): void

Defined in: src/obsidian/augmentations/App.d.ts:190

Manually fix all file links pointing towards image/audio/video resources in element

Parameters

element

HTMLElement

Element to fix links in

Returns

void


garbleText()

garbleText(): void

Defined in: src/obsidian/augmentations/App.d.ts:198

Applies an obfuscation font to all text characters in the vault

Returns

void

getAccentColor()

getAccentColor(): string

Defined in: src/obsidian/augmentations/App.d.ts:204

Get the accent color of the application

Returns

string

getAppTitle()

getAppTitle(): string

Defined in: src/obsidian/augmentations/App.d.ts:210

Get the current title of the application

Returns

string

getObsidianUrl()

getObsidianUrl(file): string

Defined in: src/obsidian/augmentations/App.d.ts:214

Get the URI for opening specified file in Obsidian

Parameters

file

TFile

Returns

string


getSpellcheckLanguages()

getSpellcheckLanguages(): string[]

Defined in: src/obsidian/augmentations/App.d.ts:221

Get currently active spellcheck languages

Returns

string[]


getTheme()

getTheme(): "moonstone" | "obsidian"

Defined in: src/obsidian/augmentations/App.d.ts:227

Get the current color scheme of the application

Returns

"moonstone" | "obsidian"

importAttachments()

importAttachments(imports, folder): Promise<void>

Defined in: src/obsidian/augmentations/App.d.ts:231

Import attachments into specified folder

Parameters

imports

ImportedAttachments[]

folder

null | TFolder

Returns

Promise<void>


isVimEnabled()

isVimEnabled(): boolean

Defined in: src/obsidian/augmentations/App.d.ts:234

Returns

boolean


loadLocalStorage()

loadLocalStorage(key): unknown

Defined in: src/obsidian/augmentations/App.d.ts:242

Load a value from the localstorage given key

Parameters

key

string

Key of value to load

Returns

unknown

on()

on(): void

Defined in: src/obsidian/augmentations/App.d.ts:249

Returns

void


openHelp()

openHelp(): void

Defined in: src/obsidian/augmentations/App.d.ts:255

Open the help vault (or site if mobile)

Returns

void


openVaultChooser()

openVaultChooser(): void

Defined in: src/obsidian/augmentations/App.d.ts:259

Open the vault picker

Returns

void


openWithDefaultApp()

openWithDefaultApp(path): void

Defined in: src/obsidian/augmentations/App.d.ts:263

Open the file with OS defined default file browser application

Parameters

path

string

Returns

void


saveLocalStorage()

saveLocalStorage(key, value): void

Defined in: src/obsidian/augmentations/App.d.ts:278

Save a value to the localstorage given key

Parameters

key

string

Key of value to save

value

unknown

Value to save

Returns

void

setAccentColor()

setAccentColor(color): void

Defined in: src/obsidian/augmentations/App.d.ts:284

Set the accent color of the application

Parameters

color

string

Returns

void

setAttachmentFolder()

setAttachmentFolder(path): void

Defined in: src/obsidian/augmentations/App.d.ts:288

Set the path where attachments should be stored

Parameters

path

string

Returns

void


setSpellcheckLanguages()

setSpellcheckLanguages(languages): void

Defined in: src/obsidian/augmentations/App.d.ts:292

Set the spellcheck languages

Parameters

languages

string[]

Returns

void


setTheme()

setTheme(theme): void

Defined in: src/obsidian/augmentations/App.d.ts:296

Set the current color scheme of the application and reload the CSS

Parameters

theme

"moonstone" | "obsidian"

Returns

void


showInFolder()

showInFolder(path): void

Defined in: src/obsidian/augmentations/App.d.ts:300

Open the OS file picker at path location

Parameters

path

string

Returns

void


showReleaseNotes()

showReleaseNotes(version?): void

Defined in: src/obsidian/augmentations/App.d.ts:306

Show the release notes for provided version as a new leaf

Parameters

version?

string

Version to show release notes for (defaults to current version)

Returns

void


updateAccentColor()

updateAccentColor(): void

Defined in: src/obsidian/augmentations/App.d.ts:310

Updates the accent color and reloads the CSS

Returns

void


updateFontFamily()

updateFontFamily(): void

Defined in: src/obsidian/augmentations/App.d.ts:314

Update the font family of the application and reloads the CSS

Returns

void


updateFontSize()

updateFontSize(): void

Defined in: src/obsidian/augmentations/App.d.ts:318

Update the font size of the application and reloads the CSS

Returns

void


updateInlineTitleDisplay()

updateInlineTitleDisplay(): void

Defined in: src/obsidian/augmentations/App.d.ts:322

Update the inline title rendering in notes

Returns

void


updateRibbonDisplay()

updateRibbonDisplay(): void

Defined in: src/obsidian/augmentations/App.d.ts:323

Returns

void


updateTheme()

updateTheme(): void

Defined in: src/obsidian/augmentations/App.d.ts:327

Update the color scheme of the application and reloads the CSS

Returns

void


updateViewHeaderDisplay()

updateViewHeaderDisplay(): void

Defined in: src/obsidian/augmentations/App.d.ts:331

Update the view header display in notes

Returns

void