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): ResultDomItem

Parameters:

ParameterTypeDescription
fileTFileThe file to add a result for.
resultResultDomResultThe search result data.
contentstringThe text content of the file.
shouldShowTitle?booleanWhether to show the file title.

Returns: ResultDomItem — The created result DOM item.