Changelog

All notable changes to the Text Editor SDK are documented in this log.

TIP

See Releases for important details about how versions are released.

2.0.2 (2022-09-26)

  • Fix use Web Locks API only in secure context
  • Fix autocomplete worker script URL in Electron apps
  • Fix type definitions in published types

2.0.1 (2022-09-20)

  • Fix accepting suggestions within a bulleted list in Draft.js
  • Fix autocomplete suggestion misalignment bug on Firefox
  • Fix dark mode support for autocomplete suggestions
  • Fix encoding of whitespace in contenteditable editors
  • Fix initial focus in Grammarly button menu as per ARIA recommendations
  • Fix stale highlight position when grammarly-theme-change event is dispatched

2.0.0 (2022-09-09)

We're excited to announce a new major release for the Grammarly Text Editor SDK! If you're using any of our 1.x minor versions, please refer to our migration guideopen in new window.

This release includes a number of major improvements in the SDK’s usability, troubleshooting experience, and end user experience.

End user experience

We’ve streamlined the Grammarly registration prompt that appears to users when an application is using the Free plan: Now, when users rate Grammarly four stars or higher when providing feedbackopen in new window, they will only see a footer on subsequent suggestion cards offering them the option to get their own Grammarly account. Read more hereopen in new window.

Developer experience

  • Remove deprecated config APIs
    • EditorConfig.onPluginDisable and PluginDisableReason
    • EditorConfig.collectUserFeedback
    • EditorConfig.oauth
    • EditorConfig.onPluginError
    • EditorConfig.onTextStats
    • EditorConfig.showToneDetector
    • EditorConfig.suggestions
    • EditorConfig.ui
    • EditorConfig.document
  • Remove deprecated methods
    • withElement
    • withQuerySelector
  • Remove deprecated interface EditorFactory
  • Remove deprecated suggestion categories
  • Remove extra wrapping <div> in React SDK's <Grammarly> component
  • Throw error when using a feature that is unavailable in the current subscription planopen in new window
  • Make Vue3 the default package. To continue using Vue2, update your import from @grammarly/editor-sdk-vue to @grammarly/editor-sdk-vue/v2.
  • Add activation config API to support immediate activation of the Editor Plugin
  • Add smart detection of the viewport when not explicitly provided
  • Add console warnings for invalid configuration
  • Add underlines config API to hide suggestion underlines
  • Fix potential visual issues due to inheriting CSS from host page
  • Fix incorrect warning for suggestion-categories usage

1.11.0 (2022-09-08)

  • Add console warnings for invalid or deprecated configuration

1.10.4 (2022-09-07)

  • Fix large blank space in suggestion cards (happens only in Chromium 102)
  • Fix tone detector not appearing in popup windows

1.10.3 (2022-09-06)

  • Fix encoder to handle nodes with data-grammarly-is set to h1

2.0.0-alpha.2 (2022-09-01)

  • Simplify registration prompt experience
  • Add console warnings for invalid configuration
  • Fix potential visual issues due to inheriting CSS from host page

1.10.2 (2022-08-30)

  • Hide Grammarly Button on non recoverable error
  • Add support for nested <grammarly-editor-plugin> elements
  • Fix underlines not appearing when editor is replaced dynamically
  • Add support for trusted authentication

2.0.0-alpha.1 (2022-08-26)

  • Add activation config API to support immediate activation of the Editor Plugin
  • Add smart detection of viewport when not explicity provided

1.10.1 (2022-08-17)

