AppSetting
Unofficial
The settings modal for the application, managing core and plugin setting tabs.
Import:
import type { AppSetting } from '@obsidian-typings/obsidian-catalyst-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) | |
| backButtonEl | HTMLElement | Back button element shown in the title bar when a sub-page is open. | |
| 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. | |
| hasInitialInputFocus | boolean | Whether the modal focuses its first input when opened. (Inherited from Modal) | |
| headerEl | HTMLDivElement | Header element of the modal dialog. (Inherited from Modal) | |
| isSearchActive | boolean | Whether the settings search is currently active. | |
| lastTabId | string | Previously opened tab ID. | |
| lastVimGTimestamp | number | Timestamp of the last Vim g keypress, used to detect gg. | |
| modalEl | HTMLElement | The HTML element that represents the modal. (Inherited from Modal) | |
| pageStack | unknown[] | The stack of open sub-pages. | |
| pluginTabs | SettingTab[] | List of all plugin tabs (core and community, ordered by precedence). | |
| popout | unknown | The popout-window handle when the settings are popped out, or null. | |
| popoutStorageKey | string | The local-storage key used to persist the popout-window state. | |
| quitRef | EventRef | null | The event reference for the workspace quit hook, or null. | |
| scope | Scope | The scope for the keymaps. (Inherited from Modal) | |
| searchComponent | SearchComponent | The search input component. | |
| searchIndex | unknown | The internal index used to search settings. | |
| searchNavItems | unknown[] | The navigable items shown for the current search results. | |
| searchResultsEl | HTMLElement | The container element for search results. | |
| 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. | |
| tabGroupContainerEl | HTMLElement | The container element for the vertical tab header group. | |
| tabHeadersEl | HTMLElement | Container for all settings tabs. | |
| tabNavItems | unknown[] | The navigable tab items in the sidebar. | |
| titleEl | HTMLElement | The HTML element that represents the title of the modal. (Inherited from Modal) | |
| titleTextEl | HTMLElement | The element displaying the current page title. | |
| unloadHandler | (() => void) | null | The beforeunload handler registered while popped out, or null. | |
| win | null | Window | Reference to the global Window object. (Inherited from Modal) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| activateNavItem(el) | void | Activates the navigable nav item matching the given element. | |
| activateSettingItem(el) | void | Activates the setting item for the given element (clicks it). | |
| 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) | |
| clearPageStack() | void | Closes and hides every open sub-page. | |
| close() | void | Close the modal. (Inherited from Modal) | |
| closeActiveTab() | void | Closes the currently active tab. | |
| closePage() | void | Closes the top-most sub-page. | |
| focusNavItem(navItem) | void | Focuses the given nav item. | |
| focusNextNavItem(direction) | void | Moves focus to the nav item at the given offset from the current one. | |
| focusNextSettingItem(settingEl, direction) | void | Moves focus to the setting item at the given offset from the given one. | |
| focusSettingItem(settingEl, focusVisible?) | void | Focuses the given setting item element. | |
| focusSidebar() | void | Moves focus to the sidebar. | |
| getCurrentPageEl() | HTMLElement | undefined | Gets the root element of the current page. | |
| getNavigableNavItems() | unknown[] | Gets the currently navigable nav items (search results or tabs). | |
| getNavigableSettingItems() | HTMLElement[] | Gets the currently navigable setting item elements. | |
| getPopoutOptions() | unknown | Gets the options used when popping the settings out into a window. | |
| getRootEl() | HTMLElement | Gets the modal's root element. (Inherited from Modal) | |
| isPluginSettingTab(tab) | boolean | Check whether tab is a plugin tab. | |
| navigateToSearchResult(result, hit?) | void | Navigates to a search result, optionally scrolling to a specific definition. | |
| 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) | |
| onSearchChanged() | void | Handles a change to the search query. | |
| 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) | |
| openPage(page) | void | Opens a sub-page. | |
| 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. | |
| rebuildTabNavItems() | void | Rebuilds the sidebar tab nav items. | |
| refreshCurrentPage(tab) | void | Re-renders the current page for the given tab if it is active. | |
| refreshSearch() | void | Re-runs the current search. | |
| removeSettingTab(tab) | void | Remove a plugin tab from the settings modal. | |
| scrollToDefinition(tab, definition) | void | Scrolls to and focuses a setting definition within a tab. | |
| 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. | |
| updatePageTitle() | void | Updates the displayed page title from the current page or active tab. | |
| updatePluginSection() | void | Update a tab section. |
Links to this page: