Skip to content

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): this

Parameters:

ParameterTypeDescription
elHTMLElementElement to create the action bar in.
callback(action: EmbedAction) => voidCallback that configures the action.

Returns: thisThe widget, for chaining.