2.0.0-alpha.0 (2022-08-16)

  • Remove deprecated config APIs
    • EditorConfig.onPluginDisable and PluginDisableReason
    • EditorConfig.collectUserFeedback
    • EditorConfig.oauth
    • EditorConfig.onPluginError
    • EditorConfig.onTextStats
    • EditorConfig.showToneDetector
    • EditorConfig.suggestions
    • EditorConfig.ui
    • EditorConfig.document
  • Remove deprecated methods
    • withElement
    • withQuerySelector
  • Remove deprecated interface EditorFactory
  • Remove deprecated suggestion categories
  • Remove extra wrapping <div> in React SDK's <Grammarly> component
  • Throw error when using a feature that is unavailable in the current subscription plan
  • Make Vue3 the default package To continue using Vue2, update your import from @grammarly/editor-sdk-vue to @grammarly/editor-sdk-vue/v2.

1.10.0 (2022-08-16)

1.9.5 (2022-08-15)

  • Fix popup menu position when <grammarly-button> has an ancestor element with CSS transform
  • Fix a bug when merging configs with suggestionCategories
  • Fix character issues if host page is not UTF-8
  • Fix encoder to process nested lists

1.9.4 (2022-08-11)

  • Fix code syntax in published packages and use ES2019 standard
  • Reorganize settings menu items

1.9.3 (2022-08-08)

  • Fix autocomplete worker script path

1.9.2 (2022-08-08)

  • Add underlines config API to hide suggestion underlines
  • Add suggestionCategories config option, deprecate suggestions
  • Fix issue where Grammarly button menu does not close when host page blocks mousedown events
  • Fix issue with access token being issued too frequently
  • Use Web Locks API in supporting browsers

1.9.1 (2022-07-28)

  • Fix textarea/input scrolling to start when suggestion is accepted

1.9.0 (2022-07-26)

  • Add suggestionCards config API to hide suggestion cards
  • Add addPlugin method, deprecate withElement and withQuerySelector methods
  • Add plugin-turned-off event, deprecate onPluginDisabled
  • Add plugin-error event, deprecate onPluginError
  • Add document-stats and session-stats events, deprecate onTextStats
  • Add suggestion-card-open and suggestion-card-close events to Vue integration
  • Fix light/dark mode issue in Safari
  • Fix overflow issue when using custom position on Grammarly button
  • Fix overscroll issue when showing suggestion
  • Fix type errors in @grammarly/editor-sdk-react

1.8.4 (2022-07-20)

  • Fix type definitions in published types

1.8.3 (2022-07-19)

  • Add persistence for ignored suggestions in authenticated user sessions
  • Add config attributes to web component
  • Add userFeedback config option, deprecate collectUserFeedback
  • Add toneDetector config option, deprecate showToneDetector
  • Fix missing type definitions in published types

1.8.2 (2022-07-12)

  • Maintenance release

1.8.1 (2022-07-08)

  • Maintenance release

1.8.0 (2022-06-28)

  • Add complete theming APIopen in new window
  • Add buttons to quickly navigate between suggestion cards
  • Improve keyboard accessibility
  • Add custom events suggestion-card-open and suggestion-card-close
  • Reduce JavaScript bundle size

1.7.10 (2022-06-22)

  • Include types in published npm packages

1.7.9 (2022-06-21)

  • Remove outdated property from SessionSuggestionBreakdown (found in onTextStats)
  • Add runnable examples to many EditorConfig APIs

1.7.8 (2022-06-15)

  • Maintenance release

1.7.7 (2022-06-14)

  • Use ES2015 for packages published on npmjs.org
  • Improve dynamic attribute handling in <grammarly-editor-plugin>
  • Support editors inside popups rendered via react portals

1.7.6 (2022-05-31)

  • Add support for --grammarly-underline-z-indexopen in new window
  • Improve SDK initialization error handling
  • Fix <grammarly-editor-plugin> to handle dynamically updated client-id attribute
  • Fix hover on suggestion underline when mouse move events are not propagated
  • Fix unsupported browser detection to handle cases like Chrome running on Linux when accessed using remote desktop
  • Fix underline text range when underline is immediately after a non-contenteditable element

1.7.5 (2022-05-24)

