Skip to main content
This changelog details breaking changes to the API and new additions that require additional context. The versions listed below correspond to the versions of the Obsidian app.
There may not be a corresponding package version for every version listed below.

Version History

Workspace Changes

New Plugin Lifecycle Hook
  • Plugin#onUserEnable - Provides a place to perform one-time initialization after the user installs and enables your plugin. If your plugin has a custom view, this is a good place to initialize it rather than recreating the view in Plugin#onload.
Sidebar Management
  • Workspace#ensureSideLeaf is now public. This function is a shorthand way to create a leaf in the sidebar if one does not already exist.
Deferred Views
  • Added WorkspaceLeaf#isDeferred and WorkspaceLeaf#loadIfDeferred
  • As of Obsidian v1.7.2, Obsidian will now defer tabs by default
  • See the guide on handling deferred views

Breaking Changes

TypeScript Changes: The API now prefers unknown to any. Using any causes TypeScript to disable typechecking entirely on the returned value, so this change could uncover some hidden typing issues.
Removed Functions: prepareQuery, fuzzySearch, and PreparedQuery have been removed from the API.
Migration GuideIf your plugin uses the old fuzzy search functions, migrate to prepareFuzzySearch:
// Old
let pq: PreparedQuery = prepareQuery(q);
...
fuzzySearch(pq, text);

// New
let fuzzy = prepareFuzzySearch(q);
...
fuzzy(text);

New Features

  • Plugin#removeCommand - Dynamically remove commands (useful for user-created commands)
  • SuggestModal#selectActiveSuggestion is now public - Useful for providing alternative hotkeys to your SuggestModal
  • Fixed FileSystemAdapter#rmdir(dirPath, false) always throwing an error when attempting to delete an empty directory
  • Added a data-type to the Markdown embed container using subpath type

Bug Fixes

  • Fixed revealLeaf failing to focus the correct window

Breaking Changes

SliderComponent Behavior Change: In version 1.5.9, the SliderComponent behavior changed. Now, instead of updating the value when the slider is dragged, it will only update the value when the slider is released.
Migration GuideIf your plugin relied on the old behavior:
// Call setInstant(true) to restore old behavior
slider.setInstant(true);

// Check if function exists for backwards compatibility
if (slider.setInstant) {
  slider.setInstant(true);
}

External Settings Change Callback

New: Plugin#onExternalSettingsChangeThis callback function allows plugins to react when plugin settings (data.json) are changed on disk. Use this to reload settings when they are updated by an external application or synced using a file syncing service like Obsidian Sync.

New Vault Utility Functions

Vault#getFileByPath and Vault#getFolderByPathThe getAbstractFileByPath has long been a point of confusion. More often than not, you are looking for either a file or a folder, and you know which you want at call-time.
// Old way
const abstract = vault.getAbstractFileByPath(path);
if (abstract instanceof TFile) {
  // work with file
}

// New way
const file = vault.getFileByPath(path); // Returns TFile | null
const folder = vault.getFolderByPath(path); // Returns TFolder | null

View Scope Now Public

View.scope is now public. This means you can assign hotkeys for when your view is active and focused.

New Utilities

  • getFrontMatterInfo - Canonical way to find the offsets of where the frontmatter ends and where the content starts in a file
  • FileManager#getAvailablePathForAttachment - If your plugin saves attachments to the vault, use this to generate a safe path that respects the user’s settings for file attachments

New Components

  • setTooltip - Helper function for setting tooltips on elements is now exposed
  • Progress Bar Component - New progress bar component added

API Improvements

  • FileManager#processFrontMatter now exposes the DataWriteOptions argument to be consistent with other process and write functions

Properties Support

Breaking Change: Changes to CachedMetadata to support Properties. FrontMatterCache is no longer a CacheItem—meaning that it doesn’t have a position. Instead, it is a Reference.
Frontmatter now supports wikilinks. If a value in the frontmatter can be interpreted as a link, it will be cached inside CachedMetadata.frontmatterLinks.

Canvas Spec Update

Updated the Canvas spec to indicate that colors can be stored in 2 formats:
  • As a hex string (e.g., "#FFFFFF")
  • As a number "1", "2", etc.
