Register a command globally. Registered commands will be available from the @{link https://help.obsidian.md/Plugins/Command+palette Command palette}. The command id and name will be automatically prefixed with this plugin's id and name.
Adds a ribbon icon to the left bar.
The icon name to be used. See addIcon
The title to be displayed in the tooltip.
The click
callback.
Optional
onRegisters an DOM event to be detached when unloading
Registers an DOM event to be detached when unloading
Registers an DOM event to be detached when unloading
Registers a CodeMirror 6 extension. To reconfigure cm6 extensions for a plugin on the fly, an array should be passed in, and modified dynamically. Once this array is modified, calling Workspace.updateOptions will apply the changes.
must be a CodeMirror 6 Extension
, or an array of Extensions.
Registers an interval (from setInterval) to be cancelled when unloading Use window.setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
Register a special post processor that handles fenced code given a language and a handler.
This special post processor takes care of removing the <pre><code>
and create a <div>
that
will be passed to the handler, and is expected to be filled with custom elements.
Optional
sortOrder: numberRegister a handler for obsidian:// URLs.
the action string. For example, 'open' corresponds to obsidian://open
.
the callback to trigger. A key-value pair that is decoded from the query will be passed in.
For example, obsidian://open?key=value
would generate {'action': 'open', 'key': 'value'}
.
Source