1.7.4 (2022-05-10)

  • Add suggestionsCount to TextStatsopen in new window event
  • Add shortcut to "Turn off Grammarly" if user provides 1 star feedback
  • Add autocomplete to the Configopen in new window interface
  • Add support for autocomplete with Slate editor
  • Fix suggestion application with Slate editor
  • Fix possible duplicate user feedback submission on slow network connections
  • Fix a bug with Grammarly button notifications

1.7.3 (2022-05-03)

  • Remove requirement for ClientID in script-tag for initializing SDK using web component API

1.7.2 (2022-04-28)

  • Fix IndexOutOfBounds issue when editor text is deleted by a suggestion
  • Improve autocomplete typeahead
  • Add new suggestion categoriesopen in new window, deprecate others
  • Fix autocomplete for Quill, TinyMCE and CKEditor

1.7.1 (2022-04-21)

  • Fix edge case causing duplicate autocomplete suggestions
  • Fix timing issue with analytics

1.7.0 (2022-04-19)

1.6.8 (2022-04-12)

  • Refresh suggestion underlines when there is a running transition
  • Support overrides for semantic tag name using data-grammarly-is

1.6.7 (2022-04-05)

  • Support configuring viewport when using withElement() methodopen in new window
  • Fix "View Suggestions" scrolling to wrong underline position when the editor has an embedded image or video
  • Fix suggestion underlines overflow
  • Fix suggestions card displayed in wrong position when editor element has an ancestor element with CSS transform

1.6.6 (2022-03-29)

  • Fix a rare condition where the Grammarly button is stuck in a loading state due to a stale mutex lock

1.6.5 (2022-03-22)

  • Fix highlights for large contenteditable elements

1.6.4 (2022-03-17)

  • Fix highlights shown out-of-place in dynamic height contenteditable editor
  • Hide Grammarly when page is printed
  • Fix edge case with fast reconnect
  • Remove the null origin workaround requirement for desktop apps

1.6.3 (2022-03-16)

  • Set cursor the end of highlighted text after a suggestion is accepted
  • Fix performance issue with textarea and input editor
  • Improve performance when detecting editor text changes
  • Support shared configurationopen in new window for all editors
import { init } from "@grammarly/editor-sdk";

const Grammarly = await init(
  "<YOUR_CLIENT_ID>",
  // shared config:
  { documentDialect: "canadian" },
  // see more at https://developer.grammarly.com/docs/api/editor-sdk/init
);

const editor = Grammarly.withQuerySelector(
  "textarea",
  // config for current editor:
  { documentDomain: "mail" },
  // see more at https://developer.grammarly.com/docs/api/editor-sdk/editorsdk#withqueryselector
);

// update config for current editor
// https://developer.grammarly.com/docs/api/editor-sdk/editor#setconfig
editor.setConfig({
  documentDomain: "casual",
});

1.6.2 (2022-03-09)

1.6.1 (2022-03-08)

  • Remove unexpected type import from 'fast-diff' package

1.6.0 (2022-03-04)

  • Refresh highlights on style changes in contenteditable editor
  • Support TinyMCE 5 editor
  • Rewrite web socket client for interactive writing assistance
  • Show status when Grammarly services are blocked
  • Bug fixes: property access on null, cross-origin CSSRule access, etc.

1.5.2 (2022-03-04)

1.5.1 (2022-02-22)

  • performance improvements

1.5.0 (2022-02-15)

  • Provide precise control over Grammarly button position
  • provide <grammarly-button> web component to control Grammarly button position
  • React: provide <GrammarlyButton> component to control Grammarly button position
  • Vue: provide <GrammarlyButton> component to control Grammarly button position
  • redirectUri needs to be configured only once for desktop apps
  • Detect Quill editor element
  • React: fix support for className, style and other standard HTML attributes

1.4.0 (2022-02-09)

  • Add ability to select English dialect from Grammarly button

1.3.6 (2022-02-01)

  • Serialize logged objects and collect minimal information required for debugging
  • Handle timeout error when creating an access token using refresh token

