@kolkov/angular-editor 3.0.0-beta.2 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/README.md +15 -10
  3. package/assets/icons/icons.svg +2 -2
  4. package/fesm2022/kolkov-angular-editor.mjs +1360 -0
  5. package/fesm2022/kolkov-angular-editor.mjs.map +1 -0
  6. package/index.d.ts +412 -0
  7. package/package.json +10 -16
  8. package/themes/default.scss +22 -22
  9. package/esm2020/kolkov-angular-editor.mjs +0 -5
  10. package/esm2020/lib/ae-button/ae-button.component.mjs +0 -21
  11. package/esm2020/lib/ae-select/ae-select.component.mjs +0 -185
  12. package/esm2020/lib/ae-toolbar/ae-toolbar.component.mjs +0 -365
  13. package/esm2020/lib/ae-toolbar-set/ae-toolbar-set.component.mjs +0 -15
  14. package/esm2020/lib/angular-editor.module.mjs +0 -27
  15. package/esm2020/lib/angular-editor.service.mjs +0 -275
  16. package/esm2020/lib/config.mjs +0 -36
  17. package/esm2020/lib/editor/angular-editor.component.mjs +0 -415
  18. package/esm2020/lib/utils.mjs +0 -4
  19. package/esm2020/public-api.mjs +0 -11
  20. package/fesm2015/kolkov-angular-editor.mjs +0 -1325
  21. package/fesm2015/kolkov-angular-editor.mjs.map +0 -1
  22. package/fesm2020/kolkov-angular-editor.mjs +0 -1319
  23. package/fesm2020/kolkov-angular-editor.mjs.map +0 -1
  24. package/kolkov-angular-editor.d.ts +0 -5
  25. package/lib/ae-button/ae-button.component.d.ts +0 -7
  26. package/lib/ae-select/ae-select.component.d.ts +0 -46
  27. package/lib/ae-toolbar/ae-toolbar.component.d.ts +0 -97
  28. package/lib/ae-toolbar-set/ae-toolbar-set.component.d.ts +0 -6
  29. package/lib/angular-editor.module.d.ts +0 -13
  30. package/lib/angular-editor.service.d.ts +0 -87
  31. package/lib/config.d.ts +0 -39
  32. package/lib/editor/angular-editor.component.d.ts +0 -133
  33. package/lib/utils.d.ts +0 -1
  34. package/public-api.d.ts +0 -8
