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

Property Type Description
currentSuggest EditorSuggest<unknown> | null Currently active and rendered editor suggestion popup.
suggests EditorSuggest<unknown>[] Registered editor suggestions.

Methods

Method Returns Description
addSuggest(suggest) void Add a new editor suggestion to the list of registered suggestion providers.
close() void Close the currently active editor suggestion popup.
isShowingSuggestion() boolean Whether there is a editor suggestion popup active and visible.
removeSuggest(suggest) void Remove a registered editor suggestion from the list of registered suggestion providers.
reposition() void Update position of currently active and rendered editor suggestion popup.
setCurrentSuggest(suggest) void Set the currently active editor suggestion popup to specified suggester.
trigger(editor, t, n) void Run check on focused editor to see whether a suggestion should be triggered and rendered.

Links to this page: