Migrating from 1.x to 2.x
Migrating to 2.x is recommended, as all new feature development will occur on that track. Only critical bugfixes will be ported back to the 1.x series.
There are some breaking changes between version 1.11.x and 2.0, but all APIs that are removed in version 2.0 are deprecated in version 1.11. If your app's test suite runs using version 1.11 without deprecation warnings, you should be safe to upgrade to version 2.
The following options on the EditorConfig interface have been changed.
oauthoption is now specified at the top level as
uioptions are now specified at the top level as
documentoptions are now specified at the top level as
onPluginDisablecallback has been removed. Use the plugin-turned-off event instead.
onPluginErrorcallback has been removed. Use the plugin-error event instead.
onTextStatscallback has been removed. Use the document-stats and session-stats events instead.
All options that previously accepted
collectUserFeedback, etc.) now accept
"off" instead. The strings
"off" are easier to specify as an HTML attribute, and more consistent with our other options.
- The imperative API
withElementhas been renamed to
addPlugin. It accepts the same arguments, but the return value is a GrammarlyEditorPluginElement DOM node instead of an Editor instance.
withQuerySelectorhas been removed. Use
document.querySelectorAll(selector).forEach(el => Grammarly.addPlugin(el, config))instead. This was an infrequently used function and it has been removed to reduce our API surface area.
EditorFactoryname is no longer available. It was an alias for
The Vue 3 package is now the default export. If you're using Vue 2, you'll need to update your import paths from
@grammarly/editor-sdk-vue/v3 will continue to work, but can also be changed to
<div> wrapper in the
<Grammarly> component has been removed. This was causing problems with server rendering and hydration for some users.
- Version 2 of the Editor SDK will throw an error when using a feature that is unavailable in the current subscription planopen in new window.
- Some deprecated suggestion categories have been removed:
- For example,
- For example,