Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ckeditor4-angular

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ckeditor4-angular - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0-beta

2

bundles/ckeditor4-angular.umd.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("load-script")):"function"==typeof define&&define.amd?define("ckeditor4-angular",["exports","@angular/common","@angular/core","@angular/forms","load-script"],e):e(t["ckeditor4-angular"]={},t.ng.common,t.ng.core,t.ng.forms,t.loadScript)}(this,function(t,e,n,i,r){"use strict";var o;r=r&&r.hasOwnProperty("default")?r["default"]:r;var a,u=function(){function t(t,e){this.elementRef=t,this.ngZone=e,this.tagName="textarea",this.type="divarea",this.ready=new n.EventEmitter,this.change=new n.EventEmitter,this.dataChange=new n.EventEmitter,this.focus=new n.EventEmitter,this.blur=new n.EventEmitter,this._readOnly=null,this._data=null,this.editorUrl="https://cdn.ckeditor.com/4.11.4/standard-all/ckeditor.js"}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){if(t!==this._data)return this.instance?(this.instance.setData(t),void(this._data=this.instance.getData())):void(this._data=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.instance?this.instance.readOnly:this._readOnly},set:function(t){this.instance?this.instance.setReadOnly(t):this._readOnly=t},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this;(function e(t){if(t.length<1)throw new TypeError("CKEditor URL must be a non-empty string.");return"CKEDITOR"in window?Promise.resolve(CKEDITOR):(o||(o=new Promise(function(e,n){r(t,function(t){t?n(t):(e(CKEDITOR),o=undefined)})})),o)})(this.editorUrl).then(function(){t.ngZone.runOutsideAngular(t.createEditor.bind(t))})["catch"](window.console.error)},t.prototype.ngOnDestroy=function(){var t=this;this.ngZone.runOutsideAngular(function(){t.instance&&(t.instance.destroy(),t.instance=null)})},t.prototype.writeValue=function(t){this.data=t},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.createEditor=function(){var t=this.createInitialElement();this.config=this.ensureDivareaPlugin(this.config||{});var i="inline"===this.type?CKEDITOR.inline(t,this.config):CKEDITOR.replace(t,this.config);i.once("instanceReady",function(t){var e=this;this.instance=i,this.wrapper.removeAttribute("style"),this.elementRef.nativeElement.appendChild(this.wrapper),this.readOnly=null!==this._readOnly?this._readOnly:this.instance.readOnly,this.subscribe(this.instance);var n=i.undoManager;null!==this.data&&(n&&n.lock(),i.setData(this.data),this.data!==i.getData()&&i.fire("change"),n&&n.unlock()),this.ngZone.run(function(){e.ready.emit(t)})},this)},t.prototype.subscribe=function(n){var i=this;n.on("focus",function(t){i.ngZone.run(function(){i.focus.emit(t)})}),n.on("blur",function(t){i.ngZone.run(function(){i.onTouched&&i.onTouched(),i.blur.emit(t)})}),n.on("change",function(e){i.ngZone.run(function(){var t=n.getData();i.change.emit(e),t!==i.data&&(i._data=t,i.dataChange.emit(t),i.onChange&&i.onChange(t))})})},t.prototype.ensureDivareaPlugin=function(t){var e=t.extraPlugins,n=t.removePlugins;return e=(e=this.removePlugin(e,"divarea")||"").concat("string"==typeof e?",divarea":"divarea"),n&&n.includes("divarea")&&(n=this.removePlugin(n,"divarea"),console.warn("[CKEDITOR] divarea plugin is required to initialize editor using Angular integration.")),Object.assign({},t,{extraPlugins:e,removePlugins:n})},t.prototype.removePlugin=function(t,e){if(!t)return null;var n="string"==typeof t;return n&&(t=t.split(",")),t=t.filter(function(t){return t!==e}),n&&(t=t.join(",")),t},t.prototype.createInitialElement=function(){this.wrapper=document.createElement("div");var t=document.createElement(this.tagName);return this.wrapper.setAttribute("style","display:none;"),document.body.appendChild(this.wrapper),this.wrapper.appendChild(t),t},t.decorators=[{type:n.Component,args:[{selector:"ckeditor",template:"<ng-template></ng-template>",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return t}),multi:!0}]}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},t.propDecorators={config:[{type:n.Input}],tagName:[{type:n.Input}],type:[{type:n.Input}],data:[{type:n.Input}],readOnly:[{type:n.Input}],ready:[{type:n.Output}],change:[{type:n.Output}],dataChange:[{type:n.Output}],focus:[{type:n.Output}],blur:[{type:n.Output}],editorUrl:[{type:n.Input}]},t}();(a=t.CKEditor4||(t.CKEditor4={})).Config=function c(){},a.EventInfo=function d(){};var s=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[i.FormsModule,e.CommonModule],declarations:[u],exports:[u]}]}],t}();t.CKEditorModule=s,t.CKEditorComponent=u,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("load-script")):"function"==typeof define&&define.amd?define("ckeditor4-angular",["exports","@angular/common","@angular/core","@angular/forms","load-script"],e):e(t["ckeditor4-angular"]={},t.ng.common,t.ng.core,t.ng.forms,t.loadScript)}(this,function(t,e,n,i,r){"use strict";var o;r=r&&r.hasOwnProperty("default")?r["default"]:r;var a,s=(Object.defineProperty(u.prototype,"data",{get:function(){return this._data},set:function(t){if(t!==this._data)return this.instance?(this.instance.setData(t),void(this._data=this.instance.getData())):void(this._data=t)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"readOnly",{get:function(){return this.instance?this.instance.readOnly:this._readOnly},set:function(t){this.instance?this.instance.setReadOnly(t):this._readOnly=t},enumerable:!0,configurable:!0}),u.prototype.ngAfterViewInit=function(){var t=this;(function e(t){if(t.length<1)throw new TypeError("CKEditor URL must be a non-empty string.");return"CKEDITOR"in window?Promise.resolve(CKEDITOR):(o||(o=new Promise(function(e,n){r(t,function(t){t?n(t):(e(CKEDITOR),o=undefined)})})),o)})(this.editorUrl).then(function(){t.ngZone.runOutsideAngular(t.createEditor.bind(t))})["catch"](window.console.error)},u.prototype.ngOnDestroy=function(){var t=this;this.ngZone.runOutsideAngular(function(){t.instance&&(t.instance.destroy(),t.instance=null)})},u.prototype.writeValue=function(t){this.data=t},u.prototype.registerOnChange=function(t){this.onChange=t},u.prototype.registerOnTouched=function(t){this.onTouched=t},u.prototype.createEditor=function(){var t=this.createInitialElement();this.config=this.ensureDivareaPlugin(this.config||{});var i="inline"===this.type?CKEDITOR.inline(t,this.config):CKEDITOR.replace(t,this.config);i.once("instanceReady",function(t){var e=this;this.instance=i,this.wrapper.removeAttribute("style"),this.elementRef.nativeElement.appendChild(this.wrapper),this.readOnly=null!==this._readOnly?this._readOnly:this.instance.readOnly,this.subscribe(this.instance);var n=i.undoManager;null!==this.data&&(n&&n.lock(),i.setData(this.data),this.data!==i.getData()&&i.fire("change"),n&&n.unlock()),this.ngZone.run(function(){e.ready.emit(t)})},this)},u.prototype.subscribe=function(n){var i=this;n.on("focus",function(t){i.ngZone.run(function(){i.focus.emit(t)})}),n.on("blur",function(t){i.ngZone.run(function(){i.onTouched&&i.onTouched(),i.blur.emit(t)})}),n.on("change",function(e){i.ngZone.run(function(){var t=n.getData();i.change.emit(e),t!==i.data&&(i._data=t,i.dataChange.emit(t),i.onChange&&i.onChange(t))})})},u.prototype.ensureDivareaPlugin=function(t){var e=t.extraPlugins,n=t.removePlugins;return e=(e=this.removePlugin(e,"divarea")||"").concat("string"==typeof e?",divarea":"divarea"),n&&n.includes("divarea")&&(n=this.removePlugin(n,"divarea"),console.warn("[CKEDITOR] divarea plugin is required to initialize editor using Angular integration.")),Object.assign({},t,{extraPlugins:e,removePlugins:n})},u.prototype.removePlugin=function(t,e){if(!t)return null;var n="string"==typeof t;return n&&(t=t.split(",")),t=t.filter(function(t){return t!==e}),n&&(t=t.join(",")),t},u.prototype.createInitialElement=function(){this.wrapper=document.createElement("div");var t=document.createElement(this.tagName);return this.wrapper.setAttribute("style","display:none;"),document.body.appendChild(this.wrapper),this.wrapper.appendChild(t),t},u.decorators=[{type:n.Component,args:[{selector:"ckeditor",template:"<ng-template></ng-template>",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return u}),multi:!0}]}]}],u.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},u.propDecorators={config:[{type:n.Input}],tagName:[{type:n.Input}],type:[{type:n.Input}],data:[{type:n.Input}],readOnly:[{type:n.Input}],ready:[{type:n.Output}],change:[{type:n.Output}],dataChange:[{type:n.Output}],focus:[{type:n.Output}],blur:[{type:n.Output}],editorUrl:[{type:n.Input}]},u);function u(t,e){this.elementRef=t,this.ngZone=e,this.tagName="textarea",this.type="divarea",this.ready=new n.EventEmitter,this.change=new n.EventEmitter,this.dataChange=new n.EventEmitter,this.focus=new n.EventEmitter,this.blur=new n.EventEmitter,this._readOnly=null,this._data=null,this.editorUrl="https://cdn.ckeditor.com/4.11.4/standard-all/ckeditor.js"}(a=t.CKEditor4||(t.CKEditor4={})).Config=function l(){},a.EventInfo=function p(){};var c=(d.decorators=[{type:n.NgModule,args:[{imports:[i.FormsModule,e.CommonModule],declarations:[s],exports:[s]}]}],d);function d(){}t.CKEditorModule=c,t.CKEditorComponent=s,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ckeditor4-angular.umd.min.js.map
{
"name": "ckeditor4-angular",
"version": "0.1.2",
"version": "1.0.0-beta",
"description": "Official Angular 2+ component for CKEditor 4.",

@@ -5,0 +5,0 @@ "keywords": [

# CKEditor 4 WYSIWYG editor Angular component
[![npm version](https://badge.fury.io/js/ckeditor4-angular.svg)](https://www.npmjs.com/package/ckeditor4-angular)
[![Build Status](https://travis-ci.org/ckeditor/ckeditor4-angular.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor4-angular)
<br>
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor4-angular/status.svg)](https://david-dm.org/ckeditor/ckeditor4-angular)
[![devDependency Status](https://david-dm.org/ckeditor/ckeditor4-angular/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor4-angular?type=dev)
The official [CKEditor 4](https://ckeditor.com/ckeditor-4/) WYSIWYG editor component for Angular.
This is the beta version (`1.0.0-beta`) of the CKEditor 4 Angular integration. 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)

@@ -6,0 +14,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc