obsidian-webhooks-events

Featured

Handle Obsidian events and workspace callbacks for plugin development. Use when implementing reactive features, handling file changes, or responding to user interactions in your plugin. Trigger with phrases like "obsidian events", "obsidian callbacks", "obsidian file change", "obsidian workspace events".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Obsidian Webhooks & Events ## Overview Complete guide to Obsidian's event system: vault events (create, modify, delete, rename), workspace events (layout, leaf changes, editor state), metadataCache events, DOM events, custom EventRef patterns, and periodic tasks. Every event registration uses `this.registerEvent()` for automatic cleanup on plugin unload. ## Prerequisites - Working Obsidian plugin with `onload()` / `onunload()` lifecycle - Understanding of TypeScript event handler signatures - Familiarity with Obsidian's TFile, TFolder, and WorkspaceLeaf types ## Instructions ### Step 1: Vault Events — File Lifecycle Vault events fire when files and folders are created, modified, deleted, or renamed. ```typescript import { Plugin, TFile, TFolder, TAbstractFile } from 'obsidian'; export default class EventPlugin extends Plugin { async onload() { // File created this.registerEvent( this.app.vault.on('create', (file: TAbstractFile) => { if (file instanceof TFile) { console.log('New file:', file.path); this.onFileCreated(file); } if (file instanceof TFolder) { console.log('New folder:', file.path); } }) ); // File content modified (fires on save and on every sync update) this.registerEvent( this.app.vault.on('modify', (file: TAbstractFile) => { if (file instanceof TFile) { this.onFileModified(file); } }) ); // File deleted thi...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category