link-and-tag-input-suggest
Completes [[ links and # tags at the caret of any <input> or <textarea>, the way the editor does.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| LinkAndTagInputSuggest | Completes [[ links and # tags inside any <input> or <textarea>. Obsidian’s AbstractInputSuggest treats the whole value as the query and replaces it on selection. This one reads the trigger before the caret and replaces only that, so it works inside free text such as a template or a description setting, and it accepts a <textarea> too. ts new Setting(containerEl).addTextArea((textArea) => \{ new LinkAndTagInputSuggest(\{ app: this.app, inputEl: textArea.inputEl \}); \}); |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| GetVaultTagSuggestionsParams | Parameters for getVaultTagSuggestions. |
| LinkAndTagCompletionTrigger | A completion trigger found before the caret. |
| LinkAndTagInputSuggestConstructorParams | Parameters of LinkAndTagInputSuggest. |
| LinkSuggestion | A suggested link. |
| TagSuggestion | A suggested tag. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| getLinkAndTagCompletionTrigger | Finds the [[ link or # tag being typed before the caret. A link trigger is an unclosed [[ on the caret’s line with no | after it, so an alias being typed is left alone. A tag trigger is a # at the start of the text or after whitespace, followed only by tag characters. |
| getVaultTagSuggestions | Gets the tags of every note matching a query, as LinkAndTagInputSuggest and TagListComponent suggest them. |
| Type | Description |
|---|---|
| LinkAndTagSuggestion | A suggestion of LinkAndTagInputSuggest. |
| Enum | Description |
|---|---|
| LinkAndTagCompletionKind | What a completion trigger completes. |