Icard/angular-clarity-master(work.../node_modules/@ckeditor/ckeditor5-angular
realSnehal 400e0876de frontend 2024-07-16 20:25:36 +05:30
..
esm2020 frontend 2024-07-16 20:25:36 +05:30
fesm2015 frontend 2024-07-16 20:25:36 +05:30
fesm2020 frontend 2024-07-16 20:25:36 +05:30
CHANGELOG.md frontend 2024-07-16 20:25:36 +05:30
CONTRIBUTING.md frontend 2024-07-16 20:25:36 +05:30
LICENSE.md frontend 2024-07-16 20:25:36 +05:30
README.md frontend 2024-07-16 20:25:36 +05:30
ckeditor-ckeditor5-angular.d.ts frontend 2024-07-16 20:25:36 +05:30
ckeditor.component.d.ts frontend 2024-07-16 20:25:36 +05:30
ckeditor.module.d.ts frontend 2024-07-16 20:25:36 +05:30
index.d.ts frontend 2024-07-16 20:25:36 +05:30
package.json frontend 2024-07-16 20:25:36 +05:30
uid.d.ts frontend 2024-07-16 20:25:36 +05:30

README.md

CKEditor 5 rich text editor component for Angular

npm version CircleCI Coverage Status Dependency Status

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

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:

Package version Angular version Details
Actively supported versions
^7 13+ Changes in peer dependencies. (issue)
Past releases (no longer maintained)
^6 13+ Requires CKEditor 5 at least in version 37.
^5 13+ Requires Angular at least in version 13+. Lower versions are no longer maintained.
^4 9.1+ Requires CKEditor 5 at least in version 34.
^3 9.1+ Requires Node.js at least in version 14.
^2 9.1+ Migration to TypeScript 4. Declaration files are not backward compatible.
^1 5.x - 8.x Angular versions are 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

After cloning this repository, install necessary dependencies:

npm 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)

First, the CKEditor 5 build should be created out of source files:

npm run build-ckeditor

To open the demo application using the component, run:

npm run start

To test it in production, use:

npm run start -- --configuration production

To run unit tests, use:

npm run test

To run e2e tests, run:

# Prepare the server.
npm run start
# Then, start tests.
npm run test:e2e

To run coverage tests, run:

npm run coverage

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

Releasing

Generating the changelog

npm run changelog

Packaging the component

Note This step is required to test the package used as an npm dependency.

This project uses ng-packagr to create the package meeting the Angular Package Format specification.

Calling:

npm run build-package

creates a package in the ./dist directory, which can be then published in the npm registry.

Testing the package before releasing

To test the ckeditor5-angular package, first bootstrap an empty Angular package using ng new and add the <ckeditor> component by following the guide.

Then, create a symlink to the ckeditor5-angular/dist package directory to test the ckeditor5-angular component via this repository.

ln -s path/to/ckeditor5-angular/dist node_modules/\@ckeditor/ckeditor5-angular

Make sure that the preserveSymlinks option is set to true for the build architect in angular.json:

{
	"project-name": {
		"architect": {
			"build": {
				"options": {
					"preserveSymlinks": true
				}
			}
		}
	}
}

Make sure to test the package with the production setup (ng build --configuration production) and with older Angular versions (at least with the 9.1).

Publishing the package

To create the release directory, run:

npm run release:prepare-packages

Then, to publish the new package in the npm registry, run:

npm run release:publish-packages

License

Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file.