EditorConfig
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;
}
Properties
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 optional — boolean
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 optional — DocumentConfig
Context of the input document that informs Grammarly suggestions.
Deprecated: since v1.6.7
documentDialect optional — Dialect
Which English dialect should be assumed?
Try it outopen in new window
Default: "auto-text"
Since: v1.6.3
documentDomain optional — Domain
What is the style or type of writing?
Try it outopen in new window
Default: "general"
Since: v1.6.3
introText optional — string
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 optional — OAuthConfig
Configuration for connected accounts.
Deprecated: since v1.6.7
oauthRedirectUri optional — string
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 optional — boolean
Show the tone detector interface (beside the Grammarly button).
Note that tone detection requires a text of at least 150 characters.
Default: false
suggestions optional — SuggestionCategories
Categories of suggestions that can be muted.
ui deprecated optional — UIConfig
Configuration for the user interface of Grammarly.
Deprecated: since v1.6.7