Skip to content

obsidian/augmentations

ClassDescription
AbstractInputSuggestAttach to an <input> element or a <div contentEditable> to add type-ahead support.
AppThe main app object.
CapacitorAdapterImplementation of the vault adapter for mobile devices. app.vault.adapter returns an instance of obsidian#CapacitorAdapter on mobile devices.
ConfirmationButtonA button inside a ConfirmationModal’s button row. Clicking the button closes the modal after the click handler resolves; return a truthy value from the handler to keep the modal open (for example, to surface a validation error).
ConfirmationModalA modal that asks the user to confirm an action. Use ConfirmationModal.addButton to add each option to the button row, and ConfirmationModal.addCancelButton for the dismissal button. Buttons auto-close the modal on click unless the handler returns truthy.
DisplayValueComponentA read-only display value for a setting row: a value label and an optional status indicator. On a navigable row, it surfaces the value edited on the page the row opens, so the user can see it without opening that page.
EditorA common interface that bridges the gap between CodeMirror 5 and CodeMirror 6.
EditorSuggestRepresents a autocomplete suggestion in the editor
EventsEvent emitter implementation
FileManagerManage the creation, deletion and renaming of files from the UI.
FileSystemAdapterImplementation of the vault adapter for desktop. app.vault.adapter returns an instance of obsidian#FileSystemAdapter on desktop devices.
FuzzySuggestModalSuggest modal for fuzzy search.
HoverPopoverA hover popover.
KeymapManages keymap lifecycle for different obsidian#Scopes.
MarkdownEditViewThis is the editor for Obsidian Mobile as well as the upcoming WYSIWYG editor.
MarkdownPreviewRendererThe renderer of the markdown preview.
MarkdownPreviewViewThe markdown preview view.
MarkdownRenderChildA component to register as a child component for the markdown preview.
MarkdownRendererA renderer for markdown.
MenuA component for context menus.
MenuItemA menu item.
MenuSeparatorA separator for the menu.
MetadataCacheA cached metadata for a note. Linktext is any internal link that is composed of a path and a subpath, such as ‘My note#Heading’ Linkpath (or path) is the path part of a linktext Subpath is the heading/block ID part of a linktext.
ModalModal dialog component.
NoticeNotification component. Use to present timely, high-value information.
PluginBase class for all plugins.
PluginSettingTabProvides a unified interface for users to configure the plugin.
PopoverSuggestBase class for adding a type-ahead popover.
RenderContextUtility functions for rendering Values within the app.
ScopeA scope receives keyboard events and binds callbacks to given hotkeys. Only one scope is active at a time, but scopes may define parent scopes (in the constructor) and inherit their hotkeys.
SecretStorageA secret storage.
SettingA setting.
SettingGroupSetting group.
SettingPageBase class for a sub-page within a SettingTab. Use with the page factory on SettingDefinitionPage to render a sub-page imperatively — useful when the page’s content is dynamic or doesn’t fit cleanly into a list of definitions. For declarative sub-pages, use the items field on SettingDefinitionPage instead.
SettingTabA setting tab.
SuggestModalA suggest modal.
TAbstractFileThis can be either a obsidian#TFile or a obsidian#TFolder.
TasksA task manager.
TFileA file.
TFolderA folder.
VaultWork with files and folders stored inside a vault.
WorkspaceA workspace.
WorkspaceContainerWorkspace container.
WorkspaceFloatingWorkspace floating.
WorkspaceItemWorkspace item.
WorkspaceLeafWorkspace leaf.
WorkspaceMobileDrawerWorkspace mobile drawer.
WorkspaceParentWorkspace parent.
WorkspaceRibbonWorkspace ribbon.
WorkspaceRootWorkspace root.
WorkspaceSidedockWorkspace sidedock.
WorkspaceSplitWorkspace split.
WorkspaceTabsWorkspace tabs.
WorkspaceWindowWorkspace window.
InterfaceDescription
BasesAllOptionsBasesOptions and the associated sub-types are configuration-driven settings controls which can be provided by a BasesViewRegistration to expose configuration options to users in the view config menu of the Bases toolbar.
BasesConfigFileFilter
BasesOptions
BasesPropertyIdThe full ID of a property, used in the bases config file. The prefixed BasesPropertyType disambiguates properties of the same name but from different sources.
BasesPropertyTypeThe three valid “sources” of a property in a Base. - note: Properties from the frontmatter of markdown files in the vault. - formula: Properties calculated by evaluating a formula from the base config file. - file: Properties inherent to a file, such as the name, extension, size, etc.
BasesSortConfig
BasesViewFactoryImplement this factory function in a BasesViewRegistration to create a new instance of a custom Bases view.
BlockCacheThe cache of the block in the note. markdown foo ^bar
BlockSubpathResultSubpath result for a block from resolveSubpath
BulkUndoRecordA captured pre-modification snapshot of a file, used to undo a bulk modification.
CachedMetadataCached metadata for a note.
CacheItemA cache item with a position within a note.
CliDataThe data passed to the CLI.
CliFlagThe data passed to the CLI.
CliFlags
CliFlags__A map of CLI flags.
CliHandler
CliHandler__A function that handles CLI commands.
CommandA command that can be executed from the command palette or toolbar buttons.
Constructor
Constructor__Abstract constructor type.
DataAdapterWork directly with files and folders inside a vault. If possible prefer using the obsidian#Vault API over this.
DataWriteOptionsCustom options for writing to a file.
DebouncerA debouncer wrapper for a function.
EditorChangeRepresents a change to the editor
EditorCommandName
EditorCommandName__The name of a command you can execute with Editor.exec
EditorPositionRepresents a position in the editor
EditorRangeRepresents a range in the editor
EditorRangeOrCaretRepresents a range or caret in the editor
EditorScrollInfoScroll info for the editor
EditorSelectionRepresents a selection in the editor
EditorSelectionOrCaretRepresents a selection or caret in the editor
EditorSuggestContextThe context of the suggestion
EditorSuggestTriggerInfoThe trigger info for the suggestion
EditorTransactionTransaction for the editor
EmbedCacheThe cache of the embed in the note. markdown ![[wikilink]] ![[wikilink|alias]] ![alias](markdown-link)
EventRefEvent reference
FileStatsFile stats
FootnoteCacheThe cache of the footnote in the note. markdown foo [^1] [^1]: bar baz [^qux] [^qux]: quux
FootnoteRefCacheThe cache of the footnote reference in the note. markdown foo [^1] [^1]: bar baz [^qux] [^qux]: quux
FootnoteSubpathResultResult of resolving footnotes using resolveSubpath
FrontMatterCacheThe cache of the frontmatter in the note. Frontmatter is a block of metadata that is used to store information about the note. markdown --- key1: "value1", key2: 42 ---
FrontMatterInfoThe information about the frontmatter in the note.
FrontmatterLinkCacheThe cache of the links in the frontmatter. markdown --- key1: "[[wikilink]]" key2: "[[wikilink|alias]]" ---
FuzzyMatchThe result of a fuzzy search.
HeadingCacheThe cache of the heading in the note. markdown # foo ## bar ### baz
HeadingSubpathResultSubpath result for a heading from resolveSubpath
HexStringHex strings are 6-digit hash-prefixed rgb strings in lowercase form. Example: #ffffff
HexString__Hex strings are 6-digit hash-prefixed rgb strings in lowercase form.
HistoryHandlerA handler that responds to history navigation, e.g. the Android ‘back’ button.
HotkeyA hotkey.
HoverLinkSourceA source for hover links.
HoverParentA parent for hover links.
HSLRepresents an obsidian#HSL color.
IconNameCan be any Lucide icon name or an internal icon name.
IconName__Can be any Lucide icon name or an internal icon name.
InstructionAn instruction for the modal.
ISuggestOwnerAn owner that controls UI suggestions.
KeymapContextContext of the keymap.
KeymapEventHandlerEvent handler for the keymap.
KeymapEventListenerReturn false to automatically preventDefault
KeymapEventListener__The event listener for the keymap. Return false to automatically preventDefault.
KeymapInfoInformation about the key combination.
LinkCacheThe cache of the link in the note. markdown [[wikilink]] [[wikilink|alias]] [alias](markdown-link)
ListedFilesListed content of the folder.
ListItemCacheThe cache of the list item in the note. List items are markdown blocks that are used to create lists. markdown - Unordered List Item 1 - Unordered List Item 2 - Unordered List Item 3 1. Ordered List Item 1 2. Ordered List Item 2 3. Ordered List Item 3
LivePreviewStateTypeThe object stored in the view plugin livePreviewState
LocLocation within a Markdown document
MarkdownFileInfoThe markdown file info.
MarkdownPostProcessorA post processor receives an element which is a section of the preview. Post processors can mutate the DOM to render various things, such as mermaid graphs, latex equations, or custom controls. If your post processor requires lifecycle management, for example, to clear an interval, kill a subprocess, etc when this element is removed from the app, look into MarkdownPostProcessorContext.addChild
MarkdownPostProcessorContextThe context of the markdown post processor.
MarkdownPreviewEventsThe events of the markdown preview.
MarkdownPreviewScrollOptionsOptions for MarkdownPreviewRenderer.applyScroll.
MarkdownSectionInformationMarkdown section information.
MarkdownSubViewA sub view of the markdown view.
MarkdownViewModeType
MarkdownViewModeType__The mode of the markdown view.
MenuPositionDefA definition for the position of the menu.
ModifierMod = Cmd on MacOS and Ctrl on other OS Ctrl = Ctrl key for every OS Meta = Cmd on MacOS and Win key on other OS
Modifier__Mod = Cmd on MacOS and Ctrl on other OS Ctrl = Ctrl key for every OS Meta = Cmd on MacOS and Win key on other OS
ObsidianProtocolDataA data object for obsidian:// URLs.
ObsidianProtocolHandler
ObsidianProtocolHandler__A handler for obsidian:// URLs.
OpenViewStateView state for the open action.
PaneType
PaneType__The pane type of the leaf.
PluginManifestMetadata about a Community plugin.
PointRepresents a point in a 2D coordinate system.
PopoverState
PosDescribes a text range in a Markdown document.
ReferenceBase interface for items that point to a different location.
ReferenceCacheA reference to a link.
ReferenceLinkCacheThe cache of the reference link in the note. markdown [google] [google]: https://google.com
RequestUrlParamThe parameters for the requestUrl function.
RequestUrlResponseThe response from the requestUrl function.
RequestUrlResponsePromiseThe promise of the requestUrl function.
RGBA color in obsidian#RGB format.
RibbonItemRepresents a button item in the sidebar ribbon.
RibbonStateSerialized state of a WorkspaceRibbon.
SearchMatches
SearchMatches__A search matches.
SearchMatchPartText position offsets within text file. Represents a text range [from offset, to offset].
SearchMatchPart__Text position offsets within text file. Represents a text range [fromOffset, toOffset].
SearchResultA search result.
SearchResultContainerA search result container.
SecretMetadataAccess metadata for a stored secret.
SectionCacheThe cache of the section in the note. Sections are root level markdown blocks, which can be used to divide the document up. markdown # Heading section Paragraph section > [!NOTE] > Callout section
SettingColorControl
SettingControl
SettingControlBase
SettingDefinition
SettingDefinitionAction
SettingDefinitionAddItemConfiguration for a SettingDefinitionList’s addItem affordance.
SettingDefinitionBase
SettingDefinitionControl
SettingDefinitionEmpty
SettingDefinitionGroupA group of settings rendered under a shared heading. Used as an inline group in the array returned by getSettingDefinitions(). For collections of mutable data (with add/delete/reorder affordances), use SettingDefinitionList instead.
SettingDefinitionItemA single item in the array returned by getSettingDefinitions().
SettingDefinitionListA specialized SettingDefinitionGroup for collections of mutable data: entries the user adds, reorders, or removes. Rendered with a more compact visual style than a group, and supports emptyState, onReorder, and onDelete for the mutation affordances.
SettingDefinitionPageA declarative page of settings rendered as a navigable entry. Used as an inline page in the array returned by getSettingDefinitions().
SettingDefinitionRender
SettingDropdownControl
SettingFileControlFile-path input with a vault file suggester. Persists the selected file’s full path including extension (e.g. folder/note.md). Resolve the saved path with Vault.getFileByPath().
SettingFolderControlFolder-path input with a vault folder suggester. Persists the selected folder’s path (a string).
SettingGroupItemA single item within a SettingDefinitionGroup — either a setting or a navigable page.
SettingNumberControlNumeric text input. Persists a number; falls back to defaultValue (or 0) if the input cannot be parsed.
SettingSliderControl
SettingTextAreaControlMulti-line text input. Persists a string.
SettingTextControl
SettingToggleControl
Side
Side__The side of the leaf.
SplitDirection
SplitDirection__The direction of the leaf split.
StatA stat for a file or folder.
SubpathResultA result of a subpath search.
TabInsertLocationDescribes where a dragged tab would be inserted, returned by WorkspaceTabs.getTabInsertLocation.
TabInsertRectThe rectangle marking where a dragged tab would be inserted, returned within TabInsertLocation.
TagCacheThe cache of the tag in the note. markdown --- tags: - foo - bar --- #baz
TooltipOptionsOptions for the tooltip.
TooltipPlacement
TooltipPlacement__The placement of the tooltip.
UserEvent
UserEvent__The user event.
ViewCreator
ViewCreator__A view creator.
ViewStateThe state of the view.
ViewStateResultThe result of the view state.
WorkspaceWindowInitData