Skip to content

EditorSuggests

Unofficial

Manager for editor suggestion popups providing autocompletion in the editor.

Import:

import type { EditorSuggests } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface EditorSuggests

Constructor

new EditorSuggests(app: App)

Constructor.

To get the constructor instance, use getEditorSuggestsConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
currentSuggestEditorSuggest<unknown> | nullCurrently active and rendered editor suggestion popup.
suggestsEditorSuggest<unknown>[]Registered editor suggestions.

Methods

MethodReturnsDescription
addSuggest(suggest)voidAdd a new editor suggestion to the list of registered suggestion providers.
close()voidClose the currently active editor suggestion popup.
isShowingSuggestion()booleanWhether there is a editor suggestion popup active and visible.
removeSuggest(suggest)voidRemove a registered editor suggestion from the list of registered suggestion providers.
reposition()voidUpdate position of currently active and rendered editor suggestion popup.
setCurrentSuggest(suggest)voidSet the currently active editor suggestion popup to specified suggester.
trigger(editor, t, n)voidRun check on focused editor to see whether a suggestion should be triggered and rendered.

Links to this page: