ObsidianWidgetType.addAction method
ObsidianWidgetType › addAction
Unofficial
Add an action to the widget's action bar, creating the bar on first use.Signature:
addAction(el: HTMLElement, callback: (action: EmbedAction) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| el | HTMLElement | Element to create the action bar in. |
| callback | (action: EmbedAction) => void | Callback that configures the action. |
Returns: this — The widget, for chaining.