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:

ParameterTypeDescription
rangesEditorRange[]The ranges to highlight.
style?"is-flashing" | "obsidian-search-match-highlight" | undefinedThe highlight style class.
removePrevious?boolean | undefinedWhether to remove previous highlights.
range?EditorSelection | undefinedThe editor selection range.

Returns: void

Remarks:

Only ranges parameter is used.