1.3.5 (2022-01-28)

  • Fix edge case in which feedback could be requested multiple times

1.3.4 (2022-01-26)

  • Mute passive voice suggestions by default
  • Clear user session on logout
  • Improve unsupported device detection
    • Excludes small screen touch devices
  • New API for connected accounts support in desktop applications
  • Improve text selection preservation when applying suggestions

1.3.3 (2022-01-18)

Maintenance release

1.3.2 (2022-01-13)

Bug Fixes

  • ui: hide tone detector switch when not enabled
  • encoding: ignore elements with data-grammarly-skip attribute
  • fix issue with closed socket (unnecessary reconnect for logged in users)
  • fix potentially jumpy underlines when entering newlines
  • clear refresh token on logout

1.3.1 (2022-01-12)

Maintenance release

1.3.0 (2022-01-11)

Features

Bug Fixes

  • use input text to determine English dialect (default to auto-text — see Dialect for details)
  • Vue: reconnect to editor in v-if branch
  • provide text/plain value in DataTransfer object of beforeinput event

1.2.5 (2022-03-04)

1.2.4 (2022-01-24)

Maintenance release

1.2.3 (2021-12-22)

Bug Fixes

  • dispatch beforeinput event before replacing text with a suggestion

1.2.2 (2021-12-15)

Bug Fixes

  • add new mute categories
  • dispatch input events before and after applying suggestion replacement
  • skip initialization of Grammarly SDK inside data:// iframes
  • loading icon state when zoomed-in Safari
  • support embedded non-editable content in a content-editable editor
  • tracks why userFeedbackCard was displayed

1.2.1 (2021-11-16)

Bug Fixes

  • remove reference in suggestion text to a personal dictionary (which is not yet available)

1.2.0 (2021-11-09)

Features

  • add item to Grammarly button menu allowing users to submit feedback
  • collect feedback from users after accepting/dismissing suggestions (max once per 30 days)
  • add collectUserFeedback config to disable feedback
  • add button to suggestion cards for marking as incorrect or offensive
  • a new positioning logic for cards
  • add theming variables for Grammarly button top, z-index

Bug Fixes

  • fix passing config via context in React
  • fix text-align CSS being inherited by suggestion card
  • fix minor font inconsistency in Grammarly button popup
  • optimize highlight rerendering
  • fix highlight shifts on newlines in contenteditable
  • suppress potential console spam from blocked requests

1.1.2 (2021-10-28)

Bug Fixes

  • fix connection to editor element in lazily updated DOM subtree (eg when using Quill)

1.1.1 (2021-10-27)

Bug Fixes

  • fix connection to editor element when it is recreated
  • gracefully handle SSR (no window)
  • reduce delay in showing priority underlines

1.1.0 (2021-10-14)

Features

Docs

1.0.2 (2021-10-05)

Bug Fixes

  • cleanup DOM on disconnect

1.0.1 (2021-09-28)

Bug Fixes

  • copy width CSS rule from editor
  • expose EditorFactory API as global Grammarly variable
  • initialize editor plugin only for supported browsers
  • remove internal variables, window.Grammarly.CSS and window.Grammarly.typestyle

1.0.0 (2021-09-10)

Graduation 🧑‍🎓

1.0.0-beta.14 (2021-09-10)

Bug Fixes

  • fix possibility of underlines overlapping suggestion cards
  • workaround extension conflict on codesandbox domains

1.0.0-beta.13 (2021-09-10)

Features

  • add support for style guide suggestions from connected accounts
  • add support for toggling underlines from the Grammarly button menu

Bug Fixes

  • fix "View suggestions" edge case
  • fix highlights when the editor has padding or large borders
  • fix highlights when the editor has fixed position
  • fix highlights when the editor has z-index
  • improve detection of Grammarly browser extension

Docs

  • add default values to types in API Reference