If it’s a number, this refers to the palette position and can be themed via CSS variables.

Theme Changes

New CSS variables related to canvas and callouts. All extended palette colors now have an RGB variant used for callouts and canvas colors.
body {
  --callout-bug: var(--color-red-rgb);
  --callout-default: var(--color-blue-rgb);
  --callout-error: var(--color-red-rgb);
  --callout-example: var(--color-purple-rgb);
  --callout-fail: var(--color-red-rgb);
  --callout-important: var(--color-cyan-rgb);
  --callout-info: var(--color-blue-rgb);
  --callout-question: var(--color-yellow-rgb);
  --callout-success: var(--color-green-rgb);
  --callout-summary: var(--color-cyan-rgb);
  --callout-tip: var(--color-cyan-rgb);
  --callout-todo: var(--color-blue-rgb);
  --callout-warning: var(--color-orange-rgb);
  --callout-quote: 158, 158, 158;
}

Canvas Integration

  • file-open event is now fired when focusing a Canvas file card
  • Exposed activeEditor on the Workspace. When a markdown view is active, this will point to the underlying MarkdownEditView. If a canvas view is active, this will be an EmbeddedEditor component.

Migration Guide

Plugins should now use activeEditor instead of directly accessing MarkdownView:
// Old approach
let view = app.workspace.getActiveViewOfType(MarkdownView);
if (view) {
  let editor = view.editor;
  let file = view.file;
}

// New approach (works with Canvas)
let { activeEditor } = app.workspace;
if (activeEditor) {
  let editor = activeEditor.editor;
  let file = activeEditor.file;
}
With these changes, plugins can adapt to the Canvas view easily. Custom views that react to focused views will automatically respond to users clicking on file cards in the canvas.

New Metadata API

In anticipation of improvements to metadata and frontmatter, a new metadata API was introduced:
interface FileManager {
  /**
   * Atomically read, modify, and save the frontmatter of a note.
   * The frontmatter is passed in as a JS object, and should be mutated directly.
   * @param file - the file to be modified. Must be a markdown file.
   * @param fn - a callback function which mutates the frontMatter object synchronously.
   */
  processFrontMatter(file: TFile, fn: (frontMatter: any) => void): Promise<void>
}
Usage Example:
app.fileManager.processFrontMatter(file, (frontmatter) => {
  frontmatter["key1"] = value;
  delete frontmatter["key2"];
});
All changes made within the callback block will be applied at once.

Improvements

  • setTooltip now accepts an optional tooltip position
  • editorCallback no longer passes the active view: MarkdownView. Instead, it now provides either the MarkdownView or a MarkdownFileInfo object. This change allows for editor commands to work within a Canvas.
  • registerHoverLinkSource is now available to register your plugin’s view with the Page preview core plugin
Breaking Change: The size?: number parameter has been removed from setIcon. This is now configurable via CSS using the --icon-size CSS variable.
Icon Sizing Migration:
/* Override icon size */
.parent-element {
  --icon-size: var(--icon-xs);
}

/* Available sizes: --icon-xs, --icon-s, --icon-m, --icon-l */

Bug Fixes

  • Fixed Editor.replaceSelection not working when run immediately after closing a modal

Notable Changes

  • Added support for optional fundingUrl field in the plugin manifest. This is a link for users who want to donate to show appreciation and support plugin development.
  • Added macOS calendar entitlements. This allows scripts run from within Obsidian to request calendar access.

New Components

Improvements

  • getLeaf can now be used to create a leaf in a new tab, a new tab group, or a new window
  • Preferred usage: getLeaf(Keymap.isModEvent(evt)) where evt is the user’s KeyboardEvent. This allows for a consistent user experience when opening files while a modifier key is pressed.

Notable Changes

Breaking Change: Workspace information is no longer saved to .obsidian/workspace file. It is now saved to workspace.json.
  • Added .has-active-menu class to file explorer item that received the right-click
  • Added .list-bullet class to HTML markup for unordered list items

Resources

GitHub Repository

View the full API source code and type definitions

Forum

Discuss API changes and request new features

Build docs developers (and LLMs) love