@@ -1,1325 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Inject, Component, Input, EventEmitter, forwardRef, HostBinding, Output, ViewChild, HostListener, SecurityContext, Attribute, ContentChild, NgModule } from '@angular/core';
3
- import * as i1$1 from '@angular/common';
4
- import { DOCUMENT, CommonModule } from '@angular/common';
5
- import * as i1 from '@angular/common/http';
6
- import * as i6 from '@angular/forms';
7
- import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import * as i2 from '@angular/platform-browser';
9
-
10
- class AngularEditorService {
11
- constructor(http, doc) {
12
- this.http = http;
13
- this.doc = doc;
14
- /**
15
- * save selection when the editor is focussed out
16
- */
17
- this.saveSelection = () => {
18
- if (this.doc.getSelection) {
19
- const sel = this.doc.getSelection();
20
- if (sel.getRangeAt && sel.rangeCount) {
21
- this.savedSelection = sel.getRangeAt(0);
22
- this.selectedText = sel.toString();
23
- }
24
- }
25
- else if (this.doc.getSelection && this.doc.createRange) {
26
- this.savedSelection = document.createRange();
27
- }
28
- else {
29
- this.savedSelection = null;
30
- }
31
- };
32
- }
33
- /**
34
- * Executed command from editor header buttons exclude toggleEditorMode
35
- * @param command string from triggerCommand
36
- * @param value
37
- */
38
- executeCommand(command, value) {
39
- const commands = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'pre'];
40
- if (commands.includes(command)) {
41
- this.doc.execCommand('formatBlock', false, command);
42
- return;
43
- }
44
- this.doc.execCommand(command, false, value);
45
- }
46
- /**
47
- * Create URL link
48
- * @param url string from UI prompt
49
- */
50
- createLink(url) {
51
- if (!url.includes('http')) {
52
- this.doc.execCommand('createlink', false, url);
53
- }
54
- else {
55
- const newUrl = '<a href="' + url + '" target="_blank">' + this.selectedText + '</a>';
56
- this.insertHtml(newUrl);
57
- }
58
- }
59
- /**
60
- * insert color either font or background
61
- *
62
- * @param color color to be inserted
63
- * @param where where the color has to be inserted either text/background
64
- */
65
- insertColor(color, where) {
66
- const restored = this.restoreSelection();
67
- if (restored) {
68
- if (where === 'textColor') {
69
- this.doc.execCommand('foreColor', false, color);
70
- }
71
- else {
72
- this.doc.execCommand('hiliteColor', false, color);
73
- }
74
- }
75
- }
76
- /**
77
- * Set font name
78
- * @param fontName string
79
- */
80
- setFontName(fontName) {
81
- this.doc.execCommand('fontName', false, fontName);
82
- }
83
- /**
84
- * Set font size
85
- * @param fontSize string
86
- */
87
- setFontSize(fontSize) {
88
- this.doc.execCommand('fontSize', false, fontSize);
89
- }
90
- /**
91
- * Create raw HTML
92
- * @param html HTML string
93
- */
94
- insertHtml(html) {
95
- const isHTMLInserted = this.doc.execCommand('insertHTML', false, html);
96
- if (!isHTMLInserted) {
97
- throw new Error('Unable to perform the operation');
98
- }
99
- }
100
- /**
101
- * restore selection when the editor is focused in
102
- *
103
- * saved selection when the editor is focused out
104
- */
105
- restoreSelection() {
106
- if (this.savedSelection) {
107
- if (this.doc.getSelection) {
108
- const sel = this.doc.getSelection();
109
- sel.removeAllRanges();
110
- sel.addRange(this.savedSelection);
111
- return true;
112
- }
113
- else if (this.doc.getSelection /*&& this.savedSelection.select*/) {
114
- // this.savedSelection.select();
115
- return true;
116
- }
117
- }
118
- else {
119
- return false;
120
- }
121
- }
122
- /**
123
- * setTimeout used for execute 'saveSelection' method in next event loop iteration
124
- */
125
- executeInNextQueueIteration(callbackFn, timeout = 1e2) {
126
- setTimeout(callbackFn, timeout);
127
- }
128
- /** check any selection is made or not */
129
- checkSelection() {
130
- const selectedText = this.savedSelection.toString();
131
- if (selectedText.length === 0) {
132
- throw new Error('No Selection Made');
133
- }
134
- return true;
135
- }
136
- /**
137
- * Upload file to uploadUrl
138
- * @param file The file
139
- */
140
- uploadImage(file) {
141
- const uploadData = new FormData();
142
- uploadData.append('file', file, file.name);
143
- return this.http.post(this.uploadUrl, uploadData, {
144
- reportProgress: true,
145
- observe: 'events',
146
- withCredentials: this.uploadWithCredentials,
147
- });
148
- }
149
- /**
150
- * Insert image with Url
151
- * @param imageUrl The imageUrl.
152
- */
153
- insertImage(imageUrl) {
154
- this.doc.execCommand('insertImage', false, imageUrl);
155
- }
156
- setDefaultParagraphSeparator(separator) {
157
- this.doc.execCommand('defaultParagraphSeparator', false, separator);
158
- }
159
- createCustomClass(customClass) {
160
- let newTag = this.selectedText;
161
- if (customClass) {
162
- const tagName = customClass.tag ? customClass.tag : 'span';
163
- newTag = '<' + tagName + ' class="' + customClass.class + '">' + this.selectedText + '</' + tagName + '>';
164
- }
165
- this.insertHtml(newTag);
166
- }
167
- insertVideo(videoUrl) {
168
- if (videoUrl.match('www.youtube.com')) {
169
- this.insertYouTubeVideoTag(videoUrl);
170
- }
171
- if (videoUrl.match('vimeo.com')) {
172
- this.insertVimeoVideoTag(videoUrl);
173
- }
174
- }
175
- insertYouTubeVideoTag(videoUrl) {
176
- const id = videoUrl.split('v=')[1];
177
- const imageUrl = `https://img.youtube.com/vi/${id}/0.jpg`;
178
- const thumbnail = `
179
- <div style='position: relative'>
180
- <a href='${videoUrl}' target='_blank'>
181
- <img src="${imageUrl}" alt="click to watch"/>
182
- <img style='position: absolute; left:200px; top:140px'
183
- src="https://img.icons8.com/color/96/000000/youtube-play.png"/>
184
- </a>
185
- </div>`;
186
- this.insertHtml(thumbnail);
187
- }
188
- insertVimeoVideoTag(videoUrl) {
189
- const sub = this.http.get(`https://vimeo.com/api/oembed.json?url=${videoUrl}`).subscribe(data => {
190
- const imageUrl = data.thumbnail_url_with_play_button;
191
- const thumbnail = `<div>
192
- <a href='${videoUrl}' target='_blank'>
193
- <img src="${imageUrl}" alt="${data.title}"/>
194
- </a>
195
- </div>`;
196
- this.insertHtml(thumbnail);
197
- sub.unsubscribe();
198
- });
199
- }
200
- nextNode(node) {
201
- if (node.hasChildNodes()) {
202
- return node.firstChild;
203
- }
204
- else {
205
- while (node && !node.nextSibling) {
206
- node = node.parentNode;
207
- }
208
- if (!node) {
209
- return null;
210
- }
211
- return node.nextSibling;
212
- }
213
- }
214
- getRangeSelectedNodes(range, includePartiallySelectedContainers) {
215
- let node = range.startContainer;
216
- const endNode = range.endContainer;
217
- let rangeNodes = [];
218
- // Special case for a range that is contained within a single node
219
- if (node === endNode) {
220
- rangeNodes = [node];
221
- }
222
- else {
223
- // Iterate nodes until we hit the end container
224
- while (node && node !== endNode) {
225
- rangeNodes.push(node = this.nextNode(node));
226
- }
227
- // Add partially selected nodes at the start of the range
228
- node = range.startContainer;
229
- while (node && node !== range.commonAncestorContainer) {
230
- rangeNodes.unshift(node);
231
- node = node.parentNode;
232
- }
233
- }
234
- // Add ancestors of the range container, if required
235
- if (includePartiallySelectedContainers) {
236
- node = range.commonAncestorContainer;
237
- while (node) {
238
- rangeNodes.push(node);
239
- node = node.parentNode;
240
- }
241
- }
242
- return rangeNodes;
243
- }
244
- getSelectedNodes() {
245
- const nodes = [];
246
- if (this.doc.getSelection) {
247
- const sel = this.doc.getSelection();
248
- for (let i = 0, len = sel.rangeCount; i < len; ++i) {
249
- nodes.push.apply(nodes, this.getRangeSelectedNodes(sel.getRangeAt(i), true));
250
- }
251
- }
252
- return nodes;
253
- }
254
- replaceWithOwnChildren(el) {
255
- const parent = el.parentNode;
256
- while (el.hasChildNodes()) {
257
- parent.insertBefore(el.firstChild, el);
258
- }
259
- parent.removeChild(el);
260
- }
261
- removeSelectedElements(tagNames) {
262
- const tagNamesArray = tagNames.toLowerCase().split(',');
263
- this.getSelectedNodes().forEach((node) => {
264
- if (node.nodeType === 1 &&
265
- tagNamesArray.indexOf(node.tagName.toLowerCase()) > -1) {
266
- // Remove the node and replace it with its children
267
- this.replaceWithOwnChildren(node);
268
- }
269
- });
270
- }
271
- }
272
- AngularEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorService, deps: [{ token: i1.HttpClient }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
273
- AngularEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorService });
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorService, decorators: [{
275
- type: Injectable
276
- }], ctorParameters: function () {
277
- return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
278
- type: Inject,
279
- args: [DOCUMENT]
280
- }] }];
281
- } });
282
-
283
- const angularEditorConfig = {
284
- editable: true,
285
- spellcheck: true,
286
- height: 'auto',
287
- minHeight: '0',
288
- maxHeight: 'auto',
289
- width: 'auto',
290
- minWidth: '0',
291
- translate: 'yes',
292
- enableToolbar: true,
293
- showToolbar: true,
294
- placeholder: 'Enter text here...',
295
- defaultParagraphSeparator: '',
296
- defaultFontName: '',
297
- defaultFontSize: '',
298
- fonts: [
299
- { class: 'arial', name: 'Arial' },
300
- { class: 'times-new-roman', name: 'Times New Roman' },
301
- { class: 'calibri', name: 'Calibri' },
302
- { class: 'comic-sans-ms', name: 'Comic Sans MS' }
303
- ],
304
- uploadUrl: 'v1/image',
305
- uploadWithCredentials: false,
306
- sanitize: true,
307
- toolbarPosition: 'top',
308
- outline: true,
309
- /*toolbarHiddenButtons: [
310
- ['bold', 'italic', 'underline', 'strikeThrough', 'superscript', 'subscript'],
311
- ['heading', 'fontName', 'fontSize', 'color'],
312
- ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],
313
- ['cut', 'copy', 'delete', 'removeFormat', 'undo', 'redo'],
314
- ['paragraph', 'blockquote', 'removeBlockquote', 'horizontalLine', 'orderedList', 'unorderedList'],
315
- ['link', 'unlink', 'image', 'video']
316
- ]*/
317
- };
318
-
319
- function isDefined(value) {
320
- return value !== undefined && value !== null;
321
- }
322
-
323
- class AeToolbarSetComponent {
324
- constructor() {
325
- }
326
- }
327
- AeToolbarSetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeToolbarSetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
328
- AeToolbarSetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AeToolbarSetComponent, selector: "ae-toolbar-set, [aeToolbarSet]", host: { classAttribute: "angular-editor-toolbar-set" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["a{cursor:pointer}:host.angular-editor-toolbar-set{display:flex;gap:1px;width:fit-content;vertical-align:baseline}\n"] });
329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeToolbarSetComponent, decorators: [{
330
- type: Component,
331
- args: [{ selector: 'ae-toolbar-set, [aeToolbarSet]', host: {
332
- 'class': 'angular-editor-toolbar-set'
333
- }, template: "<ng-content></ng-content>\n", styles: ["a{cursor:pointer}:host.angular-editor-toolbar-set{display:flex;gap:1px;width:fit-content;vertical-align:baseline}\n"] }]
334
- }], ctorParameters: function () { return []; } });
335
-
336
- class AeButtonComponent {
337
- constructor() {
338
- this.iconName = '';
339
- }
340
- }
341
- AeButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
342
- AeButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AeButtonComponent, selector: "ae-button, button[aeButton]", inputs: { iconName: "iconName" }, host: { properties: { "tabIndex": "-1", "type": "\"button\"" }, classAttribute: "angular-editor-button" }, ngImport: i0, template: "<ng-container *ngIf=\"iconName; else contentTemplate\">\n <svg>\n <use [attr.href]=\"'assets/ae-icons/icons.svg#' + iconName\" [attr.xlink:href]=\"'assets/ae-icons/icons.svg#' + iconName\"></use>\n </svg>\n</ng-container>\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: ["a{cursor:pointer}:host.angular-editor-button{background-color:var(--ae-button-bg-color, white);vertical-align:middle;border:var(--ae-button-border, 1px solid #ddd);border-radius:var(--ae-button-radius, 4px);padding:.4rem;float:left;width:2rem;height:2rem}:host.angular-editor-button svg{width:100%;height:100%}:host.angular-editor-button:hover{cursor:pointer;background-color:var(--ae-button-hover-bg-color, #f1f1f1);transition:.2s ease}:host.angular-editor-button:focus,:host.angular-editor-button.focus{outline:0}:host.angular-editor-button:disabled{background-color:var(--ae-button-disabled-bg-color, #f5f5f5);pointer-events:none;cursor:not-allowed}:host.angular-editor-button:disabled>.color-label{pointer-events:none;cursor:not-allowed}:host.angular-editor-button:disabled>.color-label.foreground :after{background:#555555}:host.angular-editor-button:disabled>.color-label.background{background:#555555}:host.angular-editor-button.active{background:var(--ae-button-active-bg-color, #fffbd3)}:host.angular-editor-button.active:hover{background-color:var(--ae-button-active-hover-bg-color, #fffaad)}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeButtonComponent, decorators: [{
344
- type: Component,
345
- args: [{ selector: 'ae-button, button[aeButton]', host: {
346
- 'class': 'angular-editor-button',
347
- '[tabIndex]': '-1',
348
- '[type]': '"button"',
349
- }, template: "<ng-container *ngIf=\"iconName; else contentTemplate\">\n <svg>\n <use [attr.href]=\"'assets/ae-icons/icons.svg#' + iconName\" [attr.xlink:href]=\"'assets/ae-icons/icons.svg#' + iconName\"></use>\n </svg>\n</ng-container>\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: ["a{cursor:pointer}:host.angular-editor-button{background-color:var(--ae-button-bg-color, white);vertical-align:middle;border:var(--ae-button-border, 1px solid #ddd);border-radius:var(--ae-button-radius, 4px);padding:.4rem;float:left;width:2rem;height:2rem}:host.angular-editor-button svg{width:100%;height:100%}:host.angular-editor-button:hover{cursor:pointer;background-color:var(--ae-button-hover-bg-color, #f1f1f1);transition:.2s ease}:host.angular-editor-button:focus,:host.angular-editor-button.focus{outline:0}:host.angular-editor-button:disabled{background-color:var(--ae-button-disabled-bg-color, #f5f5f5);pointer-events:none;cursor:not-allowed}:host.angular-editor-button:disabled>.color-label{pointer-events:none;cursor:not-allowed}:host.angular-editor-button:disabled>.color-label.foreground :after{background:#555555}:host.angular-editor-button:disabled>.color-label.background{background:#555555}:host.angular-editor-button.active{background:var(--ae-button-active-bg-color, #fffbd3)}:host.angular-editor-button.active:hover{background-color:var(--ae-button-active-hover-bg-color, #fffaad)}\n"] }]
350
- }], ctorParameters: function () { return []; }, propDecorators: { iconName: [{
351
- type: Input
352
- }] } });
353
-
354
- class AeSelectComponent {
355
- constructor(elRef, r) {
356
- this.elRef = elRef;
357
- this.r = r;
358
- this.options = [];
359
- this.disabled = false;
360
- this.optionId = 0;
361
- this.opened = false;
362
- this.hidden = 'inline-block';
363
- // eslint-disable-next-line @angular-eslint/no-output-native, @angular-eslint/no-output-rename
364
- this.changeEvent = new EventEmitter();
365
- this.onChange = () => {
366
- };
367
- this.onTouched = () => {
368
- };
369
- }
370
- get label() {
371
- return this.selectedOption && this.selectedOption.hasOwnProperty('label') ? this.selectedOption.label : 'Select';
372
- }
373
- get value() {
374
- return this.selectedOption.value;
375
- }
376
- ngOnInit() {
377
- this.selectedOption = this.options[0];
378
- if (isDefined(this.isHidden) && this.isHidden) {
379
- this.hide();
380
- }
381
- }
382
- hide() {
383
- this.hidden = 'none';
384
- }
385
- optionSelect(option, event) {
386
- event.stopPropagation();
387
- this.setValue(option.value);
388
- this.onChange(this.selectedOption.value);
389
- this.changeEvent.emit(this.selectedOption.value);
390
- this.onTouched();
391
- this.opened = false;
392
- }
393
- toggleOpen(event) {
394
- // event.stopPropagation();
395
- if (this.disabled) {
396
- return;
397
- }
398
- this.opened = !this.opened;
399
- }
400
- onClick($event) {
401
- if (!this.elRef.nativeElement.contains($event.target)) {
402
- this.close();
403
- }
404
- }
405
- close() {
406
- this.opened = false;
407
- }
408
- get isOpen() {
409
- return this.opened;
410
- }
411
- writeValue(value) {
412
- if (!value || typeof value !== 'string') {
413
- return;
414
- }
415
- this.setValue(value);
416
- }
417
- setValue(value) {
418
- let index = 0;
419
- const selectedEl = this.options.find((el, i) => {
420
- index = i;
421
- return el.value === value;
422
- });
423
- if (selectedEl) {
424
- this.selectedOption = selectedEl;
425
- this.optionId = index;
426
- }
427
- }
428
- registerOnChange(fn) {
429
- this.onChange = fn;
430
- }
431
- registerOnTouched(fn) {
432
- this.onTouched = fn;
433
- }
434
- setDisabledState(isDisabled) {
435
- this.labelButton.nativeElement.disabled = isDisabled;
436
- const div = this.labelButton.nativeElement;
437
- const action = isDisabled ? 'addClass' : 'removeClass';
438
- this.r[action](div, 'disabled');
439
- this.disabled = isDisabled;
440
- }
441
- handleKeyDown($event) {
442
- if (!this.opened) {
443
- return;
444
- }
445
- // console.log($event.key);
446
- // if (KeyCode[$event.key]) {
447
- switch ($event.key) {
448
- case 'ArrowDown':
449
- this._handleArrowDown($event);
450
- break;
451
- case 'ArrowUp':
452
- this._handleArrowUp($event);
453
- break;
454
- case 'Space':
455
- this._handleSpace($event);
456
- break;
457
- case 'Enter':
458
- this._handleEnter($event);
459
- break;
460
- case 'Tab':
461
- this._handleTab($event);
462
- break;
463
- case 'Escape':
464
- this.close();
465
- $event.preventDefault();
466
- break;
467
- case 'Backspace':
468
- this._handleBackspace();
469
- break;
470
- }
471
- // } else if ($event.key && $event.key.length === 1) {
472
- // this._keyPress$.next($event.key.toLocaleLowerCase());
473
- // }
474
- }
475
- _handleArrowDown($event) {
476
- if (this.optionId < this.options.length - 1) {
477
- this.optionId++;
478
- }
479
- }
480
- _handleArrowUp($event) {
481
- if (this.optionId >= 1) {
482
- this.optionId--;
483
- }
484
- }
485
- _handleSpace($event) {
486
- }
487
- _handleEnter($event) {
488
- this.optionSelect(this.options[this.optionId], $event);
489
- }
490
- _handleTab($event) {
491
- }
492
- _handleBackspace() {
493
- }
494
- }
495
- AeSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
496
- AeSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AeSelectComponent, selector: "ae-select", inputs: { options: "options", isHidden: ["hidden", "isHidden"] }, outputs: { changeEvent: "change" }, host: { listeners: { "document:click": "onClick($event)", "keydown": "handleKeyDown($event)" }, properties: { "style.display": "this.hidden" } }, providers: [
497
- {
498
- provide: NG_VALUE_ACCESSOR,
499
- useExisting: forwardRef(() => AeSelectComponent),
500
- multi: true,
501
- }
502
- ], viewQueries: [{ propertyName: "labelButton", first: true, predicate: ["labelButton"], descendants: true, static: true }], ngImport: i0, template: "<span class=\"ae-picker\" [ngClass]=\"{'ae-expanded':isOpen}\">\n <button [tabIndex]=\"-1\" #labelButton tabindex=\"-1\" type=\"button\" role=\"button\" class=\"ae-picker-label\" (click)=\"toggleOpen($event);\">{{label}}\n <svg>\n <use [attr.href]=\"'assets/ae-icons/icons.svg#sort'\" [attr.xlink:href]=\"'assets/ae-icons/icons.svg#sort'\"></use>\n </svg>\n </button>\n <span class=\"ae-picker-options\">\n <button tabindex=\"-1\" type=\"button\" role=\"button\" class=\"ae-picker-item\"\n *ngFor=\"let item of options; let i = index\"\n [ngClass]=\"{'selected': item.value === value, 'focused': i === optionId}\"\n (click)=\"optionSelect(item, $event)\">\n {{item.label}}\n </button>\n <span class=\"dropdown-item\" *ngIf=\"!options.length\">No items for select</span>\n </span>\n</span>\n", styles: ["a{cursor:pointer}svg{width:100%;height:100%}.ae-picker{color:var(--ae-picker-color, #444);display:inline-block;float:left;width:100%;position:relative;vertical-align:middle}.ae-picker-label{cursor:pointer;display:inline-block;padding-left:8px;padding-right:10px;position:relative;width:100%;line-height:1.8rem;vertical-align:middle;font-size:85%;text-align:left;background-color:var(--ae-picker-label-color, white);min-width:2rem;float:left;border:1px solid #ddd;border-radius:var(--ae-button-radius, 4px);text-overflow:clip;overflow:hidden;white-space:nowrap;height:2rem}.ae-picker-label:before{content:\"\";position:absolute;right:0;top:0;width:20px;height:100%;background:linear-gradient(to right,var(--ae-picker-label-color, white),var(--ae-picker-label-color, white) 100%)}.ae-picker-label:focus{outline:none}.ae-picker-label:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.ae-picker-label:hover:before{background:linear-gradient(to right,#f5f5f5 100%,#ffffff 100%)}.ae-picker-label:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.ae-picker-label:disabled:before{background:linear-gradient(to right,#f5f5f5 100%,#ffffff 100%)}.ae-picker-label svg{position:absolute;right:0;width:1rem}.ae-picker-label svg:not(:root){overflow:hidden}.ae-picker-label svg .ae-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ae-picker-options{background-color:var(--ae-picker-option-bg-color, #fff);display:none;min-width:100%;position:absolute;white-space:nowrap;z-index:3;border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ae-picker-options .ae-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px;padding-left:5px;z-index:3;text-align:left;background-color:transparent;min-width:2rem;width:100%;border:0 solid #ddd}.ae-picker-options .ae-picker-item.selected{color:#06c;background-color:var(--ae-picker-option-active-bg-color, #fff4c2)}.ae-picker-options .ae-picker-item.focused{background-color:var(--ae-picker-option-focused-bg-color, #fbf9b0)}.ae-picker-options .ae-picker-item:hover{background-color:var(--ae-picker-option-hover-bg-color, #fffa98)}.ae-expanded{display:block;margin-top:-1px;z-index:1}.ae-expanded .ae-picker-label{color:#ccc;z-index:2}.ae-expanded .ae-picker-label svg{color:#ccc;z-index:2}.ae-expanded .ae-picker-label svg .ae-stroke{stroke:#ccc}.ae-expanded .ae-picker-options{display:flex;flex-direction:column;margin-top:-1px;top:100%;z-index:3;border-color:#ccc}\n"], directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeSelectComponent, decorators: [{
504
- type: Component,
505
- args: [{ selector: 'ae-select', providers: [
506
- {
507
- provide: NG_VALUE_ACCESSOR,
508
- useExisting: forwardRef(() => AeSelectComponent),
509
- multi: true,
510
- }
511
- ], template: "<span class=\"ae-picker\" [ngClass]=\"{'ae-expanded':isOpen}\">\n <button [tabIndex]=\"-1\" #labelButton tabindex=\"-1\" type=\"button\" role=\"button\" class=\"ae-picker-label\" (click)=\"toggleOpen($event);\">{{label}}\n <svg>\n <use [attr.href]=\"'assets/ae-icons/icons.svg#sort'\" [attr.xlink:href]=\"'assets/ae-icons/icons.svg#sort'\"></use>\n </svg>\n </button>\n <span class=\"ae-picker-options\">\n <button tabindex=\"-1\" type=\"button\" role=\"button\" class=\"ae-picker-item\"\n *ngFor=\"let item of options; let i = index\"\n [ngClass]=\"{'selected': item.value === value, 'focused': i === optionId}\"\n (click)=\"optionSelect(item, $event)\">\n {{item.label}}\n </button>\n <span class=\"dropdown-item\" *ngIf=\"!options.length\">No items for select</span>\n </span>\n</span>\n", styles: ["a{cursor:pointer}svg{width:100%;height:100%}.ae-picker{color:var(--ae-picker-color, #444);display:inline-block;float:left;width:100%;position:relative;vertical-align:middle}.ae-picker-label{cursor:pointer;display:inline-block;padding-left:8px;padding-right:10px;position:relative;width:100%;line-height:1.8rem;vertical-align:middle;font-size:85%;text-align:left;background-color:var(--ae-picker-label-color, white);min-width:2rem;float:left;border:1px solid #ddd;border-radius:var(--ae-button-radius, 4px);text-overflow:clip;overflow:hidden;white-space:nowrap;height:2rem}.ae-picker-label:before{content:\"\";position:absolute;right:0;top:0;width:20px;height:100%;background:linear-gradient(to right,var(--ae-picker-label-color, white),var(--ae-picker-label-color, white) 100%)}.ae-picker-label:focus{outline:none}.ae-picker-label:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.ae-picker-label:hover:before{background:linear-gradient(to right,#f5f5f5 100%,#ffffff 100%)}.ae-picker-label:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.ae-picker-label:disabled:before{background:linear-gradient(to right,#f5f5f5 100%,#ffffff 100%)}.ae-picker-label svg{position:absolute;right:0;width:1rem}.ae-picker-label svg:not(:root){overflow:hidden}.ae-picker-label svg .ae-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ae-picker-options{background-color:var(--ae-picker-option-bg-color, #fff);display:none;min-width:100%;position:absolute;white-space:nowrap;z-index:3;border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ae-picker-options .ae-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px;padding-left:5px;z-index:3;text-align:left;background-color:transparent;min-width:2rem;width:100%;border:0 solid #ddd}.ae-picker-options .ae-picker-item.selected{color:#06c;background-color:var(--ae-picker-option-active-bg-color, #fff4c2)}.ae-picker-options .ae-picker-item.focused{background-color:var(--ae-picker-option-focused-bg-color, #fbf9b0)}.ae-picker-options .ae-picker-item:hover{background-color:var(--ae-picker-option-hover-bg-color, #fffa98)}.ae-expanded{display:block;margin-top:-1px;z-index:1}.ae-expanded .ae-picker-label{color:#ccc;z-index:2}.ae-expanded .ae-picker-label svg{color:#ccc;z-index:2}.ae-expanded .ae-picker-label svg .ae-stroke{stroke:#ccc}.ae-expanded .ae-picker-options{display:flex;flex-direction:column;margin-top:-1px;top:100%;z-index:3;border-color:#ccc}\n"] }]
512
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { options: [{
513
- type: Input
514
- }], isHidden: [{
515
- type: Input,
516
- args: ['hidden']
517
- }], hidden: [{
518
- type: HostBinding,
519
- args: ['style.display']
520
- }], changeEvent: [{
521
- type: Output,
522
- args: ['change']
523
- }], labelButton: [{
524
- type: ViewChild,
525
- args: ['labelButton', { static: true }]
526
- }], onClick: [{
527
- type: HostListener,
528
- args: ['document:click', ['$event']]
529
- }], handleKeyDown: [{
530
- type: HostListener,
531
- args: ['keydown', ['$event']]
532
- }] } });
533
-
534
- class AeToolbarComponent {
535
- constructor(r, editorService, er, doc) {
536
- this.r = r;
537
- this.editorService = editorService;
538
- this.er = er;
539
- this.doc = doc;
540
- this.htmlMode = false;
541
- this.linkSelected = false;
542
- this.block = 'default';
543
- this.fontName = 'Times New Roman';
544
- this.fontSize = '3';
545
- this.headings = [
546
- {
547
- label: 'Heading 1',
548
- value: 'h1',
549
- },
550
- {
551
- label: 'Heading 2',
552
- value: 'h2',
553
- },
554
- {
555
- label: 'Heading 3',
556
- value: 'h3',
557
- },
558
- {
559
- label: 'Heading 4',
560
- value: 'h4',
561
- },
562
- {
563
- label: 'Heading 5',
564
- value: 'h5',
565
- },
566
- {
567
- label: 'Heading 6',
568
- value: 'h6',
569
- },
570
- {
571
- label: 'Heading 7',
572
- value: 'h7',
573
- },
574
- {
575
- label: 'Paragraph',
576
- value: 'p',
577
- },
578
- {
579
- label: 'Predefined',
580
- value: 'pre'
581
- },
582
- {
583
- label: 'Standard',
584
- value: 'div'
585
- },
586
- {
587
- label: 'default',
588
- value: 'default'
589
- }
590
- ];
591
- this.fontSizes = [
592
- {
593
- label: '1',
594
- value: '1',
595
- },
596
- {
597
- label: '2',
598
- value: '2',
599
- },
600
- {
601
- label: '3',
602
- value: '3',
603
- },
604
- {
605
- label: '4',
606
- value: '4',
607
- },
608
- {
609
- label: '5',
610
- value: '5',
611
- },
612
- {
613
- label: '6',
614
- value: '6',
615
- },
616
- {
617
- label: '7',
618
- value: '7',
619
- }
620
- ];
621
- this.customClassId = '-1';
622
- this.customClassList = [{ label: '', value: '' }];
623
- // uploadUrl: string;
624
- this.tagMap = {
625
- BLOCKQUOTE: 'indent',
626
- A: 'link'
627
- };
628
- this.select = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P', 'PRE', 'DIV'];
629
- this.buttons = ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'justifyLeft', 'justifyCenter',
630
- 'justifyRight', 'justifyFull', 'indent', 'outdent', 'insertUnorderedList', 'insertOrderedList', 'link'];
631
- this.fonts = [{ label: '', value: '' }];
632
- this.execute = new EventEmitter();
633
- }
634
- set customClasses(classes) {
635
- if (classes) {
636
- this._customClasses = classes;
637
- this.customClassList = this._customClasses.map((x, i) => ({ label: x.name, value: i.toString() }));
638
- this.customClassList.unshift({ label: 'Clear Class', value: '-1' });
639
- }
640
- }
641
- set defaultFontName(value) {
642
- if (value) {
643
- this.fontName = value;
644
- }
645
- }
646
- set defaultFontSize(value) {
647
- if (value) {
648
- this.fontSize = value;
649
- }
650
- }
651
- get isLinkButtonDisabled() {
652
- return this.htmlMode || !Boolean(this.editorService.selectedText);
653
- }
654
- /**
655
- * Trigger command from editor header buttons
656
- * @param command string from toolbar buttons
657
- */
658
- triggerCommand(command) {
659
- this.execute.emit(command);
660
- }
661
- /**
662
- * highlight editor buttons when cursor moved or positioning
663
- */
664
- triggerButtons() {
665
- if (!this.showToolbar) {
666
- return;
667
- }
668
- this.buttons.forEach(e => {
669
- const result = this.doc.queryCommandState(e);
670
- const elementById = this.doc.getElementById(e + '-' + this.id);
671
- if (result) {
672
- this.r.addClass(elementById, 'active');
673
- }
674
- else {
675
- this.r.removeClass(elementById, 'active');
676
- }
677
- });
678
- }
679
- /**
680
- * trigger highlight editor buttons when cursor moved or positioning in block
681
- */
682
- triggerBlocks(nodes) {
683
- if (!this.showToolbar) {
684
- return;
685
- }
686
- this.linkSelected = nodes.findIndex(x => x.nodeName === 'A') > -1;
687
- let found = false;
688
- this.select.forEach(y => {
689
- const node = nodes.find(x => x.nodeName === y);
690
- if (node !== undefined && y === node.nodeName) {
691
- if (found === false) {
692
- this.block = node.nodeName.toLowerCase();
693
- found = true;
694
- }
695
- }
696
- else if (found === false) {
697
- this.block = 'default';
698
- }
699
- });
700
- found = false;
701
- if (this._customClasses) {
702
- this._customClasses.forEach((y, index) => {
703
- const node = nodes.find(x => {
704
- if (x instanceof Element) {
705
- return x.className === y.class;
706
- }
707
- });
708
- if (node !== undefined) {
709
- if (found === false) {
710
- this.customClassId = index.toString();
711
- found = true;
712
- }
713
- }
714
- else if (found === false) {
715
- this.customClassId = '-1';
716
- }
717
- });
718
- }
719
- Object.keys(this.tagMap).map(e => {
720
- const elementById = this.doc.getElementById(this.tagMap[e] + '-' + this.id);
721
- const node = nodes.find(x => x.nodeName === e);
722
- if (node !== undefined && e === node.nodeName) {
723
- this.r.addClass(elementById, 'active');
724
- }
725
- else {
726
- this.r.removeClass(elementById, 'active');
727
- }
728
- });
729
- this.foreColour = this.doc.queryCommandValue('ForeColor');
730
- this.fontSize = this.doc.queryCommandValue('FontSize');
731
- this.fontName = this.doc.queryCommandValue('FontName').replace(/"/g, '');
732
- this.backColor = this.doc.queryCommandValue('backColor');
733
- }
734
- /**
735
- * insert URL link
736
- */
737
- insertUrl() {
738
- let url = 'https:\/\/';
739
- const selection = this.editorService.savedSelection;
740
- if (selection && selection.commonAncestorContainer.parentElement.nodeName === 'A') {
741
- const parent = selection.commonAncestorContainer.parentElement;
742
- if (parent.href !== '') {
743
- url = parent.href;
744
- }
745
- }
746
- url = prompt('Insert URL link', url);
747
- if (url && url !== '' && url !== 'https://') {
748
- this.editorService.createLink(url);
749
- }
750
- }
751
- /**
752
- * insert Video link
753
- */
754
- insertVideo() {
755
- this.execute.emit('');
756
- const url = prompt('Insert Video link', `https://`);
757
- if (url && url !== '' && url !== `https://`) {
758
- this.editorService.insertVideo(url);
759
- }
760
- }
761
- /** insert color */
762
- insertColor(color, where) {
763
- this.editorService.insertColor(color, where);
764
- this.execute.emit('');
765
- }
766
- /**
767
- * set font Name/family
768
- * @param foreColor string
769
- */
770
- setFontName(foreColor) {
771
- this.editorService.setFontName(foreColor);
772
- this.execute.emit('');
773
- }
774
- /**
775
- * set font Size
776
- * @param fontSize string
777
- */
778
- setFontSize(fontSize) {
779
- this.editorService.setFontSize(fontSize);
780
- this.execute.emit('');
781
- }
782
- /**
783
- * toggle editor mode (WYSIWYG or SOURCE)
784
- * @param m boolean
785
- */
786
- setEditorMode(m) {
787
- const toggleEditorModeButton = this.doc.getElementById('toggleEditorMode' + '-' + this.id);
788
- if (m) {
789
- this.r.addClass(toggleEditorModeButton, 'active');
790
- }
791
- else {
792
- this.r.removeClass(toggleEditorModeButton, 'active');
793
- }
794
- this.htmlMode = m;
795
- }
796
- /**
797
- * Upload image when file is selected.
798
- */
799
- onFileChanged(event) {
800
- const file = event.target.files[0];
801
- if (file.type.includes('image/')) {
802
- if (this.upload) {
803
- this.upload(file).subscribe((response) => this.watchUploadImage(response, event));
804
- }
805
- else if (this.uploadUrl) {
806
- this.editorService.uploadImage(file).subscribe((response) => this.watchUploadImage(response, event));
807
- }
808
- else {
809
- const reader = new FileReader();
810
- reader.onload = (e) => {
811
- const fr = e.currentTarget;
812
- this.editorService.insertImage(fr.result.toString());
813
- };
814
- reader.readAsDataURL(file);
815
- }
816
- }
817
- }
818
- watchUploadImage(response, event) {
819
- const { imageUrl } = response.body;
820
- this.editorService.insertImage(imageUrl);
821
- event.srcElement.value = null;
822
- }
823
- /**
824
- * Set custom class
825
- */
826
- setCustomClass(classId) {
827
- if (classId === '-1') {
828
- this.execute.emit('clear');
829
- }
830
- else {
831
- this.editorService.createCustomClass(this._customClasses[+classId]);
832
- }
833
- }
834
- isButtonHidden(name) {
835
- if (!name) {
836
- return false;
837
- }
838
- if (!(this.hiddenButtons instanceof Array)) {
839
- return false;
840
- }
841
- let result;
842
- for (const arr of this.hiddenButtons) {
843
- if (arr instanceof Array) {
844
- result = arr.find(item => item === name);
845
- }
846
- if (result) {
847
- break;
848
- }
849
- }
850
- return result !== undefined;
851
- }
852
- focus() {
853
- this.execute.emit('focus');
854
- console.log('focused');
855
- }
856
- }
857
- AeToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeToolbarComponent, deps: [{ token: i0.Renderer2 }, { token: AngularEditorService }, { token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
858
- AeToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AeToolbarComponent, selector: "angular-editor-toolbar, ae-toolbar, div[aeToolbar]", inputs: { id: "id", uploadUrl: "uploadUrl", upload: "upload", showToolbar: "showToolbar", fonts: "fonts", customClasses: "customClasses", defaultFontName: "defaultFontName", defaultFontSize: "defaultFontSize", hiddenButtons: "hiddenButtons" }, outputs: { execute: "execute" }, viewQueries: [{ propertyName: "myInputFile", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"angular-editor-toolbar\" *ngIf=\"showToolbar\">\n <div aeToolbarSet>\n <button aeButton title=\"Undo\" iconName=\"undo\" (click)=\"triggerCommand('undo')\" [hidden]=\"isButtonHidden('undo')\">\n </button>\n <button aeButton title=\"Redo\" iconName=\"redo\" (click)=\"triggerCommand('redo')\"\n [hidden]=\"isButtonHidden('redo')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'bold-'+id\" aeButton title=\"Bold\" iconName=\"bold\" (click)=\"triggerCommand('bold')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('bold')\">\n </button>\n <button [id]=\"'italic-'+id\" aeButton iconName=\"italic\" title=\"Italic\" (click)=\"triggerCommand('italic')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('italic')\">\n </button>\n <button [id]=\"'underline-'+id\" aeButton title=\"Underline\" iconName=\"underline\"\n (click)=\"triggerCommand('underline')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('underline')\">\n </button>\n <button [id]=\"'strikeThrough-'+id\" aeButton iconName=\"strikeThrough\" title=\"Strikethrough\"\n (click)=\"triggerCommand('strikeThrough')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('strikeThrough')\">\n </button>\n <button [id]=\"'subscript-'+id\" aeButton title=\"Subscript\" iconName=\"subscript\"\n (click)=\"triggerCommand('subscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('subscript')\">\n </button>\n <button [id]=\"'superscript-'+id\" aeButton iconName=\"superscript\" title=\"Superscript\"\n (click)=\"triggerCommand('superscript')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('superscript')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'justifyLeft-'+id\" aeButton iconName=\"justifyLeft\" title=\"Justify Left\"\n (click)=\"triggerCommand('justifyLeft')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyLeft')\">\n </button>\n <button [id]=\"'justifyCenter-'+id\" aeButton iconName=\"justifyCenter\" title=\"Justify Center\"\n (click)=\"triggerCommand('justifyCenter')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyCenter')\">\n </button>\n <button [id]=\"'justifyRight-'+id\" aeButton iconName=\"justifyRight\" title=\"Justify Right\"\n (click)=\"triggerCommand('justifyRight')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyRight')\">\n </button>\n <button [id]=\"'justifyFull-'+id\" aeButton iconName=\"justifyFull\" title=\"Justify Full\"\n (click)=\"triggerCommand('justifyFull')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyFull')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'indent-'+id\" aeButton iconName=\"indent\" title=\"Indent\"\n (click)=\"triggerCommand('indent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('indent')\">\n </button>\n <button [id]=\"'outdent-'+id\" aeButton iconName=\"outdent\" title=\"Outdent\"\n (click)=\"triggerCommand('outdent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('outdent')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'insertUnorderedList-'+id\" aeButton iconName=\"unorderedList\" title=\"Unordered List\"\n (click)=\"triggerCommand('insertUnorderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertUnorderedList')\">\n </button>\n <button [id]=\"'insertOrderedList-'+id\" aeButton iconName=\"orderedList\" title=\"Ordered List\"\n (click)=\"triggerCommand('insertOrderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertOrderedList')\">\n </button>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-heading\" [options]=\"headings\"\n [(ngModel)]=\"block\"\n (change)=\"triggerCommand(block)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('heading')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-font\" [options]=\"fonts\"\n [(ngModel)]=\"fontName\"\n (change)=\"setFontName(fontName)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontName')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-font-size\" [options]=\"fontSizes\"\n [(ngModel)]=\"fontSize\"\n (change)=\"setFontSize(fontSize)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontSize')\"\n tabindex=\"-1\">\n </ae-select>\n </div>\n <div aeToolbarSet>\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(fgInput.value, 'textColor')\"\n #fgInput>\n <button [id]=\"'foregroundColorPicker-'+id\" aeButton iconName=\"textColor\"\n (click)=\"focus(); ; fgInput.click()\"\n title=\"Text Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('textColor')\">\n </button>\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(bgInput.value, 'backgroundColor')\"\n #bgInput>\n <button [id]=\"'backgroundColorPicker-'+id\" aeButton iconName=\"backgroundColor\"\n (click)=\"focus(); ; bgInput.click()\"\n title=\"Background Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('backgroundColor')\">\n </button>\n </div>\n <div *ngIf=\"_customClasses\" aeToolbarSet>\n <ae-select class=\"select-custom-style\" [options]=\"customClassList\"\n [(ngModel)]=\"customClassId\"\n (change)=\"setCustomClass(customClassId)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('customClasses')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'link-'+id\" aeButton iconName=\"link\" (click)=\"insertUrl()\"\n title=\"Insert Link\" [disabled]=\"isLinkButtonDisabled\" [hidden]=\"isButtonHidden('link')\">\n </button>\n <button [id]=\"'unlink-'+id\" aeButton iconName=\"unlink\" (click)=\"triggerCommand('unlink')\"\n title=\"Unlink\" [disabled]=\"htmlMode || !linkSelected\" [hidden]=\"isButtonHidden('unlink')\">\n </button>\n <input\n style=\"display: none\"\n accept=\"image/*\"\n type=\"file\" (change)=\"onFileChanged($event)\"\n #fileInput>\n <button [id]=\"'insertImage-'+id\" aeButton iconName=\"image\" (click)=\"focus(); fileInput.click()\"\n title=\"Insert Image\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertImage')\">\n </button>\n <button [id]=\"'insertVideo-'+id\" aeButton iconName=\"video\"\n (click)=\"insertVideo()\" title=\"Insert Video\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertVideo')\">\n </button>\n <button [id]=\"'insertHorizontalRule-'+id\" aeButton iconName=\"horizontalLine\" title=\"Horizontal Line\"\n (click)=\"triggerCommand('insertHorizontalRule')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertHorizontalRule')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'clearFormatting-'+id\" aeButton iconName=\"removeFormat\" title=\"Clear Formatting\"\n class=\"angular-editor-button\"\n (click)=\"triggerCommand('removeFormat')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('removeFormat')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'toggleEditorMode-'+id\" aeButton iconName=\"htmlCode\" title=\"HTML Code\"\n (click)=\"triggerCommand('toggleEditorMode')\" [hidden]=\"isButtonHidden('toggleEditorMode')\">\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: ["a{cursor:pointer}.angular-editor-toolbar{font:100 14px/15px Roboto,Arial,sans-serif;background-color:var(--ae-toolbar-bg-color, #f5f5f5);font-size:.8rem;padding:var(--ae-toolbar-padding, .2rem);border:var(--ae-toolbar-border-radius, 1px solid #ddd);display:flex;flex-wrap:wrap;gap:4px}.select-heading{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-heading optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-heading option{border:1px solid;background-color:#fff}.select-heading .default{font-size:16px}.select-heading .h1{font-size:24px}.select-heading .h2{font-size:20px}.select-heading .h3{font-size:16px}.select-heading .h4{font-size:15px}.select-heading .h5{font-size:14px}.select-heading .h6{font-size:13px}.select-heading .div,.select-heading .pre{font-size:12px}}.select-heading:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-heading:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-font{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-font optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-font option{border:1px solid;background-color:#fff}}.select-font:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-font:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-font-size{display:inline-block;width:50px}@supports not (-moz-appearance: none){.select-font-size optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-font-size option{border:1px solid;background-color:#fff}.select-font-size .size1{font-size:10px}.select-font-size .size2{font-size:12px}.select-font-size .size3{font-size:14px}.select-font-size .size4{font-size:16px}.select-font-size .size5{font-size:18px}.select-font-size .size6{font-size:20px}.select-font-size .size7{font-size:22px}}.select-font-size:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-font-size:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-custom-style{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-custom-style optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-custom-style option{border:1px solid;background-color:#fff}}.select-custom-style:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-custom-style:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.color-label{position:relative;cursor:pointer}.background{font-size:smaller;background:#1b1b1b;color:#fff;padding:3px}.foreground :after{position:absolute;content:\"\";inset:auto auto -3px -1px;width:15px;height:2px;z-index:0;background:#1b1b1b}\n"], components: [{ type: AeToolbarSetComponent, selector: "ae-toolbar-set, [aeToolbarSet]" }, { type: AeButtonComponent, selector: "ae-button, button[aeButton]", inputs: ["iconName"] }, { type: AeSelectComponent, selector: "ae-select", inputs: ["options", "hidden"], outputs: ["change"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
859
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AeToolbarComponent, decorators: [{
860
- type: Component,
861
- args: [{ selector: 'angular-editor-toolbar, ae-toolbar, div[aeToolbar]', template: "<div class=\"angular-editor-toolbar\" *ngIf=\"showToolbar\">\n <div aeToolbarSet>\n <button aeButton title=\"Undo\" iconName=\"undo\" (click)=\"triggerCommand('undo')\" [hidden]=\"isButtonHidden('undo')\">\n </button>\n <button aeButton title=\"Redo\" iconName=\"redo\" (click)=\"triggerCommand('redo')\"\n [hidden]=\"isButtonHidden('redo')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'bold-'+id\" aeButton title=\"Bold\" iconName=\"bold\" (click)=\"triggerCommand('bold')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('bold')\">\n </button>\n <button [id]=\"'italic-'+id\" aeButton iconName=\"italic\" title=\"Italic\" (click)=\"triggerCommand('italic')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('italic')\">\n </button>\n <button [id]=\"'underline-'+id\" aeButton title=\"Underline\" iconName=\"underline\"\n (click)=\"triggerCommand('underline')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('underline')\">\n </button>\n <button [id]=\"'strikeThrough-'+id\" aeButton iconName=\"strikeThrough\" title=\"Strikethrough\"\n (click)=\"triggerCommand('strikeThrough')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('strikeThrough')\">\n </button>\n <button [id]=\"'subscript-'+id\" aeButton title=\"Subscript\" iconName=\"subscript\"\n (click)=\"triggerCommand('subscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('subscript')\">\n </button>\n <button [id]=\"'superscript-'+id\" aeButton iconName=\"superscript\" title=\"Superscript\"\n (click)=\"triggerCommand('superscript')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('superscript')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'justifyLeft-'+id\" aeButton iconName=\"justifyLeft\" title=\"Justify Left\"\n (click)=\"triggerCommand('justifyLeft')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyLeft')\">\n </button>\n <button [id]=\"'justifyCenter-'+id\" aeButton iconName=\"justifyCenter\" title=\"Justify Center\"\n (click)=\"triggerCommand('justifyCenter')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyCenter')\">\n </button>\n <button [id]=\"'justifyRight-'+id\" aeButton iconName=\"justifyRight\" title=\"Justify Right\"\n (click)=\"triggerCommand('justifyRight')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyRight')\">\n </button>\n <button [id]=\"'justifyFull-'+id\" aeButton iconName=\"justifyFull\" title=\"Justify Full\"\n (click)=\"triggerCommand('justifyFull')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('justifyFull')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'indent-'+id\" aeButton iconName=\"indent\" title=\"Indent\"\n (click)=\"triggerCommand('indent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('indent')\">\n </button>\n <button [id]=\"'outdent-'+id\" aeButton iconName=\"outdent\" title=\"Outdent\"\n (click)=\"triggerCommand('outdent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('outdent')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'insertUnorderedList-'+id\" aeButton iconName=\"unorderedList\" title=\"Unordered List\"\n (click)=\"triggerCommand('insertUnorderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertUnorderedList')\">\n </button>\n <button [id]=\"'insertOrderedList-'+id\" aeButton iconName=\"orderedList\" title=\"Ordered List\"\n (click)=\"triggerCommand('insertOrderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertOrderedList')\">\n </button>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-heading\" [options]=\"headings\"\n [(ngModel)]=\"block\"\n (change)=\"triggerCommand(block)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('heading')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-font\" [options]=\"fonts\"\n [(ngModel)]=\"fontName\"\n (change)=\"setFontName(fontName)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontName')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <ae-select class=\"select-font-size\" [options]=\"fontSizes\"\n [(ngModel)]=\"fontSize\"\n (change)=\"setFontSize(fontSize)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontSize')\"\n tabindex=\"-1\">\n </ae-select>\n </div>\n <div aeToolbarSet>\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(fgInput.value, 'textColor')\"\n #fgInput>\n <button [id]=\"'foregroundColorPicker-'+id\" aeButton iconName=\"textColor\"\n (click)=\"focus(); ; fgInput.click()\"\n title=\"Text Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('textColor')\">\n </button>\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(bgInput.value, 'backgroundColor')\"\n #bgInput>\n <button [id]=\"'backgroundColorPicker-'+id\" aeButton iconName=\"backgroundColor\"\n (click)=\"focus(); ; bgInput.click()\"\n title=\"Background Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('backgroundColor')\">\n </button>\n </div>\n <div *ngIf=\"_customClasses\" aeToolbarSet>\n <ae-select class=\"select-custom-style\" [options]=\"customClassList\"\n [(ngModel)]=\"customClassId\"\n (change)=\"setCustomClass(customClassId)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('customClasses')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'link-'+id\" aeButton iconName=\"link\" (click)=\"insertUrl()\"\n title=\"Insert Link\" [disabled]=\"isLinkButtonDisabled\" [hidden]=\"isButtonHidden('link')\">\n </button>\n <button [id]=\"'unlink-'+id\" aeButton iconName=\"unlink\" (click)=\"triggerCommand('unlink')\"\n title=\"Unlink\" [disabled]=\"htmlMode || !linkSelected\" [hidden]=\"isButtonHidden('unlink')\">\n </button>\n <input\n style=\"display: none\"\n accept=\"image/*\"\n type=\"file\" (change)=\"onFileChanged($event)\"\n #fileInput>\n <button [id]=\"'insertImage-'+id\" aeButton iconName=\"image\" (click)=\"focus(); fileInput.click()\"\n title=\"Insert Image\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertImage')\">\n </button>\n <button [id]=\"'insertVideo-'+id\" aeButton iconName=\"video\"\n (click)=\"insertVideo()\" title=\"Insert Video\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertVideo')\">\n </button>\n <button [id]=\"'insertHorizontalRule-'+id\" aeButton iconName=\"horizontalLine\" title=\"Horizontal Line\"\n (click)=\"triggerCommand('insertHorizontalRule')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertHorizontalRule')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'clearFormatting-'+id\" aeButton iconName=\"removeFormat\" title=\"Clear Formatting\"\n class=\"angular-editor-button\"\n (click)=\"triggerCommand('removeFormat')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('removeFormat')\">\n </button>\n </div>\n <div aeToolbarSet>\n <button [id]=\"'toggleEditorMode-'+id\" aeButton iconName=\"htmlCode\" title=\"HTML Code\"\n (click)=\"triggerCommand('toggleEditorMode')\" [hidden]=\"isButtonHidden('toggleEditorMode')\">\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: ["a{cursor:pointer}.angular-editor-toolbar{font:100 14px/15px Roboto,Arial,sans-serif;background-color:var(--ae-toolbar-bg-color, #f5f5f5);font-size:.8rem;padding:var(--ae-toolbar-padding, .2rem);border:var(--ae-toolbar-border-radius, 1px solid #ddd);display:flex;flex-wrap:wrap;gap:4px}.select-heading{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-heading optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-heading option{border:1px solid;background-color:#fff}.select-heading .default{font-size:16px}.select-heading .h1{font-size:24px}.select-heading .h2{font-size:20px}.select-heading .h3{font-size:16px}.select-heading .h4{font-size:15px}.select-heading .h5{font-size:14px}.select-heading .h6{font-size:13px}.select-heading .div,.select-heading .pre{font-size:12px}}.select-heading:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-heading:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-font{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-font optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-font option{border:1px solid;background-color:#fff}}.select-font:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-font:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-font-size{display:inline-block;width:50px}@supports not (-moz-appearance: none){.select-font-size optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-font-size option{border:1px solid;background-color:#fff}.select-font-size .size1{font-size:10px}.select-font-size .size2{font-size:12px}.select-font-size .size3{font-size:14px}.select-font-size .size4{font-size:16px}.select-font-size .size5{font-size:18px}.select-font-size .size6{font-size:20px}.select-font-size .size7{font-size:22px}}.select-font-size:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-font-size:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.select-custom-style{display:inline-block;width:90px}@supports not (-moz-appearance: none){.select-custom-style optgroup{font-size:12px;background-color:#f4f4f4;padding:5px}.select-custom-style option{border:1px solid;background-color:#fff}}.select-custom-style:disabled{background-color:#f5f5f5;pointer-events:none;cursor:not-allowed}.select-custom-style:hover{cursor:pointer;background-color:#f1f1f1;transition:.2s ease}.color-label{position:relative;cursor:pointer}.background{font-size:smaller;background:#1b1b1b;color:#fff;padding:3px}.foreground :after{position:absolute;content:\"\";inset:auto auto -3px -1px;width:15px;height:2px;z-index:0;background:#1b1b1b}\n"] }]
862
- }], ctorParameters: function () {
863
- return [{ type: i0.Renderer2 }, { type: AngularEditorService }, { type: i0.ElementRef }, { type: undefined, decorators: [{
864
- type: Inject,
865
- args: [DOCUMENT]
866
- }] }];
867
- }, propDecorators: { id: [{
868
- type: Input
869
- }], uploadUrl: [{
870
- type: Input
871
- }], upload: [{
872
- type: Input
873
- }], showToolbar: [{
874
- type: Input
875
- }], fonts: [{
876
- type: Input
877
- }], customClasses: [{
878
- type: Input
879
- }], defaultFontName: [{
880
- type: Input
881
- }], defaultFontSize: [{
882
- type: Input
883
- }], hiddenButtons: [{
884
- type: Input
885
- }], execute: [{
886
- type: Output
887
- }], myInputFile: [{
888
- type: ViewChild,
889
- args: ['fileInput', { static: true }]
890
- }] } });
891
-
892
- class AngularEditorComponent {
893
- constructor(r, editorService, doc, sanitizer, cdRef, defaultTabIndex, autoFocus) {
894
- this.r = r;
895
- this.editorService = editorService;
896
- this.doc = doc;
897
- this.sanitizer = sanitizer;
898
- this.cdRef = cdRef;
899
- this.autoFocus = autoFocus;
900
- this.modeVisual = true;
901
- this.showPlaceholder = false;
902
- this.disabled = false;
903
- this.focused = false;
904
- this.touched = false;
905
- this.changed = false;
906
- this.id = '';
907
- this.config = angularEditorConfig;
908
- this.placeholder = '';
909
- this.executeCommandFn = this.executeCommand.bind(this);
910
- this.viewMode = new EventEmitter();
911
- /** emits `blur` event when focused out from the textarea */
912
- // eslint-disable-next-line @angular-eslint/no-output-native, @angular-eslint/no-output-rename
913
- this.blurEvent = new EventEmitter();
914
- /** emits `focus` event when focused in to the textarea */
915
- // eslint-disable-next-line @angular-eslint/no-output-rename, @angular-eslint/no-output-native
916
- this.focusEvent = new EventEmitter();
917
- this.tabindex = -1;
918
- const parsedTabIndex = Number(defaultTabIndex);
919
- this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;
920
- }
921
- onFocus() {
922
- this.focus();
923
- }
924
- ngOnInit() {
925
- this.config.toolbarPosition = this.config.toolbarPosition ? this.config.toolbarPosition : angularEditorConfig.toolbarPosition;
926
- }
927
- ngAfterViewInit() {
928
- if (isDefined(this.autoFocus)) {
929
- this.focus();
930
- }
931
- }
932
- onPaste(event) {
933
- if (this.config.rawPaste) {
934
- event.preventDefault();
935
- const text = event.clipboardData.getData('text/plain');
936
- document.execCommand('insertHTML', false, text);
937
- return text;
938
- }
939
- }
940
- /**
941
- * Executed command from editor header buttons
942
- * @param command string from triggerCommand
943
- * @param value
944
- */
945
- executeCommand(command, value) {
946
- this.focus();
947
- if (command === 'focus') {
948
- return;
949
- }
950
- if (command === 'toggleEditorMode') {
951
- this.toggleEditorMode(this.modeVisual);
952
- }
953
- else if (command !== '') {
954
- if (command === 'clear') {
955
- this.editorService.removeSelectedElements(this.getCustomTags());
956
- this.onContentChange(this.textArea.nativeElement);
957
- }
958
- else if (command === 'default') {
959
- this.editorService.removeSelectedElements('h1,h2,h3,h4,h5,h6,p,pre');
960
- this.onContentChange(this.textArea.nativeElement);
961
- }
962
- else {
963
- this.editorService.executeCommand(command, value);
964
- }
965
- this.exec();
966
- }
967
- }
968
- /**
969
- * focus event
970
- */
971
- onTextAreaFocus(event) {
972
- if (this.focused) {
973
- event.stopPropagation();
974
- return;
975
- }
976
- this.focused = true;
977
- this.focusEvent.emit(event);
978
- if (!this.touched || !this.changed) {
979
- this.editorService.executeInNextQueueIteration(() => {
980
- this.configure();
981
- this.touched = true;
982
- });
983
- }
984
- }
985
- /**
986
- * @description fires when cursor leaves textarea
987
- */
988
- onTextAreaMouseOut(event) {
989
- this.editorService.saveSelection();
990
- }
991
- /**
992
- * blur event
993
- */
994
- onTextAreaBlur(event) {
995
- /**
996
- * save selection if focussed out
997
- */
998
- this.editorService.executeInNextQueueIteration(this.editorService.saveSelection);
999
- if (typeof this.onTouched === 'function') {
1000
- this.onTouched();
1001
- }
1002
- if (event.relatedTarget !== null) {
1003
- const parent = event.relatedTarget.parentElement;
1004
- if (!parent.classList.contains('angular-editor-toolbar-set') && !parent.classList.contains('ae-picker')) {
1005
- this.blurEvent.emit(event);
1006
- this.focused = false;
1007
- }
1008
- }
1009
- }
1010
- /**
1011
- * focus the text area when the editor is focused
1012
- */
1013
- focus() {
1014
- if (this.modeVisual) {
1015
- this.textArea.nativeElement.focus();
1016
- }
1017
- else {
1018
- const sourceText = this.doc.getElementById('sourceText' + this.id);
1019
- sourceText.focus();
1020
- this.focused = true;
1021
- }
1022
- }
1023
- /**
1024
- * Executed from the contenteditable section while the input property changes
1025
- * @param element html element from contenteditable
1026
- */
1027
- onContentChange(element) {
1028
- let html = '';
1029
- if (this.modeVisual) {
1030
- html = element.innerHTML;
1031
- }
1032
- else {
1033
- html = element.innerText;
1034
- }
1035
- if ((!html || html === '<br>')) {
1036
- html = '';
1037
- }
1038
- if (typeof this.onChange === 'function') {
1039
- this.onChange(this.config.sanitize || this.config.sanitize === undefined ?
1040
- this.sanitizer.sanitize(SecurityContext.HTML, html) : html);
1041
- if ((!html) !== this.showPlaceholder) {
1042
- this.togglePlaceholder(this.showPlaceholder);
1043
- }
1044
- }
1045
- this.changed = true;
1046
- }
1047
- /**
1048
- * Set the function to be called
1049
- * when the control receives a change event.
1050
- *
1051
- * @param fn a function
1052
- */
1053
- registerOnChange(fn) {
1054
- this.onChange = e => (e === '<br>' ? fn('') : fn(e));
1055
- }
1056
- /**
1057
- * Set the function to be called
1058
- * when the control receives a touch event.
1059
- *
1060
- * @param fn a function
1061
- */
1062
- registerOnTouched(fn) {
1063
- this.onTouched = fn;
1064
- }
1065
- /**
1066
- * Write a new value to the element.
1067
- *
1068
- * @param value value to be executed when there is a change in contenteditable
1069
- */
1070
- writeValue(value) {
1071
- if ((!value || value === '<br>' || value === '') !== this.showPlaceholder) {
1072
- this.togglePlaceholder(this.showPlaceholder);
1073
- }
1074
- if (value === undefined || value === '' || value === '<br>') {
1075
- value = null;
1076
- }
1077
- this.refreshView(value);
1078
- }
1079
- /**
1080
- * refresh view/HTML of the editor
1081
- *
1082
- * @param value html string from the editor
1083
- */
1084
- refreshView(value) {
1085
- const normalizedValue = value === null ? '' : value;
1086
- this.r.setProperty(this.textArea.nativeElement, 'innerHTML', normalizedValue);
1087
- return;
1088
- }
1089
- /**
1090
- * toggles placeholder based on input string
1091
- *
1092
- * @param value A HTML string from the editor
1093
- */
1094
- togglePlaceholder(value) {
1095
- if (!value) {
1096
- this.r.addClass(this.editorWrapper.nativeElement, 'show-placeholder');
1097
- this.showPlaceholder = true;
1098
- }
1099
- else {
1100
- this.r.removeClass(this.editorWrapper.nativeElement, 'show-placeholder');
1101
- this.showPlaceholder = false;
1102
- }
1103
- }
1104
- /**
1105
- * Implements disabled state for this element
1106
- *
1107
- * @param isDisabled Disabled flag
1108
- */
1109
- setDisabledState(isDisabled) {
1110
- const div = this.textArea.nativeElement;
1111
- const action = isDisabled ? 'addClass' : 'removeClass';
1112
- this.r[action](div, 'disabled');
1113
- this.disabled = isDisabled;
1114
- }
1115
- /**
1116
- * toggles editor mode based on bToSource bool
1117
- *
1118
- * @param bToSource A boolean value from the editor
1119
- */
1120
- toggleEditorMode(bToSource) {
1121
- let oContent;
1122
- const editableElement = this.textArea.nativeElement;
1123
- if (bToSource) {
1124
- oContent = this.r.createText(editableElement.innerHTML);
1125
- this.r.setProperty(editableElement, 'innerHTML', '');
1126
- this.r.setProperty(editableElement, 'contentEditable', false);
1127
- const oPre = this.r.createElement('pre');
1128
- this.r.setStyle(oPre, 'margin', '0');
1129
- this.r.setStyle(oPre, 'outline', 'none');
1130
- const oCode = this.r.createElement('code');
1131
- this.r.setProperty(oCode, 'id', 'sourceText' + this.id);
1132
- this.r.setStyle(oCode, 'display', 'block');
1133
- this.r.setStyle(oCode, 'white-space', 'pre-wrap');
1134
- this.r.setStyle(oCode, 'word-break', 'keep-all');
1135
- this.r.setStyle(oCode, 'outline', 'none');
1136
- this.r.setStyle(oCode, 'margin', '0');
1137
- this.r.setStyle(oCode, 'background-color', '#fff5b9');
1138
- this.r.setProperty(oCode, 'contentEditable', true);
1139
- this.r.appendChild(oCode, oContent);
1140
- this.focusInstance = this.r.listen(oCode, 'focus', (event) => this.onTextAreaFocus(event));
1141
- this.blurInstance = this.r.listen(oCode, 'blur', (event) => this.onTextAreaBlur(event));
1142
- this.r.appendChild(oPre, oCode);
1143
- this.r.appendChild(editableElement, oPre);
1144
- // ToDo move to service
1145
- this.doc.execCommand('defaultParagraphSeparator', false, 'div');
1146
- this.modeVisual = false;
1147
- this.viewMode.emit(false);
1148
- oCode.focus();
1149
- }
1150
- else {
1151
- if (this.doc.querySelectorAll) {
1152
- this.r.setProperty(editableElement, 'innerHTML', editableElement.innerText);
1153
- }
1154
- else {
1155
- oContent = this.doc.createRange();
1156
- oContent.selectNodeContents(editableElement.firstChild);
1157
- this.r.setProperty(editableElement, 'innerHTML', oContent.toString());
1158
- }
1159
- this.r.setProperty(editableElement, 'contentEditable', true);
1160
- this.modeVisual = true;
1161
- this.viewMode.emit(true);
1162
- this.onContentChange(editableElement);
1163
- editableElement.focus();
1164
- }
1165
- this.editorToolbar.setEditorMode(!this.modeVisual);
1166
- }
1167
- /**
1168
- * toggles editor buttons when cursor moved or positioning
1169
- *
1170
- * Send a node array from the contentEditable of the editor
1171
- */
1172
- exec() {
1173
- this.editorToolbar.triggerButtons();
1174
- let userSelection;
1175
- if (this.doc.getSelection) {
1176
- userSelection = this.doc.getSelection();
1177
- this.editorService.executeInNextQueueIteration(this.editorService.saveSelection);
1178
- }
1179
- let a = userSelection.focusNode;
1180
- const els = [];
1181
- while (a && a.id !== 'editor') {
1182
- els.unshift(a);
1183
- a = a.parentNode;
1184
- }
1185
- this.editorToolbar.triggerBlocks(els);
1186
- }
1187
- configure() {
1188
- this.editorService.uploadUrl = this.config.uploadUrl;
1189
- this.editorService.uploadWithCredentials = this.config.uploadWithCredentials;
1190
- if (this.config.defaultParagraphSeparator) {
1191
- this.editorService.setDefaultParagraphSeparator(this.config.defaultParagraphSeparator);
1192
- }
1193
- if (this.config.defaultFontName) {
1194
- this.editorService.setFontName(this.config.defaultFontName);
1195
- }
1196
- if (this.config.defaultFontSize) {
1197
- this.editorService.setFontSize(this.config.defaultFontSize);
1198
- }
1199
- }
1200
- getFonts() {
1201
- const fonts = this.config.fonts ? this.config.fonts : angularEditorConfig.fonts;
1202
- return fonts.map(x => {
1203
- return { label: x.name, value: x.name };
1204
- });
1205
- }
1206
- getCustomTags() {
1207
- const tags = ['span'];
1208
- this.config.customClasses.forEach(x => {
1209
- if (x.tag !== undefined) {
1210
- if (!tags.includes(x.tag)) {
1211
- tags.push(x.tag);
1212
- }
1213
- }
1214
- });
1215
- return tags.join(',');
1216
- }
1217
- ngOnDestroy() {
1218
- if (this.blurInstance) {
1219
- this.blurInstance();
1220
- }
1221
- if (this.focusInstance) {
1222
- this.focusInstance();
1223
- }
1224
- }
1225
- filterStyles(html) {
1226
- html = html.replace('position: fixed;', '');
1227
- return html;
1228
- }
1229
- }
1230
- AngularEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorComponent, deps: [{ token: i0.Renderer2 }, { token: AngularEditorService }, { token: DOCUMENT }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }, { token: 'autofocus', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1231
- AngularEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: AngularEditorComponent, selector: "angular-editor", inputs: { id: "id", config: "config", placeholder: "placeholder", tabIndex: "tabIndex" }, outputs: { html: "html", viewMode: "viewMode", blurEvent: "blur", focusEvent: "focus" }, host: { listeners: { "focus": "onFocus()" }, properties: { "attr.tabindex": "this.tabindex" } }, providers: [
1232
- {
1233
- provide: NG_VALUE_ACCESSOR,
1234
- useExisting: forwardRef(() => AngularEditorComponent),
1235
- multi: true
1236
- },
1237
- AngularEditorService
1238
- ], queries: [{ propertyName: "customButtonsTemplateRef", first: true, predicate: ["customButtons"], descendants: true }], viewQueries: [{ propertyName: "textArea", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "editorWrapper", first: true, predicate: ["editorWrapper"], descendants: true, static: true }, { propertyName: "editorToolbar", first: true, predicate: ["editorToolbar"], descendants: true }], ngImport: i0, template: "<div\n class=\"angular-editor\"\n #angularEditor\n [style.width]=\"config.width\"\n [style.minWidth]=\"config.minWidth\"\n [ngClass]=\"{\n 'bottom': config.toolbarPosition === 'bottom'\n }\"\n>\n <angular-editor-toolbar\n #editorToolbar\n [id]=\"id\"\n [uploadUrl]=\"config.uploadUrl\"\n [upload]=\"config.upload\"\n [showToolbar]=\"config.showToolbar !== undefined ? config.showToolbar : true\"\n [fonts]=\"getFonts()\"\n [customClasses]=\"config.customClasses\"\n [defaultFontName]=\"config.defaultFontName\"\n [defaultFontSize]=\"config.defaultFontSize\"\n [hiddenButtons]=\"config.toolbarHiddenButtons\"\n (execute)=\"executeCommand($event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"customButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"{ executeCommandFn: this.executeCommandFn}\"\n >\n </ng-container>\n </angular-editor-toolbar>\n\n <div\n class=\"angular-editor-wrapper\"\n #editorWrapper\n >\n <div\n #editor\n class=\"angular-editor-textarea\"\n [attr.contenteditable]=\"config.editable\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [attr.translate]=\"config.translate\"\n [attr.spellcheck]=\"config.spellcheck\"\n [style.height]=\"config.height\"\n [style.minHeight]=\"config.minHeight\"\n [style.maxHeight]=\"config.maxHeight\"\n [style.outline]=\"config.outline === false ? 'none': undefined\"\n (input)=\"onContentChange($event.target)\"\n (focus)=\"onTextAreaFocus($event)\"\n (blur)=\"onTextAreaBlur($event)\"\n (click)=\"exec()\"\n (keyup)=\"exec()\"\n (mouseout)=\"onTextAreaMouseOut($event)\"\n (paste)=\"onPaste($event)\"\n >\n </div>\n <span class=\"angular-editor-placeholder\">{{ placeholder || config['placeholder'] }}</span>\n </div>\n</div>\n", styles: ["a{cursor:pointer}.angular-editor{display:flex;flex-direction:column;gap:var(--ae-gap, 5px)}.angular-editor.bottom{flex-direction:column-reverse}.angular-editor ::ng-deep [contenteditable=true]:empty:before{content:attr(placeholder);color:#868e96;opacity:1}.angular-editor .angular-editor-wrapper{position:relative}.angular-editor .angular-editor-wrapper .angular-editor-textarea{min-height:150px;overflow:auto;resize:vertical}.angular-editor .angular-editor-wrapper .angular-editor-textarea:after{content:\"\";position:absolute;bottom:0;right:0;display:block;width:8px;height:8px;cursor:nwse-resize;background-color:#ffffff80}.angular-editor .angular-editor-wrapper .angular-editor-textarea{min-height:5rem;padding:.5rem .8rem 1rem;border-radius:var(--ae-text-area-border-radius, .3rem);border:var(--ae-text-area-border, 1px solid #ddd);background-color:transparent;overflow-x:hidden;overflow-y:auto;position:relative}.angular-editor .angular-editor-wrapper .angular-editor-textarea:focus,.angular-editor .angular-editor-wrapper .angular-editor-textarea.focus{outline:var(--ae-focus-outline-color, -webkit-focus-ring-color auto 1px)}.angular-editor .angular-editor-wrapper .angular-editor-textarea ::ng-deep blockquote{margin-left:1rem;border-left:.2em solid #dfe2e5;padding-left:.5rem}.angular-editor .angular-editor-wrapper ::ng-deep p{margin-bottom:0}.angular-editor .angular-editor-wrapper .angular-editor-placeholder{display:none;position:absolute;top:0;padding:.6rem .8rem 1rem .9rem;color:#6c757d;opacity:.75}.angular-editor .angular-editor-wrapper.show-placeholder .angular-editor-placeholder{display:block}.angular-editor .angular-editor-wrapper.disabled{cursor:not-allowed;opacity:.5;pointer-events:none}\n"], components: [{ type: AeToolbarComponent, selector: "angular-editor-toolbar, ae-toolbar, div[aeToolbar]", inputs: ["id", "uploadUrl", "upload", "showToolbar", "fonts", "customClasses", "defaultFontName", "defaultFontSize", "hiddenButtons"], outputs: ["execute"] }], directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorComponent, decorators: [{
1240
- type: Component,
1241
- args: [{ selector: 'angular-editor', providers: [
1242
- {
1243
- provide: NG_VALUE_ACCESSOR,
1244
- useExisting: forwardRef(() => AngularEditorComponent),
1245
- multi: true
1246
- },
1247
- AngularEditorService
1248
- ], template: "<div\n class=\"angular-editor\"\n #angularEditor\n [style.width]=\"config.width\"\n [style.minWidth]=\"config.minWidth\"\n [ngClass]=\"{\n 'bottom': config.toolbarPosition === 'bottom'\n }\"\n>\n <angular-editor-toolbar\n #editorToolbar\n [id]=\"id\"\n [uploadUrl]=\"config.uploadUrl\"\n [upload]=\"config.upload\"\n [showToolbar]=\"config.showToolbar !== undefined ? config.showToolbar : true\"\n [fonts]=\"getFonts()\"\n [customClasses]=\"config.customClasses\"\n [defaultFontName]=\"config.defaultFontName\"\n [defaultFontSize]=\"config.defaultFontSize\"\n [hiddenButtons]=\"config.toolbarHiddenButtons\"\n (execute)=\"executeCommand($event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"customButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"{ executeCommandFn: this.executeCommandFn}\"\n >\n </ng-container>\n </angular-editor-toolbar>\n\n <div\n class=\"angular-editor-wrapper\"\n #editorWrapper\n >\n <div\n #editor\n class=\"angular-editor-textarea\"\n [attr.contenteditable]=\"config.editable\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [attr.translate]=\"config.translate\"\n [attr.spellcheck]=\"config.spellcheck\"\n [style.height]=\"config.height\"\n [style.minHeight]=\"config.minHeight\"\n [style.maxHeight]=\"config.maxHeight\"\n [style.outline]=\"config.outline === false ? 'none': undefined\"\n (input)=\"onContentChange($event.target)\"\n (focus)=\"onTextAreaFocus($event)\"\n (blur)=\"onTextAreaBlur($event)\"\n (click)=\"exec()\"\n (keyup)=\"exec()\"\n (mouseout)=\"onTextAreaMouseOut($event)\"\n (paste)=\"onPaste($event)\"\n >\n </div>\n <span class=\"angular-editor-placeholder\">{{ placeholder || config['placeholder'] }}</span>\n </div>\n</div>\n", styles: ["a{cursor:pointer}.angular-editor{display:flex;flex-direction:column;gap:var(--ae-gap, 5px)}.angular-editor.bottom{flex-direction:column-reverse}.angular-editor ::ng-deep [contenteditable=true]:empty:before{content:attr(placeholder);color:#868e96;opacity:1}.angular-editor .angular-editor-wrapper{position:relative}.angular-editor .angular-editor-wrapper .angular-editor-textarea{min-height:150px;overflow:auto;resize:vertical}.angular-editor .angular-editor-wrapper .angular-editor-textarea:after{content:\"\";position:absolute;bottom:0;right:0;display:block;width:8px;height:8px;cursor:nwse-resize;background-color:#ffffff80}.angular-editor .angular-editor-wrapper .angular-editor-textarea{min-height:5rem;padding:.5rem .8rem 1rem;border-radius:var(--ae-text-area-border-radius, .3rem);border:var(--ae-text-area-border, 1px solid #ddd);background-color:transparent;overflow-x:hidden;overflow-y:auto;position:relative}.angular-editor .angular-editor-wrapper .angular-editor-textarea:focus,.angular-editor .angular-editor-wrapper .angular-editor-textarea.focus{outline:var(--ae-focus-outline-color, -webkit-focus-ring-color auto 1px)}.angular-editor .angular-editor-wrapper .angular-editor-textarea ::ng-deep blockquote{margin-left:1rem;border-left:.2em solid #dfe2e5;padding-left:.5rem}.angular-editor .angular-editor-wrapper ::ng-deep p{margin-bottom:0}.angular-editor .angular-editor-wrapper .angular-editor-placeholder{display:none;position:absolute;top:0;padding:.6rem .8rem 1rem .9rem;color:#6c757d;opacity:.75}.angular-editor .angular-editor-wrapper.show-placeholder .angular-editor-placeholder{display:block}.angular-editor .angular-editor-wrapper.disabled{cursor:not-allowed;opacity:.5;pointer-events:none}\n"] }]
1249
- }], ctorParameters: function () {
1250
- return [{ type: i0.Renderer2 }, { type: AngularEditorService }, { type: undefined, decorators: [{
1251
- type: Inject,
1252
- args: [DOCUMENT]
1253
- }] }, { type: i2.DomSanitizer }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1254
- type: Attribute,
1255
- args: ['tabindex']
1256
- }] }, { type: undefined, decorators: [{
1257
- type: Attribute,
1258
- args: ['autofocus']
1259
- }] }];
1260
- }, propDecorators: { id: [{
1261
- type: Input
1262
- }], config: [{
1263
- type: Input
1264
- }], placeholder: [{
1265
- type: Input
1266
- }], tabIndex: [{
1267
- type: Input
1268
- }], html: [{
1269
- type: Output
1270
- }], textArea: [{
1271
- type: ViewChild,
1272
- args: ['editor', { static: true }]
1273
- }], editorWrapper: [{
1274
- type: ViewChild,
1275
- args: ['editorWrapper', { static: true }]
1276
- }], editorToolbar: [{
1277
- type: ViewChild,
1278
- args: ['editorToolbar']
1279
- }], customButtonsTemplateRef: [{
1280
- type: ContentChild,
1281
- args: ["customButtons"]
1282
- }], viewMode: [{
1283
- type: Output
1284
- }], blurEvent: [{
1285
- type: Output,
1286
- args: ['blur']
1287
- }], focusEvent: [{
1288
- type: Output,
1289
- args: ['focus']
1290
- }], tabindex: [{
1291
- type: HostBinding,
1292
- args: ['attr.tabindex']
1293
- }], onFocus: [{
1294
- type: HostListener,
1295
- args: ['focus']
1296
- }] } });
1297
-
1298
- class AngularEditorModule {
1299
- }
1300
- AngularEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1301
- AngularEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorModule, declarations: [AngularEditorComponent, AeToolbarComponent, AeSelectComponent, AeButtonComponent, AeToolbarSetComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule], exports: [AngularEditorComponent, AeToolbarComponent, AeButtonComponent, AeToolbarSetComponent] });
1302
- AngularEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorModule, imports: [[
1303
- CommonModule, FormsModule, ReactiveFormsModule
1304
- ]] });
1305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AngularEditorModule, decorators: [{
1306
- type: NgModule,
1307
- args: [{
1308
- imports: [
1309
- CommonModule, FormsModule, ReactiveFormsModule
1310
- ],
1311
- declarations: [AngularEditorComponent, AeToolbarComponent, AeSelectComponent, AeButtonComponent, AeToolbarSetComponent],
1312
- exports: [AngularEditorComponent, AeToolbarComponent, AeButtonComponent, AeToolbarSetComponent]
1313
- }]
1314
- }] });
1315
-
1316
- /*
1317
- * Public API Surface of angular-editor
1318
- */
1319
-
1320
- /**
1321
- * Generated bundle index. Do not edit.
1322
- */
1323
-
1324
- export { AeButtonComponent, AeSelectComponent, AeToolbarComponent, AeToolbarSetComponent, AngularEditorComponent, AngularEditorModule, AngularEditorService };
1325
- //# sourceMappingURL=kolkov-angular-editor.mjs.map