@firestitch/html-editor 9.5.0 → 9.5.4
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/components/html-editor/html-editor.component.d.ts +1 -0
- package/app/enums/default-plugin.enum.d.ts +2 -1
- package/bundles/firestitch-html-editor.umd.js +42 -23
- package/bundles/firestitch-html-editor.umd.js.map +1 -1
- package/bundles/firestitch-html-editor.umd.min.js +1 -1
- package/bundles/firestitch-html-editor.umd.min.js.map +1 -1
- package/esm2015/app/components/html-editor/html-editor.component.js +12 -8
- package/esm2015/app/enums/default-plugin.enum.js +1 -1
- package/esm2015/app/fs-html-editor.module.js +2 -1
- package/esm2015/app/utils/loader.js +2 -1
- package/esm5/app/components/html-editor/html-editor.component.js +14 -9
- package/esm5/app/enums/default-plugin.enum.js +1 -1
- package/esm5/app/fs-html-editor.module.js +2 -1
- package/esm5/app/utils/loader.js +2 -1
- package/fesm2015/firestitch-html-editor.js +13 -7
- package/fesm2015/firestitch-html-editor.js.map +1 -1
- package/fesm5/firestitch-html-editor.js +14 -7
- package/fesm5/firestitch-html-editor.js.map +1 -1
- package/firestitch-html-editor.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
var extendStatics = function(d, b) {
|
|
26
26
|
extendStatics = Object.setPrototypeOf ||
|
|
27
27
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
28
|
-
function (d, b) { for (var p in b) if (
|
|
28
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
29
29
|
return extendStatics(d, b);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
function __extends(d, b) {
|
|
33
|
+
if (typeof b !== "function" && b !== null)
|
|
34
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
35
|
extendStatics(d, b);
|
|
34
36
|
function __() { this.constructor = d; }
|
|
35
37
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -119,8 +121,8 @@
|
|
|
119
121
|
o[k2] = m[k];
|
|
120
122
|
});
|
|
121
123
|
|
|
122
|
-
function __exportStar(m,
|
|
123
|
-
for (var p in m) if (p !== "default" && !
|
|
124
|
+
function __exportStar(m, o) {
|
|
125
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
function __values(o) {
|
|
@@ -152,19 +154,31 @@
|
|
|
152
154
|
return ar;
|
|
153
155
|
}
|
|
154
156
|
|
|
157
|
+
/** @deprecated */
|
|
155
158
|
function __spread() {
|
|
156
159
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
157
160
|
ar = ar.concat(__read(arguments[i]));
|
|
158
161
|
return ar;
|
|
159
162
|
}
|
|
160
163
|
|
|
164
|
+
/** @deprecated */
|
|
161
165
|
function __spreadArrays() {
|
|
162
166
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
163
167
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
164
168
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
165
169
|
r[k] = a[j];
|
|
166
170
|
return r;
|
|
167
|
-
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function __spreadArray(to, from, pack) {
|
|
174
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
175
|
+
if (ar || !(i in from)) {
|
|
176
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
177
|
+
ar[i] = from[i];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
181
|
+
}
|
|
168
182
|
|
|
169
183
|
function __await(v) {
|
|
170
184
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -210,7 +224,7 @@
|
|
|
210
224
|
function __importStar(mod) {
|
|
211
225
|
if (mod && mod.__esModule) return mod;
|
|
212
226
|
var result = {};
|
|
213
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
227
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
214
228
|
__setModuleDefault(result, mod);
|
|
215
229
|
return result;
|
|
216
230
|
}
|
|
@@ -219,19 +233,17 @@
|
|
|
219
233
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
220
234
|
}
|
|
221
235
|
|
|
222
|
-
function __classPrivateFieldGet(receiver,
|
|
223
|
-
if (!
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
return privateMap.get(receiver);
|
|
236
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
237
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
238
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
239
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
227
240
|
}
|
|
228
241
|
|
|
229
|
-
function __classPrivateFieldSet(receiver,
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return value;
|
|
242
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
243
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
244
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
245
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
246
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
235
247
|
}
|
|
236
248
|
|
|
237
249
|
var RichButtons = [
|
|
@@ -290,6 +302,7 @@
|
|
|
290
302
|
video: 'plugins/video.min.js',
|
|
291
303
|
quote: 'plugins/quote.min.js',
|
|
292
304
|
draggable: 'plugins/draggable.min.js',
|
|
305
|
+
font_size: 'plugins/font_size.min.js',
|
|
293
306
|
};
|
|
294
307
|
var stylesPaths = {
|
|
295
308
|
froala: 'froala_editor.pkgd.min.css',
|
|
@@ -527,10 +540,7 @@
|
|
|
527
540
|
_this._cdRef.markForCheck();
|
|
528
541
|
});
|
|
529
542
|
_this._editor.events.on('contentChanged', function () {
|
|
530
|
-
|
|
531
|
-
if (_this.html !== editorHTML) {
|
|
532
|
-
_this._change(editorHTML);
|
|
533
|
-
}
|
|
543
|
+
_this._contentChanged();
|
|
534
544
|
});
|
|
535
545
|
_this._editor.events.on('paste.afterCleanup', function (html) {
|
|
536
546
|
var div = document.createElement('div');
|
|
@@ -560,6 +570,7 @@
|
|
|
560
570
|
.subscribe(function (url) {
|
|
561
571
|
image.setAttribute('src', url);
|
|
562
572
|
image.removeAttribute('data-fr-image-pasted');
|
|
573
|
+
_this._contentChanged();
|
|
563
574
|
});
|
|
564
575
|
});
|
|
565
576
|
});
|
|
@@ -604,8 +615,9 @@
|
|
|
604
615
|
var processor = new file.FileProcessor();
|
|
605
616
|
var file$1 = new file.FsFile(blob);
|
|
606
617
|
return processor.process([file$1], this.config.image)
|
|
607
|
-
.pipe(operators.switchMap(function (
|
|
608
|
-
|
|
618
|
+
.pipe(operators.switchMap(function (_a) {
|
|
619
|
+
var _b = __read(_a, 1), f = _b[0];
|
|
620
|
+
return _this.config.image.upload(f.file);
|
|
609
621
|
}));
|
|
610
622
|
};
|
|
611
623
|
FsHtmlEditorComponent.prototype._getTextNode = function (node) {
|
|
@@ -833,6 +845,12 @@
|
|
|
833
845
|
_this.initialize(options);
|
|
834
846
|
});
|
|
835
847
|
};
|
|
848
|
+
FsHtmlEditorComponent.prototype._contentChanged = function () {
|
|
849
|
+
var editorHTML = this._editor.html.get();
|
|
850
|
+
if (this.html !== editorHTML) {
|
|
851
|
+
this._change(editorHTML);
|
|
852
|
+
}
|
|
853
|
+
};
|
|
836
854
|
var FsHtmlEditorComponent_1;
|
|
837
855
|
FsHtmlEditorComponent.ctorParameters = function () { return [
|
|
838
856
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FS_HTML_EDITOR_CONFIG,] }] },
|
|
@@ -872,7 +890,7 @@
|
|
|
872
890
|
},
|
|
873
891
|
],
|
|
874
892
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
875
|
-
styles: [":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-dropdown-menu .fr-dropdown-wrapper,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar{transition:none!important}:host ::ng-deep .fr-toolbar{position:-webkit-sticky;position:sticky;z-index:2;border-radius:0;background-color:transparent}:host ::ng-deep .fr-toolbar .fr-btn-grp{margin:0 20px 0 0
|
|
893
|
+
styles: [":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-dropdown-menu .fr-dropdown-wrapper,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar{transition:none!important}:host ::ng-deep .fr-toolbar{position:-webkit-sticky;position:sticky;z-index:2;border-radius:0;background-color:transparent}:host ::ng-deep .fr-toolbar .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar .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 div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top{border:0}:host ::ng-deep .fr-toolbar .fr-newline{margin:0}:host ::ng-deep .fr-toolbar .fr-more-toolbar{z-index:auto}:host ::ng-deep .fr-toolbar .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar .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}:host.disabled ::ng-deep .disabled-line{display:block}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}.disabled-line{display:none;position:absolute;bottom:-1px;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x;height:1px;width:100%}.bottom-line{opacity:0;transform-origin:50%;transform:scaleX(.5);transition:background-color .3s cubic-bezier(.55,0,.55,.2);width:100%;border-bottom:2px solid #949494;position:absolute;bottom:-1px;z-index:1}:host{position:relative;display:block}:host.focused .bottom-line{opacity:1;display:block;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}::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 rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);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}"]
|
|
876
894
|
}),
|
|
877
895
|
__param(0, core.Optional()), __param(0, core.Inject(FS_HTML_EDITOR_CONFIG)),
|
|
878
896
|
__metadata("design:paramtypes", [Object, core.ChangeDetectorRef,
|
|
@@ -966,6 +984,7 @@
|
|
|
966
984
|
"url" /* Url */,
|
|
967
985
|
"video" /* Video */,
|
|
968
986
|
"draggable" /* Draggable */,
|
|
987
|
+
"font_size" /* FontSize */,
|
|
969
988
|
] }, config);
|
|
970
989
|
}
|
|
971
990
|
|