Skip to content

ResultDom.addResult method

ResultDom › addResult

Unofficial

Add a search result for a file to the result DOM.

Signature:

addResult(file: TFile, result: ResultDomResult, content: string, shouldShowTitle?: boolean | undefined): ResultDomItem

Parameters:

Parameter Type Description
file TFile The file to add a result for.
result ResultDomResult The search result data.
content string The text content of the file.
shouldShowTitle? boolean | undefined Whether to show the file title.

Returns: ResultDomItemThe created result DOM item.