Back to reference


Configuration to customize the Grammarly integration per editor instance.

interface EditorConfig {
  autocomplete?: "on" | "off";
  collectUserFeedback?: boolean;
  document?: DocumentConfig;
  documentDialect?: Dialect;
  documentDomain?: Domain;
  introText?: string;
  oauth?: OAuthConfig;
  oauthRedirectUri?: string;
  onPluginDisable?: (reason: PluginDisableReason) => void;
  onPluginError?: (error: Error) => void;
  onTextStats?: (stats: TextStats) => void;
  showToneDetector?: boolean;
  suggestions?: SuggestionCategories;
  ui?: UIConfig;


autocomplete optional"on" | "off"
Offer to complete phrases for your users as they type. Learn moreopen in new window

Autocomplete is not currently supported for <input> fields.

If you have a Content Security Policy (CSP), you will need to update it as described hereopen in new window.

Try it outopen in new window
Default: "off"
Since: v1.7.0

collectUserFeedback optionalboolean
Collect user feedback after the user takes action on 5 suggestions.

We will not request feedback more than once in a 30 day period.
Default: true

document deprecated optionalDocumentConfig
Context of the input document that informs Grammarly suggestions.
Deprecated: since v1.6.7

documentDialect optionalDialect
Which English dialect should be assumed?

Try it outopen in new window
Default: "auto-text"
Since: v1.6.3

documentDomain optionalDomain
What is the style or type of writing?

Try it outopen in new window
Default: "general"
Since: v1.6.3

introText optionalstring
Text shown to introduce first-time users to Grammarly.

This introductory text shows in the footer of the first shown suggestion card.

Try it outopen in new window
Default: "Grammarly helps you write clearly and mistake-free."
Since: v1.6.3

oauth deprecated optionalOAuthConfig
Configuration for connected accounts.
Deprecated: since v1.6.7

oauthRedirectUri optionalstring
URI to redirect to after successful account connection.
Since: v1.6.3

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.

showToneDetector optionalboolean
Show the tone detector interface (beside the Grammarly button).

Note that tone detection requires a text of at least 150 characters.
Default: false

suggestions optionalSuggestionCategories
Categories of suggestions that can be muted.

Try it outopen in new window

ui deprecated optionalUIConfig
Configuration for the user interface of Grammarly.
Deprecated: since v1.6.7

Last Updated: 6/21/2022, 6:25:16 PM