Skip to main content

Overview

Inkdown’s plugin system allows you to extend the editor with custom functionality. Plugins can:
  • Add commands to the command palette
  • Register custom keyboard shortcuts
  • Create status bar items
  • Add settings tabs
  • Process markdown content
  • Extend the editor with CodeMirror extensions
  • Create custom modals and UI components
  • Listen to file system events
  • Access the metadata cache
  • Manipulate editor content

Plugin Types

Built-in Plugins

Inkdown ships with several built-in plugins that demonstrate best practices:
  • Word Count: Status bar integration and settings
  • Quick Finder: Fuzzy search modal for files
  • Slash Commands: Editor suggest for quick formatting
  • Emoji: Markdown processing and editor extensions
  • Live Preview: Advanced CodeMirror decorations

Community Plugins

Community plugins are developed by third-party developers and can be installed from the plugin marketplace. See Community Plugins for publishing guidelines.

Plugin Architecture

Base Plugin Class

All plugins extend the Plugin base class:
import { Plugin } from '@inkdown/api';

export default class MyPlugin extends Plugin {
  async onload() {
    // Initialize plugin
  }

  async onunload() {
    // Cleanup
  }
}

App Interface

Plugins receive an app instance that provides access to all Inkdown managers:
this.app.workspace        // File operations
this.app.commandManager   // Command registration
this.app.metadataCache    // File metadata
this.app.editorRegistry   // Active editor access

Plugin Manifest

Every plugin requires a manifest.json file:
{
  "id": "my-plugin",
  "name": "My Plugin",
  "version": "1.0.0",
  "minAppVersion": "1.0.0",
  "description": "A plugin for Inkdown",
  "author": "Your Name",
  "authorUrl": "https://yourwebsite.com"
}

Plugin Capabilities

Commands

Register commands with keyboard shortcuts

Modals

Create custom dialogs and search interfaces

Settings

Add settings tabs and UI controls

Status Bar

Display information in the status bar

Editor

Manipulate editor content and selections

Workspace

Access files and listen to events

Markdown Processing

Process and transform markdown content

Editor Extensions

Extend CodeMirror with custom functionality

Getting Started

Ready to build your first plugin? Follow the Quickstart Guide to create a basic plugin in minutes.

API Reference