renderResults
Official
Render the results of a search.
Import:
import { renderResults } from 'obsidian';Signature:
function renderResults(el: HTMLElement, text: string, result: SearchResult, offset?: number): 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 | The offset to render the results to. |
Returns: void
Example:
renderResults(document.body, 'foo', { score: 0.5, matches: [[0, 3]],});