SuggestionsPlugin() function

SuggestionsPlugin() function

Signature

  1. export declare function SuggestionsPlugin({ onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, }: {
  2. onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>;
  3. cleanText?: (text: string) => string;
  4. onWillApplySuggestion?: (suggestion: string, state: SuggestionsState) => string;
  5. portalOrigin: string;
  6. }): SlatePlugin;

Import

  1. import { SuggestionsPlugin } from '@grafana/ui';

Parameters

ParameterTypeDescription
{ onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, }{
onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>;
cleanText?: (text: string) => string;
onWillApplySuggestion?: (suggestion: string, state: SuggestionsState) => string;
portalOrigin: string;
}

Returns:

SlatePlugin