Documentation Index
Fetch the complete documentation index at: https://empty-ad9a3406.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Event Bus (api.bus) is a simple pub/sub system that lets plugins communicate without importing each other.
API
bus.on(event, callback)
Subscribe to an event.
bus.off(event, callback)
Unsubscribe. Must pass the same function reference.
bus.once(event, callback)
Subscribe to an event, but auto-remove the listener after the first emission.
bus.emit(event, data)
Publish an event to all subscribers. Errors in listeners are caught and logged without interrupting other listeners.
bus.removeAll([event])
Remove all listeners for a specific event, or all events if no name is given.
Naming Convention
Usenamespace:action to avoid collisions between plugins:
| ✅ Good | ❌ Bad |
|---|---|
todo:added | added |
kanban:card:moved | move |
theme:changed | change |
sticky-note:created | new |
Built-in Events
| Event | Payload | When |
|---|---|---|
board:ready | { boardEl } | Board initialized |
board:allPluginsLoaded | { total, enabled } | All plugins loaded |
board:restarted | — | Board restarted via api.restart() |
board:resize | { width, height } | Window resized |
plugin:loaded | { id, meta, container } | Single plugin loaded |
plugin:unload | pluginId | Plugin toggled off or deleted |
plugin:unloaded | pluginId | Plugin fully torn down |
plugin:docked | { pluginId, el, target } | Plugin docked |
plugin:undocked | { pluginId, el } | Plugin undocked |
plugin:updated | { pluginId, el } | Plugin container modified |
plugin:dragstart | { el } | Drag started |
plugin:dragend | { el } | Drag ended |
contextmenu:open | { x, y, menu } | Right-click menu opened |
storage:change | { key, value, oldValue, pluginId? } | Storage value changed |