!function(e,n){"use strict";angular.module("ng.ckeditor",["ng"]).directive("ngCkeditor",function(){return CKEDITOR.on("instanceCreated",function(e){var n=e.editor,o=n.element;"simpleEditor"==o.getAttribute("class")&&n.on("configLoaded",function(){n.config.removePlugins="colorbutton,find,flash,font, forms,iframe,image,newpage,removeformat, smiley,specialchar,stylescombo,templates",n.removeButtons="About",n.config.toolbarGroups=[{name:"editing",groups:["basicstyles","links"]},{name:"undo"},{name:"clipboard",groups:["selection","clipboard"]}]})}),{restrict:"E",scope:{ngModel:"=ngModel",ngChange:"=ngChange",ngDisabled:"=ngDisabled",ngConfig:"=ngConfig"},link:function(e,n,o){n[0].innerHTML='
';var t=n[0].querySelectorAll(".ng-ckeditor"),i={removeButtons:void 0!=o.removeButtons?"About,"+o.removeButtons:"About",readOnly:!!e.ngDisabled&&e.ngDisabled};void 0!=o.removePlugins&&(i.removePlugins=o.removePlugins),void 0!=o.skin&&(i.skin=o.skin),void 0!=o.width&&(i.width=o.width),void 0!=o.height&&(i.height=o.height),void 0!=o.resizeEnabled&&(i.resize_enabled="false"!=o.resizeEnabled);var a=CKEDITOR.appendTo(t[0],e.ngConfig?e.ngConfig:i,""),g=function(n){n.on("change",function(n){e.$apply(function(){e.ngModel=n.editor.getData()}),void 0!=o.msnCount&&(element[0].querySelector(".totalTypedCharacters").innerHTML=o.msnCount+" "+n.editor.getData().length),e.ngChange&&"function"==typeof e.ngChange&&e.ngChange(n.editor.getData())}),n.on("focus",function(o){n.setData(e.ngModel)})},r=function(e,n){var o=void 0;o&&clearTimeout(o),o=setTimeout(function(){e&&n?n.setData(e):n&&n.setData("")},500)};g(a),e.$watch("ngModel",function(e){r(e,a)}),e.$watch("ngDisabled",function(n){n?i.readOnly=!0:i.readOnly=!1,a.destroy(),a=CKEDITOR.appendTo(t[0],e.ngConfig?e.ngConfig:i,""),g(a),a.setData(e.ngModel)})}}})}(window,document); //# sourceMappingURL=ng-ckeditor.min.js.map