1.0.0-beta.12 (2021-09-02)

Bug Fixes

  • add tests for base64urlEncode fn

Docs

  • add functional demo

1.0.0-beta.11 (2021-08-28)

Bug Fixes

  • use base64 URL encoding for OAuth code challenge

1.0.0-beta.10 (2021-08-27)

Bug Fixes

  • editor-sdk-vue: define exports to support Vue v2/v3 in the same package

1.0.0-beta.9 (2021-08-26)

Maintenance release

1.0.0-beta.8 (2021-08-26)

Bug Fixes

  • fix misaligned highlights in input element on Safari
  • fix refresh_token URI
  • dispose of idle or disconnected socket connections to improve reconnection

Docs

  • improve organization and content of API docs

1.0.0-beta.7 (2021-08-12)

Features

  • add the ability to connect Grammarly account (using the Grammarly button)

Bug Fixes

  • avoid inserting newlines before the start of text in rich text encoding
  • crop active suggestion highlight at editor border box

1.0.0-beta.6 (2021-07-01)

Maintenance release

1.0.0-beta.5 (2021-06-29)

Features

  • allow theming advanced highlights (docs coming soon)

1.0.0-beta.4 (2021-06-08)

Bug Fixes

  • fix Grammarly button issue upon disconnect/reconnect (e.g. in modals)
  • fix whitespace in the content preview of some suggestions

1.0.0-beta.3 (2021-05-31)

Bug Fixes

  • fix overlap issues with some highlights
  • fix plugin initialization for re-used DOM element in modals
  • improve advanced suggestion highlights

1.0.0-beta.2 (2021-05-26)

Bug Fixes

  • fix edge case where suggestion card did not close when typing
  • fix handling of highlights for deleted text ranges
  • improve Grammarly button keyboard navigation
  • fix missing explanation for "monotonous text" suggestions

1.0.0-beta.1 (2021-05-20)

Bug Fixes

  • do not show the Grammarly button when the Grammarly browser extension is active
  • fix suggestion cards self-closing in some cases
  • fix suggestion card not closing properly at the edge of the viewport

1.0.0-beta.0 (2021-05-18)

Features

  • add floating Grammarly button that reflects suggestions for the whole page
  • group underlines into two categories (corrections, advanced suggestions) and delay showing in some cases to avoid overwhelming users with too many colors

Bug Fixes

  • use ES2019 for public packages
  • fix highlights disappearing for editors with relative positioning
  • fix the possibility of suggestion cards overflowing out of the viewport

Refactor

  • use cursor position to speed up text change detection

1.0.0-alpha.7 (2021-05-11)

Features

  • improve editor performance
  • add API for specifying the domainopen in new window
  • add new suggestion cards with explanations
  • add support for full sentence rewrite suggestions
  • re-enable Grammarly browser extension detection

1.0.0-alpha.6 (2021-04-29)

Bug Fixes

  • add IIFE build file to package.json of @grammarly/editor-sdk

1.0.0-alpha.5 (2021-04-29)

Bug Fixes

  • Remove browser build from @grammarly/editor-sdk because webpack picks it over module

1.0.0-alpha.4 (2021-04-28)

Features

  • add IIFE build for browsers
  • measure render and encode performance

Bug Fixes

  • fix highlights displacement due to the editor toolbar
  • fix suggestions card overlapping highlights

1.0.0-alpha.2, 1.0.0-alpha.3 (2021-04-22)

Bug Fixes

  • fix release script

1.0.0-alpha.1 (2021-04-22)

Features

  • add @grammarly/editor-sdk with unified support for textarea, input, and contenteditable
  • add @grammarly/editor-sdk-react for React with <GrammarlyEditorPlugin> and <Grammarly> components
  • add @grammarly/editor-sdk-vue for Vue 2 and 3 with <GrammarlyEditorPlugin> and <Grammarly> components
Last Updated: 9/28/2022, 6:03:24 PM