ng2-ckeditor.umd.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms')) :
  3. typeof define === 'function' && define.amd ? define('ng2-ckeditor', ['exports', '@angular/core', '@angular/common', '@angular/forms'], factory) :
  4. (global = global || self, factory(global['ng2-ckeditor'] = {}, global.ng.core, global.ng.common, global.ng.forms));
  5. }(this, function (exports, core, common, forms) { 'use strict';
  6. /*! *****************************************************************************
  7. Copyright (c) Microsoft Corporation. All rights reserved.
  8. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  9. this file except in compliance with the License. You may obtain a copy of the
  10. License at http://www.apache.org/licenses/LICENSE-2.0
  11. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  12. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  13. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  14. MERCHANTABLITY OR NON-INFRINGEMENT.
  15. See the Apache Version 2.0 License for specific language governing permissions
  16. and limitations under the License.
  17. ***************************************************************************** */
  18. /* global Reflect, Promise */
  19. var extendStatics = function(d, b) {
  20. extendStatics = Object.setPrototypeOf ||
  21. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  22. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  23. return extendStatics(d, b);
  24. };
  25. function __extends(d, b) {
  26. extendStatics(d, b);
  27. function __() { this.constructor = d; }
  28. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  29. }
  30. var __assign = function() {
  31. __assign = Object.assign || function __assign(t) {
  32. for (var s, i = 1, n = arguments.length; i < n; i++) {
  33. s = arguments[i];
  34. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  35. }
  36. return t;
  37. };
  38. return __assign.apply(this, arguments);
  39. };
  40. function __rest(s, e) {
  41. var t = {};
  42. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  43. t[p] = s[p];
  44. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  45. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  46. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  47. t[p[i]] = s[p[i]];
  48. }
  49. return t;
  50. }
  51. function __decorate(decorators, target, key, desc) {
  52. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  53. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  54. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  55. return c > 3 && r && Object.defineProperty(target, key, r), r;
  56. }
  57. function __param(paramIndex, decorator) {
  58. return function (target, key) { decorator(target, key, paramIndex); }
  59. }
  60. function __metadata(metadataKey, metadataValue) {
  61. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  62. }
  63. function __awaiter(thisArg, _arguments, P, generator) {
  64. return new (P || (P = Promise))(function (resolve, reject) {
  65. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  66. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  67. function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
  68. step((generator = generator.apply(thisArg, _arguments || [])).next());
  69. });
  70. }
  71. function __generator(thisArg, body) {
  72. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  73. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  74. function verb(n) { return function (v) { return step([n, v]); }; }
  75. function step(op) {
  76. if (f) throw new TypeError("Generator is already executing.");
  77. while (_) try {
  78. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  79. if (y = 0, t) op = [op[0] & 2, t.value];
  80. switch (op[0]) {
  81. case 0: case 1: t = op; break;
  82. case 4: _.label++; return { value: op[1], done: false };
  83. case 5: _.label++; y = op[1]; op = [0]; continue;
  84. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  85. default:
  86. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  87. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  88. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  89. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  90. if (t[2]) _.ops.pop();
  91. _.trys.pop(); continue;
  92. }
  93. op = body.call(thisArg, _);
  94. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  95. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  96. }
  97. }
  98. function __exportStar(m, exports) {
  99. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  100. }
  101. function __values(o) {
  102. var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
  103. if (m) return m.call(o);
  104. return {
  105. next: function () {
  106. if (o && i >= o.length) o = void 0;
  107. return { value: o && o[i++], done: !o };
  108. }
  109. };
  110. }
  111. function __read(o, n) {
  112. var m = typeof Symbol === "function" && o[Symbol.iterator];
  113. if (!m) return o;
  114. var i = m.call(o), r, ar = [], e;
  115. try {
  116. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  117. }
  118. catch (error) { e = { error: error }; }
  119. finally {
  120. try {
  121. if (r && !r.done && (m = i["return"])) m.call(i);
  122. }
  123. finally { if (e) throw e.error; }
  124. }
  125. return ar;
  126. }
  127. function __spread() {
  128. for (var ar = [], i = 0; i < arguments.length; i++)
  129. ar = ar.concat(__read(arguments[i]));
  130. return ar;
  131. }
  132. function __spreadArrays() {
  133. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  134. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  135. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  136. r[k] = a[j];
  137. return r;
  138. };
  139. function __await(v) {
  140. return this instanceof __await ? (this.v = v, this) : new __await(v);
  141. }
  142. function __asyncGenerator(thisArg, _arguments, generator) {
  143. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  144. var g = generator.apply(thisArg, _arguments || []), i, q = [];
  145. return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
  146. function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
  147. function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
  148. function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
  149. function fulfill(value) { resume("next", value); }
  150. function reject(value) { resume("throw", value); }
  151. function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
  152. }
  153. function __asyncDelegator(o) {
  154. var i, p;
  155. return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
  156. function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
  157. }
  158. function __asyncValues(o) {
  159. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  160. var m = o[Symbol.asyncIterator], i;
  161. return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
  162. function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
  163. function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
  164. }
  165. function __makeTemplateObject(cooked, raw) {
  166. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  167. return cooked;
  168. };
  169. function __importStar(mod) {
  170. if (mod && mod.__esModule) return mod;
  171. var result = {};
  172. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  173. result.default = mod;
  174. return result;
  175. }
  176. function __importDefault(mod) {
  177. return (mod && mod.__esModule) ? mod : { default: mod };
  178. }
  179. /**
  180. * CKGroup component
  181. * Usage :
  182. * <ckeditor [(ngModel)]="data" [config]="{...}" debounce="500">
  183. * <ckbutton [name]="'SaveButton'" [command]="'saveCommand'" (click)="save($event)"
  184. * [icon]="'/save.png'" [toolbar]="'customGroup,1'" [label]="'Save'">
  185. * </ckbutton>
  186. * </ckeditor>
  187. */
  188. var CKButtonDirective = /** @class */ (function () {
  189. function CKButtonDirective() {
  190. this.click = new core.EventEmitter();
  191. }
  192. CKButtonDirective.prototype.initialize = function (editor) {
  193. var _this = this;
  194. editor.instance.addCommand(this.command, {
  195. exec: function (evt) {
  196. _this.click.emit(evt);
  197. },
  198. });
  199. editor.instance.ui.addButton(this.name, {
  200. label: this.label,
  201. command: this.command,
  202. toolbar: this.toolbar,
  203. icon: this.icon,
  204. });
  205. };
  206. CKButtonDirective.prototype.ngOnInit = function () {
  207. if (!this.name)
  208. throw new Error('Attribute "name" is required on <ckbutton>');
  209. if (!this.command)
  210. throw new Error('Attribute "command" is required on <ckbutton>');
  211. };
  212. __decorate([
  213. core.Output(),
  214. __metadata("design:type", Object)
  215. ], CKButtonDirective.prototype, "click", void 0);
  216. __decorate([
  217. core.Input(),
  218. __metadata("design:type", String)
  219. ], CKButtonDirective.prototype, "label", void 0);
  220. __decorate([
  221. core.Input(),
  222. __metadata("design:type", String)
  223. ], CKButtonDirective.prototype, "command", void 0);
  224. __decorate([
  225. core.Input(),
  226. __metadata("design:type", String)
  227. ], CKButtonDirective.prototype, "toolbar", void 0);
  228. __decorate([
  229. core.Input(),
  230. __metadata("design:type", String)
  231. ], CKButtonDirective.prototype, "name", void 0);
  232. __decorate([
  233. core.Input(),
  234. __metadata("design:type", String)
  235. ], CKButtonDirective.prototype, "icon", void 0);
  236. CKButtonDirective = __decorate([
  237. core.Directive({
  238. selector: 'ckbutton',
  239. })
  240. ], CKButtonDirective);
  241. return CKButtonDirective;
  242. }());
  243. /**
  244. * CKGroup component
  245. * Usage :
  246. * <ckeditor [(ngModel)]="data" [config]="{...}" debounce="500">
  247. * <ckgroup [name]="'exampleGroup2'" [previous]="'1'" [subgroupOf]="'exampleGroup1'">
  248. * .
  249. * .
  250. * </ckgroup>
  251. * </ckeditor>
  252. */
  253. var CKGroupDirective = /** @class */ (function () {
  254. function CKGroupDirective() {
  255. }
  256. CKGroupDirective.prototype.ngAfterContentInit = function () {
  257. var _this = this;
  258. // Reconfigure each button's toolbar property within ckgroup to hold its parent's name
  259. this.toolbarButtons.forEach(function (button) { return (button.toolbar = _this.name); });
  260. };
  261. CKGroupDirective.prototype.initialize = function (editor) {
  262. editor.instance.ui.addToolbarGroup(this.name, this.previous, this.subgroupOf);
  263. // Initialize each button within ckgroup
  264. this.toolbarButtons.forEach(function (button) {
  265. button.initialize(editor);
  266. });
  267. };
  268. __decorate([
  269. core.Input(),
  270. __metadata("design:type", String)
  271. ], CKGroupDirective.prototype, "name", void 0);
  272. __decorate([
  273. core.Input(),
  274. __metadata("design:type", Object)
  275. ], CKGroupDirective.prototype, "previous", void 0);
  276. __decorate([
  277. core.Input(),
  278. __metadata("design:type", String)
  279. ], CKGroupDirective.prototype, "subgroupOf", void 0);
  280. __decorate([
  281. core.ContentChildren(CKButtonDirective),
  282. __metadata("design:type", core.QueryList)
  283. ], CKGroupDirective.prototype, "toolbarButtons", void 0);
  284. CKGroupDirective = __decorate([
  285. core.Directive({
  286. selector: 'ckgroup',
  287. })
  288. ], CKGroupDirective);
  289. return CKGroupDirective;
  290. }());
  291. /**
  292. * CKEditor component
  293. * Usage :
  294. * <ckeditor [(ngModel)]="data" [config]="{...}" debounce="500"></ckeditor>
  295. */
  296. var CKEditorComponent = /** @class */ (function () {
  297. /**
  298. * Constructor
  299. */
  300. function CKEditorComponent(zone) {
  301. this.zone = zone;
  302. this.change = new core.EventEmitter();
  303. this.editorChange = new core.EventEmitter();
  304. this.ready = new core.EventEmitter();
  305. this.blur = new core.EventEmitter();
  306. this.focus = new core.EventEmitter();
  307. this.contentDom = new core.EventEmitter();
  308. this.fileUploadRequest = new core.EventEmitter();
  309. this.fileUploadResponse = new core.EventEmitter();
  310. this.paste = new core.EventEmitter();
  311. this.drop = new core.EventEmitter();
  312. this._value = '';
  313. }
  314. CKEditorComponent_1 = CKEditorComponent;
  315. Object.defineProperty(CKEditorComponent.prototype, "value", {
  316. get: function () {
  317. return this._value;
  318. },
  319. set: function (v) {
  320. if (v !== this._value) {
  321. this._value = v;
  322. this.onChange(v);
  323. }
  324. },
  325. enumerable: true,
  326. configurable: true
  327. });
  328. CKEditorComponent.prototype.ngOnChanges = function (changes) {
  329. if (changes.readonly && this.instance) {
  330. this.instance.setReadOnly(changes.readonly.currentValue);
  331. }
  332. };
  333. /**
  334. * On component destroy
  335. */
  336. CKEditorComponent.prototype.ngOnDestroy = function () {
  337. if (this.instance) {
  338. this.instance.removeAllListeners();
  339. CKEDITOR.instances[this.instance.name].destroy();
  340. this.instance.destroy();
  341. this.instance = null;
  342. }
  343. };
  344. /**
  345. * On component view init
  346. */
  347. CKEditorComponent.prototype.ngAfterViewInit = function () {
  348. this.ckeditorInit(this.config || {});
  349. };
  350. /**
  351. * On component view checked
  352. */
  353. CKEditorComponent.prototype.ngAfterViewChecked = function () {
  354. this.ckeditorInit(this.config || {});
  355. };
  356. /**
  357. * Value update process
  358. */
  359. CKEditorComponent.prototype.updateValue = function (value) {
  360. var _this = this;
  361. this.zone.run(function () {
  362. _this.value = value;
  363. _this.onChange(value);
  364. _this.onTouched();
  365. _this.change.emit(value);
  366. });
  367. };
  368. /**
  369. * CKEditor init
  370. */
  371. CKEditorComponent.prototype.ckeditorInit = function (config) {
  372. var _this = this;
  373. if (typeof CKEDITOR === 'undefined') {
  374. console.warn('CKEditor 4.x is missing (http://ckeditor.com/)');
  375. }
  376. else {
  377. // Check textarea exists
  378. if (this.instance || !this.documentContains(this.host.nativeElement)) {
  379. return;
  380. }
  381. if (this.readonly) {
  382. config.readOnly = this.readonly;
  383. }
  384. // CKEditor replace textarea
  385. this.instance = CKEDITOR.replace(this.host.nativeElement, config);
  386. // Set initial value
  387. this.instance.setData(this.value);
  388. // listen for instanceReady event
  389. this.instance.on('instanceReady', function (evt) {
  390. // if value has changed while instance loading
  391. // update instance with current component value
  392. if (_this.instance.getData() !== _this.value) {
  393. _this.instance.setData(_this.value);
  394. }
  395. // send the evt to the EventEmitter
  396. _this.ready.emit(evt);
  397. });
  398. // CKEditor change event
  399. this.instance.on('change', function (evt) {
  400. _this.onTouched();
  401. var value = _this.instance.getData();
  402. if (_this.value !== value) {
  403. // Debounce update
  404. if (_this.debounce) {
  405. if (_this.debounceTimeout)
  406. clearTimeout(_this.debounceTimeout);
  407. _this.debounceTimeout = setTimeout(function () {
  408. _this.updateValue(value);
  409. _this.debounceTimeout = null;
  410. }, parseInt(_this.debounce));
  411. // Live update
  412. }
  413. else {
  414. _this.updateValue(value);
  415. }
  416. }
  417. // Original ckeditor event dispatch
  418. _this.editorChange.emit(evt);
  419. });
  420. // CKEditor blur event
  421. this.instance.on('blur', function (evt) {
  422. _this.blur.emit(evt);
  423. });
  424. // CKEditor focus event
  425. this.instance.on('focus', function (evt) {
  426. _this.focus.emit(evt);
  427. });
  428. // CKEditor contentDom event
  429. this.instance.on('contentDom', function (evt) {
  430. _this.contentDom.emit(evt);
  431. });
  432. // CKEditor fileUploadRequest event
  433. this.instance.on('fileUploadRequest', function (evt) {
  434. _this.fileUploadRequest.emit(evt);
  435. });
  436. // CKEditor fileUploadResponse event
  437. this.instance.on('fileUploadResponse', function (evt) {
  438. _this.fileUploadResponse.emit(evt);
  439. });
  440. // CKEditor paste event
  441. this.instance.on('paste', function (evt) {
  442. _this.paste.emit(evt);
  443. });
  444. // CKEditor drop event
  445. this.instance.on('drop', function (evt) {
  446. _this.drop.emit(evt);
  447. });
  448. // Add Toolbar Groups to Editor. This will also add Buttons within groups.
  449. this.toolbarGroups.forEach(function (group) {
  450. group.initialize(_this);
  451. });
  452. // Add Toolbar Buttons to Editor.
  453. this.toolbarButtons.forEach(function (button) {
  454. button.initialize(_this);
  455. });
  456. }
  457. };
  458. /**
  459. * Implements ControlValueAccessor
  460. */
  461. CKEditorComponent.prototype.writeValue = function (value) {
  462. this._value = value;
  463. if (this.instance)
  464. this.instance.setData(value);
  465. };
  466. CKEditorComponent.prototype.onChange = function (_) { };
  467. CKEditorComponent.prototype.onTouched = function () { };
  468. CKEditorComponent.prototype.registerOnChange = function (fn) {
  469. this.onChange = fn;
  470. };
  471. CKEditorComponent.prototype.registerOnTouched = function (fn) {
  472. this.onTouched = fn;
  473. };
  474. CKEditorComponent.prototype.documentContains = function (node) {
  475. return document.contains ? document.contains(node) : document.body.contains(node);
  476. };
  477. var CKEditorComponent_1;
  478. CKEditorComponent.ctorParameters = function () { return [
  479. { type: core.NgZone }
  480. ]; };
  481. __decorate([
  482. core.Input(),
  483. __metadata("design:type", Object)
  484. ], CKEditorComponent.prototype, "config", void 0);
  485. __decorate([
  486. core.Input(),
  487. __metadata("design:type", Boolean)
  488. ], CKEditorComponent.prototype, "readonly", void 0);
  489. __decorate([
  490. core.Input(),
  491. __metadata("design:type", String)
  492. ], CKEditorComponent.prototype, "debounce", void 0);
  493. __decorate([
  494. core.Output(),
  495. __metadata("design:type", Object)
  496. ], CKEditorComponent.prototype, "change", void 0);
  497. __decorate([
  498. core.Output(),
  499. __metadata("design:type", Object)
  500. ], CKEditorComponent.prototype, "editorChange", void 0);
  501. __decorate([
  502. core.Output(),
  503. __metadata("design:type", Object)
  504. ], CKEditorComponent.prototype, "ready", void 0);
  505. __decorate([
  506. core.Output(),
  507. __metadata("design:type", Object)
  508. ], CKEditorComponent.prototype, "blur", void 0);
  509. __decorate([
  510. core.Output(),
  511. __metadata("design:type", Object)
  512. ], CKEditorComponent.prototype, "focus", void 0);
  513. __decorate([
  514. core.Output(),
  515. __metadata("design:type", Object)
  516. ], CKEditorComponent.prototype, "contentDom", void 0);
  517. __decorate([
  518. core.Output(),
  519. __metadata("design:type", Object)
  520. ], CKEditorComponent.prototype, "fileUploadRequest", void 0);
  521. __decorate([
  522. core.Output(),
  523. __metadata("design:type", Object)
  524. ], CKEditorComponent.prototype, "fileUploadResponse", void 0);
  525. __decorate([
  526. core.Output(),
  527. __metadata("design:type", Object)
  528. ], CKEditorComponent.prototype, "paste", void 0);
  529. __decorate([
  530. core.Output(),
  531. __metadata("design:type", Object)
  532. ], CKEditorComponent.prototype, "drop", void 0);
  533. __decorate([
  534. core.ViewChild('host', { static: false }),
  535. __metadata("design:type", Object)
  536. ], CKEditorComponent.prototype, "host", void 0);
  537. __decorate([
  538. core.ContentChildren(CKButtonDirective),
  539. __metadata("design:type", core.QueryList)
  540. ], CKEditorComponent.prototype, "toolbarButtons", void 0);
  541. __decorate([
  542. core.ContentChildren(CKGroupDirective),
  543. __metadata("design:type", core.QueryList)
  544. ], CKEditorComponent.prototype, "toolbarGroups", void 0);
  545. __decorate([
  546. core.Input(),
  547. __metadata("design:type", Object),
  548. __metadata("design:paramtypes", [Object])
  549. ], CKEditorComponent.prototype, "value", null);
  550. CKEditorComponent = CKEditorComponent_1 = __decorate([
  551. core.Component({
  552. selector: 'ckeditor',
  553. providers: [
  554. {
  555. provide: forms.NG_VALUE_ACCESSOR,
  556. useExisting: core.forwardRef(function () { return CKEditorComponent_1; }),
  557. multi: true,
  558. },
  559. ],
  560. template: "\n <textarea #host></textarea>\n "
  561. }),
  562. __metadata("design:paramtypes", [core.NgZone])
  563. ], CKEditorComponent);
  564. return CKEditorComponent;
  565. }());
  566. /**
  567. * CKEditorModule
  568. */
  569. var CKEditorModule = /** @class */ (function () {
  570. function CKEditorModule() {
  571. }
  572. CKEditorModule = __decorate([
  573. core.NgModule({
  574. imports: [common.CommonModule],
  575. declarations: [CKEditorComponent, CKButtonDirective, CKGroupDirective],
  576. exports: [CKEditorComponent, CKButtonDirective, CKGroupDirective],
  577. })
  578. ], CKEditorModule);
  579. return CKEditorModule;
  580. }());
  581. exports.CKEditorModule = CKEditorModule;
  582. exports.ɵa = CKEditorComponent;
  583. exports.ɵb = CKButtonDirective;
  584. exports.ɵc = CKGroupDirective;
  585. Object.defineProperty(exports, '__esModule', { value: true });
  586. }));
  587. //# sourceMappingURL=ng2-ckeditor.umd.js.map