@firestitch/html-editor 12.0.2 → 12.0.5
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/fs-html-editor.module.d.ts +2 -1
- package/bundles/firestitch-html-editor.umd.js +20 -13
- package/bundles/firestitch-html-editor.umd.js.map +1 -1
- package/esm2015/app/components/html-editor/html-editor.component.js +10 -6
- package/esm2015/app/fs-html-editor.module.js +6 -2
- package/fesm2015/firestitch-html-editor.js +13 -5
- package/fesm2015/firestitch-html-editor.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,10 +6,11 @@ import * as i1 from "./components/html-editor/html-editor.component";
|
|
|
6
6
|
import * as i2 from "./components/html-renderer/html-renderer.component";
|
|
7
7
|
import * as i3 from "@angular/common";
|
|
8
8
|
import * as i4 from "@firestitch/skeleton";
|
|
9
|
+
import * as i5 from "@firestitch/label";
|
|
9
10
|
export declare class FsHtmlEditorModule {
|
|
10
11
|
static forRoot(config?: FsHtmlEditorConfig): ModuleWithProviders<FsHtmlEditorModule>;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlEditorModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsHtmlEditorModule, [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent], [typeof i3.CommonModule, typeof i4.FsSkeletonModule], [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsHtmlEditorModule, [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent], [typeof i3.CommonModule, typeof i4.FsSkeletonModule, typeof i5.FsLabelModule], [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsHtmlEditorModule>;
|
|
14
15
|
}
|
|
15
16
|
export declare function FsHtmlEditorConfigFactory(config: FsHtmlEditorConfig): {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/file'), require('rxjs'), require('rxjs/operators'), require('lodash-es'), require('@angular/platform-browser'), require('tributejs'), require('@firestitch/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@firestitch/html-editor', ['exports', '@angular/core', '@angular/common', '@firestitch/skeleton', '@angular/forms', '@firestitch/file', 'rxjs', 'rxjs/operators', 'lodash-es', '@angular/platform-browser', 'tributejs', '@firestitch/common'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["html-editor"] = {}), global.ng.core, global.ng.common, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@firestitch/label'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/file'), require('rxjs'), require('rxjs/operators'), require('lodash-es'), require('@angular/platform-browser'), require('tributejs'), require('@firestitch/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@firestitch/html-editor', ['exports', '@angular/core', '@angular/common', '@firestitch/label', '@firestitch/skeleton', '@angular/forms', '@firestitch/file', 'rxjs', 'rxjs/operators', 'lodash-es', '@angular/platform-browser', 'tributejs', '@firestitch/common'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["html-editor"] = {}), global.ng.core, global.ng.common, global.i2, global.i5, global.ng.forms, global.file, global.rxjs, global.rxjs.operators, global.lodashEs, global.ng.platformBrowser, global.Tribute, global.common));
|
|
5
|
+
})(this, (function (exports, i0, i4, i2, i5, forms, file, rxjs, operators, lodashEs, i1, Tribute, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
28
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
29
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
30
31
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
32
|
var Tribute__default = /*#__PURE__*/_interopDefaultLegacy(Tribute);
|
|
32
33
|
|
|
@@ -769,7 +770,7 @@
|
|
|
769
770
|
return lodashEs.merge({ froalaConfig: {} }, this._defaultConfig, this.config);
|
|
770
771
|
};
|
|
771
772
|
FsHtmlEditorComponent.prototype._change = function (html) {
|
|
772
|
-
|
|
773
|
+
this._html = html;
|
|
773
774
|
this.onChange(html);
|
|
774
775
|
};
|
|
775
776
|
FsHtmlEditorComponent.prototype._initButtons = function (config) {
|
|
@@ -843,6 +844,7 @@
|
|
|
843
844
|
});
|
|
844
845
|
};
|
|
845
846
|
FsHtmlEditorComponent.prototype._createOptions = function () {
|
|
847
|
+
var _a, _b;
|
|
846
848
|
var config = this._createConfig();
|
|
847
849
|
return lodashEs.merge(
|
|
848
850
|
// For some reason editor store somewhere pointer on default config object and dublicate options each time on init
|
|
@@ -861,6 +863,8 @@
|
|
|
861
863
|
quickInsertEnabled: false,
|
|
862
864
|
paragraphDefaultSelection: 'Format',
|
|
863
865
|
videoUpload: false,
|
|
866
|
+
imagePaste: !!((_a = config.image) === null || _a === void 0 ? void 0 : _a.upload),
|
|
867
|
+
imageUpload: !!((_b = config.image) === null || _b === void 0 ? void 0 : _b.upload),
|
|
864
868
|
paragraphFormat: {
|
|
865
869
|
N: 'Normal',
|
|
866
870
|
H1: 'Heading 1',
|
|
@@ -1049,7 +1053,7 @@
|
|
|
1049
1053
|
useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
|
|
1050
1054
|
multi: true
|
|
1051
1055
|
},
|
|
1052
|
-
], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"fs-html-editor-default\">\n
|
|
1056
|
+
], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0__namespace, template: "<fs-label-field>\n <fs-label *ngIf=\"config.label\">{{config.label}}</fs-label>\n <div class=\"fs-html-editor-default\">\n <ng-container *ngIf=\"initialized\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\">\n </ng-container>\n </ng-container>\n \n <div #elRef></div>\n \n <div class=\"bottom-line\"></div>\n <div class=\"disabled-line\"></div>\n <fs-html-renderer\n *ngIf=\"!initialized\"\n [html]=\"html\"\n (click)=\"uninitializedClick($event)\">\n </fs-html-renderer>\n </div>\n \n <fs-label-message>\n <div class=\"fs-form-message\"></div>\n </fs-label-message>\n</fs-label-field>\n", 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-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.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}: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}: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 #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"], components: [{ type: i2__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i2__namespace.FsLabelComponent, selector: "fs-label" }, { type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }, { type: i2__namespace.FsLabelMessageComponent, selector: "fs-label-message" }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1053
1057
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorComponent, decorators: [{
|
|
1054
1058
|
type: i0.Component,
|
|
1055
1059
|
args: [{
|
|
@@ -1111,19 +1115,22 @@
|
|
|
1111
1115
|
}());
|
|
1112
1116
|
FsHtmlEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1113
1117
|
FsHtmlEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, declarations: [FsHtmlEditorComponent,
|
|
1114
|
-
FsHtmlRendererComponent], imports: [
|
|
1115
|
-
|
|
1118
|
+
FsHtmlRendererComponent], imports: [i4.CommonModule,
|
|
1119
|
+
i5.FsSkeletonModule,
|
|
1120
|
+
i2.FsLabelModule], exports: [FsHtmlEditorComponent,
|
|
1116
1121
|
FsHtmlRendererComponent] });
|
|
1117
1122
|
FsHtmlEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, imports: [[
|
|
1118
|
-
|
|
1119
|
-
|
|
1123
|
+
i4.CommonModule,
|
|
1124
|
+
i5.FsSkeletonModule,
|
|
1125
|
+
i2.FsLabelModule,
|
|
1120
1126
|
]] });
|
|
1121
1127
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, decorators: [{
|
|
1122
1128
|
type: i0.NgModule,
|
|
1123
1129
|
args: [{
|
|
1124
1130
|
imports: [
|
|
1125
|
-
|
|
1126
|
-
|
|
1131
|
+
i4.CommonModule,
|
|
1132
|
+
i5.FsSkeletonModule,
|
|
1133
|
+
i2.FsLabelModule,
|
|
1127
1134
|
],
|
|
1128
1135
|
exports: [
|
|
1129
1136
|
FsHtmlEditorComponent,
|