angular-froala-wysiwyg 4.3.1 → 4.4.0
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.
- package/editor/editor.directive.d.ts +3 -2
- package/{fesm2020 → fesm2022}/angular-froala-wysiwyg.mjs +77 -57
- package/fesm2022/angular-froala-wysiwyg.mjs.map +1 -0
- package/package.json +4 -12
- package/view/view.directive.d.ts +1 -1
- package/esm2020/angular-froala-wysiwyg.mjs +0 -5
- package/esm2020/editor/editor.directive.mjs +0 -357
- package/esm2020/editor/editor.module.mjs +0 -19
- package/esm2020/fe-root.module.mjs +0 -28
- package/esm2020/index.mjs +0 -6
- package/esm2020/view/view.directive.mjs +0 -26
- package/esm2020/view/view.module.mjs +0 -19
- package/fesm2015/angular-froala-wysiwyg.mjs +0 -442
- package/fesm2015/angular-froala-wysiwyg.mjs.map +0 -1
- package/fesm2020/angular-froala-wysiwyg.mjs.map +0 -1
|
@@ -3,6 +3,7 @@ import { ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class FroalaEditorDirective implements ControlValueAccessor {
|
|
5
5
|
private zone;
|
|
6
|
+
private platformId;
|
|
6
7
|
private _opts;
|
|
7
8
|
private _element;
|
|
8
9
|
private SPECIAL_TAGS;
|
|
@@ -12,7 +13,7 @@ export declare class FroalaEditorDirective implements ControlValueAccessor {
|
|
|
12
13
|
private _model;
|
|
13
14
|
private _editorInitialized;
|
|
14
15
|
private _oldModel;
|
|
15
|
-
constructor(el: ElementRef, zone: NgZone);
|
|
16
|
+
constructor(el: ElementRef, zone: NgZone, platformId: Object);
|
|
16
17
|
onChange: (_: any) => void;
|
|
17
18
|
onTouched: () => void;
|
|
18
19
|
writeValue(content: any): void;
|
|
@@ -40,5 +41,5 @@ export declare class FroalaEditorDirective implements ControlValueAccessor {
|
|
|
40
41
|
ngOnDestroy(): void;
|
|
41
42
|
setDisabledState(isDisabled: boolean): void;
|
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FroalaEditorDirective, never>;
|
|
43
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaEditorDirective, "[froalaEditor]", ["froalaEditor"], { "froalaEditor": "froalaEditor"; "froalaModel": "froalaModel"; }, { "froalaModelChange": "froalaModelChange"; "froalaInit": "froalaInit"; }, never, never, false, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaEditorDirective, "[froalaEditor]", ["froalaEditor"], { "froalaEditor": { "alias": "froalaEditor"; "required": false; }; "froalaModel": { "alias": "froalaModel"; "required": false; }; }, { "froalaModelChange": "froalaModelChange"; "froalaInit": "froalaInit"; }, never, never, false, never>;
|
|
44
45
|
}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, forwardRef, Directive, Input, Output, NgModule } from '@angular/core';
|
|
4
|
-
import
|
|
3
|
+
import { EventEmitter, PLATFORM_ID, forwardRef, Directive, Inject, Input, Output, NgModule } from '@angular/core';
|
|
4
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
5
5
|
|
|
6
6
|
class FroalaEditorDirective {
|
|
7
|
-
|
|
7
|
+
zone;
|
|
8
|
+
platformId;
|
|
9
|
+
// editor options
|
|
10
|
+
_opts = {
|
|
11
|
+
immediateAngularModelUpdate: false,
|
|
12
|
+
angularIgnoreAttrs: null
|
|
13
|
+
};
|
|
14
|
+
_element;
|
|
15
|
+
SPECIAL_TAGS = ['img', 'button', 'input', 'a'];
|
|
16
|
+
INNER_HTML_ATTR = 'innerHTML';
|
|
17
|
+
_hasSpecialTag = false;
|
|
18
|
+
// editor element
|
|
19
|
+
_editor;
|
|
20
|
+
// initial editor content
|
|
21
|
+
_model;
|
|
22
|
+
_editorInitialized = false;
|
|
23
|
+
_oldModel = null;
|
|
24
|
+
constructor(el, zone, platformId) {
|
|
8
25
|
this.zone = zone;
|
|
9
|
-
|
|
10
|
-
this._opts = {
|
|
11
|
-
immediateAngularModelUpdate: false,
|
|
12
|
-
angularIgnoreAttrs: null
|
|
13
|
-
};
|
|
14
|
-
this.SPECIAL_TAGS = ['img', 'button', 'input', 'a'];
|
|
15
|
-
this.INNER_HTML_ATTR = 'innerHTML';
|
|
16
|
-
this._hasSpecialTag = false;
|
|
17
|
-
this._editorInitialized = false;
|
|
18
|
-
this._oldModel = null;
|
|
19
|
-
// Begin ControlValueAccesor methods.
|
|
20
|
-
this.onChange = (_) => {
|
|
21
|
-
};
|
|
22
|
-
this.onTouched = () => {
|
|
23
|
-
};
|
|
24
|
-
// froalaModel directive as output: update model if editor contentChanged
|
|
25
|
-
this.froalaModelChange = new EventEmitter();
|
|
26
|
-
// froalaInit directive as output: send manual editor initialization
|
|
27
|
-
this.froalaInit = new EventEmitter();
|
|
28
|
-
this.initialized = false;
|
|
26
|
+
this.platformId = platformId;
|
|
29
27
|
let element = el.nativeElement;
|
|
30
28
|
// check if the element is a special tag
|
|
31
29
|
if (this.SPECIAL_TAGS.indexOf(element.tagName.toLowerCase()) != -1) {
|
|
@@ -34,6 +32,11 @@ class FroalaEditorDirective {
|
|
|
34
32
|
this._element = element;
|
|
35
33
|
this.zone = zone;
|
|
36
34
|
}
|
|
35
|
+
// Begin ControlValueAccesor methods.
|
|
36
|
+
onChange = (_) => {
|
|
37
|
+
};
|
|
38
|
+
onTouched = () => {
|
|
39
|
+
};
|
|
37
40
|
// Form model content changed.
|
|
38
41
|
writeValue(content) {
|
|
39
42
|
this.updateEditor(content);
|
|
@@ -153,6 +156,10 @@ class FroalaEditorDirective {
|
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
}
|
|
159
|
+
// froalaModel directive as output: update model if editor contentChanged
|
|
160
|
+
froalaModelChange = new EventEmitter();
|
|
161
|
+
// froalaInit directive as output: send manual editor initialization
|
|
162
|
+
froalaInit = new EventEmitter();
|
|
156
163
|
// update model if editor contentChanged
|
|
157
164
|
updateModel() {
|
|
158
165
|
this.zone.run(() => {
|
|
@@ -240,8 +247,10 @@ class FroalaEditorDirective {
|
|
|
240
247
|
};
|
|
241
248
|
this._opts.events.initialized.overridden = true;
|
|
242
249
|
}
|
|
243
|
-
|
|
244
|
-
|
|
250
|
+
import('froala-editor').then(({ default: FroalaEditor }) => {
|
|
251
|
+
// Initialize the Froala Editor.
|
|
252
|
+
this._editor = new FroalaEditor(this._element, this._opts);
|
|
253
|
+
});
|
|
245
254
|
});
|
|
246
255
|
}
|
|
247
256
|
setHtml() {
|
|
@@ -305,8 +314,12 @@ class FroalaEditorDirective {
|
|
|
305
314
|
// TODO not sure if ngOnInit is executed after @inputs
|
|
306
315
|
ngAfterViewInit() {
|
|
307
316
|
// check if output froalaInit is present. Maybe observers is private and should not be used?? TODO how to better test that an output directive is present.
|
|
308
|
-
|
|
317
|
+
// Only allow initialization in browser
|
|
318
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
319
|
+
this.setup();
|
|
320
|
+
}
|
|
309
321
|
}
|
|
322
|
+
initialized = false;
|
|
310
323
|
setup() {
|
|
311
324
|
if (this.initialized) {
|
|
312
325
|
return;
|
|
@@ -324,16 +337,16 @@ class FroalaEditorDirective {
|
|
|
324
337
|
}
|
|
325
338
|
setDisabledState(isDisabled) {
|
|
326
339
|
}
|
|
340
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
|
|
341
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: FroalaEditorDirective, isStandalone: false, selector: "[froalaEditor]", inputs: { froalaEditor: "froalaEditor", froalaModel: "froalaModel" }, outputs: { froalaModelChange: "froalaModelChange", froalaInit: "froalaInit" }, providers: [
|
|
342
|
+
{
|
|
343
|
+
provide: NG_VALUE_ACCESSOR,
|
|
344
|
+
useExisting: forwardRef((() => FroalaEditorDirective)),
|
|
345
|
+
multi: true
|
|
346
|
+
}
|
|
347
|
+
], exportAs: ["froalaEditor"], ngImport: i0 });
|
|
327
348
|
}
|
|
328
|
-
|
|
329
|
-
/** @nocollapse */ FroalaEditorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FroalaEditorDirective, selector: "[froalaEditor]", inputs: { froalaEditor: "froalaEditor", froalaModel: "froalaModel" }, outputs: { froalaModelChange: "froalaModelChange", froalaInit: "froalaInit" }, providers: [
|
|
330
|
-
{
|
|
331
|
-
provide: NG_VALUE_ACCESSOR,
|
|
332
|
-
useExisting: forwardRef((() => FroalaEditorDirective)),
|
|
333
|
-
multi: true
|
|
334
|
-
}
|
|
335
|
-
], exportAs: ["froalaEditor"], ngImport: i0 });
|
|
336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaEditorDirective, decorators: [{
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorDirective, decorators: [{
|
|
337
350
|
type: Directive,
|
|
338
351
|
args: [{
|
|
339
352
|
selector: '[froalaEditor]',
|
|
@@ -344,9 +357,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
344
357
|
useExisting: forwardRef((() => FroalaEditorDirective)),
|
|
345
358
|
multi: true
|
|
346
359
|
}
|
|
347
|
-
]
|
|
360
|
+
],
|
|
361
|
+
standalone: false
|
|
348
362
|
}]
|
|
349
|
-
}], ctorParameters:
|
|
363
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
|
|
364
|
+
type: Inject,
|
|
365
|
+
args: [PLATFORM_ID]
|
|
366
|
+
}] }], propDecorators: { froalaEditor: [{
|
|
350
367
|
type: Input
|
|
351
368
|
}], froalaModel: [{
|
|
352
369
|
type: Input
|
|
@@ -360,11 +377,11 @@ class FroalaEditorModule {
|
|
|
360
377
|
static forRoot() {
|
|
361
378
|
return { ngModule: FroalaEditorModule, providers: [] };
|
|
362
379
|
}
|
|
380
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
381
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorModule, declarations: [FroalaEditorDirective], exports: [FroalaEditorDirective] });
|
|
382
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorModule });
|
|
363
383
|
}
|
|
364
|
-
|
|
365
|
-
/** @nocollapse */ FroalaEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FroalaEditorModule, declarations: [FroalaEditorDirective], exports: [FroalaEditorDirective] });
|
|
366
|
-
/** @nocollapse */ FroalaEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaEditorModule });
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaEditorModule, decorators: [{
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaEditorModule, decorators: [{
|
|
368
385
|
type: NgModule,
|
|
369
386
|
args: [{
|
|
370
387
|
declarations: [FroalaEditorDirective],
|
|
@@ -373,6 +390,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
373
390
|
}] });
|
|
374
391
|
|
|
375
392
|
class FroalaViewDirective {
|
|
393
|
+
renderer;
|
|
394
|
+
_element;
|
|
376
395
|
constructor(renderer, element) {
|
|
377
396
|
this.renderer = renderer;
|
|
378
397
|
this._element = element.nativeElement;
|
|
@@ -384,15 +403,16 @@ class FroalaViewDirective {
|
|
|
384
403
|
ngAfterViewInit() {
|
|
385
404
|
this.renderer.addClass(this._element, "fr-view");
|
|
386
405
|
}
|
|
406
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
407
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: FroalaViewDirective, isStandalone: false, selector: "[froalaView]", inputs: { froalaView: "froalaView" }, ngImport: i0 });
|
|
387
408
|
}
|
|
388
|
-
|
|
389
|
-
/** @nocollapse */ FroalaViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FroalaViewDirective, selector: "[froalaView]", inputs: { froalaView: "froalaView" }, ngImport: i0 });
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaViewDirective, decorators: [{
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewDirective, decorators: [{
|
|
391
410
|
type: Directive,
|
|
392
411
|
args: [{
|
|
393
|
-
selector: '[froalaView]'
|
|
412
|
+
selector: '[froalaView]',
|
|
413
|
+
standalone: false
|
|
394
414
|
}]
|
|
395
|
-
}], ctorParameters:
|
|
415
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { froalaView: [{
|
|
396
416
|
type: Input
|
|
397
417
|
}] } });
|
|
398
418
|
|
|
@@ -400,11 +420,11 @@ class FroalaViewModule {
|
|
|
400
420
|
static forRoot() {
|
|
401
421
|
return { ngModule: FroalaViewModule, providers: [] };
|
|
402
422
|
}
|
|
423
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
424
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewModule, declarations: [FroalaViewDirective], exports: [FroalaViewDirective] });
|
|
425
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewModule });
|
|
403
426
|
}
|
|
404
|
-
|
|
405
|
-
/** @nocollapse */ FroalaViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FroalaViewModule, declarations: [FroalaViewDirective], exports: [FroalaViewDirective] });
|
|
406
|
-
/** @nocollapse */ FroalaViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaViewModule });
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FroalaViewModule, decorators: [{
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FroalaViewModule, decorators: [{
|
|
408
428
|
type: NgModule,
|
|
409
429
|
args: [{
|
|
410
430
|
declarations: [FroalaViewDirective],
|
|
@@ -413,14 +433,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
413
433
|
}] });
|
|
414
434
|
|
|
415
435
|
class FERootModule {
|
|
436
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FERootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
437
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: FERootModule, imports: [FroalaEditorModule, FroalaViewModule], exports: [FroalaEditorModule,
|
|
438
|
+
FroalaViewModule] });
|
|
439
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FERootModule, imports: [FroalaEditorModule.forRoot(),
|
|
440
|
+
FroalaViewModule.forRoot(), FroalaEditorModule,
|
|
441
|
+
FroalaViewModule] });
|
|
416
442
|
}
|
|
417
|
-
|
|
418
|
-
/** @nocollapse */ FERootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FERootModule, imports: [FroalaEditorModule, FroalaViewModule], exports: [FroalaEditorModule,
|
|
419
|
-
FroalaViewModule] });
|
|
420
|
-
/** @nocollapse */ FERootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FERootModule, imports: [FroalaEditorModule.forRoot(),
|
|
421
|
-
FroalaViewModule.forRoot(), FroalaEditorModule,
|
|
422
|
-
FroalaViewModule] });
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FERootModule, decorators: [{
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FERootModule, decorators: [{
|
|
424
444
|
type: NgModule,
|
|
425
445
|
args: [{
|
|
426
446
|
imports: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-froala-wysiwyg.mjs","sources":["../../projects/library/src/editor/editor.directive.ts","../../projects/library/src/editor/editor.module.ts","../../projects/library/src/view/view.directive.ts","../../projects/library/src/view/view.module.ts","../../projects/library/src/fe-root.module.ts","../../projects/library/src/angular-froala-wysiwyg.ts"],"sourcesContent":["import { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { Directive, ElementRef, EventEmitter, forwardRef, Input, NgZone, Output, PLATFORM_ID, Inject } from '@angular/core';\nimport { isPlatformBrowser } from \"@angular/common\";\n\n@Directive({\n selector: '[froalaEditor]',\n exportAs: 'froalaEditor',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FroalaEditorDirective),\n multi: true\n }\n ],\n standalone: false\n})\nexport class FroalaEditorDirective implements ControlValueAccessor {\n\n // editor options\n private _opts: any = {\n immediateAngularModelUpdate: false,\n angularIgnoreAttrs: null\n };\n\n private _element: any;\n\n private SPECIAL_TAGS: string[] = ['img', 'button', 'input', 'a'];\n private INNER_HTML_ATTR: string = 'innerHTML';\n private _hasSpecialTag: boolean = false;\n\n // editor element\n private _editor: any;\n\n // initial editor content\n private _model: string;\n\n private _editorInitialized: boolean = false;\n\n private _oldModel: string = null;\n\n constructor(el: ElementRef, private zone: NgZone, @Inject(PLATFORM_ID) private platformId: Object) {\n\n let element: any = el.nativeElement;\n\n // check if the element is a special tag\n if (this.SPECIAL_TAGS.indexOf(element.tagName.toLowerCase()) != -1) {\n this._hasSpecialTag = true;\n }\n this._element = element;\n\n this.zone = zone;\n }\n\n // Begin ControlValueAccesor methods.\n onChange = (_: any) => {\n };\n onTouched = () => {\n };\n\n // Form model content changed.\n writeValue(content: any): void {\n this.updateEditor(content);\n if(content){\n this.setup();\n }\n }\n\n registerOnChange(fn: (_: any) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n // End ControlValueAccesor methods.\n\n // froalaEditor directive as input: store the editor options\n @Input() set froalaEditor(opts: any) {\n this._opts = this.clone( opts || this._opts);\n this._opts = {...this._opts};\n }\n\n // TODO: replace clone method with better possible alternate \n private clone(item) {\n \tconst me = this; \n if (!item) { return item; } // null, undefined values check\n\n let types = [ Number, String, Boolean ], \n result;\n\n // normalizing primitives if someone did new String('aaa'), or new Number('444');\n types.forEach(function(type) {\n if (item instanceof type) {\n result = type( item );\n }\n });\n\n if (typeof result == \"undefined\") {\n if (Object.prototype.toString.call( item ) === \"[object Array]\") {\n result = [];\n item.forEach(function(child, index, array) { \n result[index] = me.clone( child );\n });\n } else if (typeof item == \"object\") {\n // testing that this is DOM\n if (item.nodeType && typeof item.cloneNode == \"function\") {\n result = item.cloneNode( true ); \n } else if (!item.prototype) { // check that this is a literal\n if (item instanceof Date) {\n result = new Date(item);\n } else {\n // it is an object literal\n result = {};\n for (var i in item) {\n result[i] = me.clone( item[i] );\n }\n }\n } else {\n if (false && item.constructor) {\n result = new item.constructor();\n } else {\n result = item;\n }\n }\n } else {\n result = item;\n }\n }\n return result;\n }\n // froalaModel directive as input: store initial editor content\n @Input() set froalaModel(content: any) {\n this.updateEditor(content);\n }\n\n private stringify(obj) {\n let cache = [];\n let str = JSON.stringify(obj, function(key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Circular reference found, discard key\n return;\n }\n // Store value in our collection\n cache.push(value);\n }\n return value;\n });\n cache = null; // reset the cache\n return str;\n }\n \n // Update editor with model contents.\n private updateEditor(content: any) {\n if (this.stringify(this._oldModel) == this.stringify(content)) {\n return;\n }\n \n if (!this._hasSpecialTag) {\n this._oldModel = content;\n } else {\n this._model = content;\n }\n\n if (this._editorInitialized) {\n if (!this._hasSpecialTag) {\n this._editor.html.set(content);\n } else {\n this.setContent();\n }\n } else {\n if (!this._hasSpecialTag) {\n this._element.innerHTML = content || '';\n } else {\n this.setContent();\n }\n }\n }\n\n // froalaModel directive as output: update model if editor contentChanged\n @Output() froalaModelChange: EventEmitter<any> = new EventEmitter<any>();\n\n // froalaInit directive as output: send manual editor initialization\n @Output() froalaInit: EventEmitter<Object> = new EventEmitter<Object>();\n\n // update model if editor contentChanged\n private updateModel() {\n this.zone.run(() => {\n\n let modelContent: any = null;\n\n if (this._hasSpecialTag) {\n\n let attributeNodes = this._element.attributes;\n let attrs = {};\n\n for (let i = 0; i < attributeNodes.length; i++) {\n\n let attrName = attributeNodes[i].name;\n if (this._opts.angularIgnoreAttrs && this._opts.angularIgnoreAttrs.indexOf(attrName) != -1) {\n continue;\n }\n\n attrs[attrName] = attributeNodes[i].value;\n }\n\n if (this._element.innerHTML) {\n attrs[this.INNER_HTML_ATTR] = this._element.innerHTML;\n }\n\n modelContent = attrs;\n } else {\n\n let returnedHtml: any = this._editor.html.get();\n if (typeof returnedHtml === 'string') {\n modelContent = returnedHtml;\n }\n }\n if (this._oldModel !== modelContent) {\n this._oldModel = modelContent;\n\n // Update froalaModel.\n this.froalaModelChange.emit(modelContent);\n\n // Update form model.\n this.onChange(modelContent);\n }\n\n })\n }\n\n private registerEvent(eventName, callback) {\n if (!eventName || !callback) {\n return;\n }\n\n if (!this._opts.events) {\n this._opts.events = {};\n }\n\n this._opts.events[eventName] = callback;\n }\n\n private initListeners() {\n let self = this;\n // Check if we have events on the editor.\n if (this._editor.events) {\n // bind contentChange and keyup event to froalaModel\n this._editor.events.on('contentChanged', function () {\n self.updateModel();\n });\n this._editor.events.on('mousedown', function () {\n setTimeout(function () {\n self.onTouched();\n }, 0);\n });\n\n if (this._opts.immediateAngularModelUpdate) {\n this._editor.events.on('keyup', function () {\n setTimeout(function () {\n self.updateModel();\n }, 0);\n });\n }\n }\n\n this._editorInitialized = true;\n }\n\n private createEditor() {\n if (this._editorInitialized) {\n return;\n }\n\n this.setContent(true);\n\n // init editor\n this.zone.runOutsideAngular(() => {\n // Add listeners on initialized event.\n if (!this._opts.events) this._opts.events = {};\n\n // Register initialized event.\n this.registerEvent('initialized', this._opts.events && this._opts.events.initialized);\n const existingInitCallback = this._opts.events.initialized;\n // Default initialized event.\n if (!this._opts.events.initialized || !this._opts.events.initialized.overridden) {\n this._opts.events.initialized = () => {\n this.initListeners();\n existingInitCallback && existingInitCallback.call(this._editor, this);\n };\n this._opts.events.initialized.overridden = true;\n }\n\n import('froala-editor').then(({ default: FroalaEditor }) => {\n // Initialize the Froala Editor.\n this._editor = new FroalaEditor(\n this._element,\n this._opts\n );\n });\n });\n }\n\n private setHtml() {\n this._editor.html.set(this._model || \"\");\n\n // This will reset the undo stack everytime the model changes externally. Can we fix this?\n this._editor.undo.reset();\n this._editor.undo.saveStep();\n }\n\n private setContent(firstTime = false) {\n let self = this;\n\n // Set initial content\n if (this._model || this._model == '') {\n this._oldModel = this._model;\n if (this._hasSpecialTag) {\n\n let tags: Object = this._model;\n\n // add tags on element\n if (tags) {\n\n for (let attr in tags) {\n if (tags.hasOwnProperty(attr) && attr != this.INNER_HTML_ATTR) {\n this._element.setAttribute(attr, tags[attr]);\n }\n }\n\n if (tags.hasOwnProperty(this.INNER_HTML_ATTR)) {\n this._element.innerHTML = tags[this.INNER_HTML_ATTR];\n }\n }\n } else {\n if (firstTime) {\n this.registerEvent('initialized', function () {\n self.setHtml();\n });\n } else {\n self.setHtml();\n }\n }\n }\n }\n\n private destroyEditor() {\n if (this._editorInitialized) {\n this._editor.destroy();\n this._editorInitialized = false;\n }\n }\n\n private getEditor() {\n if (this._element) {\n return this._editor;\n }\n\n return null;\n }\n\n // send manual editor initialization\n private generateManualController() {\n let controls = {\n initialize: this.createEditor.bind(this),\n destroy: this.destroyEditor.bind(this),\n getEditor: this.getEditor.bind(this),\n };\n this.froalaInit.emit(controls);\n }\n\n // TODO not sure if ngOnInit is executed after @inputs\n ngAfterViewInit() {\n // check if output froalaInit is present. Maybe observers is private and should not be used?? TODO how to better test that an output directive is present.\n // Only allow initialization in browser\n if (isPlatformBrowser(this.platformId)) {\n this.setup();\n }\n }\n\n private initialized = false;\n private setup() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n if (!this.froalaInit.observers.length) {\n this.createEditor();\n } else {\n this.generateManualController();\n }\n }\n\n ngOnDestroy() {\n this.destroyEditor();\n }\n\n setDisabledState(isDisabled: boolean): void {\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { FroalaEditorDirective } from './editor.directive';\n\n@NgModule({\n declarations: [FroalaEditorDirective],\n exports: [FroalaEditorDirective]\n})\n\nexport class FroalaEditorModule {\n public static forRoot(): ModuleWithProviders<FroalaEditorModule> {\n return {ngModule: FroalaEditorModule, providers: []};\n }\n}\n","import { Directive, ElementRef, Renderer2, Input } from '@angular/core';\n\n@Directive({\n selector: '[froalaView]',\n standalone: false\n})\nexport class FroalaViewDirective {\n\n private _element: HTMLElement;\n\n constructor(private renderer: Renderer2, element: ElementRef) {\n this._element = element.nativeElement;\n }\n\n // update content model as it comes\n @Input() set froalaView(content: string) {\n this._element.innerHTML = content;\n }\n\n ngAfterViewInit() {\n this.renderer.addClass(this._element, \"fr-view\");\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { FroalaViewDirective } from './view.directive';\n\n@NgModule({\n declarations: [FroalaViewDirective],\n exports: [FroalaViewDirective]\n})\nexport class FroalaViewModule {\n public static forRoot(): ModuleWithProviders<FroalaViewModule> {\n return {ngModule: FroalaViewModule, providers: []};\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FroalaEditorModule } from './editor/editor.module';\nimport { FroalaViewModule } from './view/view.module';\n\n@NgModule({\n imports: [\n FroalaEditorModule.forRoot(),\n FroalaViewModule.forRoot()\n ],\n exports: [\n FroalaEditorModule,\n FroalaViewModule\n ]\n})\nexport class FERootModule {\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAgBa,qBAAqB,CAAA;AAwBI,IAAA,IAAA;AAA2C,IAAA,UAAA;;AArBvE,IAAA,KAAK,GAAQ;AACnB,QAAA,2BAA2B,EAAE,KAAK;AAClC,QAAA,kBAAkB,EAAE;KACrB;AAEO,IAAA,QAAQ;IAER,YAAY,GAAa,CAAC,KAAK,EAAE,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,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,kBAAkB,CAAC,OAAO,EAAE;wBAC5B,gBAAgB,CAAC,OAAO;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB;AACD;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -5,16 +5,12 @@
|
|
|
5
5
|
"url": "https://github.com/froala/angular-froala-wysiwyg.git",
|
|
6
6
|
"directory": "projects/library"
|
|
7
7
|
},
|
|
8
|
-
"version": "4.
|
|
8
|
+
"version": "4.4.0",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"froala-editor": "4.
|
|
10
|
+
"froala-editor": "4.4.0",
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
|
-
"module": "
|
|
14
|
-
"es2020": "fesm2020/angular-froala-wysiwyg.mjs",
|
|
15
|
-
"esm2020": "esm2020/angular-froala-wysiwyg.mjs",
|
|
16
|
-
"fesm2020": "fesm2020/angular-froala-wysiwyg.mjs",
|
|
17
|
-
"fesm2015": "fesm2015/angular-froala-wysiwyg.mjs",
|
|
13
|
+
"module": "fesm2022/angular-froala-wysiwyg.mjs",
|
|
18
14
|
"typings": "index.d.ts",
|
|
19
15
|
"exports": {
|
|
20
16
|
"./package.json": {
|
|
@@ -22,11 +18,7 @@
|
|
|
22
18
|
},
|
|
23
19
|
".": {
|
|
24
20
|
"types": "./index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"es2020": "./fesm2020/angular-froala-wysiwyg.mjs",
|
|
27
|
-
"es2015": "./fesm2015/angular-froala-wysiwyg.mjs",
|
|
28
|
-
"node": "./fesm2015/angular-froala-wysiwyg.mjs",
|
|
29
|
-
"default": "./fesm2020/angular-froala-wysiwyg.mjs"
|
|
21
|
+
"default": "./fesm2022/angular-froala-wysiwyg.mjs"
|
|
30
22
|
}
|
|
31
23
|
},
|
|
32
24
|
"sideEffects": false
|
package/view/view.directive.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export declare class FroalaViewDirective {
|
|
|
7
7
|
set froalaView(content: string);
|
|
8
8
|
ngAfterViewInit(): void;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<FroalaViewDirective, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaViewDirective, "[froalaView]", never, { "froalaView": "froalaView"; }, {}, never, never, false, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaViewDirective, "[froalaView]", never, { "froalaView": { "alias": "froalaView"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
11
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1mcm9hbGEtd3lzaXd5Zy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3Byb2plY3RzL2xpYnJhcnkvc3JjL2FuZ3VsYXItZnJvYWxhLXd5c2l3eWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|