Skip to content

file-input-suggest

Contains a suggest that completes any vault file in an <input>, showing each file’s name and path with the matched characters highlighted.

Class Description
FileInputSuggest Suggests the vault’s files in an <input>, matching the typed text fuzzily against the file path. Each suggestion shows the file name as its title and the full path below it, with the matched characters highlighted in both. Picking one puts its path into the input and dispatches an input event, so a wrapping text component’s onChange fires.
Interface Description
FileInputSuggestConstructorOptions The parameters for constructing a FileInputSuggest.
Function Description
clipMatches Clips match ranges to a span of the searched text and shifts them to the span’s start.