@firestitch/html-editor 15.0.0 → 16.0.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/app/modules/html-editor/components/html-editor/html-editor.component.d.ts +1 -1
- package/app/modules/html-renderer/components/html-renderer/html-renderer.component.d.ts +1 -1
- package/esm2022/app/modules/html-editor/classes/plugin.mjs +7 -0
- package/esm2022/app/modules/html-editor/components/html-editor/html-editor.component.mjs +518 -0
- package/{esm2020 → esm2022}/app/modules/html-editor/directives/html-editor-container.directive.mjs +4 -4
- package/{esm2020 → esm2022}/app/modules/html-editor/fs-html-editor.module.mjs +13 -13
- package/esm2022/app/modules/html-editor/plugins/checklist.plugin.mjs +40 -0
- package/esm2022/app/modules/html-editor/plugins/code.plugin.mjs +68 -0
- package/esm2022/app/modules/html-editor/plugins/mention.plugin.mjs +92 -0
- package/esm2022/app/modules/html-editor/plugins/realtime.plugin.mjs +17 -0
- package/esm2022/app/modules/html-editor/plugins/screen-record.plugin.mjs +94 -0
- package/esm2022/app/modules/html-editor/services/froala-loader.service.mjs +93 -0
- package/esm2022/app/modules/html-renderer/components/html-renderer/html-renderer.component.mjs +27 -0
- package/{esm2020 → esm2022}/app/modules/html-renderer/fs-html-renderer.module.mjs +5 -5
- package/{fesm2020 → fesm2022}/firestitch-html-editor.mjs +95 -71
- package/{fesm2020 → fesm2022}/firestitch-html-editor.mjs.map +1 -1
- package/package.json +5 -11
- package/esm2020/app/modules/html-editor/classes/plugin.mjs +0 -5
- package/esm2020/app/modules/html-editor/components/html-editor/html-editor.component.mjs +0 -509
- package/esm2020/app/modules/html-editor/plugins/checklist.plugin.mjs +0 -39
- package/esm2020/app/modules/html-editor/plugins/code.plugin.mjs +0 -67
- package/esm2020/app/modules/html-editor/plugins/mention.plugin.mjs +0 -90
- package/esm2020/app/modules/html-editor/plugins/realtime.plugin.mjs +0 -16
- package/esm2020/app/modules/html-editor/plugins/screen-record.plugin.mjs +0 -92
- package/esm2020/app/modules/html-editor/services/froala-loader.service.mjs +0 -90
- package/esm2020/app/modules/html-renderer/components/html-renderer/html-renderer.component.mjs +0 -24
- package/fesm2015/firestitch-html-editor.mjs +0 -1043
- package/fesm2015/firestitch-html-editor.mjs.map +0 -1
- /package/{esm2020 → esm2022}/app/modules/html-editor/consts/paragraph-buttons.const.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/consts/rich-buttons.const.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/consts/text-buttons.const.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/directives/index.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/enums/default-plugin.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/injects/config.inject.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/interfaces/html-editor-config.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/interfaces/index.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/interfaces/plugin-config.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/interfaces/toolbar-button.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/plugins/configs/mention-plugin.config.mjs +0 -0
- /package/{esm2020 → esm2022}/app/modules/html-editor/plugins/configs/screen-record-plugin.config.mjs +0 -0
- /package/{esm2020 → esm2022}/firestitch-html-editor.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
|
@@ -16,18 +16,21 @@ import { merge, debounce } from 'lodash-es';
|
|
|
16
16
|
import Tribute from 'tributejs';
|
|
17
17
|
|
|
18
18
|
class FsHtmlRendererComponent {
|
|
19
|
+
sanitized;
|
|
20
|
+
_cdRef;
|
|
19
21
|
set setHtml(html) {
|
|
20
22
|
this.trustedHtml = this.sanitized.bypassSecurityTrustHtml(html || '');
|
|
21
23
|
this._cdRef.markForCheck();
|
|
22
24
|
}
|
|
25
|
+
trustedHtml;
|
|
23
26
|
constructor(sanitized, _cdRef) {
|
|
24
27
|
this.sanitized = sanitized;
|
|
25
28
|
this._cdRef = _cdRef;
|
|
26
29
|
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: { setHtml: ["html", "setHtml"] }, ngImport: i0, template: "<span class=\"fr-view fs-html-editor-default\" [innerHtml]=\"trustedHtml\"></span>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27
32
|
}
|
|
28
|
-
|
|
29
|
-
FsHtmlRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: { setHtml: ["html", "setHtml"] }, ngImport: i0, template: "<span class=\"fr-view fs-html-editor-default\" [innerHtml]=\"trustedHtml\"></span>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlRendererComponent, decorators: [{
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererComponent, decorators: [{
|
|
31
34
|
type: Component,
|
|
32
35
|
args: [{ selector: 'fs-html-renderer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"fr-view fs-html-editor-default\" [innerHtml]=\"trustedHtml\"></span>\n" }]
|
|
33
36
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { setHtml: [{
|
|
@@ -36,11 +39,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
36
39
|
}] } });
|
|
37
40
|
|
|
38
41
|
class FsHtmlRendererModule {
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
43
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererModule, declarations: [FsHtmlRendererComponent], imports: [CommonModule], exports: [FsHtmlRendererComponent] });
|
|
44
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererModule, imports: [CommonModule] });
|
|
39
45
|
}
|
|
40
|
-
|
|
41
|
-
FsHtmlRendererModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlRendererModule, declarations: [FsHtmlRendererComponent], imports: [CommonModule], exports: [FsHtmlRendererComponent] });
|
|
42
|
-
FsHtmlRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlRendererModule, imports: [CommonModule] });
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlRendererModule, decorators: [{
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlRendererModule, decorators: [{
|
|
44
47
|
type: NgModule,
|
|
45
48
|
args: [{
|
|
46
49
|
imports: [
|
|
@@ -59,10 +62,10 @@ class FsHtmlEditorContainerDirective {
|
|
|
59
62
|
static ngTemplateContextGuard(dir, ctx) {
|
|
60
63
|
return true;
|
|
61
64
|
}
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
66
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FsHtmlEditorContainerDirective, selector: "[fsHtmlEditorContainer]", ngImport: i0 });
|
|
62
67
|
}
|
|
63
|
-
|
|
64
|
-
FsHtmlEditorContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FsHtmlEditorContainerDirective, selector: "[fsHtmlEditorContainer]", ngImport: i0 });
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlEditorContainerDirective, decorators: [{
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorContainerDirective, decorators: [{
|
|
66
69
|
type: Directive,
|
|
67
70
|
args: [{ selector: '[fsHtmlEditorContainer]' }]
|
|
68
71
|
}] });
|
|
@@ -71,16 +74,19 @@ const FS_HTML_EDITOR_DEFAULT_CONFIG = new InjectionToken('fs-html-editor.default
|
|
|
71
74
|
const FS_HTML_EDITOR_CONFIG = new InjectionToken('fs-html-editor.config');
|
|
72
75
|
|
|
73
76
|
class FsFroalaLoaderService {
|
|
77
|
+
_defaultConfig;
|
|
78
|
+
_document;
|
|
79
|
+
_froalaEditor;
|
|
80
|
+
_froalaLoaded = new BehaviorSubject(false);
|
|
81
|
+
_froalaPluginsLoaded = new BehaviorSubject(false);
|
|
82
|
+
_sourceLoader = fsSourceLoader;
|
|
83
|
+
_loaded$ = combineLatest([this._froalaLoaded, this._froalaPluginsLoaded])
|
|
84
|
+
.pipe(map(([FroalaReady, pluginsRead]) => {
|
|
85
|
+
return pluginsRead && FroalaReady;
|
|
86
|
+
}), shareReplay(1));
|
|
74
87
|
constructor(_defaultConfig, _document) {
|
|
75
88
|
this._defaultConfig = _defaultConfig;
|
|
76
89
|
this._document = _document;
|
|
77
|
-
this._froalaLoaded = new BehaviorSubject(false);
|
|
78
|
-
this._froalaPluginsLoaded = new BehaviorSubject(false);
|
|
79
|
-
this._sourceLoader = fsSourceLoader;
|
|
80
|
-
this._loaded$ = combineLatest([this._froalaLoaded, this._froalaPluginsLoaded])
|
|
81
|
-
.pipe(map(([FroalaReady, pluginsRead]) => {
|
|
82
|
-
return pluginsRead && FroalaReady;
|
|
83
|
-
}), shareReplay(1));
|
|
84
90
|
this._sourceLoader.setDocument(this._document);
|
|
85
91
|
this._load();
|
|
86
92
|
}
|
|
@@ -135,10 +141,10 @@ class FsFroalaLoaderService {
|
|
|
135
141
|
_froalaPluginsDone() {
|
|
136
142
|
this._froalaPluginsLoaded.next(true);
|
|
137
143
|
}
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsFroalaLoaderService, deps: [{ token: FS_HTML_EDITOR_CONFIG, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
145
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsFroalaLoaderService, providedIn: 'root' });
|
|
138
146
|
}
|
|
139
|
-
|
|
140
|
-
FsFroalaLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsFroalaLoaderService, providedIn: 'root' });
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsFroalaLoaderService, decorators: [{
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsFroalaLoaderService, decorators: [{
|
|
142
148
|
type: Injectable,
|
|
143
149
|
args: [{
|
|
144
150
|
providedIn: 'root',
|
|
@@ -190,18 +196,27 @@ const TextButtons = [
|
|
|
190
196
|
];
|
|
191
197
|
|
|
192
198
|
class FsHtmlEditorComponent {
|
|
199
|
+
_defaultConfig;
|
|
200
|
+
_cdRef;
|
|
201
|
+
_fr;
|
|
202
|
+
htmlEditorContainer;
|
|
203
|
+
classFocused = false;
|
|
204
|
+
elRef;
|
|
205
|
+
config = {};
|
|
206
|
+
disabled = false;
|
|
207
|
+
initialized = false;
|
|
208
|
+
containerID = `fs-html-editor-${guid('xxx')}`;
|
|
209
|
+
onTouched;
|
|
210
|
+
onChange;
|
|
211
|
+
_editor;
|
|
212
|
+
_html;
|
|
213
|
+
_initialize$ = new ReplaySubject();
|
|
214
|
+
_froalaReady$ = new BehaviorSubject(null);
|
|
215
|
+
_destroy$ = new Subject();
|
|
193
216
|
constructor(_defaultConfig, _cdRef, _fr) {
|
|
194
217
|
this._defaultConfig = _defaultConfig;
|
|
195
218
|
this._cdRef = _cdRef;
|
|
196
219
|
this._fr = _fr;
|
|
197
|
-
this.classFocused = false;
|
|
198
|
-
this.config = {};
|
|
199
|
-
this.disabled = false;
|
|
200
|
-
this.initialized = false;
|
|
201
|
-
this.containerID = `fs-html-editor-${guid('xxx')}`;
|
|
202
|
-
this._initialize$ = new ReplaySubject();
|
|
203
|
-
this._froalaReady$ = new BehaviorSubject(null);
|
|
204
|
-
this._destroy$ = new Subject();
|
|
205
220
|
}
|
|
206
221
|
get el() {
|
|
207
222
|
return this.elRef.nativeElement;
|
|
@@ -614,27 +629,27 @@ class FsHtmlEditorComponent {
|
|
|
614
629
|
this.focus();
|
|
615
630
|
}
|
|
616
631
|
}
|
|
632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorComponent, deps: [{ token: FS_HTML_EDITOR_CONFIG, optional: true }, { token: i0.ChangeDetectorRef }, { token: FsFroalaLoaderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FsHtmlEditorComponent, selector: "fs-html-editor", inputs: { config: "config", disabled: "disabled" }, host: { properties: { "class.focused": "this.classFocused", "class.disabled": "this.disabled", "class.initialized": "this.initialized" } }, providers: [
|
|
634
|
+
{
|
|
635
|
+
provide: NG_VALUE_ACCESSOR,
|
|
636
|
+
useExisting: forwardRef(() => FsHtmlEditorComponent),
|
|
637
|
+
multi: true,
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
provide: NG_VALIDATORS,
|
|
641
|
+
useExisting: forwardRef(() => FsHtmlEditorComponent),
|
|
642
|
+
multi: true,
|
|
643
|
+
},
|
|
644
|
+
], queries: [{ propertyName: "htmlEditorContainer", first: true, predicate: FsHtmlEditorContainerDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0, template: "<fs-label-field>\n <div class=\"outline\">\n <div class=\"outline-overlay\"></div>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <ng-container *ngIf=\"htmlEditorContainer; else htmlEditorContainerTmpl\">\n <ng-container \n [ngTemplateOutlet]=\"htmlEditorContainer\" \n [ngTemplateOutletContext]=\"{ template: htmlEditorContainerTmpl }\">\n </ng-container>\n </ng-container>\n <ng-template #htmlEditorContainerTmpl>\n <div\n class=\"html-editor-container fs-html-editor-default\"\n [id]=\"containerID\"\n [ngClass]=\"{\n 'init-on-click': config.initOnClick\n }\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\"></ng-container>\n <div #elRef></div>\n </div>\n </ng-template>\n </div>\n\n <fs-label-message>\n <div class=\"fs-form-message\">\n <div class=\"fs-form-hint\">{{config.hint}}</div>\n </div>\n </fs-label-message>\n</fs-label-field>\n", styles: [":host{position:relative;display:block}:host.initialized .outline-overlay{border:1px solid transparent;position:absolute;inset:-1px;border-width:2px}:host.initialized .outline,:host.initialized .outline-overlay{border-radius:5px}:host.initialized .outline{border:1px solid #E0E0E0;position:relative;padding:0 .75em}:host.initialized .outline fs-label{background:#fff;top:-5px;position:absolute;left:11px;padding:0 3px;z-index:5}:host.initialized:not(.focused):not(.disabled):hover .outline-overlay{border-color:#212121}:host:not(.initialized) ::ng-deep .fr-toolbar{display:none}:host ::ng-deep fs-label-field{margin:.25em 0}:host ::ng-deep .fr-wrapper{border:none!important}:host ::ng-deep .fr-toolbar.fr-top{margin-top:2px}:host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar-open .fr-more-toolbar{display:block}:host ::ng-deep .fr-more-toolbar{display:none}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto;display:flex;justify-content:center;padding-left:0!important}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#f5f5f5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i4.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i4.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i4.FsLabelMessageComponent, selector: "fs-label-message" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], viewProviders: [
|
|
645
|
+
{
|
|
646
|
+
provide: ControlContainer,
|
|
647
|
+
deps: [[Optional, NgForm]],
|
|
648
|
+
useFactory: (ngForm) => ngForm,
|
|
649
|
+
},
|
|
650
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
617
651
|
}
|
|
618
|
-
|
|
619
|
-
FsHtmlEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FsHtmlEditorComponent, selector: "fs-html-editor", inputs: { config: "config", disabled: "disabled" }, host: { properties: { "class.focused": "this.classFocused", "class.disabled": "this.disabled", "class.initialized": "this.initialized" } }, providers: [
|
|
620
|
-
{
|
|
621
|
-
provide: NG_VALUE_ACCESSOR,
|
|
622
|
-
useExisting: forwardRef(() => FsHtmlEditorComponent),
|
|
623
|
-
multi: true,
|
|
624
|
-
},
|
|
625
|
-
{
|
|
626
|
-
provide: NG_VALIDATORS,
|
|
627
|
-
useExisting: forwardRef(() => FsHtmlEditorComponent),
|
|
628
|
-
multi: true,
|
|
629
|
-
},
|
|
630
|
-
], queries: [{ propertyName: "htmlEditorContainer", first: true, predicate: FsHtmlEditorContainerDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0, template: "<fs-label-field>\n <div class=\"outline\">\n <div class=\"outline-overlay\"></div>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <ng-container *ngIf=\"htmlEditorContainer; else htmlEditorContainerTmpl\">\n <ng-container \n [ngTemplateOutlet]=\"htmlEditorContainer\" \n [ngTemplateOutletContext]=\"{ template: htmlEditorContainerTmpl }\">\n </ng-container>\n </ng-container>\n <ng-template #htmlEditorContainerTmpl>\n <div\n class=\"html-editor-container fs-html-editor-default\"\n [id]=\"containerID\"\n [ngClass]=\"{\n 'init-on-click': config.initOnClick\n }\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\"></ng-container>\n <div #elRef></div>\n </div>\n </ng-template>\n </div>\n\n <fs-label-message>\n <div class=\"fs-form-message\">\n <div class=\"fs-form-hint\">{{config.hint}}</div>\n </div>\n </fs-label-message>\n</fs-label-field>\n", styles: [":host{position:relative;display:block}:host.initialized .outline-overlay{border:1px solid transparent;position:absolute;inset:-1px;border-width:2px}:host.initialized .outline,:host.initialized .outline-overlay{border-radius:5px}:host.initialized .outline{border:1px solid #E0E0E0;position:relative;padding:0 .75em}:host.initialized .outline fs-label{background:#fff;top:-5px;position:absolute;left:11px;padding:0 3px;z-index:5}:host.initialized:not(.focused):not(.disabled):hover .outline-overlay{border-color:#212121}:host:not(.initialized) ::ng-deep .fr-toolbar{display:none}:host ::ng-deep fs-label-field{margin:.25em 0}:host ::ng-deep .fr-wrapper{border:none!important}:host ::ng-deep .fr-toolbar.fr-top{margin-top:2px}:host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar-open .fr-more-toolbar{display:block}:host ::ng-deep .fr-more-toolbar{display:none}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto;display:flex;justify-content:center;padding-left:0!important}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#F5F5F5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i4.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i4.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i4.FsLabelMessageComponent, selector: "fs-label-message" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], viewProviders: [
|
|
631
|
-
{
|
|
632
|
-
provide: ControlContainer,
|
|
633
|
-
deps: [[Optional, NgForm]],
|
|
634
|
-
useFactory: (ngForm) => ngForm,
|
|
635
|
-
},
|
|
636
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlEditorComponent, decorators: [{
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorComponent, decorators: [{
|
|
638
653
|
type: Component,
|
|
639
654
|
args: [{ selector: 'fs-html-editor', providers: [
|
|
640
655
|
{
|
|
@@ -653,7 +668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
653
668
|
deps: [[Optional, NgForm]],
|
|
654
669
|
useFactory: (ngForm) => ngForm,
|
|
655
670
|
},
|
|
656
|
-
], template: "<fs-label-field>\n <div class=\"outline\">\n <div class=\"outline-overlay\"></div>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <ng-container *ngIf=\"htmlEditorContainer; else htmlEditorContainerTmpl\">\n <ng-container \n [ngTemplateOutlet]=\"htmlEditorContainer\" \n [ngTemplateOutletContext]=\"{ template: htmlEditorContainerTmpl }\">\n </ng-container>\n </ng-container>\n <ng-template #htmlEditorContainerTmpl>\n <div\n class=\"html-editor-container fs-html-editor-default\"\n [id]=\"containerID\"\n [ngClass]=\"{\n 'init-on-click': config.initOnClick\n }\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\"></ng-container>\n <div #elRef></div>\n </div>\n </ng-template>\n </div>\n\n <fs-label-message>\n <div class=\"fs-form-message\">\n <div class=\"fs-form-hint\">{{config.hint}}</div>\n </div>\n </fs-label-message>\n</fs-label-field>\n", styles: [":host{position:relative;display:block}:host.initialized .outline-overlay{border:1px solid transparent;position:absolute;inset:-1px;border-width:2px}:host.initialized .outline,:host.initialized .outline-overlay{border-radius:5px}:host.initialized .outline{border:1px solid #E0E0E0;position:relative;padding:0 .75em}:host.initialized .outline fs-label{background:#fff;top:-5px;position:absolute;left:11px;padding:0 3px;z-index:5}:host.initialized:not(.focused):not(.disabled):hover .outline-overlay{border-color:#212121}:host:not(.initialized) ::ng-deep .fr-toolbar{display:none}:host ::ng-deep fs-label-field{margin:.25em 0}:host ::ng-deep .fr-wrapper{border:none!important}:host ::ng-deep .fr-toolbar.fr-top{margin-top:2px}:host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar-open .fr-more-toolbar{display:block}:host ::ng-deep .fr-more-toolbar{display:none}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto;display:flex;justify-content:center;padding-left:0!important}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#
|
|
671
|
+
], template: "<fs-label-field>\n <div class=\"outline\">\n <div class=\"outline-overlay\"></div>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <ng-container *ngIf=\"htmlEditorContainer; else htmlEditorContainerTmpl\">\n <ng-container \n [ngTemplateOutlet]=\"htmlEditorContainer\" \n [ngTemplateOutletContext]=\"{ template: htmlEditorContainerTmpl }\">\n </ng-container>\n </ng-container>\n <ng-template #htmlEditorContainerTmpl>\n <div\n class=\"html-editor-container fs-html-editor-default\"\n [id]=\"containerID\"\n [ngClass]=\"{\n 'init-on-click': config.initOnClick\n }\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\"></ng-container>\n <div #elRef></div>\n </div>\n </ng-template>\n </div>\n\n <fs-label-message>\n <div class=\"fs-form-message\">\n <div class=\"fs-form-hint\">{{config.hint}}</div>\n </div>\n </fs-label-message>\n</fs-label-field>\n", styles: [":host{position:relative;display:block}:host.initialized .outline-overlay{border:1px solid transparent;position:absolute;inset:-1px;border-width:2px}:host.initialized .outline,:host.initialized .outline-overlay{border-radius:5px}:host.initialized .outline{border:1px solid #E0E0E0;position:relative;padding:0 .75em}:host.initialized .outline fs-label{background:#fff;top:-5px;position:absolute;left:11px;padding:0 3px;z-index:5}:host.initialized:not(.focused):not(.disabled):hover .outline-overlay{border-color:#212121}:host:not(.initialized) ::ng-deep .fr-toolbar{display:none}:host ::ng-deep fs-label-field{margin:.25em 0}:host ::ng-deep .fr-wrapper{border:none!important}:host ::ng-deep .fr-toolbar.fr-top{margin-top:2px}:host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar-open .fr-more-toolbar{display:block}:host ::ng-deep .fr-more-toolbar{display:none}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto;display:flex;justify-content:center;padding-left:0!important}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#f5f5f5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"] }]
|
|
657
672
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
658
673
|
type: Optional
|
|
659
674
|
}, {
|
|
@@ -694,19 +709,19 @@ class FsHtmlEditorModule {
|
|
|
694
709
|
],
|
|
695
710
|
};
|
|
696
711
|
}
|
|
712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
713
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorModule, declarations: [FsHtmlEditorComponent,
|
|
714
|
+
FsHtmlEditorContainerDirective], imports: [CommonModule,
|
|
715
|
+
FsSkeletonModule,
|
|
716
|
+
FsLabelModule,
|
|
717
|
+
FsHtmlRendererModule], exports: [FsHtmlEditorComponent,
|
|
718
|
+
FsHtmlEditorContainerDirective] });
|
|
719
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorModule, imports: [CommonModule,
|
|
720
|
+
FsSkeletonModule,
|
|
721
|
+
FsLabelModule,
|
|
722
|
+
FsHtmlRendererModule] });
|
|
697
723
|
}
|
|
698
|
-
|
|
699
|
-
FsHtmlEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlEditorModule, declarations: [FsHtmlEditorComponent,
|
|
700
|
-
FsHtmlEditorContainerDirective], imports: [CommonModule,
|
|
701
|
-
FsSkeletonModule,
|
|
702
|
-
FsLabelModule,
|
|
703
|
-
FsHtmlRendererModule], exports: [FsHtmlEditorComponent,
|
|
704
|
-
FsHtmlEditorContainerDirective] });
|
|
705
|
-
FsHtmlEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlEditorModule, imports: [CommonModule,
|
|
706
|
-
FsSkeletonModule,
|
|
707
|
-
FsLabelModule,
|
|
708
|
-
FsHtmlRendererModule] });
|
|
709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FsHtmlEditorModule, decorators: [{
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FsHtmlEditorModule, decorators: [{
|
|
710
725
|
type: NgModule,
|
|
711
726
|
args: [{
|
|
712
727
|
imports: [
|
|
@@ -747,11 +762,14 @@ function FsHtmlEditorConfigFactory(config) {
|
|
|
747
762
|
}
|
|
748
763
|
|
|
749
764
|
class Plugin {
|
|
765
|
+
config;
|
|
766
|
+
editor;
|
|
750
767
|
initialize() { }
|
|
751
768
|
destroy() { }
|
|
752
769
|
}
|
|
753
770
|
|
|
754
771
|
class ChecklistPlugin extends Plugin {
|
|
772
|
+
config;
|
|
755
773
|
constructor(config = { name: 'checklist' }) {
|
|
756
774
|
super();
|
|
757
775
|
this.config = config;
|
|
@@ -790,6 +808,7 @@ class ChecklistPlugin extends Plugin {
|
|
|
790
808
|
}
|
|
791
809
|
|
|
792
810
|
class CodePlugin extends Plugin {
|
|
811
|
+
config;
|
|
793
812
|
constructor(config = { name: 'code' }) {
|
|
794
813
|
super();
|
|
795
814
|
this.config = config;
|
|
@@ -856,17 +875,14 @@ class CodePlugin extends Plugin {
|
|
|
856
875
|
}
|
|
857
876
|
|
|
858
877
|
class MentionPlugin extends Plugin {
|
|
878
|
+
config;
|
|
879
|
+
static _currentGuid = null;
|
|
880
|
+
static _tributes = [];
|
|
881
|
+
_tribute;
|
|
882
|
+
_guid = guid();
|
|
859
883
|
constructor(config) {
|
|
860
884
|
super();
|
|
861
885
|
this.config = config;
|
|
862
|
-
this._guid = guid();
|
|
863
|
-
this.selected = (event) => {
|
|
864
|
-
if (this.config.selected) {
|
|
865
|
-
if (MentionPlugin._currentGuid === this._guid) {
|
|
866
|
-
this.config.selected(event.detail.item.original);
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
886
|
this.config = {
|
|
871
887
|
...config,
|
|
872
888
|
buttons: [
|
|
@@ -920,6 +936,13 @@ class MentionPlugin extends Plugin {
|
|
|
920
936
|
}, true);
|
|
921
937
|
this.editor.el.addEventListener("tribute-replaced", this.selected);
|
|
922
938
|
}
|
|
939
|
+
selected = (event) => {
|
|
940
|
+
if (this.config.selected) {
|
|
941
|
+
if (MentionPlugin._currentGuid === this._guid) {
|
|
942
|
+
this.config.selected(event.detail.item.original);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
};
|
|
923
946
|
destroy() {
|
|
924
947
|
this.editor.el.removeEventListener("tribute-replaced", this.selected);
|
|
925
948
|
}
|
|
@@ -938,10 +961,9 @@ class MentionPlugin extends Plugin {
|
|
|
938
961
|
});
|
|
939
962
|
}
|
|
940
963
|
}
|
|
941
|
-
MentionPlugin._currentGuid = null;
|
|
942
|
-
MentionPlugin._tributes = [];
|
|
943
964
|
|
|
944
965
|
class RealtimePlugin extends Plugin {
|
|
966
|
+
config;
|
|
945
967
|
constructor(config = { name: 'realtime' }) {
|
|
946
968
|
super();
|
|
947
969
|
this.config = config;
|
|
@@ -957,6 +979,8 @@ class RealtimePlugin extends Plugin {
|
|
|
957
979
|
}
|
|
958
980
|
|
|
959
981
|
class ScreenRecordPlugin extends Plugin {
|
|
982
|
+
config;
|
|
983
|
+
_activeEl;
|
|
960
984
|
constructor(config = {}) {
|
|
961
985
|
super();
|
|
962
986
|
this.config = config;
|