@grammarly/editor-sdk

中文文档
2.5.5发布于 2023/10/21Apache-2.0TypeScriptESM + CJS零依赖近 30 天下载 7687

Grammarly's writing SDK for web editors

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录3 节
  1. Getting started
  2. Learn more
  3. Ask a question

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.

版本与发布记录

@grammarly/editor-sdk 共发布 120 个版本,首次发布于 2021/04/23;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.5.5latest2023/10/213 年前
2.5.42023/10/103 年前
2.5.32023/09/263 年前
2.5.22023/09/193 年前
2.5.12023/06/073 年前
2.5.02023/06/013 年前

其他发布通道:version1.5.x → 1.5.2,version2.0.x → 2.0.0-alpha.2,version1.10.x → 1.10.4,version1.11.x → 1.11.0,version3.0.x → 3.0.0-alpha.0。

关于 @grammarly/editor-sdk 的常见问题

@grammarly/editor-sdk 是什么?

Grammarly's writing SDK for web editors注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @grammarly/editor-sdk?

在项目目录运行 npm install @grammarly/editor-sdk,或使用 pnpm add / yarn add / bun add。

@grammarly/editor-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@grammarly/editor-sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@grammarly/editor-sdk 可以商用吗?

@grammarly/editor-sdk 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@grammarly/editor-sdk 的下载量有多少?

根据 npm 官方下载统计,@grammarly/editor-sdk 在 2026/10/17 – 2026/11/15 这 30 天内被下载 7,687 次,日均约 256 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@grammarly/editor-sdk 还在维护吗?

最新版本 2.5.5 发布于 2023/10/21(3 年前);至今共发布 120 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/04/23。作者已将其标记为弃用,新项目建议寻找替代方案。