diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md
new file mode 100644
index 0000000..8695a4a
--- /dev/null
+++ b/dist/CHANGELOG.md
@@ -0,0 +1,172 @@
+# CKEditor 4 Angular Integration Changelog
+
+## ckeditor4-angular 3.1.1
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.19.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4191).
+
+## ckeditor4-angular 3.1.0
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.19.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4190).
+
+## ckeditor4-angular 3.0.0
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.18.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4180).
+
+ [Web Spell Checker](https://webspellchecker.com/) ended support for WebSpellChecker Dialog on December 31st, 2021. Therefore, this plugin has been deprecated and removed from the CKEditor 4.18.0 `standard-all` preset.
+ We strongly encourage everyone to choose one of the other available spellchecking solutions - [Spell Check As You Type (SCAYT)](https://ckeditor.com/cke4/addon/scayt) or [WProofreader](https://ckeditor.com/cke4/addon/wproofreader).
+
+## ckeditor4-angular 2.4.1
+
+Other Changes:
+
+* Updated year and company name in the license headers.
+* Updated default CDN CKEditor 4 dependency to [4.17.2](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4172).
+
+## ckeditor4-angular 2.4.0
+
+New Features:
+
+* [#190](https://github.com/ckeditor/ckeditor4-angular/issues/190): Added support for CKEditor 4 [Delayed Editor Creation](https://ckeditor.com/docs/ckeditor4/latest/features/delayed_creation.html) feature.
+
+## ckeditor4-angular 2.3.0
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.17.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4171).
+
+## ckeditor4-angular 2.2.2
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.16.2](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4162).
+
+## ckeditor4-angular 2.2.1
+
+Fixed Issues:
+
+* [#191](https://github.com/ckeditor/ckeditor4-angular/issues/191): Fixed: Cannot find module `ckeditor4-integrations-common` error after upgrading to `2.2.0`.
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.16.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4161).
+
+## ckeditor4-angular 2.2.0
+
+New Features:
+
+* [#143](https://github.com/ckeditor/ckeditor4-angular/issues/143): Exposed `namespaceLoaded` event fired when [`CKEDITOR` namespace](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html) is loaded, which can be used for its easier customization.
+
+## ckeditor4-angular 2.1.0
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.16.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-416).
+* Updated year in license headers.
+
+## ckeditor4-angular 2.0.1
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.15.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4151).
+
+## ckeditor4-angular 2.0.0
+
+Breaking Changes:
+
+* [#130](https://github.com/ckeditor/ckeditor4-angular/issues/130): `DIVAREA` editor type has been deprecated. Use [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin instead (see [migration guide](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html#using-the-div-based-editor-type)).
+
+## ckeditor4-angular 1.3.0
+
+Other Changes:
+
+* Updated default CDN CKEditor 4 dependency to [4.15.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-415).
+* [#98](https://github.com/ckeditor/ckeditor4-angular/issues/98): Updated repository dependencies (no changes in the actual `ckeditor4-angular` package).
+* [#128](https://github.com/ckeditor/ckeditor4-angular/issues/128): Improve the stability of `getEditorNamespace()` method.
+
+## ckeditor4-angular 1.2.2
+
+Fixed Issues:
+
+* [#110](https://github.com/ckeditor/ckeditor4-angular/issues/110): Fixed: Integration throws an error when CKEditor 4 component is removed from the DOM before CKEditor 4 is loaded. Thanks to [Benjamin Hugot](https://github.com/bhugot)!
+
+## ckeditor4-angular 1.2.1
+
+Other Changes:
+
+* Updated the default CKEditor 4 CDN dependency to [4.14.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4141).
+
+## ckeditor4-angular 1.2.0
+
+New Features:
+
+* [#7](https://github.com/ckeditor/ckeditor4-angular/issues/7): The CKEditor 4 Angular component now exposes more CKEditor 4 native events. Thanks to [Eduard Zintz](https://github.com/ezintz)! The newly exposed events are:
+ * [`paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste)
+ * [`afterPaste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste)
+ * [`dragStat`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart)
+ * [`dragEnd`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend)
+ * [`drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop)
+ * [`fileUploadRequest`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest)
+ * [`fileUploadResponse`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse)
+
+## ckeditor4-angular 1.1.0
+
+Other Changes:
+
+* Updated the default CKEditor 4 CDN dependency to [4.14.0](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-414).
+
+## ckeditor4-angular 1.0.1
+
+Other Changes:
+
+* Updated the default CKEditor 4 CDN dependency to [4.13.1](https://github.com/ckeditor/ckeditor4/blob/master/CHANGES.md#ckeditor-4131).
+
+## ckeditor4-angular 1.0.0
+
+New Features:
+
+* [#6](https://github.com/ckeditor/ckeditor4-angular/issues/6): Added support for classic (iframe-based) editor. Starting from this version classic editor is used by default.
+* [#40](https://github.com/ckeditor/ckeditor4-angular/pull/40): Added support for Angular 5.
+
+Fixed Issues:
+
+* [#42](https://github.com/ckeditor/ckeditor4-angular/issues/42): Fixed: The `elementRef` related error is thrown when using Angular 5.
+* [#54](https://github.com/ckeditor/ckeditor4-angular/issues/54): Fixed: Two-way data binding does not work when the [Undo](https://ckeditor.com/cke4/addon/undo) plugin is not present.
+
+Other Changes:
+
+* Updated the default CKEditor 4 CDN dependency to [4.13.0](https://github.com/ckeditor/ckeditor4-angular/issues/59).
+
+## ckeditor4-angular 1.0.0-beta.2
+
+Other Changes:
+
+* Updated the default CKEditor 4 CDN dependency to [4.12.1](https://github.com/ckeditor/ckeditor4-angular/commit/2bf8a8c489f2a9ea2f2d9304e2e3d92646dbe89e).
+
+## ckeditor4-angular 1.0.0-beta
+
+Other Changes:
+
+* [#28](https://github.com/ckeditor/ckeditor4-angular/issues/28): Updated package dev dependencies.
+
+## ckeditor4-angular 0.1.2
+
+Other Changes:
+
+* [#20](https://github.com/ckeditor/ckeditor4-angular/issues/20): Added the "Quick Start" section to README file.
+* [#10](https://github.com/ckeditor/ckeditor4-angular/issues/10): Updated the LICENSE file with all required dependencies.
+
+## ckeditor4-angular 0.1.1
+
+Other Changes:
+
+* `README.md` file improvements.
+
+## ckeditor4-angular 0.1.0
+
+The first beta release of CKEditor 4 WYSIWYG Editor Angular Integration.
diff --git a/dist/LICENSE.md b/dist/LICENSE.md
new file mode 100644
index 0000000..0cee191
--- /dev/null
+++ b/dist/LICENSE.md
@@ -0,0 +1,32 @@
+Software License Agreement
+==========================
+
+**CKEditor 4 WYSIWYG editor Angular component** – https://github.com/ckeditor/ckeditor4-angular
+Copyright (c) 2003-2022, [CKSource](https://cksource.com/) Holding sp. z o.o. All rights reserved.
+
+Licensed under the terms of any of the following licenses at your
+choice:
+
+- GNU General Public License Version 2 or later (the "GPL")
+ http://www.gnu.org/licenses/gpl.html
+
+- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ http://www.gnu.org/licenses/lgpl.html
+
+- Mozilla Public License Version 1.1 or later (the "MPL")
+ http://www.mozilla.org/MPL/MPL-1.1.html
+
+Sources of Intellectual Property Included in CKEditor
+-----------------------------------------------------
+
+Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
+
+The following libraries are included in CKEditor 4 component for Angular under the following licenses:
+
+- load-script [MIT](https://github.com/eldargab/load-script#license)
+- tslib Copyright (c) 2012-2020 Microsoft [Apache-2.0](https://github.com/Microsoft/tslib/blob/master/LICENSE.txt)
+
+Trademarks
+----------
+
+**CKEditor** is a trademark of [CKSource](https://cksource.com/) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
diff --git a/dist/README.md b/dist/README.md
new file mode 100644
index 0000000..9a8c957
--- /dev/null
+++ b/dist/README.md
@@ -0,0 +1,133 @@
+# CKEditor 4 WYSIWYG editor Angular component [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20CKEditor%204%20Angular%20integration&url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fckeditor4-angular)
+
+[![npm version](https://badge.fury.io/js/ckeditor4-angular.svg)](https://www.npmjs.com/package/ckeditor4-angular)
+[![GitHub tag](https://img.shields.io/github/tag/ckeditor/ckeditor4-angular.svg)](https://github.com/ckeditor/ckeditor4-angular)
+[![Build Status](https://app.travis-ci.com/ckeditor/ckeditor4-angular.svg?branch=master)](https://app.travis-ci.com/ckeditor/ckeditor4-angular)
+
+[![Join newsletter](https://img.shields.io/badge/join-newsletter-00cc99.svg)](http://eepurl.com/c3zRPr)
+[![Follow Twitter](https://img.shields.io/badge/follow-twitter-00cc99.svg)](https://twitter.com/ckeditor)
+
+Official [CKEditor 4](https://ckeditor.com/ckeditor-4/) WYSIWYG editor component for Angular.
+
+We are looking forward to your feedback! You can report any issues, ideas or feature requests on the [integration issues page](https://github.com/ckeditor/ckeditor4-angular/issues/new).
+
+![CKEditor 4 screenshot](https://c.cksource.com/a/1/img/npm/ckeditor4.png)
+
+## Usage
+
+In order to create an editor instance in Angular, install the `ckeditor4-angular` npm package as a dependency of your project:
+
+```bash
+npm install --save ckeditor4-angular
+```
+
+After installing, import `CKEditorModule` to your application:
+
+```js
+import { CKEditorModule } from 'ckeditor4-angular';
+
+@NgModule( {
+ imports: [
+ ...
+ CKEditorModule,
+ ...
+ ],
+ …
+} )
+```
+
+You can now use the `` tag in the component template to include the rich text editor:
+
+```html
+
+```
+
+The `data` attribute used in the example above is responsible for setting the editor’s data.
+
+## Documentation and examples
+
+See the [CKEditor 4 Angular Integration](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html) article and [Angular examples](https://ckeditor.com/docs/ckeditor4/latest/examples/angular.html) in the [CKEditor 4 documentation](https://ckeditor.com/docs/ckeditor4/latest/).
+
+## Browser support
+
+The CKEditor 4 Angular component works with all the [supported browsers](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html#officially-supported-browsers) except for Internet Explorer 8-10.
+
+## Supported Angular versions
+
+The integration can be used together with Angular at version 5.0.0 and higher. It is an implication of Angular metadata produced for this package by the Angular builder. Note that the `package.json` used in the main repository isn't published on NPM (the production one is present in `src/ckeditor/package.json`), so there are only a few peer dependencies:
+
+* `@angular/core` >= 5.0.0
+* `@angular/common` >= 5.0.0
+* `@angular/forms` >= 5.0.0
+
+required by this package.
+
+## Contributing
+
+Here is how you can contribute to the development of the component. Any feedback and help will be most appreciated!
+
+### Reporting issues and feature requests
+
+All issues and feature requests should be reported in the [issues section](https://github.com/ckeditor/ckeditor4-angular/issues/new) of the official GitHub repository for the CKEditor 4 Angular integration.
+
+### Development
+
+Clone the [CKEditor 4 Angular integration repository](https://github.com/ckeditor/ckeditor4-angular).
+
+Once you have cloned it, install dependencies by running:
+
+```bash
+npm install
+```
+
+#### The structure of the repository
+
+This repository contains the following code:
+
+* `./src/ckeditor` contains the CKEditor component,
+* `./src/app` is a demo application using the component.
+
+#### Development server
+
+Run `ng serve` to start the development server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+#### Building samples
+
+Run `ng build` to build the samples. The build artifacts will be stored in the `samples/` directory.
+
+#### Running unit tests
+
+Run `npm test` to execute unit tests via [Karma](https://karma-runner.github.io).
+
+There are two options available to alternate the testing process:
+
+* `url` / `u` - pass custom URL to Karma, for example custom CKEditor 4 build.
+* `watch` / `w` - tell Karma to watch for changes.
+
+For example:
+
+```
+npm run test -- -u http://localhost:5000/ckeditor.js -w
+```
+
+#### Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](https://www.protractortest.org/).
+
+#### Publishing
+
+To build and publish the package, run `npm run publish`.
+
+You can also manually build the package with `npm run build-package` which will be stored in `dist/`. Then you can publish it with `npm publish dist/`.
+
+## License
+
+Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+
+Licensed under the terms of any of the following licenses at your choice:
+
+* [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html),
+* [GNU Lesser General Public License Version 2.1 or later](http://www.gnu.org/licenses/lgpl.html),
+* [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html).
+
+For full details about the license, please check the `LICENSE.md` file.
diff --git a/dist/bundles/ckeditor4-angular.umd.js b/dist/bundles/ckeditor4-angular.umd.js
new file mode 100644
index 0000000..ef667dd
--- /dev/null
+++ b/dist/bundles/ckeditor4-angular.umd.js
@@ -0,0 +1,418 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ckeditor4-integrations-common')) :
+ typeof define === 'function' && define.amd ? define('ckeditor4-angular', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'ckeditor4-integrations-common'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ckeditor4-angular"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ckeditor4IntegrationsCommon));
+})(this, (function (exports, core, common, forms, ckeditor4IntegrationsCommon) { 'use strict';
+
+ /**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+ var CKEditorComponent = /** @class */ (function () {
+ function CKEditorComponent(elementRef, ngZone) {
+ this.elementRef = elementRef;
+ this.ngZone = ngZone;
+ /**
+ * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.
+ *
+ * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'
+ */
+ this.editorUrl = 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js';
+ /**
+ * Tag name of the editor component.
+ *
+ * The default tag is `textarea`.
+ */
+ this.tagName = 'textarea';
+ /**
+ * The type of the editor interface.
+ *
+ * By default editor interface will be initialized as `classic` editor.
+ * You can also choose to create an editor with `inline` interface type instead.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html
+ * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html
+ * to learn more.
+ */
+ this.type = "classic" /* CLASSIC */;
+ /**
+ * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace
+ * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.
+ * Can be used for convenient changes in the namespace, e.g. for adding external plugins.
+ */
+ this.namespaceLoaded = new core.EventEmitter();
+ /**
+ * Fires when the editor is ready. It corresponds with the `editor#instanceReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady
+ * event.
+ */
+ this.ready = new core.EventEmitter();
+ /**
+ * Fires when the editor data is loaded, e.g. after calling setData()
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData
+ * editor's method. It corresponds with the `editor#dataReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.
+ */
+ this.dataReady = new core.EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. It corresponds with the `editor#change`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change
+ * event. For performance reasons this event may be called even when data didn't really changed.
+ * Please note that this event will only be fired when `undo` plugin is loaded. If you need to
+ * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.
+ */
+ this.change = new core.EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. In contrast to `change` - only emits when
+ * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.
+ *
+ * See more: https://angular.io/guide/template-syntax#two-way-binding---
+ */
+ this.dataChange = new core.EventEmitter();
+ /**
+ * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart
+ * event.
+ */
+ this.dragStart = new core.EventEmitter();
+ /**
+ * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend
+ * event.
+ */
+ this.dragEnd = new core.EventEmitter();
+ /**
+ * Fires when the native drop event occurs. It corresponds with the `editor#drop`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop
+ * event.
+ */
+ this.drop = new core.EventEmitter();
+ /**
+ * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse
+ * event.
+ */
+ this.fileUploadResponse = new core.EventEmitter();
+ /**
+ * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest
+ * event.
+ */
+ this.fileUploadRequest = new core.EventEmitter();
+ /**
+ * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus
+ * event.
+ */
+ this.focus = new core.EventEmitter();
+ /**
+ * Fires after the user initiated a paste action, but before the data is inserted.
+ * It corresponds with the `editor#paste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste
+ * event.
+ */
+ this.paste = new core.EventEmitter();
+ /**
+ * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste
+ * event.
+ */
+ this.afterPaste = new core.EventEmitter();
+ /**
+ * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur
+ * event.
+ */
+ this.blur = new core.EventEmitter();
+ /**
+ * If the component is read–only before the editor instance is created, it remembers that state,
+ * so the editor can become read–only once it is ready.
+ */
+ this._readOnly = null;
+ this._data = null;
+ this._destroyed = false;
+ }
+ Object.defineProperty(CKEditorComponent.prototype, "data", {
+ get: function () {
+ return this._data;
+ },
+ /**
+ * Keeps track of the editor's data.
+ *
+ * It's also decorated as an input which is useful when not using the ngModel.
+ *
+ * See https://angular.io/api/forms/NgModel to learn more.
+ */
+ set: function (data) {
+ if (data === this._data) {
+ return;
+ }
+ if (this.instance) {
+ this.instance.setData(data);
+ // Data may be changed by ACF.
+ this._data = this.instance.getData();
+ return;
+ }
+ this._data = data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CKEditorComponent.prototype, "readOnly", {
+ get: function () {
+ if (this.instance) {
+ return this.instance.readOnly;
+ }
+ return this._readOnly;
+ },
+ /**
+ * When set to `true`, the editor becomes read-only.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly
+ * to learn more.
+ */
+ set: function (isReadOnly) {
+ if (this.instance) {
+ this.instance.setReadOnly(isReadOnly);
+ return;
+ }
+ // Delay setting read-only state until editor initialization.
+ this._readOnly = isReadOnly;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CKEditorComponent.prototype.ngAfterViewInit = function () {
+ var _this = this;
+ ckeditor4IntegrationsCommon.getEditorNamespace(this.editorUrl, function (namespace) {
+ _this.namespaceLoaded.emit(namespace);
+ }).then(function () {
+ // Check if component instance was destroyed before `ngAfterViewInit` call (#110).
+ // Here, `this.instance` is still not initialized and so additional flag is needed.
+ if (_this._destroyed) {
+ return;
+ }
+ _this.ngZone.runOutsideAngular(_this.createEditor.bind(_this));
+ }).catch(window.console.error);
+ };
+ CKEditorComponent.prototype.ngOnDestroy = function () {
+ var _this = this;
+ this._destroyed = true;
+ this.ngZone.runOutsideAngular(function () {
+ if (_this.instance) {
+ _this.instance.destroy();
+ _this.instance = null;
+ }
+ });
+ };
+ CKEditorComponent.prototype.writeValue = function (value) {
+ this.data = value;
+ };
+ CKEditorComponent.prototype.registerOnChange = function (callback) {
+ this.onChange = callback;
+ };
+ CKEditorComponent.prototype.registerOnTouched = function (callback) {
+ this.onTouched = callback;
+ };
+ CKEditorComponent.prototype.createEditor = function () {
+ var _this = this;
+ var _a, _b;
+ var element = document.createElement(this.tagName);
+ this.elementRef.nativeElement.appendChild(element);
+ var userInstanceReadyCallback = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.on) === null || _b === void 0 ? void 0 : _b.instanceReady;
+ var defaultConfig = {
+ delayIfDetached: true
+ };
+ var config = Object.assign(Object.assign({}, defaultConfig), this.config);
+ if (typeof config.on === 'undefined') {
+ config.on = {};
+ }
+ config.on.instanceReady = function (evt) {
+ var editor = evt.editor;
+ _this.instance = editor;
+ // Read only state may change during instance initialization.
+ _this.readOnly = _this._readOnly !== null ? _this._readOnly : _this.instance.readOnly;
+ _this.subscribe(_this.instance);
+ var undo = editor.undoManager;
+ if (_this.data !== null) {
+ undo && undo.lock();
+ editor.setData(_this.data, { callback: function () {
+ // Locking undoManager prevents 'change' event.
+ // Trigger it manually to updated bound data.
+ if (_this.data !== editor.getData()) {
+ undo ? editor.fire('change') : editor.fire('dataReady');
+ }
+ undo && undo.unlock();
+ _this.ngZone.run(function () {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ _this.ready.emit(evt);
+ });
+ } });
+ }
+ else {
+ _this.ngZone.run(function () {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ _this.ready.emit(evt);
+ });
+ }
+ };
+ if (this.type === "inline" /* INLINE */) {
+ CKEDITOR.inline(element, config);
+ }
+ else {
+ CKEDITOR.replace(element, config);
+ }
+ };
+ CKEditorComponent.prototype.subscribe = function (editor) {
+ var _this = this;
+ editor.on('focus', function (evt) {
+ _this.ngZone.run(function () {
+ _this.focus.emit(evt);
+ });
+ });
+ editor.on('paste', function (evt) {
+ _this.ngZone.run(function () {
+ _this.paste.emit(evt);
+ });
+ });
+ editor.on('afterPaste', function (evt) {
+ _this.ngZone.run(function () {
+ _this.afterPaste.emit(evt);
+ });
+ });
+ editor.on('dragend', function (evt) {
+ _this.ngZone.run(function () {
+ _this.dragEnd.emit(evt);
+ });
+ });
+ editor.on('dragstart', function (evt) {
+ _this.ngZone.run(function () {
+ _this.dragStart.emit(evt);
+ });
+ });
+ editor.on('drop', function (evt) {
+ _this.ngZone.run(function () {
+ _this.drop.emit(evt);
+ });
+ });
+ editor.on('fileUploadRequest', function (evt) {
+ _this.ngZone.run(function () {
+ _this.fileUploadRequest.emit(evt);
+ });
+ });
+ editor.on('fileUploadResponse', function (evt) {
+ _this.ngZone.run(function () {
+ _this.fileUploadResponse.emit(evt);
+ });
+ });
+ editor.on('blur', function (evt) {
+ _this.ngZone.run(function () {
+ if (_this.onTouched) {
+ _this.onTouched();
+ }
+ _this.blur.emit(evt);
+ });
+ });
+ editor.on('dataReady', this.propagateChange, this);
+ if (this.instance.undoManager) {
+ editor.on('change', this.propagateChange, this);
+ }
+ // If 'undo' plugin is not loaded, listen to 'selectionCheck' event instead. (#54).
+ else {
+ editor.on('selectionCheck', this.propagateChange, this);
+ }
+ };
+ CKEditorComponent.prototype.propagateChange = function (event) {
+ var _this = this;
+ this.ngZone.run(function () {
+ var newData = _this.instance.getData();
+ if (event.name === 'change') {
+ _this.change.emit(event);
+ }
+ else if (event.name === 'dataReady') {
+ _this.dataReady.emit(event);
+ }
+ if (newData === _this.data) {
+ return;
+ }
+ _this._data = newData;
+ _this.dataChange.emit(newData);
+ if (_this.onChange) {
+ _this.onChange(newData);
+ }
+ });
+ };
+ return CKEditorComponent;
+ }());
+ CKEditorComponent.decorators = [
+ { type: core.Component, args: [{
+ selector: 'ckeditor',
+ template: '',
+ providers: [
+ {
+ provide: forms.NG_VALUE_ACCESSOR,
+ useExisting: core.forwardRef(function () { return CKEditorComponent; }),
+ multi: true,
+ }
+ ]
+ },] }
+ ];
+ CKEditorComponent.ctorParameters = function () { return [
+ { type: core.ElementRef },
+ { type: core.NgZone }
+ ]; };
+ CKEditorComponent.propDecorators = {
+ config: [{ type: core.Input }],
+ editorUrl: [{ type: core.Input }],
+ tagName: [{ type: core.Input }],
+ type: [{ type: core.Input }],
+ data: [{ type: core.Input }],
+ readOnly: [{ type: core.Input }],
+ namespaceLoaded: [{ type: core.Output }],
+ ready: [{ type: core.Output }],
+ dataReady: [{ type: core.Output }],
+ change: [{ type: core.Output }],
+ dataChange: [{ type: core.Output }],
+ dragStart: [{ type: core.Output }],
+ dragEnd: [{ type: core.Output }],
+ drop: [{ type: core.Output }],
+ fileUploadResponse: [{ type: core.Output }],
+ fileUploadRequest: [{ type: core.Output }],
+ focus: [{ type: core.Output }],
+ paste: [{ type: core.Output }],
+ afterPaste: [{ type: core.Output }],
+ blur: [{ type: core.Output }]
+ };
+
+ /**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+ var CKEditorModule = /** @class */ (function () {
+ function CKEditorModule() {
+ }
+ return CKEditorModule;
+ }());
+ CKEditorModule.decorators = [
+ { type: core.NgModule, args: [{
+ imports: [forms.FormsModule, common.CommonModule],
+ declarations: [CKEditorComponent],
+ exports: [CKEditorComponent]
+ },] }
+ ];
+
+ /**
+ * Generated bundle index. Do not edit.
+ */
+
+ exports.CKEditorComponent = CKEditorComponent;
+ exports.CKEditorModule = CKEditorModule;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
+//# sourceMappingURL=ckeditor4-angular.umd.js.map
diff --git a/dist/bundles/ckeditor4-angular.umd.js.map b/dist/bundles/ckeditor4-angular.umd.js.map
new file mode 100644
index 0000000..eacccf1
--- /dev/null
+++ b/dist/bundles/ckeditor4-angular.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ckeditor4-angular.umd.js","sources":["../../src/ckeditor/ckeditor.component.ts","../../src/ckeditor/ckeditor.module.ts","../../src/ckeditor/ckeditor4-angular.ts"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\nimport {\n\tComponent,\n\tNgZone,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tforwardRef,\n\tElementRef,\n\tAfterViewInit, OnDestroy\n} from '@angular/core';\n\nimport {\n\tControlValueAccessor,\n\tNG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { getEditorNamespace } from 'ckeditor4-integrations-common';\n\nimport { CKEditor4 } from './ckeditor';\n\ndeclare let CKEDITOR: any;\n\n@Component( {\n\tselector: 'ckeditor',\n\ttemplate: '',\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef( () => CKEditorComponent ),\n\t\t\tmulti: true,\n\t\t}\n\t]\n} )\nexport class CKEditorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {\n\t/**\n\t * The configuration of the editor.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html\n\t * to learn more.\n\t */\n\t@Input() config?: CKEditor4.Config;\n\n\t/**\n\t * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.\n\t *\n\t * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'\n\t */\n\t@Input() editorUrl = 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js';\n\n\t/**\n\t * Tag name of the editor component.\n\t *\n\t * The default tag is `textarea`.\n\t */\n\t@Input() tagName = 'textarea';\n\n\t/**\n\t * The type of the editor interface.\n\t *\n\t * By default editor interface will be initialized as `classic` editor.\n\t * You can also choose to create an editor with `inline` interface type instead.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html\n\t * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html\n\t * to learn more.\n\t */\n\t@Input() type: CKEditor4.EditorType = CKEditor4.EditorType.CLASSIC;\n\n\t/**\n\t * Keeps track of the editor's data.\n\t *\n\t * It's also decorated as an input which is useful when not using the ngModel.\n\t *\n\t * See https://angular.io/api/forms/NgModel to learn more.\n\t */\n\t@Input() set data( data: string ) {\n\t\tif ( data === this._data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.instance ) {\n\t\t\tthis.instance.setData( data );\n\t\t\t// Data may be changed by ACF.\n\t\t\tthis._data = this.instance.getData();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._data = data;\n\t}\n\n\tget data(): string {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * When set to `true`, the editor becomes read-only.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly\n\t * to learn more.\n\t */\n\t@Input() set readOnly( isReadOnly: boolean ) {\n\t\tif ( this.instance ) {\n\t\t\tthis.instance.setReadOnly( isReadOnly );\n\t\t\treturn;\n\t\t}\n\n\t\t// Delay setting read-only state until editor initialization.\n\t\tthis._readOnly = isReadOnly;\n\t}\n\n\tget readOnly(): boolean {\n\t\tif ( this.instance ) {\n\t\t\treturn this.instance.readOnly;\n\t\t}\n\n\t\treturn this._readOnly;\n\t}\n\n\t/**\n\t * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace\n\t * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.\n\t * Can be used for convenient changes in the namespace, e.g. for adding external plugins.\n\t */\n\t@Output() namespaceLoaded = new EventEmitter();\n\n\t/**\n\t * Fires when the editor is ready. It corresponds with the `editor#instanceReady`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady\n\t * event.\n\t */\n\t@Output() ready = new EventEmitter();\n\n\t/**\n\t * Fires when the editor data is loaded, e.g. after calling setData()\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData\n\t * editor's method. It corresponds with the `editor#dataReady`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.\n\t */\n\t@Output() dataReady = new EventEmitter();\n\n\t/**\n\t * Fires when the content of the editor has changed. It corresponds with the `editor#change`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change\n\t * event. For performance reasons this event may be called even when data didn't really changed.\n\t * Please note that this event will only be fired when `undo` plugin is loaded. If you need to\n\t * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.\n\t */\n\t@Output() change = new EventEmitter();\n\n\t/**\n\t * Fires when the content of the editor has changed. In contrast to `change` - only emits when\n\t * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.\n\t *\n\t * See more: https://angular.io/guide/template-syntax#two-way-binding---\n\t */\n\t@Output() dataChange = new EventEmitter();\n\n\t/**\n\t * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart\n\t * event.\n\t */\n\t@Output() dragStart = new EventEmitter();\n\n\t/**\n\t * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend\n\t * event.\n\t */\n\t@Output() dragEnd = new EventEmitter();\n\n\t/**\n\t * Fires when the native drop event occurs. It corresponds with the `editor#drop`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop\n\t * event.\n\t */\n\t@Output() drop = new EventEmitter();\n\n\t/**\n\t * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse\n\t * event.\n\t */\n\t@Output() fileUploadResponse = new EventEmitter();\n\n\t/**\n\t * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest\n\t * event.\n\t */\n\t@Output() fileUploadRequest = new EventEmitter();\n\n\t/**\n\t * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus\n\t * event.\n\t */\n\t@Output() focus = new EventEmitter();\n\n\t/**\n\t * Fires after the user initiated a paste action, but before the data is inserted.\n\t * It corresponds with the `editor#paste`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste\n\t * event.\n\t */\n\t@Output() paste = new EventEmitter();\n\n\t/**\n\t * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste\n\t * event.\n\t */\n\t@Output() afterPaste = new EventEmitter();\n\n\t/**\n\t * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur\n\t * event.\n\t */\n\t@Output() blur = new EventEmitter();\n\n\t/**\n\t * A callback executed when the content of the editor changes. Part of the\n\t * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.\n\t *\n\t * Note: Unset unless the component uses the `ngModel`.\n\t */\n\tonChange?: ( data: string ) => void;\n\n\t/**\n\t * A callback executed when the editor has been blurred. Part of the\n\t * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.\n\t *\n\t * Note: Unset unless the component uses the `ngModel`.\n\t */\n\tonTouched?: () => void;\n\n\t/**\n\t * The instance of the editor created by this component.\n\t */\n\tinstance: any;\n\n\t/**\n\t * If the component is read–only before the editor instance is created, it remembers that state,\n\t * so the editor can become read–only once it is ready.\n\t */\n\tprivate _readOnly: boolean = null;\n\n\tprivate _data: string = null;\n\n\tprivate _destroyed: boolean = false;\n\n\tconstructor( private elementRef: ElementRef, private ngZone: NgZone ) {}\n\n\tngAfterViewInit(): void {\n\t\tgetEditorNamespace( this.editorUrl, namespace => {\n\t\t\tthis.namespaceLoaded.emit( namespace );\n\t\t} ).then( () => {\n\t\t\t// Check if component instance was destroyed before `ngAfterViewInit` call (#110).\n\t\t\t// Here, `this.instance` is still not initialized and so additional flag is needed.\n\t\t\tif ( this._destroyed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.ngZone.runOutsideAngular( this.createEditor.bind( this ) );\n\t\t} ).catch( window.console.error );\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed = true;\n\n\t\tthis.ngZone.runOutsideAngular( () => {\n\t\t\tif ( this.instance ) {\n\t\t\t\tthis.instance.destroy();\n\t\t\t\tthis.instance = null;\n\t\t\t}\n\t\t} );\n\t}\n\n\twriteValue( value: string ): void {\n\t\tthis.data = value;\n\t}\n\n\tregisterOnChange( callback: ( data: string ) => void ): void {\n\t\tthis.onChange = callback;\n\t}\n\n\tregisterOnTouched( callback: () => void ): void {\n\t\tthis.onTouched = callback;\n\t}\n\n\tprivate createEditor(): void {\n\t\tconst element = document.createElement( this.tagName );\n\t\tthis.elementRef.nativeElement.appendChild( element );\n\n\t\tconst userInstanceReadyCallback = this.config?.on?.instanceReady;\n\t\tconst defaultConfig: Partial = {\n\t\t\tdelayIfDetached: true\n\t\t};\n\t\tconst config: Partial = { ...defaultConfig, ...this.config };\n\n\t\tif ( typeof config.on === 'undefined' ) {\n\t\t\tconfig.on = {};\n\t\t}\n\n\t\tconfig.on.instanceReady = evt => {\n\t\t\tconst editor = evt.editor;\n\n\t\t\tthis.instance = editor;\n\n\t\t\t// Read only state may change during instance initialization.\n\t\t\tthis.readOnly = this._readOnly !== null ? this._readOnly : this.instance.readOnly;\n\n\t\t\tthis.subscribe( this.instance );\n\n\t\t\tconst undo = editor.undoManager;\n\n\t\t\tif ( this.data !== null ) {\n\t\t\t\tundo && undo.lock();\n\n\t\t\t\teditor.setData( this.data, { callback: () => {\n\t\t\t\t\t// Locking undoManager prevents 'change' event.\n\t\t\t\t\t// Trigger it manually to updated bound data.\n\t\t\t\t\tif ( this.data !== editor.getData() ) {\n\t\t\t\t\t\tundo ? editor.fire( 'change' ) : editor.fire( 'dataReady' );\n\t\t\t\t\t}\n\t\t\t\t\tundo && undo.unlock();\n\n\t\t\t\t\tthis.ngZone.run( () => {\n\t\t\t\t\t\tif ( typeof userInstanceReadyCallback === 'function' ) {\n\t\t\t\t\t\t\tuserInstanceReadyCallback( evt );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.ready.emit( evt );\n\t\t\t\t\t} );\n\t\t\t\t} } );\n\t\t\t} else {\n\t\t\t\tthis.ngZone.run( () => {\n\t\t\t\t\tif ( typeof userInstanceReadyCallback === 'function' ) {\n\t\t\t\t\t\tuserInstanceReadyCallback( evt );\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.ready.emit( evt );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tif ( this.type === CKEditor4.EditorType.INLINE ) {\n\t\t\tCKEDITOR.inline( element, config );\n\t\t} else {\n\t\t\tCKEDITOR.replace( element, config );\n\t\t}\n\t}\n\n\tprivate subscribe( editor: any ): void {\n\t\teditor.on( 'focus', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.focus.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'paste', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.paste.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'afterPaste', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.afterPaste.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'dragend', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.dragEnd.emit( evt );\n\t\t\t} );\n\t\t});\n\n\t\teditor.on( 'dragstart', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.dragStart.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'drop', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.drop.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'fileUploadRequest', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.fileUploadRequest.emit(evt);\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'fileUploadResponse', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.fileUploadResponse.emit(evt);\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'blur', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tif ( this.onTouched ) {\n\t\t\t\t\tthis.onTouched();\n\t\t\t\t}\n\n\t\t\t\tthis.blur.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'dataReady', this.propagateChange, this );\n\n\t\tif ( this.instance.undoManager ) {\n\t\t\teditor.on( 'change', this.propagateChange, this );\n\t\t}\n\t\t// If 'undo' plugin is not loaded, listen to 'selectionCheck' event instead. (#54).\n\t\telse {\n\t\t\teditor.on( 'selectionCheck', this.propagateChange, this );\n\t\t}\n\t}\n\n\tprivate propagateChange( event: any ): void {\n\t\tthis.ngZone.run( () => {\n\t\t\tconst newData = this.instance.getData();\n\n\t\t\tif ( event.name === 'change' ) {\n\t\t\t\tthis.change.emit( event );\n\t\t\t} else if ( event.name === 'dataReady' ) {\n\t\t\t\tthis.dataReady.emit( event );\n\t\t\t}\n\n\t\t\tif ( newData === this.data ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._data = newData;\n\t\t\tthis.dataChange.emit( newData );\n\n\t\t\tif ( this.onChange ) {\n\t\t\t\tthis.onChange( newData );\n\t\t\t}\n\t\t} );\n\t}\n\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { CKEditorComponent } from './ckeditor.component';\n\n@NgModule( {\n\timports: [ FormsModule, CommonModule ],\n\tdeclarations: [ CKEditorComponent ],\n\texports: [ CKEditorComponent ]\n} )\nexport class CKEditorModule {\n}\nexport * from './ckeditor';\nexport { CKEditorComponent } from './ckeditor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './ckeditor.module';\n"],"names":["EventEmitter","getEditorNamespace","Component","NG_VALUE_ACCESSOR","forwardRef","ElementRef","NgZone","Input","Output","NgModule","FormsModule","CommonModule"],"mappings":";;;;;;IAAA;;;IAGG;AAoCH,QAAA,iBAAA,kBAAA,YAAA;QA2NC,SAAqB,iBAAA,CAAA,UAAsB,EAAU,MAAc,EAAA;IAA9C,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;IAAU,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;IAlNnE;;;;IAIG;IACM,QAAA,IAAS,CAAA,SAAA,GAAG,0DAA0D,CAAC;IAEhF;;;;IAIG;IACM,QAAA,IAAO,CAAA,OAAA,GAAG,UAAU,CAAC;IAE9B;;;;;;;;;IASG;IACM,QAAA,IAAA,C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E;IACV,oBAAA;IACC,wBAAA,OAAO,EAAEC,uBAAiB;4BAC1B,WAAW,EAAEC,eAAU,CAAE,YAAA,EAAM,OAAA,iBAAiB,CAAA,EAAA,CAAE;IAClD,wBAAA,KAAK,EAAE,IAAI;IACX,qBAAA;IACD,iBAAA;IACD,aAAA,EAAA,EAAA;;;gBA1BAC,eAAU,EAAA;gBALVC,WAAM,EAAA;;;yBAuCLC,UAAK,EAAA,CAAA;4BAOLA,UAAK,EAAA,CAAA;0BAOLA,UAAK,EAAA,CAAA;uBAYLA,UAAK,EAAA,CAAA;uBASLA,UAAK,EAAA,CAAA;2BAyBLA,UAAK,EAAA,CAAA;kCAuBLC,WAAM,EAAA,CAAA;wBAONA,WAAM,EAAA,CAAA;4BAQNA,WAAM,EAAA,CAAA;yBASNA,WAAM,EAAA,CAAA;6BAQNA,WAAM,EAAA,CAAA;4BAONA,WAAM,EAAA,CAAA;0BAONA,WAAM,EAAA,CAAA;uBAONA,WAAM,EAAA,CAAA;qCAONA,WAAM,EAAA,CAAA;oCAONA,WAAM,EAAA,CAAA;wBAONA,WAAM,EAAA,CAAA;wBAQNA,WAAM,EAAA,CAAA;6BAONA,WAAM,EAAA,CAAA;uBAONA,WAAM,EAAA,CAAA;;;ICjOR;;;IAGG;AAYH,QAAA,cAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,cAAA,GAAA;;;;;IALC,IAAA,EAAA,IAAA,EAAAC,aAAQ,EAAE,IAAA,EAAA,CAAA;IACV,gBAAA,OAAO,EAAE,CAAEC,iBAAW,EAAEC,mBAAY,CAAE;oBACtC,YAAY,EAAE,CAAE,iBAAiB,CAAE;oBACnC,OAAO,EAAE,CAAE,iBAAiB,CAAE;IAC9B,aAAA,EAAA,EAAA;;;ICdD;;IAEG;;;;;;;;;;;"}
\ No newline at end of file
diff --git a/dist/ckeditor.component.d.ts b/dist/ckeditor.component.d.ts
new file mode 100644
index 0000000..3e6b886
--- /dev/null
+++ b/dist/ckeditor.component.d.ts
@@ -0,0 +1,181 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+import { NgZone, EventEmitter, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
+import { ControlValueAccessor } from '@angular/forms';
+import { CKEditor4 } from './ckeditor';
+export declare class CKEditorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {
+ private elementRef;
+ private ngZone;
+ /**
+ * The configuration of the editor.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
+ * to learn more.
+ */
+ config?: CKEditor4.Config;
+ /**
+ * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.
+ *
+ * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'
+ */
+ editorUrl: string;
+ /**
+ * Tag name of the editor component.
+ *
+ * The default tag is `textarea`.
+ */
+ tagName: string;
+ /**
+ * The type of the editor interface.
+ *
+ * By default editor interface will be initialized as `classic` editor.
+ * You can also choose to create an editor with `inline` interface type instead.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html
+ * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html
+ * to learn more.
+ */
+ type: CKEditor4.EditorType;
+ /**
+ * Keeps track of the editor's data.
+ *
+ * It's also decorated as an input which is useful when not using the ngModel.
+ *
+ * See https://angular.io/api/forms/NgModel to learn more.
+ */
+ set data(data: string);
+ get data(): string;
+ /**
+ * When set to `true`, the editor becomes read-only.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly
+ * to learn more.
+ */
+ set readOnly(isReadOnly: boolean);
+ get readOnly(): boolean;
+ /**
+ * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace
+ * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.
+ * Can be used for convenient changes in the namespace, e.g. for adding external plugins.
+ */
+ namespaceLoaded: EventEmitter;
+ /**
+ * Fires when the editor is ready. It corresponds with the `editor#instanceReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady
+ * event.
+ */
+ ready: EventEmitter;
+ /**
+ * Fires when the editor data is loaded, e.g. after calling setData()
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData
+ * editor's method. It corresponds with the `editor#dataReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.
+ */
+ dataReady: EventEmitter;
+ /**
+ * Fires when the content of the editor has changed. It corresponds with the `editor#change`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change
+ * event. For performance reasons this event may be called even when data didn't really changed.
+ * Please note that this event will only be fired when `undo` plugin is loaded. If you need to
+ * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.
+ */
+ change: EventEmitter;
+ /**
+ * Fires when the content of the editor has changed. In contrast to `change` - only emits when
+ * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.
+ *
+ * See more: https://angular.io/guide/template-syntax#two-way-binding---
+ */
+ dataChange: EventEmitter;
+ /**
+ * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart
+ * event.
+ */
+ dragStart: EventEmitter;
+ /**
+ * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend
+ * event.
+ */
+ dragEnd: EventEmitter;
+ /**
+ * Fires when the native drop event occurs. It corresponds with the `editor#drop`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop
+ * event.
+ */
+ drop: EventEmitter;
+ /**
+ * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse
+ * event.
+ */
+ fileUploadResponse: EventEmitter;
+ /**
+ * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest
+ * event.
+ */
+ fileUploadRequest: EventEmitter;
+ /**
+ * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus
+ * event.
+ */
+ focus: EventEmitter;
+ /**
+ * Fires after the user initiated a paste action, but before the data is inserted.
+ * It corresponds with the `editor#paste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste
+ * event.
+ */
+ paste: EventEmitter;
+ /**
+ * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste
+ * event.
+ */
+ afterPaste: EventEmitter;
+ /**
+ * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur
+ * event.
+ */
+ blur: EventEmitter;
+ /**
+ * A callback executed when the content of the editor changes. Part of the
+ * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.
+ *
+ * Note: Unset unless the component uses the `ngModel`.
+ */
+ onChange?: (data: string) => void;
+ /**
+ * A callback executed when the editor has been blurred. Part of the
+ * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.
+ *
+ * Note: Unset unless the component uses the `ngModel`.
+ */
+ onTouched?: () => void;
+ /**
+ * The instance of the editor created by this component.
+ */
+ instance: any;
+ /**
+ * If the component is read–only before the editor instance is created, it remembers that state,
+ * so the editor can become read–only once it is ready.
+ */
+ private _readOnly;
+ private _data;
+ private _destroyed;
+ constructor(elementRef: ElementRef, ngZone: NgZone);
+ ngAfterViewInit(): void;
+ ngOnDestroy(): void;
+ writeValue(value: string): void;
+ registerOnChange(callback: (data: string) => void): void;
+ registerOnTouched(callback: () => void): void;
+ private createEditor;
+ private subscribe;
+ private propagateChange;
+}
diff --git a/dist/ckeditor.d.ts b/dist/ckeditor.d.ts
new file mode 100644
index 0000000..120acb6
--- /dev/null
+++ b/dist/ckeditor.d.ts
@@ -0,0 +1,52 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+/**
+ * Basic typings for the CKEditor4 elements.
+ */
+export declare namespace CKEditor4 {
+ /**
+ * The CKEditor4 editor constructor.
+ */
+ interface Config {
+ [key: string]: any;
+ }
+ /**
+ * The CKEditor4 editor.
+ */
+ interface Editor {
+ [key: string]: any;
+ }
+ /**
+ * The CKEditor4 editor interface type.
+ * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html
+ * to learn more.
+ */
+ const enum EditorType {
+ INLINE = "inline",
+ CLASSIC = "classic"
+ }
+ /**
+ * The event object passed to CKEditor4 event callbacks.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_eventInfo.html
+ * to learn more.
+ */
+ interface EventInfo {
+ readonly name: string;
+ readonly editor: any;
+ readonly data: {
+ [key: string]: any;
+ };
+ readonly listenerData: {
+ [key: string]: any;
+ };
+ readonly sender: {
+ [key: string]: any;
+ };
+ cancel(): void;
+ removeListener(): void;
+ stop(): void;
+ }
+}
diff --git a/dist/ckeditor.module.d.ts b/dist/ckeditor.module.d.ts
new file mode 100644
index 0000000..6e2e034
--- /dev/null
+++ b/dist/ckeditor.module.d.ts
@@ -0,0 +1,8 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+export declare class CKEditorModule {
+}
+export * from './ckeditor';
+export { CKEditorComponent } from './ckeditor.component';
diff --git a/dist/ckeditor4-angular.d.ts b/dist/ckeditor4-angular.d.ts
new file mode 100644
index 0000000..26f6d8a
--- /dev/null
+++ b/dist/ckeditor4-angular.d.ts
@@ -0,0 +1,4 @@
+/**
+ * Generated bundle index. Do not edit.
+ */
+export * from './ckeditor.module';
diff --git a/dist/ckeditor4-angular.metadata.json b/dist/ckeditor4-angular.metadata.json
new file mode 100644
index 0000000..3efc4e0
--- /dev/null
+++ b/dist/ckeditor4-angular.metadata.json
@@ -0,0 +1 @@
+{"__symbolic":"module","version":4,"exports":[{"from":"./ckeditor"}],"metadata":{"CKEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":11,"character":12},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":11,"character":25}],"declarations":[{"__symbolic":"reference","name":"CKEditorComponent"}],"exports":[{"__symbolic":"reference","name":"CKEditorComponent"}]}]}],"members":{}},"CKEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":27,"character":1},"arguments":[{"selector":"ckeditor","template":"","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":33,"character":12},"useExisting":{"__symbolic":"reference","name":"CKEditorComponent"},"multi":true}]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":2}}]}],"editorUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":2}}]}],"tagName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":2}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":2}}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":81,"character":2}}]}],"readOnly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":2}}]}],"namespaceLoaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":129,"character":2}}]}],"ready":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":2}}]}],"dataReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":144,"character":2}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":153,"character":2}}]}],"dataChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":161,"character":2}}]}],"dragStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":168,"character":2}}]}],"dragEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":175,"character":2}}]}],"drop":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":182,"character":2}}]}],"fileUploadResponse":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":189,"character":2}}]}],"fileUploadRequest":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":196,"character":2}}]}],"focus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":203,"character":2}}]}],"paste":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":211,"character":2}}]}],"afterPaste":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":218,"character":2}}]}],"blur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":225,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":258,"character":34},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":258,"character":62}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"createEditor":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}],"propagateChange":[{"__symbolic":"method"}]}}},"origins":{"CKEditorModule":"./ckeditor.module","CKEditorComponent":"./ckeditor.component"},"importAs":"ckeditor4-angular"}
\ No newline at end of file
diff --git a/dist/esm2015/ckeditor.component.js b/dist/esm2015/ckeditor.component.js
new file mode 100644
index 0000000..07216da
--- /dev/null
+++ b/dist/esm2015/ckeditor.component.js
@@ -0,0 +1,373 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+import { Component, NgZone, Input, Output, EventEmitter, forwardRef, ElementRef } from '@angular/core';
+import { NG_VALUE_ACCESSOR } from '@angular/forms';
+import { getEditorNamespace } from 'ckeditor4-integrations-common';
+export class CKEditorComponent {
+ constructor(elementRef, ngZone) {
+ this.elementRef = elementRef;
+ this.ngZone = ngZone;
+ /**
+ * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.
+ *
+ * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'
+ */
+ this.editorUrl = 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js';
+ /**
+ * Tag name of the editor component.
+ *
+ * The default tag is `textarea`.
+ */
+ this.tagName = 'textarea';
+ /**
+ * The type of the editor interface.
+ *
+ * By default editor interface will be initialized as `classic` editor.
+ * You can also choose to create an editor with `inline` interface type instead.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html
+ * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html
+ * to learn more.
+ */
+ this.type = "classic" /* CLASSIC */;
+ /**
+ * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace
+ * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.
+ * Can be used for convenient changes in the namespace, e.g. for adding external plugins.
+ */
+ this.namespaceLoaded = new EventEmitter();
+ /**
+ * Fires when the editor is ready. It corresponds with the `editor#instanceReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady
+ * event.
+ */
+ this.ready = new EventEmitter();
+ /**
+ * Fires when the editor data is loaded, e.g. after calling setData()
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData
+ * editor's method. It corresponds with the `editor#dataReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.
+ */
+ this.dataReady = new EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. It corresponds with the `editor#change`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change
+ * event. For performance reasons this event may be called even when data didn't really changed.
+ * Please note that this event will only be fired when `undo` plugin is loaded. If you need to
+ * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.
+ */
+ this.change = new EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. In contrast to `change` - only emits when
+ * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.
+ *
+ * See more: https://angular.io/guide/template-syntax#two-way-binding---
+ */
+ this.dataChange = new EventEmitter();
+ /**
+ * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart
+ * event.
+ */
+ this.dragStart = new EventEmitter();
+ /**
+ * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend
+ * event.
+ */
+ this.dragEnd = new EventEmitter();
+ /**
+ * Fires when the native drop event occurs. It corresponds with the `editor#drop`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop
+ * event.
+ */
+ this.drop = new EventEmitter();
+ /**
+ * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse
+ * event.
+ */
+ this.fileUploadResponse = new EventEmitter();
+ /**
+ * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest
+ * event.
+ */
+ this.fileUploadRequest = new EventEmitter();
+ /**
+ * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus
+ * event.
+ */
+ this.focus = new EventEmitter();
+ /**
+ * Fires after the user initiated a paste action, but before the data is inserted.
+ * It corresponds with the `editor#paste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste
+ * event.
+ */
+ this.paste = new EventEmitter();
+ /**
+ * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste
+ * event.
+ */
+ this.afterPaste = new EventEmitter();
+ /**
+ * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur
+ * event.
+ */
+ this.blur = new EventEmitter();
+ /**
+ * If the component is read–only before the editor instance is created, it remembers that state,
+ * so the editor can become read–only once it is ready.
+ */
+ this._readOnly = null;
+ this._data = null;
+ this._destroyed = false;
+ }
+ /**
+ * Keeps track of the editor's data.
+ *
+ * It's also decorated as an input which is useful when not using the ngModel.
+ *
+ * See https://angular.io/api/forms/NgModel to learn more.
+ */
+ set data(data) {
+ if (data === this._data) {
+ return;
+ }
+ if (this.instance) {
+ this.instance.setData(data);
+ // Data may be changed by ACF.
+ this._data = this.instance.getData();
+ return;
+ }
+ this._data = data;
+ }
+ get data() {
+ return this._data;
+ }
+ /**
+ * When set to `true`, the editor becomes read-only.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly
+ * to learn more.
+ */
+ set readOnly(isReadOnly) {
+ if (this.instance) {
+ this.instance.setReadOnly(isReadOnly);
+ return;
+ }
+ // Delay setting read-only state until editor initialization.
+ this._readOnly = isReadOnly;
+ }
+ get readOnly() {
+ if (this.instance) {
+ return this.instance.readOnly;
+ }
+ return this._readOnly;
+ }
+ ngAfterViewInit() {
+ getEditorNamespace(this.editorUrl, namespace => {
+ this.namespaceLoaded.emit(namespace);
+ }).then(() => {
+ // Check if component instance was destroyed before `ngAfterViewInit` call (#110).
+ // Here, `this.instance` is still not initialized and so additional flag is needed.
+ if (this._destroyed) {
+ return;
+ }
+ this.ngZone.runOutsideAngular(this.createEditor.bind(this));
+ }).catch(window.console.error);
+ }
+ ngOnDestroy() {
+ this._destroyed = true;
+ this.ngZone.runOutsideAngular(() => {
+ if (this.instance) {
+ this.instance.destroy();
+ this.instance = null;
+ }
+ });
+ }
+ writeValue(value) {
+ this.data = value;
+ }
+ registerOnChange(callback) {
+ this.onChange = callback;
+ }
+ registerOnTouched(callback) {
+ this.onTouched = callback;
+ }
+ createEditor() {
+ var _a, _b;
+ const element = document.createElement(this.tagName);
+ this.elementRef.nativeElement.appendChild(element);
+ const userInstanceReadyCallback = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.on) === null || _b === void 0 ? void 0 : _b.instanceReady;
+ const defaultConfig = {
+ delayIfDetached: true
+ };
+ const config = Object.assign(Object.assign({}, defaultConfig), this.config);
+ if (typeof config.on === 'undefined') {
+ config.on = {};
+ }
+ config.on.instanceReady = evt => {
+ const editor = evt.editor;
+ this.instance = editor;
+ // Read only state may change during instance initialization.
+ this.readOnly = this._readOnly !== null ? this._readOnly : this.instance.readOnly;
+ this.subscribe(this.instance);
+ const undo = editor.undoManager;
+ if (this.data !== null) {
+ undo && undo.lock();
+ editor.setData(this.data, { callback: () => {
+ // Locking undoManager prevents 'change' event.
+ // Trigger it manually to updated bound data.
+ if (this.data !== editor.getData()) {
+ undo ? editor.fire('change') : editor.fire('dataReady');
+ }
+ undo && undo.unlock();
+ this.ngZone.run(() => {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ this.ready.emit(evt);
+ });
+ } });
+ }
+ else {
+ this.ngZone.run(() => {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ this.ready.emit(evt);
+ });
+ }
+ };
+ if (this.type === "inline" /* INLINE */) {
+ CKEDITOR.inline(element, config);
+ }
+ else {
+ CKEDITOR.replace(element, config);
+ }
+ }
+ subscribe(editor) {
+ editor.on('focus', evt => {
+ this.ngZone.run(() => {
+ this.focus.emit(evt);
+ });
+ });
+ editor.on('paste', evt => {
+ this.ngZone.run(() => {
+ this.paste.emit(evt);
+ });
+ });
+ editor.on('afterPaste', evt => {
+ this.ngZone.run(() => {
+ this.afterPaste.emit(evt);
+ });
+ });
+ editor.on('dragend', evt => {
+ this.ngZone.run(() => {
+ this.dragEnd.emit(evt);
+ });
+ });
+ editor.on('dragstart', evt => {
+ this.ngZone.run(() => {
+ this.dragStart.emit(evt);
+ });
+ });
+ editor.on('drop', evt => {
+ this.ngZone.run(() => {
+ this.drop.emit(evt);
+ });
+ });
+ editor.on('fileUploadRequest', evt => {
+ this.ngZone.run(() => {
+ this.fileUploadRequest.emit(evt);
+ });
+ });
+ editor.on('fileUploadResponse', evt => {
+ this.ngZone.run(() => {
+ this.fileUploadResponse.emit(evt);
+ });
+ });
+ editor.on('blur', evt => {
+ this.ngZone.run(() => {
+ if (this.onTouched) {
+ this.onTouched();
+ }
+ this.blur.emit(evt);
+ });
+ });
+ editor.on('dataReady', this.propagateChange, this);
+ if (this.instance.undoManager) {
+ editor.on('change', this.propagateChange, this);
+ }
+ // If 'undo' plugin is not loaded, listen to 'selectionCheck' event instead. (#54).
+ else {
+ editor.on('selectionCheck', this.propagateChange, this);
+ }
+ }
+ propagateChange(event) {
+ this.ngZone.run(() => {
+ const newData = this.instance.getData();
+ if (event.name === 'change') {
+ this.change.emit(event);
+ }
+ else if (event.name === 'dataReady') {
+ this.dataReady.emit(event);
+ }
+ if (newData === this.data) {
+ return;
+ }
+ this._data = newData;
+ this.dataChange.emit(newData);
+ if (this.onChange) {
+ this.onChange(newData);
+ }
+ });
+ }
+}
+CKEditorComponent.decorators = [
+ { type: Component, args: [{
+ selector: 'ckeditor',
+ template: '',
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => CKEditorComponent),
+ multi: true,
+ }
+ ]
+ },] }
+];
+CKEditorComponent.ctorParameters = () => [
+ { type: ElementRef },
+ { type: NgZone }
+];
+CKEditorComponent.propDecorators = {
+ config: [{ type: Input }],
+ editorUrl: [{ type: Input }],
+ tagName: [{ type: Input }],
+ type: [{ type: Input }],
+ data: [{ type: Input }],
+ readOnly: [{ type: Input }],
+ namespaceLoaded: [{ type: Output }],
+ ready: [{ type: Output }],
+ dataReady: [{ type: Output }],
+ change: [{ type: Output }],
+ dataChange: [{ type: Output }],
+ dragStart: [{ type: Output }],
+ dragEnd: [{ type: Output }],
+ drop: [{ type: Output }],
+ fileUploadResponse: [{ type: Output }],
+ fileUploadRequest: [{ type: Output }],
+ focus: [{ type: Output }],
+ paste: [{ type: Output }],
+ afterPaste: [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pcy5kYXRhUmVhZHkuZW1pdCggZXZlbnQgKTtcblx0XHRcdH1cblxuXHRcdFx0aWYgKCBuZXdEYXRhID09PSB0aGlzLmRhdGEgKSB7XG5cdFx0XHRcdHJldHVybjtcblx0XHRcdH1cblxuXHRcdFx0dGhpcy5fZGF0YSA9IG5ld0RhdGE7XG5cdFx0XHR0aGlzLmRhdGFDaGFuZ2UuZW1pdCggbmV3RGF0YSApO1xuXG5cdFx0XHRpZiAoIHRoaXMub25DaGFuZ2UgKSB7XG5cdFx0XHRcdHRoaXMub25DaGFuZ2UoIG5ld0RhdGEgKTtcblx0XHRcdH1cblx0XHR9ICk7XG5cdH1cblxufVxuIl19
\ No newline at end of file
diff --git a/dist/esm2015/ckeditor.js b/dist/esm2015/ckeditor.js
new file mode 100644
index 0000000..d804db5
--- /dev/null
+++ b/dist/esm2015/ckeditor.js
@@ -0,0 +1,6 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+export {};
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2tlZGl0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2tlZGl0b3IvY2tlZGl0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZSBDb3B5cmlnaHQgKGMpIDIwMDMtMjAyMiwgQ0tTb3VyY2UgSG9sZGluZyBzcC4geiBvLm8uIEFsbCByaWdodHMgcmVzZXJ2ZWQuXG4gKiBGb3IgbGljZW5zaW5nLCBzZWUgTElDRU5TRS5tZC5cbiAqL1xuXG4vKipcbiAqIEJhc2ljIHR5cGluZ3MgZm9yIHRoZSBDS0VkaXRvcjQgZWxlbWVudHMuXG4gKi9cbmV4cG9ydCBuYW1lc3BhY2UgQ0tFZGl0b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mx5IGxpc3RlbmVyRGF0YToge1xuXHRcdFx0WyBrZXk6IHN0cmluZyBdOiBhbnk7XG5cdFx0fTtcblx0XHRyZWFkb25seSBzZW5kZXI6IHtcblx0XHRcdFsga2V5OiBzdHJpbmcgXTogYW55O1xuXHRcdH07XG5cblx0XHRjYW5jZWwoKTogdm9pZDtcblxuXHRcdHJlbW92ZUxpc3RlbmVyKCk6IHZvaWQ7XG5cblx0XHRzdG9wKCk6IHZvaWQ7XG5cdH1cbn1cbiJdfQ==
\ No newline at end of file
diff --git a/dist/esm2015/ckeditor.module.js b/dist/esm2015/ckeditor.module.js
new file mode 100644
index 0000000..f31ed01
--- /dev/null
+++ b/dist/esm2015/ckeditor.module.js
@@ -0,0 +1,20 @@
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { CKEditorComponent } from './ckeditor.component';
+export class CKEditorModule {
+}
+CKEditorModule.decorators = [
+ { type: NgModule, args: [{
+ imports: [FormsModule, CommonModule],
+ declarations: [CKEditorComponent],
+ exports: [CKEditorComponent]
+ },] }
+];
+export * from './ckeditor';
+export { CKEditorComponent } from './ckeditor.component';
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2tlZGl0b3IubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NrZWRpdG9yL2NrZWRpdG9yLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFFSCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1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l0b3JNb2R1bGUge1xufVxuZXhwb3J0ICogZnJvbSAnLi9ja2VkaXRvcic7XG5leHBvcnQgeyBDS0VkaXRvckNvbXBvbmVudCB9IGZyb20gJy4vY2tlZGl0b3IuY29tcG9uZW50JztcbiJdfQ==
\ No newline at end of file
diff --git a/dist/esm2015/ckeditor4-angular.js b/dist/esm2015/ckeditor4-angular.js
new file mode 100644
index 0000000..fe7ee0e
--- /dev/null
+++ b/dist/esm2015/ckeditor4-angular.js
@@ -0,0 +1,5 @@
+/**
+ * Generated bundle index. Do not edit.
+ */
+export * from './ckeditor.module';
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2tlZGl0b3I0LWFuZ3VsYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2tlZGl0b3IvY2tlZGl0b3I0LWFuZ3VsYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLG1CQUFtQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2NrZWRpdG9yLm1vZHVsZSc7XG4iXX0=
\ No newline at end of file
diff --git a/dist/fesm2015/ckeditor4-angular.js b/dist/fesm2015/ckeditor4-angular.js
new file mode 100644
index 0000000..ca9b854
--- /dev/null
+++ b/dist/fesm2015/ckeditor4-angular.js
@@ -0,0 +1,400 @@
+import { EventEmitter, Component, forwardRef, ElementRef, NgZone, Input, Output, NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
+import { getEditorNamespace } from 'ckeditor4-integrations-common';
+
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+class CKEditorComponent {
+ constructor(elementRef, ngZone) {
+ this.elementRef = elementRef;
+ this.ngZone = ngZone;
+ /**
+ * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.
+ *
+ * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'
+ */
+ this.editorUrl = 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js';
+ /**
+ * Tag name of the editor component.
+ *
+ * The default tag is `textarea`.
+ */
+ this.tagName = 'textarea';
+ /**
+ * The type of the editor interface.
+ *
+ * By default editor interface will be initialized as `classic` editor.
+ * You can also choose to create an editor with `inline` interface type instead.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html
+ * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html
+ * to learn more.
+ */
+ this.type = "classic" /* CLASSIC */;
+ /**
+ * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace
+ * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.
+ * Can be used for convenient changes in the namespace, e.g. for adding external plugins.
+ */
+ this.namespaceLoaded = new EventEmitter();
+ /**
+ * Fires when the editor is ready. It corresponds with the `editor#instanceReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady
+ * event.
+ */
+ this.ready = new EventEmitter();
+ /**
+ * Fires when the editor data is loaded, e.g. after calling setData()
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData
+ * editor's method. It corresponds with the `editor#dataReady`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.
+ */
+ this.dataReady = new EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. It corresponds with the `editor#change`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change
+ * event. For performance reasons this event may be called even when data didn't really changed.
+ * Please note that this event will only be fired when `undo` plugin is loaded. If you need to
+ * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.
+ */
+ this.change = new EventEmitter();
+ /**
+ * Fires when the content of the editor has changed. In contrast to `change` - only emits when
+ * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.
+ *
+ * See more: https://angular.io/guide/template-syntax#two-way-binding---
+ */
+ this.dataChange = new EventEmitter();
+ /**
+ * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart
+ * event.
+ */
+ this.dragStart = new EventEmitter();
+ /**
+ * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend
+ * event.
+ */
+ this.dragEnd = new EventEmitter();
+ /**
+ * Fires when the native drop event occurs. It corresponds with the `editor#drop`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop
+ * event.
+ */
+ this.drop = new EventEmitter();
+ /**
+ * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse
+ * event.
+ */
+ this.fileUploadResponse = new EventEmitter();
+ /**
+ * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest
+ * event.
+ */
+ this.fileUploadRequest = new EventEmitter();
+ /**
+ * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus
+ * event.
+ */
+ this.focus = new EventEmitter();
+ /**
+ * Fires after the user initiated a paste action, but before the data is inserted.
+ * It corresponds with the `editor#paste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste
+ * event.
+ */
+ this.paste = new EventEmitter();
+ /**
+ * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste
+ * event.
+ */
+ this.afterPaste = new EventEmitter();
+ /**
+ * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`
+ * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur
+ * event.
+ */
+ this.blur = new EventEmitter();
+ /**
+ * If the component is read–only before the editor instance is created, it remembers that state,
+ * so the editor can become read–only once it is ready.
+ */
+ this._readOnly = null;
+ this._data = null;
+ this._destroyed = false;
+ }
+ /**
+ * Keeps track of the editor's data.
+ *
+ * It's also decorated as an input which is useful when not using the ngModel.
+ *
+ * See https://angular.io/api/forms/NgModel to learn more.
+ */
+ set data(data) {
+ if (data === this._data) {
+ return;
+ }
+ if (this.instance) {
+ this.instance.setData(data);
+ // Data may be changed by ACF.
+ this._data = this.instance.getData();
+ return;
+ }
+ this._data = data;
+ }
+ get data() {
+ return this._data;
+ }
+ /**
+ * When set to `true`, the editor becomes read-only.
+ *
+ * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly
+ * to learn more.
+ */
+ set readOnly(isReadOnly) {
+ if (this.instance) {
+ this.instance.setReadOnly(isReadOnly);
+ return;
+ }
+ // Delay setting read-only state until editor initialization.
+ this._readOnly = isReadOnly;
+ }
+ get readOnly() {
+ if (this.instance) {
+ return this.instance.readOnly;
+ }
+ return this._readOnly;
+ }
+ ngAfterViewInit() {
+ getEditorNamespace(this.editorUrl, namespace => {
+ this.namespaceLoaded.emit(namespace);
+ }).then(() => {
+ // Check if component instance was destroyed before `ngAfterViewInit` call (#110).
+ // Here, `this.instance` is still not initialized and so additional flag is needed.
+ if (this._destroyed) {
+ return;
+ }
+ this.ngZone.runOutsideAngular(this.createEditor.bind(this));
+ }).catch(window.console.error);
+ }
+ ngOnDestroy() {
+ this._destroyed = true;
+ this.ngZone.runOutsideAngular(() => {
+ if (this.instance) {
+ this.instance.destroy();
+ this.instance = null;
+ }
+ });
+ }
+ writeValue(value) {
+ this.data = value;
+ }
+ registerOnChange(callback) {
+ this.onChange = callback;
+ }
+ registerOnTouched(callback) {
+ this.onTouched = callback;
+ }
+ createEditor() {
+ var _a, _b;
+ const element = document.createElement(this.tagName);
+ this.elementRef.nativeElement.appendChild(element);
+ const userInstanceReadyCallback = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.on) === null || _b === void 0 ? void 0 : _b.instanceReady;
+ const defaultConfig = {
+ delayIfDetached: true
+ };
+ const config = Object.assign(Object.assign({}, defaultConfig), this.config);
+ if (typeof config.on === 'undefined') {
+ config.on = {};
+ }
+ config.on.instanceReady = evt => {
+ const editor = evt.editor;
+ this.instance = editor;
+ // Read only state may change during instance initialization.
+ this.readOnly = this._readOnly !== null ? this._readOnly : this.instance.readOnly;
+ this.subscribe(this.instance);
+ const undo = editor.undoManager;
+ if (this.data !== null) {
+ undo && undo.lock();
+ editor.setData(this.data, { callback: () => {
+ // Locking undoManager prevents 'change' event.
+ // Trigger it manually to updated bound data.
+ if (this.data !== editor.getData()) {
+ undo ? editor.fire('change') : editor.fire('dataReady');
+ }
+ undo && undo.unlock();
+ this.ngZone.run(() => {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ this.ready.emit(evt);
+ });
+ } });
+ }
+ else {
+ this.ngZone.run(() => {
+ if (typeof userInstanceReadyCallback === 'function') {
+ userInstanceReadyCallback(evt);
+ }
+ this.ready.emit(evt);
+ });
+ }
+ };
+ if (this.type === "inline" /* INLINE */) {
+ CKEDITOR.inline(element, config);
+ }
+ else {
+ CKEDITOR.replace(element, config);
+ }
+ }
+ subscribe(editor) {
+ editor.on('focus', evt => {
+ this.ngZone.run(() => {
+ this.focus.emit(evt);
+ });
+ });
+ editor.on('paste', evt => {
+ this.ngZone.run(() => {
+ this.paste.emit(evt);
+ });
+ });
+ editor.on('afterPaste', evt => {
+ this.ngZone.run(() => {
+ this.afterPaste.emit(evt);
+ });
+ });
+ editor.on('dragend', evt => {
+ this.ngZone.run(() => {
+ this.dragEnd.emit(evt);
+ });
+ });
+ editor.on('dragstart', evt => {
+ this.ngZone.run(() => {
+ this.dragStart.emit(evt);
+ });
+ });
+ editor.on('drop', evt => {
+ this.ngZone.run(() => {
+ this.drop.emit(evt);
+ });
+ });
+ editor.on('fileUploadRequest', evt => {
+ this.ngZone.run(() => {
+ this.fileUploadRequest.emit(evt);
+ });
+ });
+ editor.on('fileUploadResponse', evt => {
+ this.ngZone.run(() => {
+ this.fileUploadResponse.emit(evt);
+ });
+ });
+ editor.on('blur', evt => {
+ this.ngZone.run(() => {
+ if (this.onTouched) {
+ this.onTouched();
+ }
+ this.blur.emit(evt);
+ });
+ });
+ editor.on('dataReady', this.propagateChange, this);
+ if (this.instance.undoManager) {
+ editor.on('change', this.propagateChange, this);
+ }
+ // If 'undo' plugin is not loaded, listen to 'selectionCheck' event instead. (#54).
+ else {
+ editor.on('selectionCheck', this.propagateChange, this);
+ }
+ }
+ propagateChange(event) {
+ this.ngZone.run(() => {
+ const newData = this.instance.getData();
+ if (event.name === 'change') {
+ this.change.emit(event);
+ }
+ else if (event.name === 'dataReady') {
+ this.dataReady.emit(event);
+ }
+ if (newData === this.data) {
+ return;
+ }
+ this._data = newData;
+ this.dataChange.emit(newData);
+ if (this.onChange) {
+ this.onChange(newData);
+ }
+ });
+ }
+}
+CKEditorComponent.decorators = [
+ { type: Component, args: [{
+ selector: 'ckeditor',
+ template: '',
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => CKEditorComponent),
+ multi: true,
+ }
+ ]
+ },] }
+];
+CKEditorComponent.ctorParameters = () => [
+ { type: ElementRef },
+ { type: NgZone }
+];
+CKEditorComponent.propDecorators = {
+ config: [{ type: Input }],
+ editorUrl: [{ type: Input }],
+ tagName: [{ type: Input }],
+ type: [{ type: Input }],
+ data: [{ type: Input }],
+ readOnly: [{ type: Input }],
+ namespaceLoaded: [{ type: Output }],
+ ready: [{ type: Output }],
+ dataReady: [{ type: Output }],
+ change: [{ type: Output }],
+ dataChange: [{ type: Output }],
+ dragStart: [{ type: Output }],
+ dragEnd: [{ type: Output }],
+ drop: [{ type: Output }],
+ fileUploadResponse: [{ type: Output }],
+ fileUploadRequest: [{ type: Output }],
+ focus: [{ type: Output }],
+ paste: [{ type: Output }],
+ afterPaste: [{ type: Output }],
+ blur: [{ type: Output }]
+};
+
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/**
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+class CKEditorModule {
+}
+CKEditorModule.decorators = [
+ { type: NgModule, args: [{
+ imports: [FormsModule, CommonModule],
+ declarations: [CKEditorComponent],
+ exports: [CKEditorComponent]
+ },] }
+];
+
+/**
+ * Generated bundle index. Do not edit.
+ */
+
+export { CKEditorComponent, CKEditorModule };
+//# sourceMappingURL=ckeditor4-angular.js.map
diff --git a/dist/fesm2015/ckeditor4-angular.js.map b/dist/fesm2015/ckeditor4-angular.js.map
new file mode 100644
index 0000000..e4e9e0c
--- /dev/null
+++ b/dist/fesm2015/ckeditor4-angular.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ckeditor4-angular.js","sources":["../../src/ckeditor/ckeditor.component.ts","../../src/ckeditor/ckeditor.ts","../../src/ckeditor/ckeditor.module.ts","../../src/ckeditor/ckeditor4-angular.ts"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\nimport {\n\tComponent,\n\tNgZone,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tforwardRef,\n\tElementRef,\n\tAfterViewInit, OnDestroy\n} from '@angular/core';\n\nimport {\n\tControlValueAccessor,\n\tNG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport { getEditorNamespace } from 'ckeditor4-integrations-common';\n\nimport { CKEditor4 } from './ckeditor';\n\ndeclare let CKEDITOR: any;\n\n@Component( {\n\tselector: 'ckeditor',\n\ttemplate: '',\n\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef( () => CKEditorComponent ),\n\t\t\tmulti: true,\n\t\t}\n\t]\n} )\nexport class CKEditorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {\n\t/**\n\t * The configuration of the editor.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html\n\t * to learn more.\n\t */\n\t@Input() config?: CKEditor4.Config;\n\n\t/**\n\t * CKEditor 4 script url address. Script will be loaded only if CKEDITOR namespace is missing.\n\t *\n\t * Defaults to 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js'\n\t */\n\t@Input() editorUrl = 'https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js';\n\n\t/**\n\t * Tag name of the editor component.\n\t *\n\t * The default tag is `textarea`.\n\t */\n\t@Input() tagName = 'textarea';\n\n\t/**\n\t * The type of the editor interface.\n\t *\n\t * By default editor interface will be initialized as `classic` editor.\n\t * You can also choose to create an editor with `inline` interface type instead.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html\n\t * and https://ckeditor.com/docs/ckeditor4/latest/examples/fixedui.html\n\t * to learn more.\n\t */\n\t@Input() type: CKEditor4.EditorType = CKEditor4.EditorType.CLASSIC;\n\n\t/**\n\t * Keeps track of the editor's data.\n\t *\n\t * It's also decorated as an input which is useful when not using the ngModel.\n\t *\n\t * See https://angular.io/api/forms/NgModel to learn more.\n\t */\n\t@Input() set data( data: string ) {\n\t\tif ( data === this._data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.instance ) {\n\t\t\tthis.instance.setData( data );\n\t\t\t// Data may be changed by ACF.\n\t\t\tthis._data = this.instance.getData();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._data = data;\n\t}\n\n\tget data(): string {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * When set to `true`, the editor becomes read-only.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly\n\t * to learn more.\n\t */\n\t@Input() set readOnly( isReadOnly: boolean ) {\n\t\tif ( this.instance ) {\n\t\t\tthis.instance.setReadOnly( isReadOnly );\n\t\t\treturn;\n\t\t}\n\n\t\t// Delay setting read-only state until editor initialization.\n\t\tthis._readOnly = isReadOnly;\n\t}\n\n\tget readOnly(): boolean {\n\t\tif ( this.instance ) {\n\t\t\treturn this.instance.readOnly;\n\t\t}\n\n\t\treturn this._readOnly;\n\t}\n\n\t/**\n\t * Fired when the CKEDITOR https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html namespace\n\t * is loaded. It only triggers once, no matter how many CKEditor 4 components are initialised.\n\t * Can be used for convenient changes in the namespace, e.g. for adding external plugins.\n\t */\n\t@Output() namespaceLoaded = new EventEmitter();\n\n\t/**\n\t * Fires when the editor is ready. It corresponds with the `editor#instanceReady`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady\n\t * event.\n\t */\n\t@Output() ready = new EventEmitter();\n\n\t/**\n\t * Fires when the editor data is loaded, e.g. after calling setData()\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData\n\t * editor's method. It corresponds with the `editor#dataReady`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dataReady event.\n\t */\n\t@Output() dataReady = new EventEmitter();\n\n\t/**\n\t * Fires when the content of the editor has changed. It corresponds with the `editor#change`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change\n\t * event. For performance reasons this event may be called even when data didn't really changed.\n\t * Please note that this event will only be fired when `undo` plugin is loaded. If you need to\n\t * listen for editor changes (e.g. for two-way data binding), use `dataChange` event instead.\n\t */\n\t@Output() change = new EventEmitter();\n\n\t/**\n\t * Fires when the content of the editor has changed. In contrast to `change` - only emits when\n\t * data really changed thus can be successfully used with `[data]` and two way `[(data)]` binding.\n\t *\n\t * See more: https://angular.io/guide/template-syntax#two-way-binding---\n\t */\n\t@Output() dataChange = new EventEmitter();\n\n\t/**\n\t * Fires when the native dragStart event occurs. It corresponds with the `editor#dragstart`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart\n\t * event.\n\t */\n\t@Output() dragStart = new EventEmitter();\n\n\t/**\n\t * Fires when the native dragEnd event occurs. It corresponds with the `editor#dragend`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend\n\t * event.\n\t */\n\t@Output() dragEnd = new EventEmitter();\n\n\t/**\n\t * Fires when the native drop event occurs. It corresponds with the `editor#drop`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop\n\t * event.\n\t */\n\t@Output() drop = new EventEmitter();\n\n\t/**\n\t * Fires when the file loader response is received. It corresponds with the `editor#fileUploadResponse`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadResponse\n\t * event.\n\t */\n\t@Output() fileUploadResponse = new EventEmitter();\n\n\t/**\n\t * Fires when the file loader should send XHR. It corresponds with the `editor#fileUploadRequest`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-fileUploadRequest\n\t * event.\n\t */\n\t@Output() fileUploadRequest = new EventEmitter();\n\n\t/**\n\t * Fires when the editing area of the editor is focused. It corresponds with the `editor#focus`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-focus\n\t * event.\n\t */\n\t@Output() focus = new EventEmitter();\n\n\t/**\n\t * Fires after the user initiated a paste action, but before the data is inserted.\n\t * It corresponds with the `editor#paste`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste\n\t * event.\n\t */\n\t@Output() paste = new EventEmitter();\n\n\t/**\n\t * Fires after the `paste` event if content was modified. It corresponds with the `editor#afterPaste`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-afterPaste\n\t * event.\n\t */\n\t@Output() afterPaste = new EventEmitter();\n\n\t/**\n\t * Fires when the editing view of the editor is blurred. It corresponds with the `editor#blur`\n\t * https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur\n\t * event.\n\t */\n\t@Output() blur = new EventEmitter();\n\n\t/**\n\t * A callback executed when the content of the editor changes. Part of the\n\t * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.\n\t *\n\t * Note: Unset unless the component uses the `ngModel`.\n\t */\n\tonChange?: ( data: string ) => void;\n\n\t/**\n\t * A callback executed when the editor has been blurred. Part of the\n\t * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface.\n\t *\n\t * Note: Unset unless the component uses the `ngModel`.\n\t */\n\tonTouched?: () => void;\n\n\t/**\n\t * The instance of the editor created by this component.\n\t */\n\tinstance: any;\n\n\t/**\n\t * If the component is read–only before the editor instance is created, it remembers that state,\n\t * so the editor can become read–only once it is ready.\n\t */\n\tprivate _readOnly: boolean = null;\n\n\tprivate _data: string = null;\n\n\tprivate _destroyed: boolean = false;\n\n\tconstructor( private elementRef: ElementRef, private ngZone: NgZone ) {}\n\n\tngAfterViewInit(): void {\n\t\tgetEditorNamespace( this.editorUrl, namespace => {\n\t\t\tthis.namespaceLoaded.emit( namespace );\n\t\t} ).then( () => {\n\t\t\t// Check if component instance was destroyed before `ngAfterViewInit` call (#110).\n\t\t\t// Here, `this.instance` is still not initialized and so additional flag is needed.\n\t\t\tif ( this._destroyed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.ngZone.runOutsideAngular( this.createEditor.bind( this ) );\n\t\t} ).catch( window.console.error );\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed = true;\n\n\t\tthis.ngZone.runOutsideAngular( () => {\n\t\t\tif ( this.instance ) {\n\t\t\t\tthis.instance.destroy();\n\t\t\t\tthis.instance = null;\n\t\t\t}\n\t\t} );\n\t}\n\n\twriteValue( value: string ): void {\n\t\tthis.data = value;\n\t}\n\n\tregisterOnChange( callback: ( data: string ) => void ): void {\n\t\tthis.onChange = callback;\n\t}\n\n\tregisterOnTouched( callback: () => void ): void {\n\t\tthis.onTouched = callback;\n\t}\n\n\tprivate createEditor(): void {\n\t\tconst element = document.createElement( this.tagName );\n\t\tthis.elementRef.nativeElement.appendChild( element );\n\n\t\tconst userInstanceReadyCallback = this.config?.on?.instanceReady;\n\t\tconst defaultConfig: Partial = {\n\t\t\tdelayIfDetached: true\n\t\t};\n\t\tconst config: Partial = { ...defaultConfig, ...this.config };\n\n\t\tif ( typeof config.on === 'undefined' ) {\n\t\t\tconfig.on = {};\n\t\t}\n\n\t\tconfig.on.instanceReady = evt => {\n\t\t\tconst editor = evt.editor;\n\n\t\t\tthis.instance = editor;\n\n\t\t\t// Read only state may change during instance initialization.\n\t\t\tthis.readOnly = this._readOnly !== null ? this._readOnly : this.instance.readOnly;\n\n\t\t\tthis.subscribe( this.instance );\n\n\t\t\tconst undo = editor.undoManager;\n\n\t\t\tif ( this.data !== null ) {\n\t\t\t\tundo && undo.lock();\n\n\t\t\t\teditor.setData( this.data, { callback: () => {\n\t\t\t\t\t// Locking undoManager prevents 'change' event.\n\t\t\t\t\t// Trigger it manually to updated bound data.\n\t\t\t\t\tif ( this.data !== editor.getData() ) {\n\t\t\t\t\t\tundo ? editor.fire( 'change' ) : editor.fire( 'dataReady' );\n\t\t\t\t\t}\n\t\t\t\t\tundo && undo.unlock();\n\n\t\t\t\t\tthis.ngZone.run( () => {\n\t\t\t\t\t\tif ( typeof userInstanceReadyCallback === 'function' ) {\n\t\t\t\t\t\t\tuserInstanceReadyCallback( evt );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.ready.emit( evt );\n\t\t\t\t\t} );\n\t\t\t\t} } );\n\t\t\t} else {\n\t\t\t\tthis.ngZone.run( () => {\n\t\t\t\t\tif ( typeof userInstanceReadyCallback === 'function' ) {\n\t\t\t\t\t\tuserInstanceReadyCallback( evt );\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.ready.emit( evt );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tif ( this.type === CKEditor4.EditorType.INLINE ) {\n\t\t\tCKEDITOR.inline( element, config );\n\t\t} else {\n\t\t\tCKEDITOR.replace( element, config );\n\t\t}\n\t}\n\n\tprivate subscribe( editor: any ): void {\n\t\teditor.on( 'focus', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.focus.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'paste', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.paste.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'afterPaste', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.afterPaste.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'dragend', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.dragEnd.emit( evt );\n\t\t\t} );\n\t\t});\n\n\t\teditor.on( 'dragstart', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.dragStart.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'drop', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.drop.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'fileUploadRequest', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.fileUploadRequest.emit(evt);\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'fileUploadResponse', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tthis.fileUploadResponse.emit(evt);\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'blur', evt => {\n\t\t\tthis.ngZone.run( () => {\n\t\t\t\tif ( this.onTouched ) {\n\t\t\t\t\tthis.onTouched();\n\t\t\t\t}\n\n\t\t\t\tthis.blur.emit( evt );\n\t\t\t} );\n\t\t} );\n\n\t\teditor.on( 'dataReady', this.propagateChange, this );\n\n\t\tif ( this.instance.undoManager ) {\n\t\t\teditor.on( 'change', this.propagateChange, this );\n\t\t}\n\t\t// If 'undo' plugin is not loaded, listen to 'selectionCheck' event instead. (#54).\n\t\telse {\n\t\t\teditor.on( 'selectionCheck', this.propagateChange, this );\n\t\t}\n\t}\n\n\tprivate propagateChange( event: any ): void {\n\t\tthis.ngZone.run( () => {\n\t\t\tconst newData = this.instance.getData();\n\n\t\t\tif ( event.name === 'change' ) {\n\t\t\t\tthis.change.emit( event );\n\t\t\t} else if ( event.name === 'dataReady' ) {\n\t\t\t\tthis.dataReady.emit( event );\n\t\t\t}\n\n\t\t\tif ( newData === this.data ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._data = newData;\n\t\t\tthis.dataChange.emit( newData );\n\n\t\t\tif ( this.onChange ) {\n\t\t\t\tthis.onChange( newData );\n\t\t\t}\n\t\t} );\n\t}\n\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * Basic typings for the CKEditor4 elements.\n */\nexport namespace CKEditor4 {\n\t/**\n\t * The CKEditor4 editor constructor.\n\t */\n\texport interface Config {\n\t\t[ key: string ]: any;\n\t}\n\n\t/**\n\t * The CKEditor4 editor.\n\t */\n\texport interface Editor {\n\t\t[ key: string ]: any;\n\t}\n\n\t/**\n\t * The CKEditor4 editor interface type.\n\t * See https://ckeditor.com/docs/ckeditor4/latest/guide/dev_uitypes.html\n\t * to learn more.\n\t */\n\texport const enum EditorType {\n\t\tINLINE = 'inline',\n\t\tCLASSIC = 'classic'\n\t}\n\n\t/**\n\t * The event object passed to CKEditor4 event callbacks.\n\t *\n\t * See https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_eventInfo.html\n\t * to learn more.\n\t */\n\texport interface EventInfo {\n\t\treadonly name: string;\n\t\treadonly editor: any;\n\t\treadonly data: {\n\t\t\t[ key: string ]: any;\n\t\t};\n\t\treadonly listenerData: {\n\t\t\t[ key: string ]: any;\n\t\t};\n\t\treadonly sender: {\n\t\t\t[ key: string ]: any;\n\t\t};\n\n\t\tcancel(): void;\n\n\t\tremoveListener(): void;\n\n\t\tstop(): void;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { CKEditorComponent } from './ckeditor.component';\n\n@NgModule( {\n\timports: [ FormsModule, CommonModule ],\n\tdeclarations: [ CKEditorComponent ],\n\texports: [ CKEditorComponent ]\n} )\nexport class CKEditorModule {\n}\nexport * from './ckeditor';\nexport { CKEditorComponent } from './ckeditor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './ckeditor.module';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;MAoCU,iBAAiB,CAAA;IA2N7B,WAAqB,CAAA,UAAsB,EAAU,MAAc,EAAA;QAA9C,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAlNnE;;;;AAIG;QACM,IAAS,CAAA,SAAA,GAAG,0DAA0D,CAAC;AAEhF;;;;AAIG;QACM,IAAO,CAAA,OAAA,GAAG,UAAU,CAAC;AAE9B;;;;;;;;;AASG;AACM,QAAA,IAAA,CAAA,IAAI,GAAsD,SAAA,eAAA;AAoDnE;;;;AAIG;AACO,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAuB,CAAC;AAEpE;;;;AAIG;AACO,QAAA,IAAA,CAAA,KAAK,GAA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;;AAEG;;;;"}
\ No newline at end of file
diff --git a/dist/package.json b/dist/package.json
new file mode 100644
index 0000000..f520bf4
--- /dev/null
+++ b/dist/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "ckeditor4-angular",
+ "version": "3.1.1",
+ "description": "Official CKEditor 4 component for Angular.",
+ "keywords": [
+ "wysiwyg",
+ "rich text editor",
+ "rte",
+ "editor",
+ "html",
+ "contentEditable",
+ "editing",
+ "angular",
+ "angular5",
+ "ng",
+ "component",
+ "ckeditor",
+ "ckeditor4",
+ "ckeditor 4"
+ ],
+ "peerDependencies": {
+ "@angular/core": ">=5.0.0",
+ "@angular/common": ">=5.0.0",
+ "@angular/forms": ">=5.0.0"
+ },
+ "author": "CKSource (https://cksource.com/)",
+ "license": "(GPL-2.0-or-later OR LGPL-2.1-or-later OR MPL-1.1-or-later)",
+ "homepage": "https://ckeditor.com/",
+ "bugs": "https://github.com/ckeditor/ckeditor4-angular/issues",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ckeditor/ckeditor4-angular.git"
+ },
+ "dependencies": {
+ "ckeditor4-integrations-common": "^1.0.0",
+ "tslib": "^2.2.0"
+ },
+ "main": "bundles/ckeditor4-angular.umd.js",
+ "module": "fesm2015/ckeditor4-angular.js",
+ "es2015": "fesm2015/ckeditor4-angular.js",
+ "esm2015": "esm2015/ckeditor4-angular.js",
+ "fesm2015": "fesm2015/ckeditor4-angular.js",
+ "typings": "ckeditor4-angular.d.ts",
+ "metadata": "ckeditor4-angular.metadata.json",
+ "sideEffects": false
+}
diff --git a/package.json b/package.json
index 74e98c3..1178c5e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ckeditor4-angular",
- "version": "3.1.0",
+ "version": "3.1.1",
"description": "Official CKEditor 4 component for Angular.",
"scripts": {
"ng": "ng",