1!function(a,b){ 2// AMD 3"function"==typeof define&&define.amd?define(["angular"],b):b(angular)}(this,function(a){/** 4 * CKEditor directive. 5 * 6 * @example 7 * <div ckeditor="options" ng-model="content" ready="onReady()"></div> 8 */ 9function b(a){return{restrict:"A",require:["ckeditor","ngModel"],controller:["$scope","$element","$attrs","$parse","$q",c],link:function(b,c,e,f){ 10// get needed controllers 11var g=f[0],h=f[1]; 12// Initialize the editor content when it is ready. 13g.ready().then(function(){ 14// Sync view on specific events. 15["dataReady","change","blur","saveSnapshot"].forEach(function(a){g.onCKEvent(a,function(){h.$setViewValue(g.instance.getData()||"")})}),g.instance.setReadOnly(!!e.readonly),e.$observe("readonly",function(a){g.instance.setReadOnly(!!a)}), 16// Defer the ready handler calling to ensure that the editor is 17// completely ready and populated with data. 18d(function(){a(e.ready)(b)})}), 19// Set editor data when view data change. 20h.$render=function(){g.ready().then(function(){g.instance.setData(h.$viewValue||"",{noSnapshot:!0,callback:function(){ 21//Amends the top of the undo stack with the current DOM changes 22g.instance.fire("updateSnapshot")}})})}}}}/** 23 * CKEditor controller. 24 */ 25function c(a,b,c,e,f){var g,h=e(c.ckeditor)(a)||{},i=b[0],j=f.defer();// a deferred to be resolved when the editor is ready 26// Create editor instance. 27g=i.hasAttribute("contenteditable")&&"true"==i.getAttribute("contenteditable").toLowerCase()?this.instance=CKEDITOR.inline(i,h):this.instance=CKEDITOR.replace(i,h),this.onCKEvent=function(b,c){function e(){var a=arguments;d(function(){f.apply(null,a)})}function f(){var b=arguments;a.$apply(function(){c.apply(null,b)})}return g.on(b,e),function(){g.removeListener(b,f)}},this.onCKEvent("instanceReady",function(){j.resolve(!0)}),this.ready=function(){return j.promise},a.$on("$destroy",function(){j.promise.then(function(){g.destroy(!1)})})}a.module("ckeditor",[]).directive("ckeditor",["$parse",b]); 28// Polyfill setImmediate function. 29var d=window&&window.setImmediate?window.setImmediate:function(a){setTimeout(a,0)}}); 30//# sourceMappingURL=angular-ckeditor.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.