Back to reference

EditorConfig

Configuration to customize the Grammarly integration.

interface EditorConfig {
  document?: DocumentConfig;
  onPluginDisable?: (reason: PluginDisableReason) => void;
  onPluginError?: (error: Error) => void;
  onTextStats?: (stats: TextStats) => void;
  suggestions?: SuggestionCategories;
  ui?: {
    introText?: string;
  };
}

Properties

document optionalDocumentConfig
Context of the input document that informs Grammarly suggestions.

onPluginDisable optional(reason: PluginDisableReason) => void
Triggered when the user consciously disables the plugin. Not triggered again once already disabled.

onPluginError optional(error: Error) => void
Callback triggered on fatal error with the plugin.

onTextStats optional(stats: TextStats) => void
Callback to receive stats about the user-entered text and Grammarly session.

suggestions optionalSuggestionCategories
Categories of suggestions that can be muted.

ui optional{ introText?: string; }
Configuration for the UI

Last Updated: 10/15/2021, 2:26:57 AM