@ckeditor/ckeditor5-angular

中文文档
13.0.0发布于 2026/10/26SEE LICENSE IN LICENSE.mdTypeScriptES Module近 30 天下载 39.7万

Official Angular component for CKEditor 5 – the best browser-based rich text editor.

原始使用文档
文档目录6 节
  1. Developer Documentation 📖
  2. Supported Angular versions
  3. Contributing
  4. The structure of the repository
  5. Testing the component (demo)
  6. License

CKEditor 5 rich text editor component for Angular

npm version CircleCI Coverage Status Dependency Status

Official CKEditor 5 rich text editor component for Angular 21+.

Developer Documentation 📖

See the "Rich text editor component for Angular" guide in the CKEditor 5 documentation to learn more:

Supported Angular versions

Because of the breaking changes in the Angular library output format, the @ckeditor/ckeditor5-angular package is released in the following versions to support various Angular ecosystems:

CKEditor 5  Angular component version Angular version Details
Actively supported versions
^13 21+ Requires CKEditor 5 in version 49 or higher.
Past releases (no longer maintained)
^12 20+ Requires CKEditor 5 in version 49 or higher.
^11 19+ Requires CKEditor 5 in version 47 or higher.
^10 16+ Requires CKEditor 5 in version 46 or higher.
^9 16+ Migration to TypeScript 5. Declaration files are not backward compatible. Requires CKEditor 5 in version 43 or higher.
^8 13+ Requires CKEditor 5 in version 42 or higher.
^7 13+ Changes in peer dependencies (issue). Requires CKEditor 5 in version 37 or higher.
^6 13+ Requires CKEditor 5 in version 37 or higher.
^5 13+ Requires Angular in version 13+ or higher.
^4 9.1+ Requires CKEditor 5 in version 34 or higher.
^3 9.1+ Requires Node.js in version 14 or higher.
^2 9.1+ Migration to TypeScript 4. Declaration files are not backward compatible.
^1 5.x - 8.x Angular versions no longer maintained.

Note that the package.json file used in the main repository isn't published on npm (the production one is present in src/ckeditor/package.json).

Contributing

[!NOTE] This project requires pnpm v12.8.2. You can check your version with pnpm --version and update if needed with npm install -g [email protected].

After cloning this repository, install necessary dependencies:

pnpm install

The structure of the repository

This repository contains the following code:

  • ./src/ckeditor contains the implementation of the <ckeditor> component,
  • ./src/app is a demo application using the component.

Note: The npm package contains a packaged component only.

Testing the component (demo)

To open the demo application using the component, run:

pnpm run start

To test it in production, use:

pnpm run start --configuration production

To run the full automated test suite against the default installed editor version, use:

pnpm run test

The unit test suite runs in a real browser (Chrome) using Vitest browser mode. pnpm run test and pnpm run coverage run the library specs (src/ckeditor/**) twice: with zone.js, like the demo application (the zone project), and without it, like a default Angular 21+ application (the zoneless project).

To run only the integration subset used by the CI editor-version matrix, use:

pnpm exec vitest run --project integration

After a regular pnpm install, this command uses the default ckeditor5 and ckeditor5-premium-features versions from package.json.

To run unit tests in watch mode, use:

pnpm run test:dev

To run e2e tests, run:

pnpm run test:e2e

Playwright starts the demo app with pnpm run start on its own, or reuses one that already runs on port 4200. The tests use the system Chrome, so no browser download is needed.

To reproduce the LTS integration matrix run locally, install the matching editor packages first and then run the integration checks:

export CKEDITOR_LICENSE_KEY=<your-key>
pnpm add -Dw ckeditor5@lts-v47 ckeditor5-premium-features@lts-v47
pnpm exec vitest run --project integration
pnpm run test:e2e

If you prefer, you can put CKEDITOR_LICENSE_KEY in .env or .env.local instead. The Vitest setup reads it through Vite, and pnpm run start forwards it to ng serve for local e2e runs.

To run coverage tests, run:

pnpm run coverage

The coverage report is generated in the ./coverage directory.

Play with the application and make sure the component works properly.

License

Licensed under a dual-license model, this software is available under:

For more information, see: https://ckeditor.com/legal/ckeditor-licensing-options.

版本与发布记录

@ckeditor/ckeditor5-angular 共发布 43 个版本,首次发布于 2018/07/26;过去 12 个月发布了 11 个版本。

版本发布日期距今
13.0.0latest2026/10/2614 天前
12.0.02026/10/081 个月前
12.0.0-alpha.1alpha2026/10/011 个月前
12.0.0-alpha.02026/09/221 个月前
11.2.02026/06/085 个月前
11.1.22026/04/156 个月前

关于 @ckeditor/ckeditor5-angular 的常见问题

@ckeditor/ckeditor5-angular 是什么?

Official Angular component for CKEditor 5 – the best browser-based rich text editor.

如何安装 @ckeditor/ckeditor5-angular?

在项目目录运行 npm install @ckeditor/ckeditor5-angular,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:rxjs(>=6.0.0)、ckeditor5(>=49.0.0 || ^0.0.0-nightly || ^0.0.0-internal)、@angular/core(>=21.2.25)、@angular/forms(>=21.2.25)、@angular/common(>=21.2.25)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ckeditor/ckeditor5-angular 支持 TypeScript 吗?

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

@ckeditor/ckeditor5-angular 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ckeditor/ckeditor5-angular 可以商用吗?

@ckeditor/ckeditor5-angular 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@ckeditor/ckeditor5-angular 的下载量有多少?

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

@ckeditor/ckeditor5-angular 还在维护吗?

最新版本 13.0.0 发布于 2026/10/26(14 天前);至今共发布 43 个版本,其中过去 12 个月发布了 11 个;首次发布于 2018/07/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。