Skip to content

highlightElement

Unofficial

Highlights a single code element.

Import:

import type { highlightElement } from '@obsidian-typings/obsidian-public-latest';

Signature:

function highlightElement(element: Element, async: boolean | undefined, callback: HighlightCallback | undefined): void

Parameters:

ParameterTypeDescription
elementElementThe element to highlight.
asyncboolean | undefinedWhether to use web workers for highlighting.
callbackHighlightCallback | undefinedCallback invoked after the element is highlighted.

Returns: void