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', removePrevious?: boolean, range?: EditorSelection): void

Parameters:

ParameterTypeDescription
rangesEditorRange[]The ranges to highlight.
style?'is-flashing' | 'obsidian-search-match-highlight'The highlight style class.
removePrevious?booleanWhether to remove previous highlights.
range?EditorSelectionThe editor selection range.

Returns: void

Remarks:

Only ranges parameter is used.