AppSetting
Unofficial
The settings modal for the application, managing core and plugin setting tabs.
Import:
import type { AppSetting } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface AppSetting extends ModalExtends: Modal
Constructor
new AppSetting(app: App)Constructor.
To get the constructor instance, use getAppSettingConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| activeTab | null | SettingTab | Current active tab of the settings modal. | |
| app | App | The Obsidian app instance. (Inherited from Modal) | |
| bgEl | HTMLElement | Background applied to application to dim it (Inherited from Modal) | |
| bgOpacity | string | Opacity percentage of the background (Inherited from Modal) | |
| communityPluginTabContainer | HTMLElement | Container element containing the community plugins | |
| communityPluginTabHeaderGroup | HTMLElement | Container element containing the community plugins header. | |
| containerEl | HTMLElement | The container HTML element for the modal. (Inherited from Modal) | |
| contentEl | HTMLElement | The HTML element that represents the content of the modal. (Inherited from Modal) | |
| corePluginTabContainer | HTMLElement | Container element containing the core plugins. | |
| corePluginTabHeaderGroup | HTMLElement | Container element containing the core plugins header. | |
| dimBackground | boolean | Whether the background is being dimmed (Inherited from Modal) | |
| feedbackBanner | unknown | Feedback banner element. | |
| headerEl | HTMLDivElement | Header element of the modal dialog. (Inherited from Modal) | |
| lastTabId | string | Previously opened tab ID. | |
| modalEl | HTMLElement | The HTML element that represents the modal. (Inherited from Modal) | |
| pluginTabs | SettingTab[] | List of all plugin tabs (core and community, ordered by precedence). | |
| scope | Scope | The scope for the keymaps. (Inherited from Modal) | |
| selection | null | WindowSelection | Selection logic handler (Inherited from Modal) | |
| settingTabs | SettingTab[] | List of all core settings tabs (editor, files & links, ...). | |
| shouldAnimate | boolean | Whether the modal should animate (Inherited from Modal) | |
| shouldRestoreSelection | boolean | Whether the modal should restore the selection when it is opened or closed. (Inherited from Modal) | |
| tabContainer | HTMLElement | Container element containing the core settings. | |
| tabContentContainer | HTMLElement | Container for currently active settings tab. | |
| tabHeadersEl | HTMLElement | Container for all settings tabs. | |
| titleEl | HTMLElement | The HTML element that represents the title of the modal. (Inherited from Modal) | |
| win | null | Window | Reference to the global Window object. (Inherited from Modal) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addSettingTab(tab) | void | Add a new plugin tab to the settings modal. | |
| animateClose() | Promise<void> | Performed when animation is complete (Inherited from Modal) | |
| animateOpen() | Promise<void> | Performed when animation is started (Inherited from Modal) | |
| close() | void | Close the modal. (Inherited from Modal) | |
| closeActiveTab() | void | Closes the currently active tab. | |
| isPluginSettingTab(tab) | boolean | Check whether tab is a plugin tab. | |
| onClickOutside(evt) | void | Closes the modal when a click occurs outside of it, unless the event was already handled. (Inherited from Modal) | |
| onClose() | void | Called when the modal is closed. (Inherited from Modal) | |
| onEscapeKey() | void | On escape key press close modal (Inherited from Modal) | |
| onHistoryBack() | void | Called when the user navigates back in the history. (Inherited from Modal) | |
| onHistoryForward() | void | Called when the user navigates forward in the history. (Inherited from Modal) | |
| onOpen() | Promise<void> | void | Called when the modal is opened. (Inherited from Modal) | |
| onWindowClose() | void | On closing of the modal (Inherited from Modal) | |
| open() | void | Show the modal on the the active window. On phones, the modal will animate on screen. (Inherited from Modal) | |
| openTab(tab) | void | Open a specific tab by tab reference. | |
| openTabById(id) | HotkeysSettingTab | Open the hotkeys setting tab by ID. | |
| openTabById(id) | SettingTab | Open a specific tab by ID. | |
| removeSettingTab(tab) | void | Remove a plugin tab from the settings modal. | |
| setBackgroundOpacity(opacity) | this | Set the background opacity of the dimmed background. (Inherited from Modal) | |
| setCloseCallback(callback) | this | Set the callback to be called when the modal is closed. (Inherited from Modal) | |
| setContent(content) | this | Set the content of the modal. (Inherited from Modal) | |
| setDimBackground(dim) | this | Set whether the background should be dimmed. (Inherited from Modal) | |
| setTitle(title) | this | Set the title of the modal. (Inherited from Modal) | |
| updateModalTitle(tab) | void | Update the title of the modal. | |
| updatePluginSection() | void | Update a tab section. |
Links to this page: