renderResults
Official
Render the results of a search.
Import:
import { renderResults } from 'obsidian';Example:
renderResults(document.body, 'foo', { score: 0.5, matches: [[0, 3]],});Signature:
function renderResults(el: HTMLElement, text: string, result: SearchResult, offset: number | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
el | HTMLElement | The element to render the results to. |
text | string | The text to render the results to. |
result | SearchResult | The result to render. |
offset | number | undefined | The offset to render the results to. |
Returns: void
Example:
renderResults(document.body, 'foo', { score: 0.5, matches: [[0, 3]],});