Skip to content

MarkdownEditView.highlightSearchMatches method

MarkdownEditView › highlightSearchMatches

Unofficial

Add highlights for specified ranges.

Signature:

highlightSearchMatches(ranges: EditorRange[], style?: "is-flashing" | "obsidian-search-match-highlight" | undefined, removePrevious?: boolean | undefined, range?: EditorSelection | undefined): void

Parameters:

Parameter Type Description
ranges EditorRange[] The ranges to highlight.
style? "is-flashing" | "obsidian-search-match-highlight" | undefined The highlight style class.
removePrevious? boolean | undefined Whether to remove previous highlights.
range? EditorSelection | undefined The editor selection range.

Returns: void

Remarks:

Only ranges parameter is used.