Skip to content

ObsidianWidgetType.hookClickHandler method

ObsidianWidgetType › hookClickHandler

Unofficial

Make clicks on the element select the widget's source range, unless they land inside a nested editor.

Signature:

hookClickHandler(view: EditorView, el: HTMLElement): void

Parameters:

ParameterTypeDescription
viewEditorViewThe CodeMirror editor view.
elHTMLElementThe element to hook.

Returns: void