npm.io
2.5.5 • Published 2 years ago

@grammarly/editor-sdk

Licence
Apache-2.0
Version
2.5.5
Deps
0
Size
94 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Grammarly Text Editor SDK

Add Grammarly's real-time writing support to your app with just a few lines of code.

A code snippet shows how to add the Grammarly Text Editor Plugin to a textarea. Then an animation of a user accepting a Grammarly suggestion in a chat app appears.

This package is designed for vanilla JavaScript apps. Visit @grammarly/editor-sdk-react for our package for React apps and @grammarly/editor-sdk-vue for our package for Vue apps.

Getting started

Here's how to get started:

  1. Create a new Grammarly for Developers app

  2. Install the Grammarly Text Editor SDK:

    npm install @grammarly/editor-sdk
  3. Initialize the SDK with your client ID:

    import * as Grammarly from "@grammarly/editor-sdk";
    
    Grammarly.init("YOUR_CLIENT_ID");
  4. Add the Grammarly Text Editor Plugin to your text editors by wrapping them with the grammarly-editor-plugin web component.

    <grammarly-editor-plugin>
      <textarea></textarea>
    </grammarly-editor-plugin>

Learn more

If you'd like to learn more about what you can do with the SDK and how you can customize the plugin for your app, visit:

Ask a question

If you want to ask a question, share a suggestion, or chat about how you're using the Grammarly Text Editor SDK in your app, join us in the Grammarly for Developers community on GitHub.

Keywords