@syncfusion/ej2-richtexteditor 19.3.43 → 19.3.47-6125
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/CHANGELOG.md +999 -955
- package/README.md +67 -67
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +323 -204
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +428 -313
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/license +9 -9
- package/package.json +55 -74
- package/src/common/constant.d.ts +8 -8
- package/src/common/constant.js +8 -8
- package/src/common/interface.d.ts +7 -7
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +4 -4
- package/src/editor-manager/base/interface.d.ts +7 -7
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +2 -1
- package/src/editor-manager/plugin/clearformat.js +2 -1
- package/src/editor-manager/plugin/dom-node.d.ts +34 -34
- package/src/editor-manager/plugin/dom-node.js +34 -34
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +15 -20
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml.js +18 -8
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +2 -3
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +2 -1
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +2 -1
- package/src/editor-manager/plugin/selection-commands.js +53 -3
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +5 -5
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +5 -5
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- package/src/global.d.ts +1 -0
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
- package/src/rich-text-editor/actions/enter-key.js +5 -16
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +4 -3
- package/src/rich-text-editor/actions/html-editor.js +34 -4
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +20 -20
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +14 -11
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +2 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +6 -4
- package/src/rich-text-editor/base/classes.d.ts +107 -107
- package/src/rich-text-editor/base/classes.js +107 -107
- package/src/rich-text-editor/base/constant.d.ts +120 -120
- package/src/rich-text-editor/base/constant.js +120 -120
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +45 -45
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +851 -851
- package/src/rich-text-editor/base/rich-text-editor.d.ts +53 -53
- package/src/rich-text-editor/base/rich-text-editor.js +65 -66
- package/src/rich-text-editor/base/util.d.ts +2 -1
- package/src/rich-text-editor/base/util.js +2 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +8 -8
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +439 -439
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +3 -1
- package/src/rich-text-editor/renderer/image-module.js +40 -13
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +6 -4
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +11 -4
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -10
- package/src/rich-text-editor/renderer/toolbar-renderer.js +10 -10
- package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
- package/src/rich-text-editor/renderer/view-source.js +6 -6
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +22 -22
- package/styles/_all.scss +2 -2
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +187 -187
- package/styles/rich-text-editor/_bootstrap-definition.scss +244 -244
- package/styles/rich-text-editor/_bootstrap4-definition.scss +370 -370
- package/styles/rich-text-editor/_bootstrap5-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-dark-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-definition.scss +167 -167
- package/styles/rich-text-editor/_highcontrast-definition.scss +167 -167
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +167 -167
- package/styles/rich-text-editor/_layout.scss +1635 -1635
- package/styles/rich-text-editor/_material-dark-definition.scss +172 -172
- package/styles/rich-text-editor/_material-definition.scss +169 -169
- package/styles/rich-text-editor/_tailwind-definition.scss +167 -167
- package/styles/rich-text-editor/_theme.scss +626 -626
- package/styles/rich-text-editor/bootstrap-dark.css +1 -1
- package/styles/rich-text-editor/bootstrap.css +1 -1
- package/styles/rich-text-editor/bootstrap4.css +1 -1
- package/styles/rich-text-editor/bootstrap5-dark.css +1 -1
- package/styles/rich-text-editor/bootstrap5.css +1 -1
- package/styles/rich-text-editor/fabric-dark.css +1 -1
- package/styles/rich-text-editor/fabric.css +1 -1
- package/styles/rich-text-editor/highcontrast-light.css +1 -1
- package/styles/rich-text-editor/highcontrast.css +1 -1
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap4.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap5.scss +303 -303
- package/styles/rich-text-editor/icons/_fabric-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_fabric.scss +304 -304
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +304 -304
- package/styles/rich-text-editor/icons/_highcontrast.scss +304 -304
- package/styles/rich-text-editor/icons/_material-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_material.scss +304 -304
- package/styles/rich-text-editor/icons/_tailwind.scss +304 -304
- package/styles/rich-text-editor/material-dark.css +1 -1
- package/styles/rich-text-editor/material.css +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +1 -1
- package/styles/rich-text-editor/tailwind.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
- package/.eslintrc.json +0 -244
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -2515,6 +2515,7 @@ function getEditValue(value, rteObj) {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
/**
|
|
2517
2517
|
* @param {string} value - specifies the value
|
|
2518
|
+
* @param {IRichTextEditor} rteObj - specifies the rich text editor instance.
|
|
2518
2519
|
* @returns {string} - returns the string
|
|
2519
2520
|
* @hidden
|
|
2520
2521
|
*/
|
|
@@ -2692,7 +2693,7 @@ function updateDropDownFontFormatLocale(self) {
|
|
|
2692
2693
|
* @hidden
|
|
2693
2694
|
* @deprecated
|
|
2694
2695
|
*/
|
|
2695
|
-
var ToolbarRenderer = /** @
|
|
2696
|
+
var ToolbarRenderer = /** @class */ (function () {
|
|
2696
2697
|
/**
|
|
2697
2698
|
* Constructor for toolbar renderer module
|
|
2698
2699
|
*
|
|
@@ -2861,7 +2862,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
2861
2862
|
* renderListDropDown method
|
|
2862
2863
|
*
|
|
2863
2864
|
* @param {IDropDownModel} args - specifies the the arguments.
|
|
2864
|
-
* @param {string} item - specifies the string value
|
|
2865
2865
|
* @returns {void}
|
|
2866
2866
|
* @hidden
|
|
2867
2867
|
* @deprecated
|
|
@@ -3149,6 +3149,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3149
3149
|
enablePersistence: this.parent.enablePersistence,
|
|
3150
3150
|
enableRtl: this.parent.enableRtl,
|
|
3151
3151
|
inline: true,
|
|
3152
|
+
value: '#fff',
|
|
3152
3153
|
created: function () {
|
|
3153
3154
|
var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
|
|
3154
3155
|
colorPicker.setProperties({ value: value });
|
|
@@ -3235,7 +3236,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3235
3236
|
/**
|
|
3236
3237
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
3237
3238
|
*/
|
|
3238
|
-
var BaseToolbar = /** @
|
|
3239
|
+
var BaseToolbar = /** @class */ (function () {
|
|
3239
3240
|
function BaseToolbar(parent, serviceLocator) {
|
|
3240
3241
|
this.tools = {};
|
|
3241
3242
|
this.parent = parent;
|
|
@@ -3407,7 +3408,7 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
|
3407
3408
|
/**
|
|
3408
3409
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
3409
3410
|
*/
|
|
3410
|
-
var DropDownButtons = /** @
|
|
3411
|
+
var DropDownButtons = /** @class */ (function () {
|
|
3411
3412
|
function DropDownButtons(parent, serviceLocator) {
|
|
3412
3413
|
this.parent = parent;
|
|
3413
3414
|
this.locator = serviceLocator;
|
|
@@ -3904,7 +3905,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
|
|
|
3904
3905
|
* @hidden
|
|
3905
3906
|
* @deprecated
|
|
3906
3907
|
*/
|
|
3907
|
-
var ServiceLocator = /** @
|
|
3908
|
+
var ServiceLocator = /** @class */ (function () {
|
|
3908
3909
|
function ServiceLocator() {
|
|
3909
3910
|
this.services = {};
|
|
3910
3911
|
}
|
|
@@ -3948,7 +3949,7 @@ var ServiceLocator = /** @__PURE__ @class */ (function () {
|
|
|
3948
3949
|
* @hidden
|
|
3949
3950
|
* @deprecated
|
|
3950
3951
|
*/
|
|
3951
|
-
var RendererFactory = /** @
|
|
3952
|
+
var RendererFactory = /** @class */ (function () {
|
|
3952
3953
|
function RendererFactory() {
|
|
3953
3954
|
this.rendererMap = {};
|
|
3954
3955
|
}
|
|
@@ -3991,7 +3992,7 @@ var RendererFactory = /** @__PURE__ @class */ (function () {
|
|
|
3991
3992
|
/**
|
|
3992
3993
|
* `ToolbarAction` module is used to toolbar click action
|
|
3993
3994
|
*/
|
|
3994
|
-
var ToolbarAction = /** @
|
|
3995
|
+
var ToolbarAction = /** @class */ (function () {
|
|
3995
3996
|
function ToolbarAction(parent) {
|
|
3996
3997
|
this.parent = parent;
|
|
3997
3998
|
this.addEventListener();
|
|
@@ -4064,7 +4065,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
|
|
|
4064
4065
|
/**
|
|
4065
4066
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
4066
4067
|
*/
|
|
4067
|
-
var Toolbar$2 = /** @
|
|
4068
|
+
var Toolbar$2 = /** @class */ (function () {
|
|
4068
4069
|
function Toolbar$$1(parent, serviceLocator) {
|
|
4069
4070
|
this.parent = parent;
|
|
4070
4071
|
this.isToolbar = false;
|
|
@@ -4729,25 +4730,25 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
4729
4730
|
return Toolbar$$1;
|
|
4730
4731
|
}());
|
|
4731
4732
|
|
|
4732
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
4733
|
-
var extendStatics = function (d, b) {
|
|
4734
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4735
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
4736
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
4737
|
-
return extendStatics(d, b);
|
|
4738
|
-
};
|
|
4739
|
-
return function (d, b) {
|
|
4740
|
-
extendStatics(d, b);
|
|
4741
|
-
function __() { this.constructor = d; }
|
|
4742
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
4743
|
-
};
|
|
4744
|
-
})();
|
|
4745
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4746
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4747
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4748
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4749
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4750
|
-
};
|
|
4733
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
4734
|
+
var extendStatics = function (d, b) {
|
|
4735
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4736
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
4737
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
4738
|
+
return extendStatics(d, b);
|
|
4739
|
+
};
|
|
4740
|
+
return function (d, b) {
|
|
4741
|
+
extendStatics(d, b);
|
|
4742
|
+
function __() { this.constructor = d; }
|
|
4743
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
4744
|
+
};
|
|
4745
|
+
})();
|
|
4746
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4747
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4748
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4749
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4750
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4751
|
+
};
|
|
4751
4752
|
var keyCode = {
|
|
4752
4753
|
'backspace': 8,
|
|
4753
4754
|
'tab': 9,
|
|
@@ -4815,7 +4816,7 @@ var keyCode = {
|
|
|
4815
4816
|
* @hidden
|
|
4816
4817
|
* @deprecated
|
|
4817
4818
|
*/
|
|
4818
|
-
var KeyboardEvents$1 = /** @
|
|
4819
|
+
var KeyboardEvents$1 = /** @class */ (function (_super) {
|
|
4819
4820
|
__extends(KeyboardEvents$$1, _super);
|
|
4820
4821
|
/**
|
|
4821
4822
|
* Initializes the KeyboardEvents
|
|
@@ -4958,7 +4959,7 @@ var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
|
|
|
4958
4959
|
/**
|
|
4959
4960
|
* `Color Picker` module is used to handle ColorPicker actions.
|
|
4960
4961
|
*/
|
|
4961
|
-
var ColorPickerInput = /** @
|
|
4962
|
+
var ColorPickerInput = /** @class */ (function () {
|
|
4962
4963
|
function ColorPickerInput(parent, serviceLocator) {
|
|
4963
4964
|
this.tools = {};
|
|
4964
4965
|
this.parent = parent;
|
|
@@ -5163,7 +5164,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
|
|
|
5163
5164
|
/**
|
|
5164
5165
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
5165
5166
|
*/
|
|
5166
|
-
var BaseQuickToolbar = /** @
|
|
5167
|
+
var BaseQuickToolbar = /** @class */ (function () {
|
|
5167
5168
|
function BaseQuickToolbar(parent, locator) {
|
|
5168
5169
|
this.parent = parent;
|
|
5169
5170
|
this.locator = locator;
|
|
@@ -5558,7 +5559,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
5558
5559
|
* @hidden
|
|
5559
5560
|
* @deprecated
|
|
5560
5561
|
*/
|
|
5561
|
-
var PopupRenderer = /** @
|
|
5562
|
+
var PopupRenderer = /** @class */ (function () {
|
|
5562
5563
|
/**
|
|
5563
5564
|
* Constructor for popup renderer module
|
|
5564
5565
|
*
|
|
@@ -5627,7 +5628,7 @@ var PopupRenderer = /** @__PURE__ @class */ (function () {
|
|
|
5627
5628
|
/**
|
|
5628
5629
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
5629
5630
|
*/
|
|
5630
|
-
var QuickToolbar = /** @
|
|
5631
|
+
var QuickToolbar = /** @class */ (function () {
|
|
5631
5632
|
function QuickToolbar(parent, locator) {
|
|
5632
5633
|
this.parent = parent;
|
|
5633
5634
|
this.locator = locator;
|
|
@@ -5812,7 +5813,10 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
5812
5813
|
else {
|
|
5813
5814
|
var closestAnchor = closest(target, 'a');
|
|
5814
5815
|
target = closestAnchor ? closestAnchor : target;
|
|
5815
|
-
|
|
5816
|
+
var startNode = this.parent.getRange().startContainer.parentElement;
|
|
5817
|
+
var endNode = this.parent.getRange().endContainer.parentElement;
|
|
5818
|
+
if ((isNullOrUndefined(closest(startNode, 'A')) || isNullOrUndefined(closest(endNode, 'A'))) && (!closest(target, 'td,th') || !range.collapsed) &&
|
|
5819
|
+
(target.tagName !== 'IMG' || this.parent.getRange().startOffset !== this.parent.getRange().endOffset)) {
|
|
5816
5820
|
if (this.parent.inlineMode.onSelection && range.collapsed) {
|
|
5817
5821
|
return;
|
|
5818
5822
|
}
|
|
@@ -6063,7 +6067,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6063
6067
|
/**
|
|
6064
6068
|
* `Count` module is used to handle Count actions.
|
|
6065
6069
|
*/
|
|
6066
|
-
var Count = /** @
|
|
6070
|
+
var Count = /** @class */ (function () {
|
|
6067
6071
|
function Count(parent, serviceLocator) {
|
|
6068
6072
|
this.parent = parent;
|
|
6069
6073
|
this.locator = serviceLocator;
|
|
@@ -6191,7 +6195,7 @@ var Count = /** @__PURE__ @class */ (function () {
|
|
|
6191
6195
|
* @hidden
|
|
6192
6196
|
* @deprecated
|
|
6193
6197
|
*/
|
|
6194
|
-
var MarkdownSelection = /** @
|
|
6198
|
+
var MarkdownSelection = /** @class */ (function () {
|
|
6195
6199
|
function MarkdownSelection() {
|
|
6196
6200
|
}
|
|
6197
6201
|
/**
|
|
@@ -6574,7 +6578,7 @@ function getDefaultMDTbStatus() {
|
|
|
6574
6578
|
/**
|
|
6575
6579
|
* MarkdownToolbarStatus module for refresh the toolbar status
|
|
6576
6580
|
*/
|
|
6577
|
-
var MarkdownToolbarStatus = /** @
|
|
6581
|
+
var MarkdownToolbarStatus = /** @class */ (function () {
|
|
6578
6582
|
function MarkdownToolbarStatus(parent) {
|
|
6579
6583
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
|
|
6580
6584
|
this.selection = new MarkdownSelection();
|
|
@@ -6696,7 +6700,7 @@ var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
6696
6700
|
/**
|
|
6697
6701
|
* `ExecCommandCallBack` module is used to run the editor manager command
|
|
6698
6702
|
*/
|
|
6699
|
-
var ExecCommandCallBack = /** @
|
|
6703
|
+
var ExecCommandCallBack = /** @class */ (function () {
|
|
6700
6704
|
function ExecCommandCallBack(parent) {
|
|
6701
6705
|
this.parent = parent;
|
|
6702
6706
|
this.addEventListener();
|
|
@@ -6789,16 +6793,16 @@ var MS_WORD_CLEANUP_PLUGIN = 'ms_word_cleanup_plugin';
|
|
|
6789
6793
|
*/
|
|
6790
6794
|
var MS_WORD_CLEANUP = 'ms_word_cleanup';
|
|
6791
6795
|
/**
|
|
6792
|
-
* ActionBegin event callback
|
|
6793
|
-
*
|
|
6794
|
-
* @hidden
|
|
6795
|
-
*/
|
|
6796
|
+
* ActionBegin event callback
|
|
6797
|
+
*
|
|
6798
|
+
* @hidden
|
|
6799
|
+
*/
|
|
6796
6800
|
var ON_BEGIN = 'onBegin';
|
|
6797
6801
|
/**
|
|
6798
|
-
* Callback for spacelist action
|
|
6799
|
-
*
|
|
6800
|
-
* @hidden
|
|
6801
|
-
*/
|
|
6802
|
+
* Callback for spacelist action
|
|
6803
|
+
*
|
|
6804
|
+
* @hidden
|
|
6805
|
+
*/
|
|
6802
6806
|
var SPACE_ACTION = 'actionBegin';
|
|
6803
6807
|
|
|
6804
6808
|
/**
|
|
@@ -6807,7 +6811,7 @@ var SPACE_ACTION = 'actionBegin';
|
|
|
6807
6811
|
* @hidden
|
|
6808
6812
|
* @deprecated
|
|
6809
6813
|
*/
|
|
6810
|
-
var Formatter = /** @
|
|
6814
|
+
var Formatter = /** @class */ (function () {
|
|
6811
6815
|
function Formatter() {
|
|
6812
6816
|
}
|
|
6813
6817
|
/**
|
|
@@ -7064,7 +7068,7 @@ var MD_TABLE = 'insert-table';
|
|
|
7064
7068
|
*
|
|
7065
7069
|
* @hidden
|
|
7066
7070
|
*/
|
|
7067
|
-
var MDLists = /** @
|
|
7071
|
+
var MDLists = /** @class */ (function () {
|
|
7068
7072
|
/**
|
|
7069
7073
|
* Constructor for creating the Lists plugin
|
|
7070
7074
|
*
|
|
@@ -7530,7 +7534,7 @@ var MDLists = /** @__PURE__ @class */ (function () {
|
|
|
7530
7534
|
* @hidden
|
|
7531
7535
|
* @deprecated
|
|
7532
7536
|
*/
|
|
7533
|
-
var MDFormats = /** @
|
|
7537
|
+
var MDFormats = /** @class */ (function () {
|
|
7534
7538
|
/**
|
|
7535
7539
|
* Constructor for creating the Formats plugin
|
|
7536
7540
|
*
|
|
@@ -7757,7 +7761,7 @@ var MDFormats = /** @__PURE__ @class */ (function () {
|
|
|
7757
7761
|
* @hidden
|
|
7758
7762
|
* @deprecated
|
|
7759
7763
|
*/
|
|
7760
|
-
var MDSelectionFormats = /** @
|
|
7764
|
+
var MDSelectionFormats = /** @class */ (function () {
|
|
7761
7765
|
function MDSelectionFormats(parent) {
|
|
7762
7766
|
extend(this, this, parent, true);
|
|
7763
7767
|
this.selection = this.parent.markdownSelection;
|
|
@@ -8209,7 +8213,7 @@ var selfClosingTags = [
|
|
|
8209
8213
|
/**
|
|
8210
8214
|
* `Undo` module is used to handle undo actions.
|
|
8211
8215
|
*/
|
|
8212
|
-
var UndoRedoCommands = /** @
|
|
8216
|
+
var UndoRedoCommands = /** @class */ (function () {
|
|
8213
8217
|
function UndoRedoCommands(parent, options) {
|
|
8214
8218
|
this.undoRedoStack = [];
|
|
8215
8219
|
this.parent = parent;
|
|
@@ -8404,7 +8408,7 @@ var UndoRedoCommands = /** @__PURE__ @class */ (function () {
|
|
|
8404
8408
|
* @hidden
|
|
8405
8409
|
* @deprecated
|
|
8406
8410
|
*/
|
|
8407
|
-
var MDLink = /** @
|
|
8411
|
+
var MDLink = /** @class */ (function () {
|
|
8408
8412
|
/**
|
|
8409
8413
|
* Constructor for creating the Formats plugin
|
|
8410
8414
|
*
|
|
@@ -8455,7 +8459,7 @@ var MDLink = /** @__PURE__ @class */ (function () {
|
|
|
8455
8459
|
* @hidden
|
|
8456
8460
|
* @deprecated
|
|
8457
8461
|
*/
|
|
8458
|
-
var MDTable = /** @
|
|
8462
|
+
var MDTable = /** @class */ (function () {
|
|
8459
8463
|
/**
|
|
8460
8464
|
* Constructor for creating the Formats plugin
|
|
8461
8465
|
*
|
|
@@ -8684,7 +8688,7 @@ var MDTable = /** @__PURE__ @class */ (function () {
|
|
|
8684
8688
|
* @hidden
|
|
8685
8689
|
* @deprecated
|
|
8686
8690
|
*/
|
|
8687
|
-
var ClearFormat = /** @
|
|
8691
|
+
var ClearFormat = /** @class */ (function () {
|
|
8688
8692
|
/**
|
|
8689
8693
|
* Constructor for creating the clear format plugin
|
|
8690
8694
|
*
|
|
@@ -8800,7 +8804,7 @@ var ClearFormat = /** @__PURE__ @class */ (function () {
|
|
|
8800
8804
|
* @hidden
|
|
8801
8805
|
* @deprecated
|
|
8802
8806
|
*/
|
|
8803
|
-
var MarkdownParser = /** @
|
|
8807
|
+
var MarkdownParser = /** @class */ (function () {
|
|
8804
8808
|
/**
|
|
8805
8809
|
* Constructor for creating the component
|
|
8806
8810
|
*
|
|
@@ -8891,26 +8895,26 @@ var MarkdownParser = /** @__PURE__ @class */ (function () {
|
|
|
8891
8895
|
return MarkdownParser;
|
|
8892
8896
|
}());
|
|
8893
8897
|
|
|
8894
|
-
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
8895
|
-
var extendStatics = function (d, b) {
|
|
8896
|
-
extendStatics = Object.setPrototypeOf ||
|
|
8897
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8898
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
8899
|
-
return extendStatics(d, b);
|
|
8900
|
-
};
|
|
8901
|
-
return function (d, b) {
|
|
8902
|
-
extendStatics(d, b);
|
|
8903
|
-
function __() { this.constructor = d; }
|
|
8904
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8905
|
-
};
|
|
8906
|
-
})();
|
|
8898
|
+
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
8899
|
+
var extendStatics = function (d, b) {
|
|
8900
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8901
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8902
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
8903
|
+
return extendStatics(d, b);
|
|
8904
|
+
};
|
|
8905
|
+
return function (d, b) {
|
|
8906
|
+
extendStatics(d, b);
|
|
8907
|
+
function __() { this.constructor = d; }
|
|
8908
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8909
|
+
};
|
|
8910
|
+
})();
|
|
8907
8911
|
/**
|
|
8908
8912
|
* Markdown adapter
|
|
8909
8913
|
*
|
|
8910
8914
|
* @hidden
|
|
8911
8915
|
* @deprecated
|
|
8912
8916
|
*/
|
|
8913
|
-
var MarkdownFormatter = /** @
|
|
8917
|
+
var MarkdownFormatter = /** @class */ (function (_super) {
|
|
8914
8918
|
__extends$1(MarkdownFormatter, _super);
|
|
8915
8919
|
function MarkdownFormatter(options) {
|
|
8916
8920
|
var _this = _super.call(this) || this;
|
|
@@ -8957,7 +8961,7 @@ var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
|
8957
8961
|
* @hidden
|
|
8958
8962
|
* @deprecated
|
|
8959
8963
|
*/
|
|
8960
|
-
var MarkdownRender = /** @
|
|
8964
|
+
var MarkdownRender = /** @class */ (function () {
|
|
8961
8965
|
/**
|
|
8962
8966
|
* Constructor for content renderer module
|
|
8963
8967
|
*
|
|
@@ -9039,7 +9043,7 @@ var MarkdownRender = /** @__PURE__ @class */ (function () {
|
|
|
9039
9043
|
/**
|
|
9040
9044
|
* `MarkdownEditor` module is used to markdown editor
|
|
9041
9045
|
*/
|
|
9042
|
-
var MarkdownEditor = /** @
|
|
9046
|
+
var MarkdownEditor = /** @class */ (function () {
|
|
9043
9047
|
function MarkdownEditor(parent, serviceLocator) {
|
|
9044
9048
|
this.parent = parent;
|
|
9045
9049
|
this.locator = serviceLocator;
|
|
@@ -9294,7 +9298,7 @@ var CLEAR_TYPE = 'clear-type';
|
|
|
9294
9298
|
/**
|
|
9295
9299
|
* `Selection` module is used to handle RTE Selections.
|
|
9296
9300
|
*/
|
|
9297
|
-
var NodeSelection = /** @
|
|
9301
|
+
var NodeSelection = /** @class */ (function () {
|
|
9298
9302
|
function NodeSelection() {
|
|
9299
9303
|
this.startNodeName = [];
|
|
9300
9304
|
this.endNodeName = [];
|
|
@@ -9738,7 +9742,7 @@ var markerClassName = {
|
|
|
9738
9742
|
* @hidden
|
|
9739
9743
|
* @deprecated
|
|
9740
9744
|
*/
|
|
9741
|
-
var DOMNode = /** @
|
|
9745
|
+
var DOMNode = /** @class */ (function () {
|
|
9742
9746
|
/**
|
|
9743
9747
|
* Constructor for creating the DOMNode plugin
|
|
9744
9748
|
*
|
|
@@ -10505,7 +10509,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
10505
10509
|
* @hidden
|
|
10506
10510
|
* @deprecated
|
|
10507
10511
|
*/
|
|
10508
|
-
var Lists = /** @
|
|
10512
|
+
var Lists = /** @class */ (function () {
|
|
10509
10513
|
/**
|
|
10510
10514
|
* Constructor for creating the Lists plugin
|
|
10511
10515
|
*
|
|
@@ -10577,7 +10581,6 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
10577
10581
|
}
|
|
10578
10582
|
}
|
|
10579
10583
|
};
|
|
10580
|
-
// eslint-disable-next-line
|
|
10581
10584
|
Lists.prototype.enterList = function (e) {
|
|
10582
10585
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
10583
10586
|
var startNode = range.startContainer.nodeName === 'LI' ? range.startContainer :
|
|
@@ -11260,7 +11263,7 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
11260
11263
|
*
|
|
11261
11264
|
* @hidden
|
|
11262
11265
|
*/
|
|
11263
|
-
var InsertMethods = /** @
|
|
11266
|
+
var InsertMethods = /** @class */ (function () {
|
|
11264
11267
|
function InsertMethods() {
|
|
11265
11268
|
}
|
|
11266
11269
|
/**
|
|
@@ -11337,7 +11340,7 @@ var InsertMethods = /** @__PURE__ @class */ (function () {
|
|
|
11337
11340
|
* @hidden
|
|
11338
11341
|
* @deprecated
|
|
11339
11342
|
*/
|
|
11340
|
-
var NodeCutter = /** @
|
|
11343
|
+
var NodeCutter = /** @class */ (function () {
|
|
11341
11344
|
function NodeCutter() {
|
|
11342
11345
|
this.enterAction = 'P';
|
|
11343
11346
|
this.position = -1;
|
|
@@ -11543,7 +11546,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
11543
11546
|
* @hidden
|
|
11544
11547
|
* @deprecated
|
|
11545
11548
|
*/
|
|
11546
|
-
var Formats = /** @
|
|
11549
|
+
var Formats = /** @class */ (function () {
|
|
11547
11550
|
/**
|
|
11548
11551
|
* Constructor for creating the Formats plugin
|
|
11549
11552
|
*
|
|
@@ -11911,7 +11914,7 @@ var Formats = /** @__PURE__ @class */ (function () {
|
|
|
11911
11914
|
* @hidden
|
|
11912
11915
|
* @deprecated
|
|
11913
11916
|
*/
|
|
11914
|
-
var InsertHtml = /** @
|
|
11917
|
+
var InsertHtml = /** @class */ (function () {
|
|
11915
11918
|
function InsertHtml() {
|
|
11916
11919
|
}
|
|
11917
11920
|
InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal) {
|
|
@@ -11935,6 +11938,11 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
11935
11938
|
var nodeSelection = new NodeSelection();
|
|
11936
11939
|
var nodeCutter = new NodeCutter();
|
|
11937
11940
|
var range = nodeSelection.getRange(docElement);
|
|
11941
|
+
if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
|
|
11942
|
+
range.startOffset === range.endOffset && editNode.textContent.length === 0 && editNode.children[0].tagName === 'P') {
|
|
11943
|
+
nodeSelection.setSelectionText(docElement, range.startContainer.children[0], range.startContainer.children[0], 0, 0);
|
|
11944
|
+
range = nodeSelection.getRange(docElement);
|
|
11945
|
+
}
|
|
11938
11946
|
var isCursor = range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
11939
11947
|
range.startContainer === range.endContainer;
|
|
11940
11948
|
var isCollapsed = range.collapsed;
|
|
@@ -12246,15 +12254,20 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
12246
12254
|
blockNode = range.endContainer;
|
|
12247
12255
|
range.setEnd(blockNode, range.endContainer.textContent.length);
|
|
12248
12256
|
}
|
|
12249
|
-
if (!isNullOrUndefined(blockNode) && editNode === blockNode &&
|
|
12250
|
-
range.startContainer === editNode && range.endContainer === editNode) {
|
|
12251
|
-
blockNode = editNode.firstElementChild;
|
|
12252
|
-
range.setStart(editNode.firstElementChild, editNode.firstElementChild.textContent.length);
|
|
12253
|
-
range.setEnd(editNode.firstElementChild, editNode.firstElementChild.textContent.length);
|
|
12254
|
-
}
|
|
12255
12257
|
if (blockNode.nodeName === 'BODY' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
12256
12258
|
blockNode = range.startContainer;
|
|
12257
12259
|
}
|
|
12260
|
+
if (blockNode.closest('LI') && node && node.firstElementChild &&
|
|
12261
|
+
((node).firstElementChild.tagName === 'OL' || node.firstElementChild.tagName === 'UL')) {
|
|
12262
|
+
var liNode = void 0;
|
|
12263
|
+
while (node.firstElementChild.lastElementChild && node.firstElementChild.lastElementChild.tagName === 'LI') {
|
|
12264
|
+
liNode = node.firstElementChild.lastElementChild;
|
|
12265
|
+
liNode.style.removeProperty('margin-left');
|
|
12266
|
+
liNode.style.removeProperty('margin-top');
|
|
12267
|
+
liNode.style.removeProperty('margin-bottom');
|
|
12268
|
+
node.firstElementChild.insertAdjacentElement('afterend', liNode);
|
|
12269
|
+
}
|
|
12270
|
+
}
|
|
12258
12271
|
if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH') {
|
|
12259
12272
|
var tempSpan = createElement('span', { className: 'tempSpan' });
|
|
12260
12273
|
range.insertNode(tempSpan);
|
|
@@ -12355,7 +12368,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
12355
12368
|
* @hidden
|
|
12356
12369
|
* @deprecated
|
|
12357
12370
|
*/
|
|
12358
|
-
var LinkCommand = /** @
|
|
12371
|
+
var LinkCommand = /** @class */ (function () {
|
|
12359
12372
|
/**
|
|
12360
12373
|
* Constructor for creating the Formats plugin
|
|
12361
12374
|
*
|
|
@@ -12644,7 +12657,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
12644
12657
|
* @hidden
|
|
12645
12658
|
* @deprecated
|
|
12646
12659
|
*/
|
|
12647
|
-
var Alignments = /** @
|
|
12660
|
+
var Alignments = /** @class */ (function () {
|
|
12648
12661
|
/**
|
|
12649
12662
|
* Constructor for creating the Formats plugin
|
|
12650
12663
|
*
|
|
@@ -12747,7 +12760,7 @@ var Alignments = /** @__PURE__ @class */ (function () {
|
|
|
12747
12760
|
* @hidden
|
|
12748
12761
|
* @deprecated
|
|
12749
12762
|
*/
|
|
12750
|
-
var Indents = /** @
|
|
12763
|
+
var Indents = /** @class */ (function () {
|
|
12751
12764
|
/**
|
|
12752
12765
|
* Constructor for creating the Formats plugin
|
|
12753
12766
|
*
|
|
@@ -12867,7 +12880,7 @@ var CLASS_IMAGE_INLINE = 'e-imginline';
|
|
|
12867
12880
|
* @hidden
|
|
12868
12881
|
* @deprecated
|
|
12869
12882
|
*/
|
|
12870
|
-
var ImageCommand = /** @
|
|
12883
|
+
var ImageCommand = /** @class */ (function () {
|
|
12871
12884
|
/**
|
|
12872
12885
|
* Constructor for creating the Formats plugin
|
|
12873
12886
|
*
|
|
@@ -12891,7 +12904,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
12891
12904
|
* @deprecated
|
|
12892
12905
|
*/
|
|
12893
12906
|
ImageCommand.prototype.imageCommand = function (e) {
|
|
12894
|
-
switch (e.value.toString().
|
|
12907
|
+
switch (e.value.toString().toLowerCase()) {
|
|
12895
12908
|
case 'image':
|
|
12896
12909
|
case 'replace':
|
|
12897
12910
|
this.createImage(e);
|
|
@@ -12968,21 +12981,8 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
12968
12981
|
var selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
12969
12982
|
var imgElm_1 = (e.value === 'Replace' || isReplaced) ? e.item.selectParent[0] :
|
|
12970
12983
|
(Browser.isIE ? selectedNode.previousSibling : selectedNode.previousElementSibling);
|
|
12971
|
-
var preventLoadCall_1 = false;
|
|
12972
12984
|
imgElm_1.addEventListener('load', function () {
|
|
12973
|
-
if (e.value
|
|
12974
|
-
if (!preventLoadCall_1) {
|
|
12975
|
-
e.callBack({
|
|
12976
|
-
requestType: 'Images',
|
|
12977
|
-
editorMode: 'HTML',
|
|
12978
|
-
event: e.event,
|
|
12979
|
-
range: _this.parent.nodeSelection.getRange(_this.parent.currentDocument),
|
|
12980
|
-
elements: [imgElm_1]
|
|
12981
|
-
});
|
|
12982
|
-
preventLoadCall_1 = true;
|
|
12983
|
-
}
|
|
12984
|
-
}
|
|
12985
|
-
else {
|
|
12985
|
+
if (e.value !== 'Replace' || !isReplaced) {
|
|
12986
12986
|
e.callBack({
|
|
12987
12987
|
requestType: 'Images',
|
|
12988
12988
|
editorMode: 'HTML',
|
|
@@ -13112,10 +13112,18 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
13112
13112
|
var selectNode = e.item.selectNode[0];
|
|
13113
13113
|
selectNode.style.height = '';
|
|
13114
13114
|
selectNode.style.width = '';
|
|
13115
|
-
e.item.width !== 'auto'
|
|
13115
|
+
if (e.item.width !== 'auto') {
|
|
13116
|
+
selectNode.style.width = formatUnit(e.item.width);
|
|
13117
|
+
}
|
|
13118
|
+
else {
|
|
13116
13119
|
selectNode.removeAttribute('width');
|
|
13117
|
-
|
|
13120
|
+
}
|
|
13121
|
+
if (e.item.height !== 'auto') {
|
|
13122
|
+
selectNode.style.height = formatUnit(e.item.height);
|
|
13123
|
+
}
|
|
13124
|
+
else {
|
|
13118
13125
|
selectNode.removeAttribute('height');
|
|
13126
|
+
}
|
|
13119
13127
|
this.callBack(e);
|
|
13120
13128
|
};
|
|
13121
13129
|
ImageCommand.prototype.imageCaption = function (e) {
|
|
@@ -13232,7 +13240,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
13232
13240
|
* @hidden
|
|
13233
13241
|
* @deprecated
|
|
13234
13242
|
*/
|
|
13235
|
-
var TableCommand = /** @
|
|
13243
|
+
var TableCommand = /** @class */ (function () {
|
|
13236
13244
|
/**
|
|
13237
13245
|
* Constructor for creating the Formats plugin
|
|
13238
13246
|
*
|
|
@@ -13445,7 +13453,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
13445
13453
|
var currentTabElm = closest(curRow, 'table');
|
|
13446
13454
|
var thTdElm = closest(curRow, 'table').querySelectorAll('th,td');
|
|
13447
13455
|
for (var i = 0; i < thTdElm.length; i++) {
|
|
13448
|
-
thTdElm[i].dataset.oldWidth = (thTdElm[i].offsetWidth / currentTabElm.offsetWidth * 100) +
|
|
13456
|
+
thTdElm[i].dataset.oldWidth = (thTdElm[i].offsetWidth / currentTabElm.offsetWidth * 100) + '%';
|
|
13449
13457
|
}
|
|
13450
13458
|
for (var i = 0; i < allRows.length; i++) {
|
|
13451
13459
|
curCell = allRows[i].querySelectorAll(':scope > td, :scope > th')[colIndex];
|
|
@@ -13458,11 +13466,11 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
13458
13466
|
// eslint-disable-next-line
|
|
13459
13467
|
(e.item.subCommand === 'InsertColumnLeft') ? curCell.parentElement.insertBefore(colTemplate, curCell) :
|
|
13460
13468
|
this.insertAfter(colTemplate, curCell);
|
|
13461
|
-
colTemplate.style.width = currentWidth.toFixed(4) +
|
|
13469
|
+
colTemplate.style.width = currentWidth.toFixed(4) + '%';
|
|
13462
13470
|
delete colTemplate.dataset.oldWidth;
|
|
13463
13471
|
}
|
|
13464
13472
|
for (var i = 0; i < thTdElm.length; i++) {
|
|
13465
|
-
thTdElm[i].style.width = (Number(thTdElm[i].dataset.oldWidth.split('%')[0]) * currentWidth / previousWidth).toFixed(4) +
|
|
13473
|
+
thTdElm[i].style.width = (Number(thTdElm[i].dataset.oldWidth.split('%')[0]) * currentWidth / previousWidth).toFixed(4) + '%';
|
|
13466
13474
|
delete thTdElm[i].dataset.oldWidth;
|
|
13467
13475
|
}
|
|
13468
13476
|
e.item.selection.setSelectionText(this.parent.currentDocument, selectedCell, selectedCell, 0, 0);
|
|
@@ -14136,7 +14144,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
14136
14144
|
|
|
14137
14145
|
return TableCommand;
|
|
14138
14146
|
}());
|
|
14139
|
-
var MinMax = /** @
|
|
14147
|
+
var MinMax = /** @class */ (function () {
|
|
14140
14148
|
function MinMax() {
|
|
14141
14149
|
}
|
|
14142
14150
|
return MinMax;
|
|
@@ -14148,7 +14156,7 @@ var MinMax = /** @__PURE__ @class */ (function () {
|
|
|
14148
14156
|
* @hidden
|
|
14149
14157
|
* @deprecated
|
|
14150
14158
|
*/
|
|
14151
|
-
var IsFormatted = /** @
|
|
14159
|
+
var IsFormatted = /** @class */ (function () {
|
|
14152
14160
|
function IsFormatted() {
|
|
14153
14161
|
}
|
|
14154
14162
|
/**
|
|
@@ -14391,7 +14399,7 @@ var IsFormatted = /** @__PURE__ @class */ (function () {
|
|
|
14391
14399
|
/**
|
|
14392
14400
|
* `Selection` module is used to handle RTE Selections.
|
|
14393
14401
|
*/
|
|
14394
|
-
var SelectionCommands = /** @
|
|
14402
|
+
var SelectionCommands = /** @class */ (function () {
|
|
14395
14403
|
function SelectionCommands() {
|
|
14396
14404
|
}
|
|
14397
14405
|
/**
|
|
@@ -14400,6 +14408,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14400
14408
|
* @param {Document} docElement - specifies the document
|
|
14401
14409
|
* @param {string} format - specifies the string value
|
|
14402
14410
|
* @param {Node} endNode - specifies the end node
|
|
14411
|
+
* @param {string} enterAction - specifies the enter key action
|
|
14403
14412
|
* @param {string} value - specifies the string value
|
|
14404
14413
|
* @param {string} selector - specifies the string
|
|
14405
14414
|
* @returns {void}
|
|
@@ -14414,7 +14423,6 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14414
14423
|
if (format === 'backgroundcolor' && value === '') {
|
|
14415
14424
|
value = 'transparent';
|
|
14416
14425
|
}
|
|
14417
|
-
var preventRestore = false;
|
|
14418
14426
|
var domSelection = new NodeSelection();
|
|
14419
14427
|
var domNode = new DOMNode(endNode, docElement);
|
|
14420
14428
|
var nodeCutter = new NodeCutter();
|
|
@@ -14426,6 +14434,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14426
14434
|
var isCollapsed = false;
|
|
14427
14435
|
var isFormat = false;
|
|
14428
14436
|
var isCursor = false;
|
|
14437
|
+
var preventRestore = false;
|
|
14429
14438
|
var isFontStyle = (['fontcolor', 'fontname', 'fontsize', 'backgroundcolor'].indexOf(format) > -1);
|
|
14430
14439
|
if (range.collapsed) {
|
|
14431
14440
|
if (nodes.length > 0) {
|
|
@@ -14449,6 +14458,9 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14449
14458
|
else {
|
|
14450
14459
|
domSelection.endOffset = domSelection.startOffset = 1;
|
|
14451
14460
|
}
|
|
14461
|
+
if (cursorNode.nodeName === 'BR' && cursorNode.parentNode.textContent.length === 0) {
|
|
14462
|
+
preventRestore = true;
|
|
14463
|
+
}
|
|
14452
14464
|
}
|
|
14453
14465
|
}
|
|
14454
14466
|
isCursor = range.collapsed;
|
|
@@ -14496,7 +14508,52 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14496
14508
|
var cursorNode = null;
|
|
14497
14509
|
if (cursorFormat) {
|
|
14498
14510
|
cursorNode = cursorNodes[0];
|
|
14499
|
-
|
|
14511
|
+
if (cursorFormat.firstChild.textContent.charCodeAt(0) === 8203) {
|
|
14512
|
+
var regEx = new RegExp(String.fromCharCode(8203), 'g');
|
|
14513
|
+
var emptySpaceNode = void 0;
|
|
14514
|
+
if (cursorFormat.firstChild === cursorNode) {
|
|
14515
|
+
cursorNode.textContent = cursorNode.textContent.replace(regEx, '');
|
|
14516
|
+
emptySpaceNode = cursorNode;
|
|
14517
|
+
|
|
14518
|
+
}
|
|
14519
|
+
else {
|
|
14520
|
+
cursorFormat.firstChild.textContent = cursorFormat.firstChild.textContent.replace(regEx, '');
|
|
14521
|
+
emptySpaceNode = cursorFormat.firstChild;
|
|
14522
|
+
}
|
|
14523
|
+
var pointer = void 0;
|
|
14524
|
+
if (emptySpaceNode.textContent.length === 0) {
|
|
14525
|
+
if (!isNullOrUndefined(emptySpaceNode.previousSibling)) {
|
|
14526
|
+
cursorNode = emptySpaceNode.previousSibling;
|
|
14527
|
+
pointer = emptySpaceNode.textContent.length - 1;
|
|
14528
|
+
domSelection.setCursorPoint(docElement, emptySpaceNode, pointer);
|
|
14529
|
+
}
|
|
14530
|
+
else if (!isNullOrUndefined(emptySpaceNode.parentElement) && emptySpaceNode.parentElement.textContent.length === 0) {
|
|
14531
|
+
var brElem = document.createElement('BR');
|
|
14532
|
+
emptySpaceNode.parentElement.appendChild(brElem);
|
|
14533
|
+
detach(emptySpaceNode);
|
|
14534
|
+
cursorNode = brElem;
|
|
14535
|
+
domSelection.setCursorPoint(docElement, cursorNode.parentElement, 0);
|
|
14536
|
+
}
|
|
14537
|
+
}
|
|
14538
|
+
}
|
|
14539
|
+
if ((['fontcolor', 'fontname', 'fontsize', 'backgroundcolor'].indexOf(format) > -1)) {
|
|
14540
|
+
if (format === 'fontcolor') {
|
|
14541
|
+
cursorFormat.style.color = value;
|
|
14542
|
+
}
|
|
14543
|
+
else if (format === 'fontname') {
|
|
14544
|
+
cursorFormat.style.fontFamily = value;
|
|
14545
|
+
}
|
|
14546
|
+
else if (format === 'fontsize') {
|
|
14547
|
+
cursorFormat.style.fontSize = value;
|
|
14548
|
+
}
|
|
14549
|
+
else {
|
|
14550
|
+
cursorFormat.style.backgroundColor = value;
|
|
14551
|
+
}
|
|
14552
|
+
cursorNode = cursorFormat;
|
|
14553
|
+
}
|
|
14554
|
+
else {
|
|
14555
|
+
InsertMethods.unwrap(cursorFormat);
|
|
14556
|
+
}
|
|
14500
14557
|
}
|
|
14501
14558
|
else {
|
|
14502
14559
|
if (cursorNodes.length > 1 && range.startOffset > 0 && (cursorNodes[0].firstElementChild &&
|
|
@@ -14832,7 +14889,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
14832
14889
|
* @hidden
|
|
14833
14890
|
* @deprecated
|
|
14834
14891
|
*/
|
|
14835
|
-
var SelectionBasedExec = /** @
|
|
14892
|
+
var SelectionBasedExec = /** @class */ (function () {
|
|
14836
14893
|
/**
|
|
14837
14894
|
* Constructor for creating the Formats plugin
|
|
14838
14895
|
*
|
|
@@ -14881,7 +14938,7 @@ var SelectionBasedExec = /** @__PURE__ @class */ (function () {
|
|
|
14881
14938
|
* @hidden
|
|
14882
14939
|
* @deprecated
|
|
14883
14940
|
*/
|
|
14884
|
-
var InsertHtmlExec = /** @
|
|
14941
|
+
var InsertHtmlExec = /** @class */ (function () {
|
|
14885
14942
|
/**
|
|
14886
14943
|
* Constructor for creating the Formats plugin
|
|
14887
14944
|
*
|
|
@@ -14928,7 +14985,7 @@ var InsertHtmlExec = /** @__PURE__ @class */ (function () {
|
|
|
14928
14985
|
/**
|
|
14929
14986
|
* `Clear Format` module is used to handle Clear Format.
|
|
14930
14987
|
*/
|
|
14931
|
-
var ClearFormat$1 = /** @
|
|
14988
|
+
var ClearFormat$1 = /** @class */ (function () {
|
|
14932
14989
|
function ClearFormat() {
|
|
14933
14990
|
}
|
|
14934
14991
|
/**
|
|
@@ -14936,6 +14993,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
14936
14993
|
*
|
|
14937
14994
|
* @param {Document} docElement - specifies the document element.
|
|
14938
14995
|
* @param {Node} endNode - specifies the end node
|
|
14996
|
+
* @param {string} enterAction - specifies the enter key action
|
|
14939
14997
|
* @param {string} selector - specifies the string value
|
|
14940
14998
|
* @returns {void}
|
|
14941
14999
|
* @hidden
|
|
@@ -15168,7 +15226,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
15168
15226
|
* @hidden
|
|
15169
15227
|
* @deprecated
|
|
15170
15228
|
*/
|
|
15171
|
-
var ClearFormatExec = /** @
|
|
15229
|
+
var ClearFormatExec = /** @class */ (function () {
|
|
15172
15230
|
/**
|
|
15173
15231
|
* Constructor for creating the Formats plugin
|
|
15174
15232
|
*
|
|
@@ -15213,7 +15271,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
|
|
|
15213
15271
|
/**
|
|
15214
15272
|
* `Undo` module is used to handle undo actions.
|
|
15215
15273
|
*/
|
|
15216
|
-
var UndoRedoManager = /** @
|
|
15274
|
+
var UndoRedoManager = /** @class */ (function () {
|
|
15217
15275
|
function UndoRedoManager(parent, options) {
|
|
15218
15276
|
this.undoRedoStack = [];
|
|
15219
15277
|
this.parent = parent;
|
|
@@ -15414,7 +15472,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
15414
15472
|
* @hidden
|
|
15415
15473
|
* @deprecated
|
|
15416
15474
|
*/
|
|
15417
|
-
var MsWordPaste = /** @
|
|
15475
|
+
var MsWordPaste = /** @class */ (function () {
|
|
15418
15476
|
function MsWordPaste(parent) {
|
|
15419
15477
|
this.olData = [
|
|
15420
15478
|
'decimal',
|
|
@@ -15521,6 +15579,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
15521
15579
|
var imgSrc = [];
|
|
15522
15580
|
var base64Src = [];
|
|
15523
15581
|
var imgName = [];
|
|
15582
|
+
// eslint-disable-next-line
|
|
15524
15583
|
var linkRegex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
|
|
15525
15584
|
if (imgElem.length > 0) {
|
|
15526
15585
|
for (var i = 0; i < imgElem.length; i++) {
|
|
@@ -16070,7 +16129,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
16070
16129
|
* @hidden
|
|
16071
16130
|
* @deprecated
|
|
16072
16131
|
*/
|
|
16073
|
-
var InsertTextExec = /** @
|
|
16132
|
+
var InsertTextExec = /** @class */ (function () {
|
|
16074
16133
|
/**
|
|
16075
16134
|
* Constructor for creating the InsertText plugin
|
|
16076
16135
|
*
|
|
@@ -16107,7 +16166,7 @@ var InsertTextExec = /** @__PURE__ @class */ (function () {
|
|
|
16107
16166
|
* @hidden
|
|
16108
16167
|
* @deprecated
|
|
16109
16168
|
*/
|
|
16110
|
-
var EditorManager = /** @
|
|
16169
|
+
var EditorManager = /** @class */ (function () {
|
|
16111
16170
|
/**
|
|
16112
16171
|
* Constructor for creating the component
|
|
16113
16172
|
*
|
|
@@ -16177,7 +16236,7 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
16177
16236
|
*/
|
|
16178
16237
|
/* eslint-enable */
|
|
16179
16238
|
EditorManager.prototype.execCommand = function (command, value, event, callBack, text, exeValue, selector, enterAction) {
|
|
16180
|
-
switch (command.
|
|
16239
|
+
switch (command.toLowerCase()) {
|
|
16181
16240
|
case 'lists':
|
|
16182
16241
|
this.observer.notify(LIST_TYPE, { subCommand: value, event: event, callBack: callBack,
|
|
16183
16242
|
selector: selector, item: exeValue, enterAction: enterAction });
|
|
@@ -16274,26 +16333,26 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
16274
16333
|
return EditorManager;
|
|
16275
16334
|
}());
|
|
16276
16335
|
|
|
16277
|
-
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
16278
|
-
var extendStatics = function (d, b) {
|
|
16279
|
-
extendStatics = Object.setPrototypeOf ||
|
|
16280
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16281
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16282
|
-
return extendStatics(d, b);
|
|
16283
|
-
};
|
|
16284
|
-
return function (d, b) {
|
|
16285
|
-
extendStatics(d, b);
|
|
16286
|
-
function __() { this.constructor = d; }
|
|
16287
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16288
|
-
};
|
|
16289
|
-
})();
|
|
16336
|
+
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
16337
|
+
var extendStatics = function (d, b) {
|
|
16338
|
+
extendStatics = Object.setPrototypeOf ||
|
|
16339
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16340
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16341
|
+
return extendStatics(d, b);
|
|
16342
|
+
};
|
|
16343
|
+
return function (d, b) {
|
|
16344
|
+
extendStatics(d, b);
|
|
16345
|
+
function __() { this.constructor = d; }
|
|
16346
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16347
|
+
};
|
|
16348
|
+
})();
|
|
16290
16349
|
/**
|
|
16291
16350
|
* HTML adapter
|
|
16292
16351
|
*
|
|
16293
16352
|
* @hidden
|
|
16294
16353
|
* @deprecated
|
|
16295
16354
|
*/
|
|
16296
|
-
var HTMLFormatter = /** @
|
|
16355
|
+
var HTMLFormatter = /** @class */ (function (_super) {
|
|
16297
16356
|
__extends$2(HTMLFormatter, _super);
|
|
16298
16357
|
function HTMLFormatter(options) {
|
|
16299
16358
|
var _this = _super.call(this) || this;
|
|
@@ -16336,7 +16395,7 @@ var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
|
16336
16395
|
* @deprecated
|
|
16337
16396
|
*/
|
|
16338
16397
|
var statusCollection = getDefaultHtmlTbStatus();
|
|
16339
|
-
var ToolbarStatus = /** @
|
|
16398
|
+
var ToolbarStatus = /** @class */ (function () {
|
|
16340
16399
|
function ToolbarStatus() {
|
|
16341
16400
|
}
|
|
16342
16401
|
/**
|
|
@@ -16362,8 +16421,8 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
16362
16421
|
var range = nodeSelection.getRange(docElement);
|
|
16363
16422
|
for (var index = 0; index < nodes.length; index++) {
|
|
16364
16423
|
while (nodes[index].nodeType === 3 && range.startContainer.nodeType === 3 && nodes[index].parentNode &&
|
|
16365
|
-
nodes[index].parentNode.lastElementChild && nodes[index].parentNode.lastElementChild.nodeName !==
|
|
16366
|
-
this.getImmediateBlockNode(nodes[index].parentNode
|
|
16424
|
+
nodes[index].parentNode.lastElementChild && nodes[index].parentNode.lastElementChild.nodeName !== 'BR' &&
|
|
16425
|
+
(this.getImmediateBlockNode(nodes[index].parentNode)).textContent.replace(/\u200B/g, '').length === 0 &&
|
|
16367
16426
|
range.startContainer.textContent.replace(/\u200B/g, '').length === 0 &&
|
|
16368
16427
|
nodeSelection.get(docElement).toString().replace(/\u200B/g, '').length === 0) {
|
|
16369
16428
|
nodes[index] = nodes[index].parentNode.lastElementChild.firstChild;
|
|
@@ -16439,7 +16498,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
16439
16498
|
}
|
|
16440
16499
|
return nodeCollection;
|
|
16441
16500
|
};
|
|
16442
|
-
ToolbarStatus.getImmediateBlockNode = function (node
|
|
16501
|
+
ToolbarStatus.getImmediateBlockNode = function (node) {
|
|
16443
16502
|
do {
|
|
16444
16503
|
node = node.parentNode;
|
|
16445
16504
|
} while (node && BLOCK_TAGS.indexOf(node.nodeName.toLocaleLowerCase()) < 0);
|
|
@@ -16670,7 +16729,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
16670
16729
|
/**
|
|
16671
16730
|
* HtmlToolbarStatus module for refresh the toolbar status
|
|
16672
16731
|
*/
|
|
16673
|
-
var HtmlToolbarStatus = /** @
|
|
16732
|
+
var HtmlToolbarStatus = /** @class */ (function () {
|
|
16674
16733
|
function HtmlToolbarStatus(parent) {
|
|
16675
16734
|
this.parent = parent;
|
|
16676
16735
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
|
|
@@ -16717,7 +16776,7 @@ var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
16717
16776
|
* @hidden
|
|
16718
16777
|
* @deprecated
|
|
16719
16778
|
*/
|
|
16720
|
-
var ContentRender = /** @
|
|
16779
|
+
var ContentRender = /** @class */ (function () {
|
|
16721
16780
|
/**
|
|
16722
16781
|
* Constructor for content renderer module
|
|
16723
16782
|
*
|
|
@@ -16804,19 +16863,19 @@ var ContentRender = /** @__PURE__ @class */ (function () {
|
|
|
16804
16863
|
return ContentRender;
|
|
16805
16864
|
}());
|
|
16806
16865
|
|
|
16807
|
-
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
16808
|
-
var extendStatics = function (d, b) {
|
|
16809
|
-
extendStatics = Object.setPrototypeOf ||
|
|
16810
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16811
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16812
|
-
return extendStatics(d, b);
|
|
16813
|
-
};
|
|
16814
|
-
return function (d, b) {
|
|
16815
|
-
extendStatics(d, b);
|
|
16816
|
-
function __() { this.constructor = d; }
|
|
16817
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16818
|
-
};
|
|
16819
|
-
})();
|
|
16866
|
+
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
16867
|
+
var extendStatics = function (d, b) {
|
|
16868
|
+
extendStatics = Object.setPrototypeOf ||
|
|
16869
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16870
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16871
|
+
return extendStatics(d, b);
|
|
16872
|
+
};
|
|
16873
|
+
return function (d, b) {
|
|
16874
|
+
extendStatics(d, b);
|
|
16875
|
+
function __() { this.constructor = d; }
|
|
16876
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16877
|
+
};
|
|
16878
|
+
})();
|
|
16820
16879
|
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n </style>\n </head>";
|
|
16821
16880
|
/**
|
|
16822
16881
|
* Content module is used to render Rich Text Editor content
|
|
@@ -16824,7 +16883,7 @@ var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n
|
|
|
16824
16883
|
* @hidden
|
|
16825
16884
|
* @deprecated
|
|
16826
16885
|
*/
|
|
16827
|
-
var IframeContentRender = /** @
|
|
16886
|
+
var IframeContentRender = /** @class */ (function (_super) {
|
|
16828
16887
|
__extends$3(IframeContentRender, _super);
|
|
16829
16888
|
function IframeContentRender() {
|
|
16830
16889
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -16896,7 +16955,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
|
|
|
16896
16955
|
/**
|
|
16897
16956
|
* XhtmlValidation module called when set enableXhtml as true
|
|
16898
16957
|
*/
|
|
16899
|
-
var XhtmlValidation = /** @
|
|
16958
|
+
var XhtmlValidation = /** @class */ (function () {
|
|
16900
16959
|
function XhtmlValidation(parent) {
|
|
16901
16960
|
this.parent = parent;
|
|
16902
16961
|
this.addEventListener();
|
|
@@ -16922,22 +16981,24 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
|
|
|
16922
16981
|
this.ImageTags();
|
|
16923
16982
|
this.removeTags();
|
|
16924
16983
|
this.RemoveUnsupported();
|
|
16925
|
-
this.currentElement.innerHTML = this.selfEncloseValidation(this.currentElement.innerHTML, this.currentElement.innerText ===
|
|
16984
|
+
this.currentElement.innerHTML = this.selfEncloseValidation(this.currentElement.innerHTML, this.currentElement.innerText === '\n' ?
|
|
16985
|
+
this.currentElement.innerText.length : this.currentElement.innerText.trim().length);
|
|
16926
16986
|
this.parent.setProperties({ value: this.currentElement.innerHTML }, true);
|
|
16927
16987
|
}
|
|
16928
16988
|
};
|
|
16929
16989
|
/**
|
|
16930
16990
|
* @param {string} currentValue - specifies the string value.
|
|
16991
|
+
* @param {number} valueLength - specifies the length of the current value.
|
|
16931
16992
|
* @returns {void}
|
|
16932
16993
|
* @deprecated
|
|
16933
16994
|
*/
|
|
16934
16995
|
XhtmlValidation.prototype.selfEncloseValidation = function (currentValue, valueLength) {
|
|
16935
16996
|
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0) {
|
|
16936
16997
|
var arrayValue = currentValue.split(' ');
|
|
16937
|
-
arrayValue[arrayValue.length - 1] =
|
|
16998
|
+
arrayValue[arrayValue.length - 1] = '​' + arrayValue[arrayValue.length - 1];
|
|
16938
16999
|
currentValue = arrayValue.join('');
|
|
16939
17000
|
}
|
|
16940
|
-
currentValue = currentValue.replace(/<br>/g, '<br/>').replace(/<hr>/g, '<hr/>').replace(
|
|
17001
|
+
currentValue = currentValue.replace(/<br>/g, '<br/>').replace(/<hr>/g, '<hr/>').replace(/ /g, ' ');
|
|
16941
17002
|
var valueTemp;
|
|
16942
17003
|
var valueDupe = [];
|
|
16943
17004
|
var valueOriginal = [];
|
|
@@ -17074,7 +17135,7 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
|
|
|
17074
17135
|
/**
|
|
17075
17136
|
* `HtmlEditor` module is used to HTML editor
|
|
17076
17137
|
*/
|
|
17077
|
-
var HtmlEditor = /** @
|
|
17138
|
+
var HtmlEditor = /** @class */ (function () {
|
|
17078
17139
|
function HtmlEditor(parent, serviceLocator) {
|
|
17079
17140
|
this.rangeCollection = [];
|
|
17080
17141
|
this.parent = parent;
|
|
@@ -17113,6 +17174,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
17113
17174
|
this.parent.on(initialLoad, this.instantiateRenderer, this);
|
|
17114
17175
|
this.parent.on(htmlToolbarClick, this.onToolbarClick, this);
|
|
17115
17176
|
this.parent.on(keyDown, this.onKeyDown, this);
|
|
17177
|
+
this.parent.on(keyUp, this.onKeyUp, this);
|
|
17116
17178
|
this.parent.on(renderColorPicker, this.renderColorPicker, this);
|
|
17117
17179
|
this.parent.on(initialEnd, this.render, this);
|
|
17118
17180
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
@@ -17147,6 +17209,30 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
17147
17209
|
this.saveSelection.restore();
|
|
17148
17210
|
}
|
|
17149
17211
|
};
|
|
17212
|
+
HtmlEditor.prototype.onKeyUp = function (e) {
|
|
17213
|
+
var args = e.args;
|
|
17214
|
+
var restrictKeys = [8, 9, 13, 16, 17, 18, 20, 27, 37, 38, 39, 40, 44, 45, 46, 91,
|
|
17215
|
+
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123];
|
|
17216
|
+
var range = this.parent.getRange();
|
|
17217
|
+
var regEx = new RegExp(String.fromCharCode(8203), 'g');
|
|
17218
|
+
var pointer;
|
|
17219
|
+
if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey) {
|
|
17220
|
+
if (range.startContainer.textContent.charCodeAt(0) === 8203) {
|
|
17221
|
+
pointer = range.startOffset - 1;
|
|
17222
|
+
range.startContainer.textContent = range.startContainer.textContent.replace(regEx, '');
|
|
17223
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), range.startContainer, pointer);
|
|
17224
|
+
}
|
|
17225
|
+
if (!isNullOrUndefined(range.startContainer.previousSibling) && !isNullOrUndefined(range.startContainer.previousSibling.parentElement) &&
|
|
17226
|
+
range.startContainer.parentElement === range.startContainer.previousSibling.parentElement && range.startContainer.previousSibling.textContent.charCodeAt(0) === 8203) {
|
|
17227
|
+
range.startContainer.previousSibling.textContent = range.startContainer.previousSibling.textContent.replace(regEx, '');
|
|
17228
|
+
}
|
|
17229
|
+
if (range.endContainer.textContent.charCodeAt(range.endOffset) === 8203) {
|
|
17230
|
+
pointer = range.startOffset;
|
|
17231
|
+
range.endContainer.textContent = range.endContainer.textContent.replace(regEx, '');
|
|
17232
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), range.startContainer, pointer);
|
|
17233
|
+
}
|
|
17234
|
+
}
|
|
17235
|
+
};
|
|
17150
17236
|
HtmlEditor.prototype.onKeyDown = function (e) {
|
|
17151
17237
|
var _this = this;
|
|
17152
17238
|
var currentRange;
|
|
@@ -17357,7 +17443,12 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
17357
17443
|
while (this.deleteOldRangeElement.firstChild) {
|
|
17358
17444
|
this.deleteRangeElement.appendChild(this.deleteOldRangeElement.childNodes[0]);
|
|
17359
17445
|
}
|
|
17360
|
-
!isLiElement
|
|
17446
|
+
if (!isLiElement) {
|
|
17447
|
+
detach(this.deleteOldRangeElement);
|
|
17448
|
+
}
|
|
17449
|
+
else {
|
|
17450
|
+
detach(this.deleteOldRangeElement.parentElement);
|
|
17451
|
+
}
|
|
17361
17452
|
this.deleteRangeElement.normalize();
|
|
17362
17453
|
}
|
|
17363
17454
|
else {
|
|
@@ -17728,7 +17819,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
17728
17819
|
/**
|
|
17729
17820
|
* PasteCleanup module called when pasting content in RichTextEditor
|
|
17730
17821
|
*/
|
|
17731
|
-
var PasteCleanup = /** @
|
|
17822
|
+
var PasteCleanup = /** @class */ (function () {
|
|
17732
17823
|
function PasteCleanup(parent, serviceLocator) {
|
|
17733
17824
|
this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
17734
17825
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -18599,7 +18690,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
18599
18690
|
/**
|
|
18600
18691
|
* `Resize` module is used to resize the editor
|
|
18601
18692
|
*/
|
|
18602
|
-
var Resize = /** @
|
|
18693
|
+
var Resize = /** @class */ (function () {
|
|
18603
18694
|
function Resize(parent) {
|
|
18604
18695
|
this.parent = parent;
|
|
18605
18696
|
this.addEventListener();
|
|
@@ -18721,7 +18812,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
18721
18812
|
/**
|
|
18722
18813
|
* `FileManager` module is used to display the directories and images inside the editor.
|
|
18723
18814
|
*/
|
|
18724
|
-
var FileManager$1 = /** @
|
|
18815
|
+
var FileManager$1 = /** @class */ (function () {
|
|
18725
18816
|
function FileManager$$1(parent, locator) {
|
|
18726
18817
|
FileManager.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$1);
|
|
18727
18818
|
this.parent = parent;
|
|
@@ -18956,7 +19047,7 @@ var FileManager$1 = /** @__PURE__ @class */ (function () {
|
|
|
18956
19047
|
/**
|
|
18957
19048
|
* `FullScreen` module is used to maximize and minimize screen
|
|
18958
19049
|
*/
|
|
18959
|
-
var FullScreen = /** @
|
|
19050
|
+
var FullScreen = /** @class */ (function () {
|
|
18960
19051
|
function FullScreen(parent) {
|
|
18961
19052
|
this.parent = parent;
|
|
18962
19053
|
this.addEventListener();
|
|
@@ -19183,7 +19274,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
|
|
|
19183
19274
|
* @hidden
|
|
19184
19275
|
* @deprecated
|
|
19185
19276
|
*/
|
|
19186
|
-
var Render = /** @
|
|
19277
|
+
var Render = /** @class */ (function () {
|
|
19187
19278
|
/**
|
|
19188
19279
|
* Constructor for render module
|
|
19189
19280
|
*
|
|
@@ -19274,7 +19365,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
19274
19365
|
/**
|
|
19275
19366
|
* `Link` module is used to handle undo actions.
|
|
19276
19367
|
*/
|
|
19277
|
-
var Link = /** @
|
|
19368
|
+
var Link = /** @class */ (function () {
|
|
19278
19369
|
function Link(parent, serviceLocator) {
|
|
19279
19370
|
this.parent = parent;
|
|
19280
19371
|
this.rteID = parent.element.id;
|
|
@@ -19401,7 +19492,8 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
19401
19492
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
19402
19493
|
var isPopupOpen = this.quickToolObj.linkQTBar.element.classList.contains('e-rte-pop');
|
|
19403
19494
|
if (target.nodeName === 'A' && (target.childNodes.length > 0 && target.childNodes[0].nodeName !== 'IMG') &&
|
|
19404
|
-
e.args.target.nodeName !== 'IMG'
|
|
19495
|
+
e.args.target.nodeName !== 'IMG' &&
|
|
19496
|
+
!isNullOrUndefined(closest(this.parent.getRange().startContainer.parentElement, 'A')) && !isNullOrUndefined(closest(this.parent.getRange().endContainer.parentElement, 'A'))) {
|
|
19405
19497
|
if (isPopupOpen) {
|
|
19406
19498
|
return;
|
|
19407
19499
|
}
|
|
@@ -19662,7 +19754,8 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
19662
19754
|
else {
|
|
19663
19755
|
argsValue = this.args;
|
|
19664
19756
|
}
|
|
19665
|
-
this.selfLink.parent.formatter.process(this.selfLink.parent, argsValue, (!isNullOrUndefined(this.args) &&
|
|
19757
|
+
this.selfLink.parent.formatter.process(this.selfLink.parent, argsValue, (!isNullOrUndefined(this.args) &&
|
|
19758
|
+
this.args.originalEvent), value);
|
|
19666
19759
|
this.selfLink.parent.contentModule.getEditPanel().focus();
|
|
19667
19760
|
};
|
|
19668
19761
|
Link.prototype.isUrl = function (url) {
|
|
@@ -19778,7 +19871,7 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
19778
19871
|
/**
|
|
19779
19872
|
* `Image` module is used to handle image actions.
|
|
19780
19873
|
*/
|
|
19781
|
-
var Image = /** @
|
|
19874
|
+
var Image = /** @class */ (function () {
|
|
19782
19875
|
function Image(parent, serviceLocator) {
|
|
19783
19876
|
this.isImgUploaded = false;
|
|
19784
19877
|
this.isAllowedTypes = true;
|
|
@@ -20081,7 +20174,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
20081
20174
|
if (width > height) {
|
|
20082
20175
|
img.style.minWidth = '20px';
|
|
20083
20176
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20084
|
-
if (parseInt('' + img.getBoundingClientRect().width + '') !== 0 && parseInt('' + width + '') !== 0) {
|
|
20177
|
+
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20085
20178
|
var percentageValue = this.pixToPerc((width / height * expectedY), (img.previousElementSibling || img.parentElement));
|
|
20086
20179
|
img.style.width = Math.min(Math.round((percentageValue / img.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
|
|
20087
20180
|
}
|
|
@@ -20107,7 +20200,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
20107
20200
|
}
|
|
20108
20201
|
else if (height > width) {
|
|
20109
20202
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20110
|
-
if (parseInt('' + img.getBoundingClientRect().width + '') !== 0 && parseInt('' + width + '') !== 0) {
|
|
20203
|
+
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20111
20204
|
img.style.width = Math.min(Math.round((width / img.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
|
|
20112
20205
|
}
|
|
20113
20206
|
else {
|
|
@@ -20580,7 +20673,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
20580
20673
|
var target = args.target;
|
|
20581
20674
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
20582
20675
|
var isPopupOpen = this.quickToolObj.imageQTBar.element.classList.contains('e-rte-pop');
|
|
20583
|
-
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule) {
|
|
20676
|
+
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule && this.parent.getRange().startOffset === this.parent.getRange().endOffset) {
|
|
20584
20677
|
if (isPopupOpen) {
|
|
20585
20678
|
return;
|
|
20586
20679
|
}
|
|
@@ -20819,13 +20912,34 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
20819
20912
|
}
|
|
20820
20913
|
};
|
|
20821
20914
|
Image.prototype.imageRemovePost = function (src) {
|
|
20915
|
+
var proxy = this;
|
|
20916
|
+
var absoluteUrl = '';
|
|
20917
|
+
if (src.indexOf('http://') > -1 || src.indexOf('https://') > -1) {
|
|
20918
|
+
absoluteUrl = src;
|
|
20919
|
+
}
|
|
20920
|
+
else {
|
|
20921
|
+
absoluteUrl = new URL(src, document.baseURI).href;
|
|
20922
|
+
}
|
|
20923
|
+
this.removingImgName = absoluteUrl.replace(/^.*[\\\/]/, '');
|
|
20924
|
+
var xhr = new XMLHttpRequest();
|
|
20925
|
+
xhr.addEventListener("readystatechange", function () {
|
|
20926
|
+
if (this.readyState == 4 && this.status == 200) {
|
|
20927
|
+
proxy.triggerPost(this.response);
|
|
20928
|
+
}
|
|
20929
|
+
});
|
|
20930
|
+
xhr.open('GET', absoluteUrl);
|
|
20931
|
+
xhr.responseType = 'blob';
|
|
20932
|
+
xhr.send();
|
|
20933
|
+
};
|
|
20934
|
+
Image.prototype.triggerPost = function (response) {
|
|
20822
20935
|
var removeUrl = this.parent.insertImageSettings.removeUrl;
|
|
20823
20936
|
if (isNullOrUndefined(removeUrl) || removeUrl === '') {
|
|
20824
20937
|
return;
|
|
20825
20938
|
}
|
|
20939
|
+
var file = new File([response], this.removingImgName);
|
|
20826
20940
|
var ajax = new Ajax(removeUrl, 'POST', true, null);
|
|
20827
20941
|
var formData = new FormData();
|
|
20828
|
-
formData.append(
|
|
20942
|
+
formData.append('UploadFiles', file);
|
|
20829
20943
|
ajax.send(formData);
|
|
20830
20944
|
};
|
|
20831
20945
|
Image.prototype.caption = function (e) {
|
|
@@ -21065,9 +21179,15 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
21065
21179
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
21066
21180
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Image') &&
|
|
21067
21181
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Image')))) {
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21182
|
+
/* eslint-disable */
|
|
21183
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
|
|
21184
|
+
}
|
|
21185
|
+
else {
|
|
21186
|
+
this.dialogObj.hide({ returnValue: true });
|
|
21187
|
+
this.parent.isBlur = true;
|
|
21188
|
+
dispatchEvent(this.parent.element, 'focusout');
|
|
21189
|
+
}
|
|
21190
|
+
/* eslint-enable */
|
|
21071
21191
|
}
|
|
21072
21192
|
if (e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
|
|
21073
21193
|
this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
|
|
@@ -21171,11 +21291,11 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
21171
21291
|
var imgWidth = this.i10n.getConstant('imageWidth');
|
|
21172
21292
|
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' });
|
|
21173
21293
|
var widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
21174
|
-
selectNode.style.width !==
|
|
21175
|
-
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString())).toString();
|
|
21294
|
+
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
21295
|
+
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
21176
21296
|
var heightVal = isNullOrUndefined(this.changedHeightValue) && (selectNode.style.height.toString() === 'auto' ||
|
|
21177
|
-
selectNode.style.height !==
|
|
21178
|
-
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString())).toString();
|
|
21297
|
+
selectNode.style.height !== '') ? selectNode.style.height : !isNullOrUndefined(this.changedHeightValue) ?
|
|
21298
|
+
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
21179
21299
|
this.changedWidthValue = null;
|
|
21180
21300
|
this.changedHeightValue = null;
|
|
21181
21301
|
var content = '<div class="e-rte-label"><label>' + imgWidth +
|
|
@@ -21214,7 +21334,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
21214
21334
|
return value;
|
|
21215
21335
|
}
|
|
21216
21336
|
else {
|
|
21217
|
-
return
|
|
21337
|
+
return 'auto';
|
|
21218
21338
|
}
|
|
21219
21339
|
};
|
|
21220
21340
|
Image.prototype.insertSize = function (e) {
|
|
@@ -21930,7 +22050,7 @@ var Image = /** @__PURE__ @class */ (function () {
|
|
|
21930
22050
|
* @hidden
|
|
21931
22051
|
* @deprecated
|
|
21932
22052
|
*/
|
|
21933
|
-
var ViewSource = /** @
|
|
22053
|
+
var ViewSource = /** @class */ (function () {
|
|
21934
22054
|
/**
|
|
21935
22055
|
* Constructor for view source module
|
|
21936
22056
|
*
|
|
@@ -22188,7 +22308,7 @@ var ViewSource = /** @__PURE__ @class */ (function () {
|
|
|
22188
22308
|
/**
|
|
22189
22309
|
* `Table` module is used to handle table actions.
|
|
22190
22310
|
*/
|
|
22191
|
-
var Table = /** @
|
|
22311
|
+
var Table = /** @class */ (function () {
|
|
22192
22312
|
function Table(parent, serviceLocator) {
|
|
22193
22313
|
this.ensureInsideTableList = true;
|
|
22194
22314
|
this.pageX = null;
|
|
@@ -22416,8 +22536,12 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
22416
22536
|
if (args.args && args.args.item.cssClass) {
|
|
22417
22537
|
var classList = args.args.item.cssClass.split(' ');
|
|
22418
22538
|
for (var i = 0; i < classList.length; i++) {
|
|
22419
|
-
(table.classList.contains(classList[i]))
|
|
22539
|
+
if (table.classList.contains(classList[i])) {
|
|
22540
|
+
table.classList.remove(classList[i]);
|
|
22541
|
+
}
|
|
22542
|
+
else {
|
|
22420
22543
|
table.classList.add(classList[i]);
|
|
22544
|
+
}
|
|
22421
22545
|
}
|
|
22422
22546
|
}
|
|
22423
22547
|
this.parent.formatter.saveData();
|
|
@@ -22573,7 +22697,9 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
22573
22697
|
}
|
|
22574
22698
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
22575
22699
|
var closestTable = closest(target, 'table');
|
|
22576
|
-
|
|
22700
|
+
var startNode = this.parent.getRange().startContainer.parentElement;
|
|
22701
|
+
var endNode = this.parent.getRange().endContainer.parentElement;
|
|
22702
|
+
if (target && target.nodeName !== 'A' && target.nodeName !== 'IMG' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
22577
22703
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
22578
22704
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
22579
22705
|
var range_1 = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
@@ -22660,7 +22786,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
22660
22786
|
tdNode : target;
|
|
22661
22787
|
removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), CLS_TABLE_SEL);
|
|
22662
22788
|
if (target && (target.tagName === 'TD' || target.tagName === 'TH')) {
|
|
22663
|
-
target.removeAttribute('class');
|
|
22664
22789
|
addClass([target], CLS_TABLE_SEL);
|
|
22665
22790
|
this.activeCell = target;
|
|
22666
22791
|
this.curTable = (this.curTable) ? this.curTable : closest(target, 'table');
|
|
@@ -22759,6 +22884,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
22759
22884
|
top: 0,
|
|
22760
22885
|
left: 0
|
|
22761
22886
|
};
|
|
22887
|
+
// eslint-disable-next-line
|
|
22762
22888
|
var offset = elem.getBoundingClientRect();
|
|
22763
22889
|
var doc = elem.ownerDocument;
|
|
22764
22890
|
var offsetParent = elem.offsetParent || doc.documentElement;
|
|
@@ -22771,6 +22897,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
22771
22897
|
offsetParent = closest(offsetParent, '.e-rte-content');
|
|
22772
22898
|
}
|
|
22773
22899
|
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
|
|
22900
|
+
// eslint-disable-next-line
|
|
22774
22901
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
22775
22902
|
}
|
|
22776
22903
|
return {
|
|
@@ -23408,7 +23535,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
23408
23535
|
/**
|
|
23409
23536
|
* Dialog Renderer
|
|
23410
23537
|
*/
|
|
23411
|
-
var DialogRenderer = /** @
|
|
23538
|
+
var DialogRenderer = /** @class */ (function () {
|
|
23412
23539
|
function DialogRenderer(parent) {
|
|
23413
23540
|
this.parent = parent;
|
|
23414
23541
|
}
|
|
@@ -23641,29 +23768,29 @@ var executeGroup = {
|
|
|
23641
23768
|
}
|
|
23642
23769
|
};
|
|
23643
23770
|
|
|
23644
|
-
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
23645
|
-
var extendStatics = function (d, b) {
|
|
23646
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23647
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23648
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
23649
|
-
return extendStatics(d, b);
|
|
23650
|
-
};
|
|
23651
|
-
return function (d, b) {
|
|
23652
|
-
extendStatics(d, b);
|
|
23653
|
-
function __() { this.constructor = d; }
|
|
23654
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23655
|
-
};
|
|
23656
|
-
})();
|
|
23657
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23658
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23659
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23660
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23661
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23662
|
-
};
|
|
23771
|
+
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
23772
|
+
var extendStatics = function (d, b) {
|
|
23773
|
+
extendStatics = Object.setPrototypeOf ||
|
|
23774
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23775
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
23776
|
+
return extendStatics(d, b);
|
|
23777
|
+
};
|
|
23778
|
+
return function (d, b) {
|
|
23779
|
+
extendStatics(d, b);
|
|
23780
|
+
function __() { this.constructor = d; }
|
|
23781
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23782
|
+
};
|
|
23783
|
+
})();
|
|
23784
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23785
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23786
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23787
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23788
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23789
|
+
};
|
|
23663
23790
|
/**
|
|
23664
23791
|
* Configures the toolbar settings of the RichTextEditor.
|
|
23665
23792
|
*/
|
|
23666
|
-
var ToolbarSettings$1 = /** @
|
|
23793
|
+
var ToolbarSettings$1 = /** @class */ (function (_super) {
|
|
23667
23794
|
__extends$5(ToolbarSettings$$1, _super);
|
|
23668
23795
|
function ToolbarSettings$$1() {
|
|
23669
23796
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23688,7 +23815,7 @@ var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
|
|
|
23688
23815
|
/**
|
|
23689
23816
|
* Configures the image settings of the RichTextEditor.
|
|
23690
23817
|
*/
|
|
23691
|
-
var ImageSettings = /** @
|
|
23818
|
+
var ImageSettings = /** @class */ (function (_super) {
|
|
23692
23819
|
__extends$5(ImageSettings, _super);
|
|
23693
23820
|
function ImageSettings() {
|
|
23694
23821
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23740,7 +23867,7 @@ var ImageSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
23740
23867
|
/**
|
|
23741
23868
|
* Configures the file manager settings of the RichTextEditor.
|
|
23742
23869
|
*/
|
|
23743
|
-
var FileManagerSettings = /** @
|
|
23870
|
+
var FileManagerSettings = /** @class */ (function (_super) {
|
|
23744
23871
|
__extends$5(FileManagerSettings, _super);
|
|
23745
23872
|
function FileManagerSettings() {
|
|
23746
23873
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23798,7 +23925,7 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
23798
23925
|
], FileManagerSettings.prototype, "view", void 0);
|
|
23799
23926
|
return FileManagerSettings;
|
|
23800
23927
|
}(ChildProperty));
|
|
23801
|
-
var TableSettings = /** @
|
|
23928
|
+
var TableSettings = /** @class */ (function (_super) {
|
|
23802
23929
|
__extends$5(TableSettings, _super);
|
|
23803
23930
|
function TableSettings() {
|
|
23804
23931
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23823,7 +23950,7 @@ var TableSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
23823
23950
|
/**
|
|
23824
23951
|
* Configures the quick toolbar settings of the RichTextEditor.
|
|
23825
23952
|
*/
|
|
23826
|
-
var QuickToolbarSettings = /** @
|
|
23953
|
+
var QuickToolbarSettings = /** @class */ (function (_super) {
|
|
23827
23954
|
__extends$5(QuickToolbarSettings, _super);
|
|
23828
23955
|
function QuickToolbarSettings() {
|
|
23829
23956
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23854,7 +23981,7 @@ var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
23854
23981
|
/**
|
|
23855
23982
|
* Configures the Paste Cleanup settings of the RichTextEditor.
|
|
23856
23983
|
*/
|
|
23857
|
-
var PasteCleanupSettings = /** @
|
|
23984
|
+
var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
23858
23985
|
__extends$5(PasteCleanupSettings, _super);
|
|
23859
23986
|
function PasteCleanupSettings() {
|
|
23860
23987
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23882,7 +24009,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
23882
24009
|
/**
|
|
23883
24010
|
* Configures the font family settings of the RichTextEditor.
|
|
23884
24011
|
*/
|
|
23885
|
-
var FontFamily = /** @
|
|
24012
|
+
var FontFamily = /** @class */ (function (_super) {
|
|
23886
24013
|
__extends$5(FontFamily, _super);
|
|
23887
24014
|
function FontFamily() {
|
|
23888
24015
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23901,7 +24028,7 @@ var FontFamily = /** @__PURE__ @class */ (function (_super) {
|
|
|
23901
24028
|
/**
|
|
23902
24029
|
* Configures the font size settings of the RichTextEditor.
|
|
23903
24030
|
*/
|
|
23904
|
-
var FontSize = /** @
|
|
24031
|
+
var FontSize = /** @class */ (function (_super) {
|
|
23905
24032
|
__extends$5(FontSize, _super);
|
|
23906
24033
|
function FontSize() {
|
|
23907
24034
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23920,7 +24047,7 @@ var FontSize = /** @__PURE__ @class */ (function (_super) {
|
|
|
23920
24047
|
/**
|
|
23921
24048
|
* Configures the format settings of the RichTextEditor.
|
|
23922
24049
|
*/
|
|
23923
|
-
var Format = /** @
|
|
24050
|
+
var Format = /** @class */ (function (_super) {
|
|
23924
24051
|
__extends$5(Format, _super);
|
|
23925
24052
|
function Format() {
|
|
23926
24053
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23939,7 +24066,7 @@ var Format = /** @__PURE__ @class */ (function (_super) {
|
|
|
23939
24066
|
/**
|
|
23940
24067
|
* Configures the font Color settings of the RichTextEditor.
|
|
23941
24068
|
*/
|
|
23942
|
-
var FontColor = /** @
|
|
24069
|
+
var FontColor = /** @class */ (function (_super) {
|
|
23943
24070
|
__extends$5(FontColor, _super);
|
|
23944
24071
|
function FontColor() {
|
|
23945
24072
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23964,7 +24091,7 @@ var FontColor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23964
24091
|
/**
|
|
23965
24092
|
* Configures the background Color settings of the RichTextEditor.
|
|
23966
24093
|
*/
|
|
23967
|
-
var BackgroundColor = /** @
|
|
24094
|
+
var BackgroundColor = /** @class */ (function (_super) {
|
|
23968
24095
|
__extends$5(BackgroundColor, _super);
|
|
23969
24096
|
function BackgroundColor() {
|
|
23970
24097
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -23989,7 +24116,7 @@ var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
|
|
|
23989
24116
|
/**
|
|
23990
24117
|
* Configures the numberFormatList settings of the RichTextEditor.
|
|
23991
24118
|
*/
|
|
23992
|
-
var NumberFormatList = /** @
|
|
24119
|
+
var NumberFormatList = /** @class */ (function (_super) {
|
|
23993
24120
|
__extends$5(NumberFormatList, _super);
|
|
23994
24121
|
function NumberFormatList() {
|
|
23995
24122
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -24002,7 +24129,7 @@ var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
|
|
|
24002
24129
|
/**
|
|
24003
24130
|
* Configures the bulletFormatList settings of the RichTextEditor.
|
|
24004
24131
|
*/
|
|
24005
|
-
var BulletFormatList = /** @
|
|
24132
|
+
var BulletFormatList = /** @class */ (function (_super) {
|
|
24006
24133
|
__extends$5(BulletFormatList, _super);
|
|
24007
24134
|
function BulletFormatList() {
|
|
24008
24135
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -24013,29 +24140,29 @@ var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
|
|
|
24013
24140
|
return BulletFormatList;
|
|
24014
24141
|
}(ChildProperty));
|
|
24015
24142
|
|
|
24016
|
-
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
24017
|
-
var extendStatics = function (d, b) {
|
|
24018
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24019
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24020
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24021
|
-
return extendStatics(d, b);
|
|
24022
|
-
};
|
|
24023
|
-
return function (d, b) {
|
|
24024
|
-
extendStatics(d, b);
|
|
24025
|
-
function __() { this.constructor = d; }
|
|
24026
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24027
|
-
};
|
|
24028
|
-
})();
|
|
24029
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24030
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24031
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24032
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24033
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24034
|
-
};
|
|
24143
|
+
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
24144
|
+
var extendStatics = function (d, b) {
|
|
24145
|
+
extendStatics = Object.setPrototypeOf ||
|
|
24146
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24147
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24148
|
+
return extendStatics(d, b);
|
|
24149
|
+
};
|
|
24150
|
+
return function (d, b) {
|
|
24151
|
+
extendStatics(d, b);
|
|
24152
|
+
function __() { this.constructor = d; }
|
|
24153
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24154
|
+
};
|
|
24155
|
+
})();
|
|
24156
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24157
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24158
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24159
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24160
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24161
|
+
};
|
|
24035
24162
|
/**
|
|
24036
24163
|
* Objects used for configuring the iframe resources properties.
|
|
24037
24164
|
*/
|
|
24038
|
-
var Resources = /** @
|
|
24165
|
+
var Resources = /** @class */ (function (_super) {
|
|
24039
24166
|
__extends$6(Resources, _super);
|
|
24040
24167
|
function Resources() {
|
|
24041
24168
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -24051,7 +24178,7 @@ var Resources = /** @__PURE__ @class */ (function (_super) {
|
|
|
24051
24178
|
/**
|
|
24052
24179
|
* Configures the iframe settings of the RTE.
|
|
24053
24180
|
*/
|
|
24054
|
-
var IFrameSettings = /** @
|
|
24181
|
+
var IFrameSettings = /** @class */ (function (_super) {
|
|
24055
24182
|
__extends$6(IFrameSettings, _super);
|
|
24056
24183
|
function IFrameSettings() {
|
|
24057
24184
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -24068,29 +24195,29 @@ var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
24068
24195
|
return IFrameSettings;
|
|
24069
24196
|
}(ChildProperty));
|
|
24070
24197
|
|
|
24071
|
-
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
24072
|
-
var extendStatics = function (d, b) {
|
|
24073
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24074
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24075
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24076
|
-
return extendStatics(d, b);
|
|
24077
|
-
};
|
|
24078
|
-
return function (d, b) {
|
|
24079
|
-
extendStatics(d, b);
|
|
24080
|
-
function __() { this.constructor = d; }
|
|
24081
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24082
|
-
};
|
|
24083
|
-
})();
|
|
24084
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24085
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24086
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24087
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24088
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24089
|
-
};
|
|
24198
|
+
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
24199
|
+
var extendStatics = function (d, b) {
|
|
24200
|
+
extendStatics = Object.setPrototypeOf ||
|
|
24201
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24202
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24203
|
+
return extendStatics(d, b);
|
|
24204
|
+
};
|
|
24205
|
+
return function (d, b) {
|
|
24206
|
+
extendStatics(d, b);
|
|
24207
|
+
function __() { this.constructor = d; }
|
|
24208
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24209
|
+
};
|
|
24210
|
+
})();
|
|
24211
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24212
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24213
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24214
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24215
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24216
|
+
};
|
|
24090
24217
|
/**
|
|
24091
24218
|
* Configures the inlineMode property of the RTE.
|
|
24092
24219
|
*/
|
|
24093
|
-
var InlineMode = /** @
|
|
24220
|
+
var InlineMode = /** @class */ (function (_super) {
|
|
24094
24221
|
__extends$7(InlineMode, _super);
|
|
24095
24222
|
function InlineMode() {
|
|
24096
24223
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -24107,7 +24234,7 @@ var InlineMode = /** @__PURE__ @class */ (function (_super) {
|
|
|
24107
24234
|
/**
|
|
24108
24235
|
* `EnterKey` module is used to handle enter key press actions.
|
|
24109
24236
|
*/
|
|
24110
|
-
var EnterKeyAction = /** @
|
|
24237
|
+
var EnterKeyAction = /** @class */ (function () {
|
|
24111
24238
|
function EnterKeyAction(parent) {
|
|
24112
24239
|
this.parent = parent;
|
|
24113
24240
|
this.addEventListener();
|
|
@@ -24173,9 +24300,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24173
24300
|
}
|
|
24174
24301
|
else if (focusElem.textContent.length === 0) {
|
|
24175
24302
|
var currentFocusElem = focusElem.previousSibling.lastChild;
|
|
24176
|
-
var finalFocusElem = void 0;
|
|
24177
24303
|
while (currentFocusElem.nodeName !== '#text') {
|
|
24178
|
-
finalFocusElem = currentFocusElem;
|
|
24179
24304
|
currentFocusElem = currentFocusElem.lastChild;
|
|
24180
24305
|
}
|
|
24181
24306
|
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), currentFocusElem, currentFocusElem.textContent.length);
|
|
@@ -24190,9 +24315,9 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24190
24315
|
_this.getRangeNode();
|
|
24191
24316
|
}
|
|
24192
24317
|
}
|
|
24193
|
-
if (_this.range.startContainer === _this.range.endContainer &&
|
|
24194
|
-
_this.range.startOffset
|
|
24195
|
-
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), _this.range.startContainer.childNodes[_this.range.startOffset],
|
|
24318
|
+
if (_this.range.startContainer === _this.range.endContainer &&
|
|
24319
|
+
_this.range.startOffset === _this.range.endOffset && _this.range.startContainer === _this.parent.inputElement) {
|
|
24320
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), _this.range.startContainer.childNodes[_this.range.startOffset], 0);
|
|
24196
24321
|
_this.getRangeNode();
|
|
24197
24322
|
}
|
|
24198
24323
|
if (_this.parent.enterKey === 'P' || _this.parent.enterKey === 'DIV' ||
|
|
@@ -24235,6 +24360,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24235
24360
|
detach(nearBlockNode);
|
|
24236
24361
|
}
|
|
24237
24362
|
}
|
|
24363
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
24238
24364
|
}
|
|
24239
24365
|
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG')) {
|
|
24240
24366
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
@@ -24268,7 +24394,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24268
24394
|
}
|
|
24269
24395
|
_this.parent.formatter.editorManager.domNode.insertAfter(insertElm, newElem);
|
|
24270
24396
|
detach(newElem);
|
|
24271
|
-
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(),
|
|
24397
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), _this.parent.formatter.editorManager.domNode.isBlockNode(_this.startNode) ? insertElm : _this.startNode, 0);
|
|
24272
24398
|
}
|
|
24273
24399
|
}
|
|
24274
24400
|
e.args.preventDefault();
|
|
@@ -24308,18 +24434,14 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24308
24434
|
}
|
|
24309
24435
|
else {
|
|
24310
24436
|
var newElem = void 0;
|
|
24311
|
-
var focusElem = void 0;
|
|
24312
24437
|
var outerBRElem = _this.parent.createElement('br');
|
|
24313
24438
|
if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
|
|
24314
24439
|
!isNullOrUndefined(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR') {
|
|
24315
|
-
focusElem = _this.range.startContainer;
|
|
24316
24440
|
newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, false).cloneNode(true);
|
|
24317
24441
|
_this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
|
|
24318
24442
|
_this.insertFocusContent();
|
|
24319
24443
|
var currentFocusElem = outerBRElem.nextSibling;
|
|
24320
|
-
var finalFocusElem = void 0;
|
|
24321
24444
|
while (!isNullOrUndefined(currentFocusElem) && currentFocusElem.nodeName !== '#text') {
|
|
24322
|
-
finalFocusElem = currentFocusElem;
|
|
24323
24445
|
currentFocusElem = currentFocusElem.lastChild;
|
|
24324
24446
|
}
|
|
24325
24447
|
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), currentFocusElem, 0);
|
|
@@ -24357,12 +24479,6 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24357
24479
|
}
|
|
24358
24480
|
e.args.preventDefault();
|
|
24359
24481
|
}
|
|
24360
|
-
if (_this.range.startContainer.nodeName === '#text') {
|
|
24361
|
-
_this.range.startContainer.parentElement.scrollIntoView(false);
|
|
24362
|
-
}
|
|
24363
|
-
else {
|
|
24364
|
-
_this.range.startContainer.scrollIntoView(false);
|
|
24365
|
-
}
|
|
24366
24482
|
_this.parent.trigger(actionComplete, { requestType: shiftKey_1 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
|
|
24367
24483
|
}
|
|
24368
24484
|
});
|
|
@@ -24392,36 +24508,36 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
24392
24508
|
return EnterKeyAction;
|
|
24393
24509
|
}());
|
|
24394
24510
|
|
|
24395
|
-
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
24396
|
-
var extendStatics = function (d, b) {
|
|
24397
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24398
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24399
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24400
|
-
return extendStatics(d, b);
|
|
24401
|
-
};
|
|
24402
|
-
return function (d, b) {
|
|
24403
|
-
extendStatics(d, b);
|
|
24404
|
-
function __() { this.constructor = d; }
|
|
24405
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24406
|
-
};
|
|
24407
|
-
})();
|
|
24408
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
|
24409
|
-
__assign = Object.assign || function(t) {
|
|
24410
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24411
|
-
s = arguments[i];
|
|
24412
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24413
|
-
t[p] = s[p];
|
|
24414
|
-
}
|
|
24415
|
-
return t;
|
|
24416
|
-
};
|
|
24417
|
-
return __assign.apply(this, arguments);
|
|
24418
|
-
};
|
|
24419
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24420
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24421
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24422
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24423
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24424
|
-
};
|
|
24511
|
+
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
24512
|
+
var extendStatics = function (d, b) {
|
|
24513
|
+
extendStatics = Object.setPrototypeOf ||
|
|
24514
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24515
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
24516
|
+
return extendStatics(d, b);
|
|
24517
|
+
};
|
|
24518
|
+
return function (d, b) {
|
|
24519
|
+
extendStatics(d, b);
|
|
24520
|
+
function __() { this.constructor = d; }
|
|
24521
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
24522
|
+
};
|
|
24523
|
+
})();
|
|
24524
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
24525
|
+
__assign = Object.assign || function(t) {
|
|
24526
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24527
|
+
s = arguments[i];
|
|
24528
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24529
|
+
t[p] = s[p];
|
|
24530
|
+
}
|
|
24531
|
+
return t;
|
|
24532
|
+
};
|
|
24533
|
+
return __assign.apply(this, arguments);
|
|
24534
|
+
};
|
|
24535
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24536
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24537
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24538
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24539
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24540
|
+
};
|
|
24425
24541
|
/**
|
|
24426
24542
|
* Represents the Rich Text Editor component.
|
|
24427
24543
|
* ```html
|
|
@@ -24432,7 +24548,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
24432
24548
|
* </script>
|
|
24433
24549
|
* ```
|
|
24434
24550
|
*/
|
|
24435
|
-
var RichTextEditor = /** @
|
|
24551
|
+
var RichTextEditor = /** @class */ (function (_super) {
|
|
24436
24552
|
__extends$4(RichTextEditor, _super);
|
|
24437
24553
|
function RichTextEditor(options, element) {
|
|
24438
24554
|
var _this = _super.call(this, options, element) || this;
|
|
@@ -25796,8 +25912,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
25796
25912
|
this.setProperties({ value: this.valueTemplate });
|
|
25797
25913
|
}
|
|
25798
25914
|
else {
|
|
25799
|
-
var
|
|
25800
|
-
var compiledTemplate = compiledString({});
|
|
25915
|
+
var compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
|
|
25801
25916
|
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
25802
25917
|
var item = compiledTemplate[i];
|
|
25803
25918
|
append([item], this.element);
|