@syncfusion/ej2-richtexteditor 24.2.9 → 25.1.35
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 +18 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +908 -485
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +892 -474
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +11 -0
- package/src/common/interface.d.ts +12 -0
- package/src/common/types.d.ts +6 -0
- package/src/editor-manager/plugin/dom-node.d.ts +5 -1
- package/src/editor-manager/plugin/dom-node.js +161 -12
- package/src/editor-manager/plugin/formats.js +1 -1
- package/src/editor-manager/plugin/image.js +12 -16
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +31 -0
- package/src/editor-manager/plugin/link.js +1 -1
- package/src/editor-manager/plugin/lists.js +24 -2
- package/src/editor-manager/plugin/ms-word-clean-up.js +65 -57
- package/src/editor-manager/plugin/selection-commands.js +52 -3
- package/src/editor-manager/plugin/table.js +18 -3
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +17 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +41 -10
- package/src/rich-text-editor/actions/base-toolbar.js +24 -30
- package/src/rich-text-editor/actions/dropdown-buttons.js +4 -4
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- package/src/rich-text-editor/actions/full-screen.js +2 -2
- package/src/rich-text-editor/actions/html-editor.d.ts +0 -2
- package/src/rich-text-editor/actions/html-editor.js +8 -26
- package/src/rich-text-editor/actions/markdown-editor.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +23 -0
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +7 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +23 -8
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +0 -2
- package/src/rich-text-editor/actions/toolbar.js +13 -85
- package/src/rich-text-editor/base/classes.d.ts +0 -5
- package/src/rich-text-editor/base/classes.js +0 -5
- package/src/rich-text-editor/base/constant.d.ts +5 -0
- package/src/rich-text-editor/base/constant.js +5 -0
- package/src/rich-text-editor/base/interface.d.ts +36 -2
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +2 -2
- package/src/rich-text-editor/base/rich-text-editor.d.ts +4 -3
- package/src/rich-text-editor/base/rich-text-editor.js +81 -58
- package/src/rich-text-editor/base/util.js +8 -2
- package/src/rich-text-editor/models/default-locale.js +15 -12
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +8 -1
- package/src/rich-text-editor/renderer/image-module.js +148 -155
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +71 -8
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +3 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +61 -2
- package/src/rich-text-editor/renderer/video-module.js +7 -4
- package/src/rich-text-editor/renderer/view-source.js +7 -4
- package/styles/bootstrap-dark.css +57 -17
- package/styles/bootstrap.css +58 -18
- package/styles/bootstrap4.css +58 -18
- package/styles/bootstrap5-dark.css +64 -17
- package/styles/bootstrap5.css +64 -17
- package/styles/fabric-dark.css +57 -17
- package/styles/fabric.css +58 -18
- package/styles/fluent-dark.css +57 -17
- package/styles/fluent.css +57 -17
- package/styles/highcontrast-light.css +57 -17
- package/styles/highcontrast.css +58 -18
- package/styles/material-dark.css +57 -17
- package/styles/material.css +57 -17
- package/styles/material3-dark.css +59 -19
- package/styles/material3.css +59 -19
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +1 -1
- package/styles/rich-text-editor/_bootstrap4-definition.scss +3 -2
- package/styles/rich-text-editor/_bootstrap5-definition.scss +1 -0
- package/styles/rich-text-editor/_fabric-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_fabric-definition.scss +2 -1
- package/styles/rich-text-editor/_fluent-definition.scss +1 -0
- package/styles/rich-text-editor/_fusionnew-definition.scss +1 -0
- package/styles/rich-text-editor/_highcontrast-definition.scss +2 -1
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +1 -0
- package/styles/rich-text-editor/_layout.scss +47 -13
- package/styles/rich-text-editor/_material-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +1 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +4 -3
- package/styles/rich-text-editor/_theme.scss +18 -5
- package/styles/rich-text-editor/bootstrap-dark.css +57 -17
- package/styles/rich-text-editor/bootstrap.css +58 -18
- package/styles/rich-text-editor/bootstrap4.css +58 -18
- package/styles/rich-text-editor/bootstrap5-dark.css +64 -17
- package/styles/rich-text-editor/bootstrap5.css +64 -17
- package/styles/rich-text-editor/fabric-dark.css +57 -17
- package/styles/rich-text-editor/fabric.css +58 -18
- package/styles/rich-text-editor/fluent-dark.css +57 -17
- package/styles/rich-text-editor/fluent.css +57 -17
- package/styles/rich-text-editor/highcontrast-light.css +57 -17
- package/styles/rich-text-editor/highcontrast.css +58 -18
- package/styles/rich-text-editor/icons/_bds.scss +351 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +7 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +7 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_fabric.scss +7 -4
- package/styles/rich-text-editor/icons/_fluent.scss +7 -4
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +7 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +7 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +7 -4
- package/styles/rich-text-editor/icons/_material.scss +7 -4
- package/styles/rich-text-editor/icons/_material3.scss +7 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +7 -4
- package/styles/rich-text-editor/material-dark.css +57 -17
- package/styles/rich-text-editor/material.css +57 -17
- package/styles/rich-text-editor/material3-dark.css +59 -19
- package/styles/rich-text-editor/material3.css +59 -19
- package/styles/rich-text-editor/tailwind-dark.css +61 -21
- package/styles/rich-text-editor/tailwind.css +61 -21
- package/styles/tailwind-dark.css +61 -21
- package/styles/tailwind.css +61 -21
|
@@ -769,6 +769,11 @@ var documentClickClosedBy = 'documentClickClosedBy';
|
|
|
769
769
|
* @deprecated
|
|
770
770
|
*/
|
|
771
771
|
var showColorPicker = 'showColorPicker';
|
|
772
|
+
/**
|
|
773
|
+
* @hidden
|
|
774
|
+
* @deprecated
|
|
775
|
+
*/
|
|
776
|
+
var closeTooltip = 'closeTooltip';
|
|
772
777
|
/**
|
|
773
778
|
* @hidden
|
|
774
779
|
* @deprecated
|
|
@@ -1012,11 +1017,6 @@ var CLS_TB_FIXED = 'e-rte-tb-fixed';
|
|
|
1012
1017
|
* @deprecated
|
|
1013
1018
|
*/
|
|
1014
1019
|
var CLS_TB_FLOAT = 'e-rte-tb-float';
|
|
1015
|
-
/**
|
|
1016
|
-
* @hidden
|
|
1017
|
-
* @deprecated
|
|
1018
|
-
*/
|
|
1019
|
-
var CLS_TB_ABS_FLOAT = 'e-rte-tb-abs-float';
|
|
1020
1020
|
/**
|
|
1021
1021
|
* @hidden
|
|
1022
1022
|
* @deprecated
|
|
@@ -2687,7 +2687,7 @@ var defaultLocale = {
|
|
|
2687
2687
|
'linkTooltipLabel': 'Title',
|
|
2688
2688
|
'linkWebUrl': 'Web address',
|
|
2689
2689
|
'linkTitle': 'Enter a title',
|
|
2690
|
-
'linkurl': '
|
|
2690
|
+
'linkurl': 'https://example.com',
|
|
2691
2691
|
'linkOpenInNewWindow': 'Open link in new window',
|
|
2692
2692
|
'linkHeader': 'Insert Link',
|
|
2693
2693
|
'dialogInsert': 'Insert',
|
|
@@ -2710,9 +2710,9 @@ var defaultLocale = {
|
|
|
2710
2710
|
'imageAlternateText': 'Alternate Text',
|
|
2711
2711
|
'alternateHeader': 'Alternative Text',
|
|
2712
2712
|
'browse': 'Browse',
|
|
2713
|
-
'imageUrl': '
|
|
2714
|
-
'audioUrl': '
|
|
2715
|
-
'videoUrl': '
|
|
2713
|
+
'imageUrl': 'https://example.com/image.png',
|
|
2714
|
+
'audioUrl': 'https://example.com/audio.mp3',
|
|
2715
|
+
'videoUrl': 'https://example.com/video.mp4',
|
|
2716
2716
|
'webUrl': 'Web URL',
|
|
2717
2717
|
'embedUrl': 'Embed Code',
|
|
2718
2718
|
'imageCaption': 'Caption',
|
|
@@ -2723,7 +2723,7 @@ var defaultLocale = {
|
|
|
2723
2723
|
'videoHeight': 'Height',
|
|
2724
2724
|
'videoWidth': 'Width',
|
|
2725
2725
|
'textPlaceholder': 'Enter text',
|
|
2726
|
-
'inserttablebtn': 'Insert
|
|
2726
|
+
'inserttablebtn': 'Insert Table',
|
|
2727
2727
|
'tabledialogHeader': 'Insert Table',
|
|
2728
2728
|
'tableWidth': 'Width',
|
|
2729
2729
|
'cellpadding': 'Cell Padding',
|
|
@@ -2737,7 +2737,7 @@ var defaultLocale = {
|
|
|
2737
2737
|
'createTable': 'Create Table',
|
|
2738
2738
|
'removeTable': 'Remove Table',
|
|
2739
2739
|
'tableHeader': 'Header Row',
|
|
2740
|
-
'tableRemove': 'Delete',
|
|
2740
|
+
'tableRemove': 'Delete Table',
|
|
2741
2741
|
'tableCellBackground': 'Table Cell Background',
|
|
2742
2742
|
'tableEditProperties': 'Table Edit Properties',
|
|
2743
2743
|
'styles': 'Styles',
|
|
@@ -2799,11 +2799,11 @@ var defaultLocale = {
|
|
|
2799
2799
|
'fontNameTimesNewRoman': 'Times New Roman',
|
|
2800
2800
|
'fontNameVerdana': 'Verdana',
|
|
2801
2801
|
'numberFormatListNumber': 'Number',
|
|
2802
|
-
'numberFormatListLowerAlpha': '
|
|
2803
|
-
'numberFormatListUpperAlpha': '
|
|
2804
|
-
'numberFormatListLowerRoman': '
|
|
2805
|
-
'numberFormatListUpperRoman': '
|
|
2806
|
-
'numberFormatListLowerGreek': '
|
|
2802
|
+
'numberFormatListLowerAlpha': 'Lower Alpha',
|
|
2803
|
+
'numberFormatListUpperAlpha': 'Upper Alpha',
|
|
2804
|
+
'numberFormatListLowerRoman': 'Lower Roman',
|
|
2805
|
+
'numberFormatListUpperRoman': 'Upper Roman',
|
|
2806
|
+
'numberFormatListLowerGreek': 'Lower Greek',
|
|
2807
2807
|
'bulletFormatListDisc': 'Disc',
|
|
2808
2808
|
'bulletFormatListCircle': 'Circle',
|
|
2809
2809
|
'bulletFormatListSquare': 'Square',
|
|
@@ -2817,7 +2817,10 @@ var defaultLocale = {
|
|
|
2817
2817
|
'emojiPickerNoResultFound': 'No results found',
|
|
2818
2818
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2819
2819
|
'linkAriaLabel': 'Open in new window',
|
|
2820
|
-
'unsupportedImage': 'Unsupported file format'
|
|
2820
|
+
'unsupportedImage': 'Unsupported file format',
|
|
2821
|
+
'mergecells': 'Merge cells',
|
|
2822
|
+
'verticalsplit': 'Vertical split',
|
|
2823
|
+
'horizontalsplit': 'Horizontal split'
|
|
2821
2824
|
};
|
|
2822
2825
|
var toolsLocale = {
|
|
2823
2826
|
'alignments': 'alignments',
|
|
@@ -3209,7 +3212,12 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
3209
3212
|
}
|
|
3210
3213
|
case 'bulletFormatList':
|
|
3211
3214
|
case 'numberFormatList': {
|
|
3212
|
-
|
|
3215
|
+
if (value !== '') {
|
|
3216
|
+
addClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
3217
|
+
}
|
|
3218
|
+
else {
|
|
3219
|
+
removeClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
3220
|
+
}
|
|
3213
3221
|
}
|
|
3214
3222
|
}
|
|
3215
3223
|
}
|
|
@@ -3451,7 +3459,8 @@ function updateTextNode(value, rteObj) {
|
|
|
3451
3459
|
imageElm[i].classList.add(CLS_RTE_IMAGE);
|
|
3452
3460
|
}
|
|
3453
3461
|
if (!(imageElm[i].classList.contains(CLS_IMGINLINE) ||
|
|
3454
|
-
imageElm[i].classList.contains(CLS_IMGBREAK))
|
|
3462
|
+
imageElm[i].classList.contains(CLS_IMGBREAK)) &&
|
|
3463
|
+
!(imageElm[i].classList.contains('e-imgleft') || imageElm[i].classList.contains('e-imgright') || imageElm[i].classList.contains('e-imgcenter'))) {
|
|
3455
3464
|
imageElm[i].classList.add(CLS_IMGINLINE);
|
|
3456
3465
|
}
|
|
3457
3466
|
}
|
|
@@ -3600,6 +3609,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3600
3609
|
ToolbarRenderer.prototype.wireEvent = function () {
|
|
3601
3610
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3602
3611
|
this.parent.on(destroyTooltip, this.destroyTooltip, this);
|
|
3612
|
+
this.parent.on(closeTooltip, this.closeTooltip, this);
|
|
3603
3613
|
};
|
|
3604
3614
|
ToolbarRenderer.prototype.destroyTooltip = function () {
|
|
3605
3615
|
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
@@ -3612,6 +3622,8 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3612
3622
|
};
|
|
3613
3623
|
ToolbarRenderer.prototype.unWireEvent = function () {
|
|
3614
3624
|
this.parent.off(destroy, this.unWireEvent);
|
|
3625
|
+
this.parent.off(destroyTooltip, this.destroyTooltip);
|
|
3626
|
+
this.parent.off(closeTooltip, this.closeTooltip);
|
|
3615
3627
|
};
|
|
3616
3628
|
ToolbarRenderer.prototype.toolbarBeforeCreate = function (e) {
|
|
3617
3629
|
if (this.mode === 'Extended') {
|
|
@@ -3732,7 +3744,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3732
3744
|
windowCollision: true,
|
|
3733
3745
|
position: 'BottomCenter'
|
|
3734
3746
|
});
|
|
3735
|
-
this.tooltip.appendTo(args.target);
|
|
3747
|
+
this.tooltip.appendTo(args.target.parentElement);
|
|
3736
3748
|
}
|
|
3737
3749
|
};
|
|
3738
3750
|
/**
|
|
@@ -3864,6 +3876,32 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3864
3876
|
popupElement.setAttribute('aria-owns', this.parent.getID());
|
|
3865
3877
|
return dropDown;
|
|
3866
3878
|
};
|
|
3879
|
+
ToolbarRenderer.prototype.mouseOutHandler = function () {
|
|
3880
|
+
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
3881
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
3882
|
+
}
|
|
3883
|
+
else {
|
|
3884
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3885
|
+
this.parent.contentModule.getDocument();
|
|
3886
|
+
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
3887
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
3888
|
+
}
|
|
3889
|
+
this.tooltipTargetEle.removeAttribute('data-title');
|
|
3890
|
+
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
3891
|
+
};
|
|
3892
|
+
ToolbarRenderer.prototype.closeTooltip = function (args) {
|
|
3893
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3894
|
+
this.parent.contentModule.getDocument();
|
|
3895
|
+
this.tooltipTargetEle = closest(args.target, '[data-tooltip-id]');
|
|
3896
|
+
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
3897
|
+
this.destroyTooltip();
|
|
3898
|
+
if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
|
|
3899
|
+
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
3900
|
+
this.tooltipTargetEle.removeAttribute('title');
|
|
3901
|
+
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
};
|
|
3867
3905
|
/**
|
|
3868
3906
|
* renderListDropDown method
|
|
3869
3907
|
*
|
|
@@ -3873,6 +3911,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3873
3911
|
* @deprecated
|
|
3874
3912
|
*/
|
|
3875
3913
|
ToolbarRenderer.prototype.renderListDropDown = function (args) {
|
|
3914
|
+
var _this = this;
|
|
3876
3915
|
// eslint-disable-next-line
|
|
3877
3916
|
var proxy = this;
|
|
3878
3917
|
var css = CLS_RTE_ELEMENTS + ' ' + CLS_TB_BTN + ((this.parent.inlineMode) ? (' ' + CLS_INLINE_DROPDOWN) : '');
|
|
@@ -3888,6 +3927,35 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
3888
3927
|
enableRtl: this.parent.enableRtl,
|
|
3889
3928
|
select: this.dropDownSelected.bind(this),
|
|
3890
3929
|
beforeOpen: function (args) {
|
|
3930
|
+
if (proxy.parent.editorMode !== 'Markdown') {
|
|
3931
|
+
var startNode = proxy.parent.getRange().startContainer.parentElement;
|
|
3932
|
+
var listElem = startNode.closest('LI');
|
|
3933
|
+
var currentLiElem = !isNullOrUndefined(listElem) ? listElem.parentElement : null;
|
|
3934
|
+
if (!isNullOrUndefined(currentLiElem) && (currentLiElem.nodeName === 'OL' || currentLiElem.nodeName === 'UL')) {
|
|
3935
|
+
if (currentLiElem.nodeName === 'UL' && args.items[0].subCommand === 'NumberFormatList') {
|
|
3936
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3937
|
+
}
|
|
3938
|
+
else if (currentLiElem.nodeName === 'OL' && args.items[0].subCommand === 'BulletFormatList') {
|
|
3939
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3940
|
+
}
|
|
3941
|
+
else {
|
|
3942
|
+
var currentListStyle = currentLiElem.style.listStyleType.split('-').join('').toLocaleLowerCase();
|
|
3943
|
+
currentListStyle = currentListStyle === 'decimal' ? 'number' : currentListStyle;
|
|
3944
|
+
for (var index = 0; index < args.element.childNodes.length; index++) {
|
|
3945
|
+
if (currentListStyle === args.element.childNodes[index].innerHTML.split(' ').join('').toLocaleLowerCase()) {
|
|
3946
|
+
addClass([args.element.childNodes[index]], 'e-active');
|
|
3947
|
+
}
|
|
3948
|
+
else if (currentListStyle === '') {
|
|
3949
|
+
addClass([args.element.childNodes[index]], 'e-active');
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3954
|
+
else {
|
|
3955
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3956
|
+
}
|
|
3957
|
+
}
|
|
3958
|
+
_this.closeTooltip({ target: args.event.target });
|
|
3891
3959
|
if (proxy.parent.readonly || !proxy.parent.enabled) {
|
|
3892
3960
|
args.cancel = true;
|
|
3893
3961
|
return;
|
|
@@ -4304,23 +4372,13 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
|
4304
4372
|
case '-':
|
|
4305
4373
|
return { type: 'Separator', cssClass: CLS_HR_SEPARATOR };
|
|
4306
4374
|
default:
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
};
|
|
4315
|
-
}
|
|
4316
|
-
else {
|
|
4317
|
-
return {
|
|
4318
|
-
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
4319
|
-
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
4320
|
-
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
4321
|
-
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
4322
|
-
};
|
|
4323
|
-
}
|
|
4375
|
+
return {
|
|
4376
|
+
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
4377
|
+
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
4378
|
+
tooltipText: getTooltipText(itemStr, this.locator),
|
|
4379
|
+
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
4380
|
+
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
4381
|
+
};
|
|
4324
4382
|
}
|
|
4325
4383
|
}
|
|
4326
4384
|
};
|
|
@@ -4373,17 +4431,21 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
|
4373
4431
|
var item = tbItems_1[_i];
|
|
4374
4432
|
_loop_1(item);
|
|
4375
4433
|
}
|
|
4376
|
-
|
|
4377
|
-
var
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4434
|
+
if (this.parent.showTooltip) {
|
|
4435
|
+
for (var num = 0; num < items.length; num++) {
|
|
4436
|
+
var tooltipText = items[num].tooltipText;
|
|
4437
|
+
var shortCutKey = void 0;
|
|
4438
|
+
if (windowKeys["" + tooltipText]) {
|
|
4439
|
+
shortCutKey = window.navigator.platform.toLocaleLowerCase().includes('mac') ? windowKeys["" + tooltipText].replace('Ctrl', 'Cmd') : windowKeys["" + tooltipText];
|
|
4440
|
+
}
|
|
4441
|
+
else {
|
|
4442
|
+
shortCutKey = tooltipText;
|
|
4443
|
+
}
|
|
4444
|
+
if (shortCutKey) {
|
|
4445
|
+
if (!(items[num].command === "Images" && items[num].subCommand === "InsertLink")) {
|
|
4446
|
+
items[num].tooltipText = (tooltipText !== shortCutKey) ? tooltipText + ' (' + shortCutKey + ')' : tooltipText;
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4387
4449
|
}
|
|
4388
4450
|
}
|
|
4389
4451
|
return items;
|
|
@@ -4433,7 +4495,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
|
|
|
4433
4495
|
addClass([args.element], item.cssClass);
|
|
4434
4496
|
}
|
|
4435
4497
|
if (item.command === 'Images' || item.command === 'Videos' || item.command === 'Audios' || item.command === 'Table') {
|
|
4436
|
-
args.element.setAttribute('title', getQuickToolbarTooltipText(item.text));
|
|
4498
|
+
args.element.setAttribute('title', getQuickToolbarTooltipText(item.text) !== '' ? getQuickToolbarTooltipText(item.text) : item.text);
|
|
4437
4499
|
}
|
|
4438
4500
|
if (item.command === 'Alignments' || item.subCommand === 'JustifyLeft'
|
|
4439
4501
|
|| item.subCommand === 'JustifyRight' || item.subCommand === 'JustifyCenter') {
|
|
@@ -4443,13 +4505,13 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
|
|
|
4443
4505
|
args.element.setAttribute('title', getTooltipTextDropdownItems(item.subCommand.toLocaleLowerCase(), this.locator, formatsLocale));
|
|
4444
4506
|
}
|
|
4445
4507
|
if (item.command === 'Font') {
|
|
4446
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.
|
|
4508
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) : item.text);
|
|
4447
4509
|
}
|
|
4448
4510
|
if (item.subCommand === 'BulletFormatList') {
|
|
4449
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.
|
|
4511
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) : item.text);
|
|
4450
4512
|
}
|
|
4451
4513
|
if (item.subCommand === 'NumberFormatList') {
|
|
4452
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.
|
|
4514
|
+
args.element.setAttribute('title', (getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale)) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale) : item.text);
|
|
4453
4515
|
}
|
|
4454
4516
|
if (item.subCommand === 'FontSize') {
|
|
4455
4517
|
args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), null, null, this.parent));
|
|
@@ -5259,72 +5321,14 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5259
5321
|
}
|
|
5260
5322
|
};
|
|
5261
5323
|
Toolbar$$1.prototype.toggleFloatClass = function (e) {
|
|
5262
|
-
var topValue;
|
|
5263
|
-
var isBody = false;
|
|
5264
|
-
var isFloat = false;
|
|
5265
|
-
var scrollParent;
|
|
5266
5324
|
var floatOffset = this.parent.floatingToolbarOffset;
|
|
5267
|
-
if (
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
else if (e && e.target !== document) {
|
|
5271
|
-
scrollParent = e.target;
|
|
5325
|
+
if (this.parent.toolbarSettings.enableFloating) {
|
|
5326
|
+
addClass([this.tbElement.parentElement], [CLS_TB_FLOAT]);
|
|
5327
|
+
setStyleAttribute(this.tbElement.parentElement, { top: (floatOffset) + 'px' });
|
|
5272
5328
|
}
|
|
5273
5329
|
else {
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
}
|
|
5277
|
-
var tbHeight = this.getToolbarHeight() + this.getExpandTBarPopHeight();
|
|
5278
|
-
if (this.isTransformChild) {
|
|
5279
|
-
topValue = 0;
|
|
5280
|
-
var scrollParentRelativeTop = 0;
|
|
5281
|
-
var trgHeight = this.parent.element.offsetHeight;
|
|
5282
|
-
if (isBody) {
|
|
5283
|
-
var bodyStyle = window.getComputedStyle(scrollParent);
|
|
5284
|
-
scrollParentRelativeTop = parseFloat(bodyStyle.marginTop.split('px')[0]) + parseFloat(bodyStyle.paddingTop.split('px')[0]);
|
|
5285
|
-
}
|
|
5286
|
-
var targetTop = this.parent.element.getBoundingClientRect().top;
|
|
5287
|
-
var scrollParentYOffset = (Browser.isMSPointer && isBody) ? window.pageYOffset : scrollParent.parentElement.scrollTop;
|
|
5288
|
-
var scrollParentRect = scrollParent.getBoundingClientRect();
|
|
5289
|
-
var scrollParentTop = (!isBody) ? scrollParentRect.top : (scrollParentRect.top + scrollParentYOffset);
|
|
5290
|
-
var outOfRange = ((targetTop - ((!isBody) ? scrollParentTop : 0))
|
|
5291
|
-
+ trgHeight > tbHeight + floatOffset) ? false : true;
|
|
5292
|
-
if (targetTop > (scrollParentTop + floatOffset) || targetTop < -trgHeight || ((targetTop < 0) ? outOfRange : false)) {
|
|
5293
|
-
isFloat = false;
|
|
5294
|
-
removeClass([this.tbElement], [CLS_TB_ABS_FLOAT]);
|
|
5295
|
-
}
|
|
5296
|
-
else if (targetTop < (scrollParentTop + floatOffset)) {
|
|
5297
|
-
if (targetTop < 0) {
|
|
5298
|
-
topValue = (-targetTop) + scrollParentTop;
|
|
5299
|
-
}
|
|
5300
|
-
else {
|
|
5301
|
-
topValue = scrollParentTop - targetTop;
|
|
5302
|
-
}
|
|
5303
|
-
topValue = (isBody) ? topValue - scrollParentRelativeTop : topValue;
|
|
5304
|
-
addClass([this.tbElement], [CLS_TB_ABS_FLOAT]);
|
|
5305
|
-
isFloat = true;
|
|
5306
|
-
}
|
|
5307
|
-
}
|
|
5308
|
-
else {
|
|
5309
|
-
var parent_1 = this.parent.element.getBoundingClientRect();
|
|
5310
|
-
if (window.innerHeight < parent_1.top) {
|
|
5311
|
-
return;
|
|
5312
|
-
}
|
|
5313
|
-
topValue = (e && e.target !== document) ? scrollParent.getBoundingClientRect().top : 0;
|
|
5314
|
-
if ((parent_1.bottom < (floatOffset + tbHeight + topValue)) || parent_1.bottom < 0 || parent_1.top > floatOffset + topValue) {
|
|
5315
|
-
isFloat = false;
|
|
5316
|
-
}
|
|
5317
|
-
else if (parent_1.top < floatOffset || parent_1.top < floatOffset + topValue) {
|
|
5318
|
-
isFloat = true;
|
|
5319
|
-
}
|
|
5320
|
-
}
|
|
5321
|
-
if (!isFloat) {
|
|
5322
|
-
removeClass([this.tbElement], [CLS_TB_FLOAT]);
|
|
5323
|
-
setStyleAttribute(this.tbElement, { top: 0 + 'px', width: '100%' });
|
|
5324
|
-
}
|
|
5325
|
-
else {
|
|
5326
|
-
addClass([this.tbElement], [CLS_TB_FLOAT]);
|
|
5327
|
-
setStyleAttribute(this.tbElement, { width: this.parent.element.offsetWidth + 'px', top: (floatOffset + topValue) + 'px' });
|
|
5330
|
+
removeClass([this.tbElement.parentElement], [CLS_TB_FLOAT]);
|
|
5331
|
+
setStyleAttribute(this.tbElement.parentElement, { top: '' });
|
|
5328
5332
|
}
|
|
5329
5333
|
};
|
|
5330
5334
|
Toolbar$$1.prototype.renderToolbar = function () {
|
|
@@ -5630,19 +5634,6 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5630
5634
|
this.toolbarActionModule.parent = null;
|
|
5631
5635
|
this.dropDownModule.parent = null;
|
|
5632
5636
|
};
|
|
5633
|
-
Toolbar$$1.prototype.scrollHandler = function (e) {
|
|
5634
|
-
if (!this.parent.inlineMode.enable) {
|
|
5635
|
-
if (this.parent.toolbarSettings.enableFloating && this.getDOMVisibility(this.tbElement)) {
|
|
5636
|
-
this.toggleFloatClass(e.args);
|
|
5637
|
-
}
|
|
5638
|
-
}
|
|
5639
|
-
};
|
|
5640
|
-
Toolbar$$1.prototype.getDOMVisibility = function (el) {
|
|
5641
|
-
if (!el.offsetParent && el.offsetWidth === 0 && el.offsetHeight === 0) {
|
|
5642
|
-
return false;
|
|
5643
|
-
}
|
|
5644
|
-
return true;
|
|
5645
|
-
};
|
|
5646
5637
|
Toolbar$$1.prototype.mouseDownHandler = function () {
|
|
5647
5638
|
if (Browser.isDevice && this.parent.inlineMode.enable && !isIDevice()) {
|
|
5648
5639
|
this.showFixedTBar();
|
|
@@ -5679,11 +5670,6 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5679
5670
|
};
|
|
5680
5671
|
Toolbar$$1.prototype.adjustContentHeight = function (trg, isKeyboard) {
|
|
5681
5672
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNullOrUndefined(trg)) {
|
|
5682
|
-
var extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
5683
|
-
if (!isNullOrUndefined(extendedTbar)) {
|
|
5684
|
-
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
5685
|
-
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
5686
|
-
}
|
|
5687
5673
|
var hasActiveClass = trg.classList.contains('e-nav-active');
|
|
5688
5674
|
var isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
5689
5675
|
if (isExpand) {
|
|
@@ -5692,7 +5678,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5692
5678
|
else {
|
|
5693
5679
|
removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5694
5680
|
}
|
|
5695
|
-
this.parent.setContentHeight('
|
|
5681
|
+
this.parent.setContentHeight('Toolbar', isExpand);
|
|
5696
5682
|
}
|
|
5697
5683
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
5698
5684
|
this.isToolbar = true;
|
|
@@ -5717,7 +5703,6 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5717
5703
|
this.dropDownModule = new DropDownButtons(this.parent, this.locator);
|
|
5718
5704
|
this.toolbarActionModule = new ToolbarAction(this.parent);
|
|
5719
5705
|
this.parent.on(initialEnd, this.renderToolbar, this);
|
|
5720
|
-
this.parent.on(scroll, this.scrollHandler, this);
|
|
5721
5706
|
this.parent.on(bindOnEnd, this.toolbarBindEvent, this);
|
|
5722
5707
|
this.parent.on(toolbarUpdated, this.updateToolbarStatus, this);
|
|
5723
5708
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
@@ -5742,7 +5727,6 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5742
5727
|
return;
|
|
5743
5728
|
}
|
|
5744
5729
|
this.parent.off(initialEnd, this.renderToolbar);
|
|
5745
|
-
this.parent.off(scroll, this.scrollHandler);
|
|
5746
5730
|
this.parent.off(bindOnEnd, this.toolbarBindEvent);
|
|
5747
5731
|
this.parent.off(toolbarUpdated, this.updateToolbarStatus);
|
|
5748
5732
|
this.parent.off(modelChanged, this.onPropertyChanged);
|
|
@@ -5777,7 +5761,8 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5777
5761
|
if (!this.parent.inlineMode.enable) {
|
|
5778
5762
|
this.refreshToolbarOverflow();
|
|
5779
5763
|
}
|
|
5780
|
-
this.parent.
|
|
5764
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
5765
|
+
this.parent.setContentHeight('Refresh', isExpand);
|
|
5781
5766
|
};
|
|
5782
5767
|
/**
|
|
5783
5768
|
* Called internally if any of the property value changed.
|
|
@@ -5798,6 +5783,11 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
|
5798
5783
|
}
|
|
5799
5784
|
}
|
|
5800
5785
|
}
|
|
5786
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings)) {
|
|
5787
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings.enableFloating)) {
|
|
5788
|
+
this.toggleFloatClass();
|
|
5789
|
+
}
|
|
5790
|
+
}
|
|
5801
5791
|
if (e.module !== this.getModuleName()) {
|
|
5802
5792
|
return;
|
|
5803
5793
|
}
|
|
@@ -6322,7 +6312,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6322
6312
|
function BaseQuickToolbar(parent, locator) {
|
|
6323
6313
|
this.parent = parent;
|
|
6324
6314
|
this.locator = locator;
|
|
6325
|
-
this.
|
|
6315
|
+
this.isRendered = false;
|
|
6326
6316
|
this.renderFactory = this.locator.getService('rendererFactory');
|
|
6327
6317
|
this.contentRenderer = this.renderFactory.getRenderer(RenderType.Content);
|
|
6328
6318
|
this.popupRenderer = this.renderFactory.getRenderer(RenderType.Popup);
|
|
@@ -6386,7 +6376,18 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6386
6376
|
e.target.classList.contains('e-imgbreak')) ? false : true;
|
|
6387
6377
|
var target = !isNullOrUndefined(imgWrapper) ? imgWrapper : e.target;
|
|
6388
6378
|
addClass([this.toolbarElement], [CLS_RM_WHITE_SPACE]);
|
|
6389
|
-
var targetOffsetTop
|
|
6379
|
+
var targetOffsetTop;
|
|
6380
|
+
if (!isNullOrUndefined(closest(target, 'table'))) {
|
|
6381
|
+
targetOffsetTop = target.offsetTop;
|
|
6382
|
+
var parentTable = closest(target, 'table');
|
|
6383
|
+
while (!isNullOrUndefined(parentTable)) {
|
|
6384
|
+
targetOffsetTop += parentTable.offsetTop;
|
|
6385
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
6386
|
+
}
|
|
6387
|
+
}
|
|
6388
|
+
else {
|
|
6389
|
+
targetOffsetTop = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetTop : target.offsetTop;
|
|
6390
|
+
}
|
|
6390
6391
|
var parentOffsetTop = window.pageYOffset + e.parentData.top;
|
|
6391
6392
|
if ((targetOffsetTop - e.editTop) > e.popHeight) {
|
|
6392
6393
|
y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) - e.popHeight - 5;
|
|
@@ -6398,11 +6399,30 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6398
6399
|
y = e.y;
|
|
6399
6400
|
}
|
|
6400
6401
|
target = isAligned ? e.target : target;
|
|
6401
|
-
|
|
6402
|
-
|
|
6402
|
+
var targetOffsetLeft;
|
|
6403
|
+
var currentOffsetWidth;
|
|
6404
|
+
if (!isNullOrUndefined(closest(target, 'table'))) {
|
|
6405
|
+
targetOffsetLeft = target.offsetLeft;
|
|
6406
|
+
var parentTable = closest(target, 'table');
|
|
6407
|
+
var checkOffSetParentWidth = false;
|
|
6408
|
+
if (!isNullOrUndefined(closest(parentTable, 'TD'))) {
|
|
6409
|
+
checkOffSetParentWidth = true;
|
|
6410
|
+
}
|
|
6411
|
+
while (!isNullOrUndefined(parentTable)) {
|
|
6412
|
+
targetOffsetLeft += parentTable.offsetLeft;
|
|
6413
|
+
currentOffsetWidth = checkOffSetParentWidth ? parentTable.offsetWidth : target.offsetWidth;
|
|
6414
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
6415
|
+
}
|
|
6403
6416
|
}
|
|
6404
6417
|
else {
|
|
6405
|
-
|
|
6418
|
+
currentOffsetWidth = target.offsetWidth;
|
|
6419
|
+
targetOffsetLeft = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetLeft : target.offsetLeft;
|
|
6420
|
+
}
|
|
6421
|
+
if (currentOffsetWidth > e.popWidth) {
|
|
6422
|
+
x = (currentOffsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + targetOffsetLeft;
|
|
6423
|
+
}
|
|
6424
|
+
else {
|
|
6425
|
+
x = e.parentData.left + targetOffsetLeft;
|
|
6406
6426
|
}
|
|
6407
6427
|
this.popupObj.position.X = ((x + e.popWidth) > e.parentData.right) ? e.parentData.right - e.popWidth : x;
|
|
6408
6428
|
this.popupObj.position.Y = (y >= 0) ? y : e.y + 5;
|
|
@@ -6540,7 +6560,8 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6540
6560
|
openDelay: 400,
|
|
6541
6561
|
showTipPointer: true,
|
|
6542
6562
|
windowCollision: true,
|
|
6543
|
-
position: 'BottomCenter'
|
|
6563
|
+
position: 'BottomCenter',
|
|
6564
|
+
cssClass: _this.parent.getCssClass()
|
|
6544
6565
|
});
|
|
6545
6566
|
_this.tooltip.appendTo(_this.element);
|
|
6546
6567
|
}
|
|
@@ -6574,7 +6595,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6574
6595
|
parentData: parent_1.getBoundingClientRect(),
|
|
6575
6596
|
tBarElementHeight: tBarHeight
|
|
6576
6597
|
};
|
|
6577
|
-
if ((target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
6598
|
+
if ((closest(target, 'TABLE') || target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
6578
6599
|
(target.classList.contains(CLS_AUDIOWRAP) || target.classList.contains(CLS_CLICKELEM) ||
|
|
6579
6600
|
target.classList.contains(CLS_VID_CLICK_ELEM)))) && (x == beforeQuickToolbarArgs.positionX || y == beforeQuickToolbarArgs.positionY)) {
|
|
6580
6601
|
_this.setPosition(showPopupData);
|
|
@@ -6594,7 +6615,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6594
6615
|
maxWidth: window.outerWidth + 'px'
|
|
6595
6616
|
});
|
|
6596
6617
|
addClass([_this.element], [CLS_POP]);
|
|
6597
|
-
_this.
|
|
6618
|
+
_this.isRendered = true;
|
|
6598
6619
|
}
|
|
6599
6620
|
});
|
|
6600
6621
|
};
|
|
@@ -6634,7 +6655,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6634
6655
|
this.parent.notify(destroyTooltip, { args: event });
|
|
6635
6656
|
}
|
|
6636
6657
|
this.removeEleFromDOM();
|
|
6637
|
-
this.
|
|
6658
|
+
this.isRendered = false;
|
|
6638
6659
|
};
|
|
6639
6660
|
/**
|
|
6640
6661
|
* @param {string} item - specifies the string value
|
|
@@ -6657,7 +6678,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
6657
6678
|
};
|
|
6658
6679
|
BaseQuickToolbar.prototype.removeEleFromDOM = function () {
|
|
6659
6680
|
var element = this.popupObj.element;
|
|
6660
|
-
if (this.
|
|
6681
|
+
if (this.isRendered) {
|
|
6661
6682
|
this.dropDownButtons.destroyDropDowns();
|
|
6662
6683
|
this.colorPickerObj.destroyColorPicker();
|
|
6663
6684
|
removeClass([this.element], [CLS_POP]);
|
|
@@ -7072,6 +7093,9 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
7072
7093
|
}
|
|
7073
7094
|
}
|
|
7074
7095
|
if (!isNullOrUndefined(this.textQTBar) && !isNullOrUndefined(this.parent.quickToolbarSettings.text) && !this.parent.inlineMode.enable) {
|
|
7096
|
+
if (!isNullOrUndefined(e) && !isNullOrUndefined(e.name) && e.name === 'sourceCodeMouseDown') {
|
|
7097
|
+
return;
|
|
7098
|
+
}
|
|
7075
7099
|
var args = e.args.touches ?
|
|
7076
7100
|
e.args.changedTouches[0] : e.args;
|
|
7077
7101
|
var target = e.args.target;
|
|
@@ -7082,7 +7106,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
7082
7106
|
this.offsetY = pageYOffset(args, this.parent.element, this.parent.iframeSettings.enable);
|
|
7083
7107
|
var range = this.parent.getRange();
|
|
7084
7108
|
if ((range.endContainer.parentElement.tagName === range.startContainer.parentElement.tagName && (range.startContainer.parentElement.tagName === 'A' && range.endContainer.parentElement.tagName === 'A')) ||
|
|
7085
|
-
(target.tagName === 'IMG') || (target.tagName === 'VIDEO') || (target.tagName === 'AUDIO') || (target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
|
|
7109
|
+
(target.tagName === 'IMG') || (target.tagName === 'VIDEO') || (target.tagName === 'AUDIO') || (target.childNodes[0] && target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
|
|
7086
7110
|
(this.parent.getRange().startOffset === this.parent.getRange().endOffset)) {
|
|
7087
7111
|
return;
|
|
7088
7112
|
}
|
|
@@ -7090,13 +7114,16 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
7090
7114
|
this.textQTBar.showPopup(this.offsetX, this.offsetY, target, 'text');
|
|
7091
7115
|
}
|
|
7092
7116
|
};
|
|
7093
|
-
QuickToolbar.prototype.keyDownHandler = function () {
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
this.
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7117
|
+
QuickToolbar.prototype.keyDownHandler = function (e) {
|
|
7118
|
+
var preventHide = e.args.altKey;
|
|
7119
|
+
if (!preventHide) {
|
|
7120
|
+
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
7121
|
+
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
7122
|
+
this.hideInlineQTBar();
|
|
7123
|
+
}
|
|
7124
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
7125
|
+
this.textQTBar.hidePopup();
|
|
7126
|
+
}
|
|
7100
7127
|
}
|
|
7101
7128
|
};
|
|
7102
7129
|
QuickToolbar.prototype.inlineQTBarMouseDownHandler = function () {
|
|
@@ -7424,6 +7451,15 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
7424
7451
|
QuickToolbar.prototype.getModuleName = function () {
|
|
7425
7452
|
return 'quickToolbar';
|
|
7426
7453
|
};
|
|
7454
|
+
/**
|
|
7455
|
+
*
|
|
7456
|
+
* @returns {BaseQuickToolbar[]} - specifies the quick toolbar instance.
|
|
7457
|
+
* @hidden
|
|
7458
|
+
* @private
|
|
7459
|
+
*/
|
|
7460
|
+
QuickToolbar.prototype.getQuickToolbarInstance = function () {
|
|
7461
|
+
return [this.linkQTBar, this.imageQTBar, this.audioQTBar, this.videoQTBar, this.tableQTBar, this.textQTBar, this.inlineQTBar];
|
|
7462
|
+
};
|
|
7427
7463
|
return QuickToolbar;
|
|
7428
7464
|
}());
|
|
7429
7465
|
|
|
@@ -9710,6 +9746,17 @@ var selfClosingTags = [
|
|
|
9710
9746
|
'BR',
|
|
9711
9747
|
'IMG'
|
|
9712
9748
|
];
|
|
9749
|
+
/**
|
|
9750
|
+
* Resize factor for image.
|
|
9751
|
+
* @hidden
|
|
9752
|
+
*
|
|
9753
|
+
*/
|
|
9754
|
+
var imageResizeFactor = {
|
|
9755
|
+
topLeft: [-1, -1],
|
|
9756
|
+
topRight: [1, -1],
|
|
9757
|
+
botRight: [1, 1],
|
|
9758
|
+
botLeft: [-1, 1]
|
|
9759
|
+
};
|
|
9713
9760
|
|
|
9714
9761
|
/**
|
|
9715
9762
|
* `Undo` module is used to handle undo actions.
|
|
@@ -10667,7 +10714,9 @@ var MarkdownEditor = /** @__PURE__ @class */ (function () {
|
|
|
10667
10714
|
MarkdownEditor.prototype.onToolbarClick = function (args) {
|
|
10668
10715
|
var item = args.item;
|
|
10669
10716
|
var textArea = this.parent.contentModule.getEditPanel();
|
|
10670
|
-
|
|
10717
|
+
if (item.command !== 'Formats') {
|
|
10718
|
+
textArea.focus();
|
|
10719
|
+
}
|
|
10671
10720
|
var startOffset = textArea.selectionStart;
|
|
10672
10721
|
var endOffset = textArea.selectionEnd;
|
|
10673
10722
|
var text = textArea.value.substring(startOffset, endOffset);
|
|
@@ -11990,11 +12039,12 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
11990
12039
|
/**
|
|
11991
12040
|
* blockNodes method
|
|
11992
12041
|
*
|
|
12042
|
+
* @param {boolean} action - Optional Boolean that specifies the action is whether performed.
|
|
11993
12043
|
* @returns {Node[]} - returns the node array values
|
|
11994
12044
|
* @hidden
|
|
11995
12045
|
* @deprecated
|
|
11996
12046
|
*/
|
|
11997
|
-
DOMNode.prototype.blockNodes = function () {
|
|
12047
|
+
DOMNode.prototype.blockNodes = function (action) {
|
|
11998
12048
|
var collectionNodes = [];
|
|
11999
12049
|
var selection = this.getSelection();
|
|
12000
12050
|
if (this.isEditorArea() && selection.rangeCount) {
|
|
@@ -12008,23 +12058,46 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
12008
12058
|
collectionNodes.push(startNode);
|
|
12009
12059
|
}
|
|
12010
12060
|
parentNode = this.blockParentNode(startNode);
|
|
12061
|
+
var endParentNode = this.blockParentNode(endNode);
|
|
12011
12062
|
if (parentNode && collectionNodes.indexOf(parentNode) < 0) {
|
|
12012
|
-
if (
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12063
|
+
if (!isNullOrUndefined(action) && action) {
|
|
12064
|
+
if (range.commonAncestorContainer.nodeName === 'TD' || parentNode.nodeName === 'TD' || endParentNode.nodeName === 'TD') {
|
|
12065
|
+
var processedNodes = this.getPreBlockNodeCollection(range);
|
|
12066
|
+
if (processedNodes.length > 1) {
|
|
12067
|
+
this.wrapWithBlockNode(processedNodes, collectionNodes);
|
|
12068
|
+
}
|
|
12069
|
+
else if (processedNodes.length > 0) {
|
|
12070
|
+
if (startNode !== endNode && startNode.nodeName !== 'BR') {
|
|
12071
|
+
collectionNodes.push(this.createTempNode(startNode));
|
|
12072
|
+
}
|
|
12073
|
+
else if (startNode === endNode && startNode.nodeName === 'SPAN' && (startNode.classList.contains(markerClassName.startSelection)
|
|
12074
|
+
|| startNode.classList.contains(markerClassName.endSelection))) {
|
|
12075
|
+
collectionNodes.push(this.createTempNode(startNode));
|
|
12076
|
+
}
|
|
12077
|
+
}
|
|
12021
12078
|
}
|
|
12022
12079
|
else {
|
|
12023
|
-
collectionNodes.push(
|
|
12080
|
+
collectionNodes.push(parentNode);
|
|
12024
12081
|
}
|
|
12025
12082
|
}
|
|
12026
12083
|
else {
|
|
12027
|
-
|
|
12084
|
+
if (IGNORE_BLOCK_TAGS.indexOf(parentNode.tagName.toLocaleLowerCase()) >= 0 && (startNode.tagName === 'BR' ||
|
|
12085
|
+
startNode.nodeType === Node.TEXT_NODE ||
|
|
12086
|
+
startNode.classList.contains(markerClassName.startSelection) ||
|
|
12087
|
+
startNode.classList.contains(markerClassName.endSelection))) {
|
|
12088
|
+
var tempNode = startNode.previousSibling &&
|
|
12089
|
+
startNode.previousSibling.nodeType === Node.TEXT_NODE ?
|
|
12090
|
+
startNode.previousSibling : startNode;
|
|
12091
|
+
if (!startNode.nextSibling && !startNode.previousSibling && startNode.tagName === 'BR') {
|
|
12092
|
+
collectionNodes.push(tempNode);
|
|
12093
|
+
}
|
|
12094
|
+
else {
|
|
12095
|
+
collectionNodes.push(this.createTempNode(tempNode));
|
|
12096
|
+
}
|
|
12097
|
+
}
|
|
12098
|
+
else {
|
|
12099
|
+
collectionNodes.push(parentNode);
|
|
12100
|
+
}
|
|
12028
12101
|
}
|
|
12029
12102
|
}
|
|
12030
12103
|
var nodes = [];
|
|
@@ -12093,6 +12166,131 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
12093
12166
|
DOMNode.prototype.ignoreTableTag = function (element) {
|
|
12094
12167
|
return !(TABLE_BLOCK_TAGS.indexOf(element.tagName.toLocaleLowerCase()) >= 0);
|
|
12095
12168
|
};
|
|
12169
|
+
DOMNode.prototype.getPreBlockNodeCollection = function (range) {
|
|
12170
|
+
var startNode = this.getSelectedNode(range.startContainer, range.startOffset);
|
|
12171
|
+
var endNode = this.getSelectedNode(range.endContainer, range.endOffset);
|
|
12172
|
+
var nodes = [];
|
|
12173
|
+
var rootNode = startNode.closest('td, th');
|
|
12174
|
+
if (isNullOrUndefined(rootNode)) {
|
|
12175
|
+
return nodes;
|
|
12176
|
+
}
|
|
12177
|
+
var rootChildNode = Array.from(rootNode.childNodes);
|
|
12178
|
+
var isContinue = true;
|
|
12179
|
+
var processedStart = this.getClosestInlineParent(startNode, rootNode, true);
|
|
12180
|
+
var processedEnd = this.getClosestInlineParent(endNode, rootNode, false);
|
|
12181
|
+
for (var i = 0; i < rootChildNode.length; i++) {
|
|
12182
|
+
var child = rootChildNode[i];
|
|
12183
|
+
if (processedStart === processedEnd && child === processedStart) {
|
|
12184
|
+
nodes.push(child);
|
|
12185
|
+
isContinue = true;
|
|
12186
|
+
}
|
|
12187
|
+
else if (child === processedStart) {
|
|
12188
|
+
isContinue = false;
|
|
12189
|
+
}
|
|
12190
|
+
else if (child === processedEnd) {
|
|
12191
|
+
nodes.push(child); // Early Exit so Push the end node.
|
|
12192
|
+
isContinue = true;
|
|
12193
|
+
}
|
|
12194
|
+
if (isContinue) {
|
|
12195
|
+
continue;
|
|
12196
|
+
}
|
|
12197
|
+
else {
|
|
12198
|
+
nodes.push(child);
|
|
12199
|
+
}
|
|
12200
|
+
}
|
|
12201
|
+
return nodes;
|
|
12202
|
+
};
|
|
12203
|
+
DOMNode.prototype.getClosestInlineParent = function (node, rootNode, isStart) {
|
|
12204
|
+
// 1. If the node is a text node, return the node
|
|
12205
|
+
// 2. If the node is a block node return block node
|
|
12206
|
+
// 3. If the node is a inline node,
|
|
12207
|
+
// Traverse back untill the TD or TH node
|
|
12208
|
+
// Check if the the previous sibling , next sibling is a block node.
|
|
12209
|
+
// If yes return the inline node that is closest to the block node.
|
|
12210
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
12211
|
+
return node;
|
|
12212
|
+
}
|
|
12213
|
+
if (this.isBlockNode(node)) {
|
|
12214
|
+
return node;
|
|
12215
|
+
}
|
|
12216
|
+
var currentNode = node;
|
|
12217
|
+
var rootFlag = false;
|
|
12218
|
+
while (currentNode) {
|
|
12219
|
+
var previousNode = currentNode;
|
|
12220
|
+
if (rootFlag) {
|
|
12221
|
+
if (this.isBlockNode(currentNode)) {
|
|
12222
|
+
return previousNode;
|
|
12223
|
+
}
|
|
12224
|
+
if (isStart && currentNode.previousSibling) {
|
|
12225
|
+
if (this.isBlockNode(currentNode.previousSibling) || currentNode.previousSibling.nodeName === 'BR') {
|
|
12226
|
+
return previousNode;
|
|
12227
|
+
}
|
|
12228
|
+
else {
|
|
12229
|
+
currentNode = currentNode.previousSibling;
|
|
12230
|
+
}
|
|
12231
|
+
}
|
|
12232
|
+
else if (!isStart && currentNode.nextSibling) {
|
|
12233
|
+
if (this.isBlockNode(currentNode.nextSibling) || currentNode.nextSibling.nodeName === 'BR') {
|
|
12234
|
+
return previousNode;
|
|
12235
|
+
}
|
|
12236
|
+
else {
|
|
12237
|
+
currentNode = currentNode.nextSibling;
|
|
12238
|
+
}
|
|
12239
|
+
}
|
|
12240
|
+
else {
|
|
12241
|
+
return currentNode;
|
|
12242
|
+
}
|
|
12243
|
+
}
|
|
12244
|
+
else {
|
|
12245
|
+
currentNode = currentNode.parentElement;
|
|
12246
|
+
if (currentNode === rootNode) {
|
|
12247
|
+
currentNode = previousNode;
|
|
12248
|
+
rootFlag = true;
|
|
12249
|
+
}
|
|
12250
|
+
}
|
|
12251
|
+
}
|
|
12252
|
+
return null;
|
|
12253
|
+
};
|
|
12254
|
+
DOMNode.prototype.wrapWithBlockNode = function (nodes, collectionNodes) {
|
|
12255
|
+
var wrapperElement = createElement('p');
|
|
12256
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
12257
|
+
var child = nodes[i];
|
|
12258
|
+
if (child.nodeName === 'BR') {
|
|
12259
|
+
child.parentNode.insertBefore(wrapperElement, child);
|
|
12260
|
+
wrapperElement.appendChild(child);
|
|
12261
|
+
if (wrapperElement.childNodes.length > 0) {
|
|
12262
|
+
collectionNodes.push(wrapperElement);
|
|
12263
|
+
}
|
|
12264
|
+
wrapperElement = createElement('p');
|
|
12265
|
+
}
|
|
12266
|
+
else {
|
|
12267
|
+
if (!this.isBlockNode(child)) {
|
|
12268
|
+
if (child.nodeName === '#text' && child.textContent.trim() === '') {
|
|
12269
|
+
continue;
|
|
12270
|
+
}
|
|
12271
|
+
if (wrapperElement.childElementCount === 0) {
|
|
12272
|
+
child.parentNode.insertBefore(wrapperElement, child);
|
|
12273
|
+
wrapperElement.appendChild(child);
|
|
12274
|
+
}
|
|
12275
|
+
else {
|
|
12276
|
+
wrapperElement.appendChild(child);
|
|
12277
|
+
}
|
|
12278
|
+
}
|
|
12279
|
+
else {
|
|
12280
|
+
collectionNodes.push(child);
|
|
12281
|
+
}
|
|
12282
|
+
// Use case when the BR is next sibling but the BR is not the part of selection.
|
|
12283
|
+
if ((i === nodes.length - 1) && wrapperElement.nextElementSibling &&
|
|
12284
|
+
wrapperElement.querySelectorAll('br').length === 0 &&
|
|
12285
|
+
wrapperElement.nextElementSibling.nodeName === 'BR') {
|
|
12286
|
+
wrapperElement.appendChild(wrapperElement.nextElementSibling);
|
|
12287
|
+
}
|
|
12288
|
+
}
|
|
12289
|
+
}
|
|
12290
|
+
if (wrapperElement.childNodes.length > 0 && collectionNodes.indexOf(wrapperElement) < 0) {
|
|
12291
|
+
collectionNodes.push(wrapperElement);
|
|
12292
|
+
}
|
|
12293
|
+
};
|
|
12096
12294
|
return DOMNode;
|
|
12097
12295
|
}());
|
|
12098
12296
|
|
|
@@ -12205,7 +12403,8 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
12205
12403
|
startNode.textContent = '';
|
|
12206
12404
|
}
|
|
12207
12405
|
var startNodeParent = startNode.parentElement;
|
|
12208
|
-
|
|
12406
|
+
var parentOfCurrentOLUL = startNodeParent.parentElement;
|
|
12407
|
+
if (isNullOrUndefined(parentOfCurrentOLUL.closest('UL')) && isNullOrUndefined(parentOfCurrentOLUL.closest('OL'))) {
|
|
12209
12408
|
if (!isNullOrUndefined(startNode.nextElementSibling)) {
|
|
12210
12409
|
var nearBlockNode = this.parent.domNode.blockParentNode(startNode);
|
|
12211
12410
|
this.parent.nodeCutter.GetSpliceNode(range, nearBlockNode);
|
|
@@ -12232,6 +12431,15 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
12232
12431
|
detach(startNode);
|
|
12233
12432
|
}
|
|
12234
12433
|
}
|
|
12434
|
+
// To handle the nested enter key press in the list for the first LI element
|
|
12435
|
+
if (!isNullOrUndefined(parentOfCurrentOLUL) && (!isNullOrUndefined(parentOfCurrentOLUL.closest('UL')) || !isNullOrUndefined(parentOfCurrentOLUL.closest('OL'))) &&
|
|
12436
|
+
parentOfCurrentOLUL.nodeName === 'LI' && parentOfCurrentOLUL.style.listStyleType === 'none' &&
|
|
12437
|
+
parentOfCurrentOLUL.textContent === '' && startNode.textContent === '' && startNode === startNodeParent.firstElementChild &&
|
|
12438
|
+
isNullOrUndefined(startNode.nextSibling)) {
|
|
12439
|
+
detach(startNodeParent);
|
|
12440
|
+
parentOfCurrentOLUL.style.removeProperty('list-style-type');
|
|
12441
|
+
e.event.preventDefault();
|
|
12442
|
+
}
|
|
12235
12443
|
}
|
|
12236
12444
|
};
|
|
12237
12445
|
Lists.prototype.backspaceList = function (e) {
|
|
@@ -12605,7 +12813,7 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
12605
12813
|
this.currentAction = e.subCommand;
|
|
12606
12814
|
this.currentAction = e.subCommand = this.currentAction === 'NumberFormatList' ? 'OL' : this.currentAction === 'BulletFormatList' ? 'UL' : this.currentAction;
|
|
12607
12815
|
this.domNode.setMarker(this.saveSelection);
|
|
12608
|
-
var listsNodes = this.domNode.blockNodes();
|
|
12816
|
+
var listsNodes = this.domNode.blockNodes(true);
|
|
12609
12817
|
if (e.enterAction === 'BR') {
|
|
12610
12818
|
this.setSelectionBRConfig();
|
|
12611
12819
|
var allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
|
|
@@ -12719,6 +12927,17 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
12719
12927
|
listEle.innerHTML = '<li><br/></li>';
|
|
12720
12928
|
elements[i].appendChild(listEle);
|
|
12721
12929
|
}
|
|
12930
|
+
else if ('LI' !== elements[i].tagName && isNullOrUndefined(item) &&
|
|
12931
|
+
elements[i].nodeName === 'BLOCKQUOTE') {
|
|
12932
|
+
var elemAtt = this.domNode.attributes(elements[i]);
|
|
12933
|
+
var openTag = '<' + type + '>';
|
|
12934
|
+
var closeTag = '</' + type + '>';
|
|
12935
|
+
var newTag = 'li' + elemAtt;
|
|
12936
|
+
var replaceHTML = elements[i].innerHTML;
|
|
12937
|
+
var innerHTML = this.domNode.createTagString(newTag, null, replaceHTML);
|
|
12938
|
+
var collectionString = openTag + innerHTML + closeTag;
|
|
12939
|
+
elements[i].innerHTML = collectionString;
|
|
12940
|
+
}
|
|
12722
12941
|
else if ('LI' !== elements[i].tagName && isNullOrUndefined(item)) {
|
|
12723
12942
|
var elemAtt = elements[i].tagName === 'IMG' ? '' : this.domNode.attributes(elements[i]);
|
|
12724
12943
|
var openTag = '<' + type + '>';
|
|
@@ -13510,7 +13729,7 @@ var Formats = /** @__PURE__ @class */ (function () {
|
|
|
13510
13729
|
}
|
|
13511
13730
|
var save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
|
|
13512
13731
|
this.parent.domNode.setMarker(save);
|
|
13513
|
-
var formatsNodes = this.parent.domNode.blockNodes();
|
|
13732
|
+
var formatsNodes = this.parent.domNode.blockNodes(true);
|
|
13514
13733
|
if (e.enterAction === 'BR') {
|
|
13515
13734
|
this.setSelectionBRConfig();
|
|
13516
13735
|
var allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
|
|
@@ -13730,6 +13949,10 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
13730
13949
|
var isCollapsed = range.collapsed;
|
|
13731
13950
|
var nodes = this.getNodeCollection(range, nodeSelection, node);
|
|
13732
13951
|
var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
|
|
13952
|
+
if (closestParentNode && closestParentNode.nodeName === 'LI' && node.nodeName.toLowerCase() === 'table') {
|
|
13953
|
+
this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
|
|
13954
|
+
return;
|
|
13955
|
+
}
|
|
13733
13956
|
if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
|
|
13734
13957
|
node.classList.contains('pasteContent'))) {
|
|
13735
13958
|
this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
|
|
@@ -14225,6 +14448,9 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
14225
14448
|
};
|
|
14226
14449
|
InsertHtml.closestEle = function (element, editNode) {
|
|
14227
14450
|
var el = element;
|
|
14451
|
+
if (closest(el, 'li')) {
|
|
14452
|
+
return closest(el, 'li');
|
|
14453
|
+
}
|
|
14228
14454
|
while (el && el.nodeType === 1) {
|
|
14229
14455
|
if (el.parentNode === editNode ||
|
|
14230
14456
|
(!isNullOrUndefined(el.parentNode.tagName) &&
|
|
@@ -14235,6 +14461,30 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
14235
14461
|
}
|
|
14236
14462
|
return null;
|
|
14237
14463
|
};
|
|
14464
|
+
InsertHtml.insertTableInList = function (range, insertNode, parentNode, currentNode, nodeCutter) {
|
|
14465
|
+
if (range.collapsed) {
|
|
14466
|
+
var isStart = range.startOffset === 0;
|
|
14467
|
+
var isEnd = range.startContainer.textContent.trimEnd().length === range.startOffset;
|
|
14468
|
+
if (isStart || isEnd) {
|
|
14469
|
+
if (isStart) {
|
|
14470
|
+
InsertMethods.AppendBefore(insertNode, currentNode, false);
|
|
14471
|
+
}
|
|
14472
|
+
else {
|
|
14473
|
+
InsertMethods.AppendBefore(insertNode, currentNode, true);
|
|
14474
|
+
}
|
|
14475
|
+
}
|
|
14476
|
+
else {
|
|
14477
|
+
var preNode = nodeCutter.SplitNode(range, parentNode, true);
|
|
14478
|
+
var sibNode = preNode.previousSibling;
|
|
14479
|
+
sibNode.appendChild(insertNode);
|
|
14480
|
+
}
|
|
14481
|
+
}
|
|
14482
|
+
else {
|
|
14483
|
+
range.deleteContents();
|
|
14484
|
+
parentNode.appendChild(insertNode);
|
|
14485
|
+
}
|
|
14486
|
+
insertNode.classList.add('ignore-table');
|
|
14487
|
+
};
|
|
14238
14488
|
/**
|
|
14239
14489
|
* Insert method
|
|
14240
14490
|
*
|
|
@@ -14441,7 +14691,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
14441
14691
|
for (var i = 0, j_2 = 0, k = 0; i <= finalinlineNodes.length; i++) {
|
|
14442
14692
|
if (i === 0) {
|
|
14443
14693
|
finalinlineNodes[i].parentNode.insertBefore(anchorNodes[j_2], finalinlineNodes[i].nextSibling);
|
|
14444
|
-
if (this.parent.domNode.blockNodes().length === 1) {
|
|
14694
|
+
if (this.parent.domNode.blockNodes().length === 1 && anchorNodes.length === 1) {
|
|
14445
14695
|
this.parent.nodeSelection.setSelectionNode(this.parent.currentDocument, anchorNodes[j_2]);
|
|
14446
14696
|
}
|
|
14447
14697
|
removeNodes[k] = finalinlineNodes[i];
|
|
@@ -14872,7 +15122,6 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
14872
15122
|
}
|
|
14873
15123
|
};
|
|
14874
15124
|
ImageCommand.prototype.createImage = function (e) {
|
|
14875
|
-
var _this = this;
|
|
14876
15125
|
var isReplaced = false;
|
|
14877
15126
|
e.item.url = isNullOrUndefined(e.item.url) || e.item.url === 'undefined' ? e.item.src : e.item.url;
|
|
14878
15127
|
if (!isNullOrUndefined(e.item.selectParent) && e.item.selectParent[0].tagName === 'IMG') {
|
|
@@ -14902,21 +15151,18 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
14902
15151
|
var selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
14903
15152
|
var imgElm_1 = (e.value === 'Replace' || isReplaced) ? e.item.selectParent[0] :
|
|
14904
15153
|
(Browser.isIE ? selectedNode.previousSibling : selectedNode.previousElementSibling);
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
}
|
|
14916
|
-
|
|
14917
|
-
if (e.value === 'Replace') {
|
|
14918
|
-
e.item.subCommand = 'Replace';
|
|
14919
|
-
this.callBack(e);
|
|
15154
|
+
var imageInstance_1 = this;
|
|
15155
|
+
var onImageLoadEvent_1 = function () {
|
|
15156
|
+
e.callBack({
|
|
15157
|
+
requestType: (e.value === 'Replace') ? (e.item.subCommand = 'Replace', "Replace") : 'Images',
|
|
15158
|
+
editorMode: 'HTML',
|
|
15159
|
+
event: e.event,
|
|
15160
|
+
range: imageInstance_1.parent.nodeSelection.getRange(imageInstance_1.parent.currentDocument),
|
|
15161
|
+
elements: [imgElm_1]
|
|
15162
|
+
});
|
|
15163
|
+
imgElm_1.removeEventListener('load', onImageLoadEvent_1);
|
|
15164
|
+
};
|
|
15165
|
+
imgElm_1.addEventListener('load', onImageLoadEvent_1);
|
|
14920
15166
|
}
|
|
14921
15167
|
};
|
|
14922
15168
|
ImageCommand.prototype.setStyle = function (imgElement, e, imgReplace) {
|
|
@@ -15633,7 +15879,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
15633
15879
|
e.item.selection.restore();
|
|
15634
15880
|
InsertHtml.Insert(this.parent.currentDocument, table, this.parent.editableElement);
|
|
15635
15881
|
e.item.selection.setSelectionText(this.parent.currentDocument, table.querySelector('td'), table.querySelector('td'), 0, 0);
|
|
15636
|
-
if (table.nextElementSibling === null) {
|
|
15882
|
+
if (table.nextElementSibling === null && !table.classList.contains('ignore-table')) {
|
|
15637
15883
|
var insertElem = void 0;
|
|
15638
15884
|
if (e.enterAction === 'DIV') {
|
|
15639
15885
|
insertElem = createElement('div');
|
|
@@ -15648,6 +15894,9 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
15648
15894
|
}
|
|
15649
15895
|
this.insertAfter(insertElem, table);
|
|
15650
15896
|
}
|
|
15897
|
+
if (table.classList.contains('ignore-table')) {
|
|
15898
|
+
table.classList.remove('ignore-table');
|
|
15899
|
+
}
|
|
15651
15900
|
table.querySelector('td').classList.add('e-cell-select');
|
|
15652
15901
|
if (e.callBack) {
|
|
15653
15902
|
e.callBack({
|
|
@@ -16067,10 +16316,22 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
16067
16316
|
firstCell.setAttribute('rowspan', (minMaxIndexes.endRow - minMaxIndexes.startRow + 1).toString());
|
|
16068
16317
|
}
|
|
16069
16318
|
var totalWidth = 0;
|
|
16319
|
+
var unit;
|
|
16070
16320
|
for (var j = rowSelectedCells.length - 1; j >= 0; j--) {
|
|
16071
|
-
|
|
16321
|
+
if (!isNullOrUndefined(rowSelectedCells[j].style.width)
|
|
16322
|
+
&& rowSelectedCells[j].style.width !== '') {
|
|
16323
|
+
if (!unit) {
|
|
16324
|
+
var match = rowSelectedCells[j].style.width.match(/^([\d.]+)([a-z%]+)$/i);
|
|
16325
|
+
unit = match ? match[2] : '%';
|
|
16326
|
+
}
|
|
16327
|
+
totalWidth = totalWidth + parseFloat(rowSelectedCells[j].style.width);
|
|
16328
|
+
}
|
|
16329
|
+
else {
|
|
16330
|
+
totalWidth = totalWidth + ((rowSelectedCells[j].offsetWidth / this.curTable.offsetWidth) * 100);
|
|
16331
|
+
unit = '%';
|
|
16332
|
+
}
|
|
16072
16333
|
}
|
|
16073
|
-
firstCell.style.width = totalWidth +
|
|
16334
|
+
firstCell.style.width = totalWidth + unit;
|
|
16074
16335
|
for (var i = 1; i <= selectedCells.length - 1; i++) {
|
|
16075
16336
|
detach(selectedCells[i]);
|
|
16076
16337
|
}
|
|
@@ -17087,6 +17348,30 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
17087
17348
|
formatNode.style.textDecoration = 'none';
|
|
17088
17349
|
child = [formatNode];
|
|
17089
17350
|
}
|
|
17351
|
+
else if (IsFormatted.inlineTags.indexOf(formatNodeTagName.toLowerCase()) !== -1 && isFontStyle && formatNodeTagName.toLocaleLowerCase() !== 'span') {
|
|
17352
|
+
var fontNodeStyle = formatNode.style;
|
|
17353
|
+
if (fontNodeStyle.color && format === 'fontcolor') {
|
|
17354
|
+
if (formatNode.nodeName === 'A') {
|
|
17355
|
+
fontNodeStyle.color = value;
|
|
17356
|
+
}
|
|
17357
|
+
else {
|
|
17358
|
+
fontNodeStyle.color = '';
|
|
17359
|
+
}
|
|
17360
|
+
}
|
|
17361
|
+
else if (fontNodeStyle.backgroundColor && format === 'backgroundcolor') {
|
|
17362
|
+
fontNodeStyle.backgroundColor = '';
|
|
17363
|
+
}
|
|
17364
|
+
else if (fontNodeStyle.fontSize && format === 'fontsize') {
|
|
17365
|
+
fontNodeStyle.fontSize = '';
|
|
17366
|
+
}
|
|
17367
|
+
else if (fontNodeStyle.fontFamily && format === 'fontname') {
|
|
17368
|
+
fontNodeStyle.fontFamily = '';
|
|
17369
|
+
}
|
|
17370
|
+
if (formatNode.getAttribute("style") === '') {
|
|
17371
|
+
formatNode.removeAttribute("style");
|
|
17372
|
+
}
|
|
17373
|
+
child = [formatNode];
|
|
17374
|
+
}
|
|
17090
17375
|
else {
|
|
17091
17376
|
child = InsertMethods.unwrap(formatNode);
|
|
17092
17377
|
var liElement = nodes[index].parentElement;
|
|
@@ -17267,19 +17552,44 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
17267
17552
|
parentElement = parentElement.parentElement;
|
|
17268
17553
|
liElement = parentElement;
|
|
17269
17554
|
}
|
|
17270
|
-
if (format === 'fontcolor') {
|
|
17555
|
+
if (format === 'fontcolor' || format === 'fontname') {
|
|
17271
17556
|
var parentElem = nodes[index].parentElement;
|
|
17272
17557
|
if (!isNullOrUndefined(parentElem) && parentElem.childNodes) {
|
|
17273
17558
|
for (var i = 0; i < parentElem.childNodes.length; i++) {
|
|
17274
17559
|
if (this.concatenateTextExcludingList(nodes, index) === nodes[index].textContent) {
|
|
17560
|
+
var liElement_1 = void 0;
|
|
17275
17561
|
if (parentElem.tagName === 'LI') {
|
|
17276
|
-
|
|
17562
|
+
liElement_1 = parentElem;
|
|
17563
|
+
}
|
|
17564
|
+
else if (parentElem.closest('li')) {
|
|
17565
|
+
liElement_1 = parentElem.closest('li');
|
|
17566
|
+
}
|
|
17567
|
+
if (!isNullOrUndefined(liElement_1)) {
|
|
17568
|
+
switch (format) {
|
|
17569
|
+
case 'fontcolor':
|
|
17570
|
+
liElement_1.style.color = value;
|
|
17571
|
+
break;
|
|
17572
|
+
case 'fontname':
|
|
17573
|
+
liElement_1.style.fontFamily = value;
|
|
17574
|
+
break;
|
|
17575
|
+
default:
|
|
17576
|
+
break;
|
|
17577
|
+
}
|
|
17277
17578
|
}
|
|
17278
17579
|
}
|
|
17279
17580
|
// eslint-disable-next-line
|
|
17280
17581
|
var childElement = parentElem.childNodes[i];
|
|
17281
17582
|
if (childElement.tagName === 'OL' || childElement.tagName === 'UL') {
|
|
17282
|
-
|
|
17583
|
+
switch (format) {
|
|
17584
|
+
case 'fontcolor':
|
|
17585
|
+
childElement.style.color = 'initial';
|
|
17586
|
+
break;
|
|
17587
|
+
case 'fontname':
|
|
17588
|
+
childElement.style.fontFamily = 'initial';
|
|
17589
|
+
break;
|
|
17590
|
+
default:
|
|
17591
|
+
break;
|
|
17592
|
+
}
|
|
17283
17593
|
}
|
|
17284
17594
|
}
|
|
17285
17595
|
}
|
|
@@ -18716,72 +19026,80 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
18716
19026
|
};
|
|
18717
19027
|
MsWordPaste.prototype.styleCorrection = function (elm, wordPasteStyleConfig) {
|
|
18718
19028
|
var styleElement = elm.querySelectorAll('style');
|
|
19029
|
+
var styles = [];
|
|
18719
19030
|
if (styleElement.length > 0) {
|
|
18720
|
-
|
|
19031
|
+
if (!isNullOrUndefined(styleElement[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi))) {
|
|
19032
|
+
styles = styleElement[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);
|
|
19033
|
+
}
|
|
19034
|
+
else if (styleElement.length > 1) {
|
|
19035
|
+
styles = styleElement[1].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);
|
|
19036
|
+
}
|
|
18721
19037
|
var styleClassObject_1 = !isNullOrUndefined(styles) ? this.findStyleObject(styles) : null;
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
}
|
|
18738
|
-
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
|
|
18739
|
-
resultElem = elm.getElementsByTagName(keys[i]);
|
|
18740
|
-
}
|
|
18741
|
-
else {
|
|
18742
|
-
resultElem = elm.querySelectorAll(keys[i]);
|
|
18743
|
-
}
|
|
18744
|
-
for (var j = 0; j < resultElem.length; j++) {
|
|
18745
|
-
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
19038
|
+
if (!isNullOrUndefined(styleClassObject_1)) {
|
|
19039
|
+
var keys = Object.keys(styleClassObject_1);
|
|
19040
|
+
var values = keys.map(function (key) {
|
|
19041
|
+
return styleClassObject_1["" + key];
|
|
19042
|
+
});
|
|
19043
|
+
values = this.removeUnwantedStyle(values, wordPasteStyleConfig);
|
|
19044
|
+
this.filterStyles(elm, wordPasteStyleConfig);
|
|
19045
|
+
var resultElem = void 0;
|
|
19046
|
+
var fromClass = false;
|
|
19047
|
+
for (var i = 0; i < keys.length; i++) {
|
|
19048
|
+
if (keys[i].split('.')[0] === '') {
|
|
19049
|
+
resultElem = elm.getElementsByClassName(keys[i].split('.')[1]);
|
|
19050
|
+
fromClass = true;
|
|
19051
|
+
}
|
|
19052
|
+
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) {
|
|
18746
19053
|
continue;
|
|
18747
19054
|
}
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
|
|
18751
|
-
|
|
18752
|
-
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
19055
|
+
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
|
|
19056
|
+
resultElem = elm.getElementsByTagName(keys[i]);
|
|
19057
|
+
}
|
|
19058
|
+
else {
|
|
19059
|
+
resultElem = elm.querySelectorAll(keys[i]);
|
|
19060
|
+
}
|
|
19061
|
+
for (var j = 0; j < resultElem.length; j++) {
|
|
19062
|
+
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
19063
|
+
continue;
|
|
19064
|
+
}
|
|
19065
|
+
var styleProperty = resultElem[j].getAttribute('style');
|
|
19066
|
+
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '') {
|
|
19067
|
+
var valueSplit = values[i].split(';');
|
|
19068
|
+
if (!fromClass) {
|
|
19069
|
+
for (var k = 0; k < valueSplit.length; k++) {
|
|
19070
|
+
if (styleProperty.indexOf(valueSplit[k].split(':')[0]) >= 0) {
|
|
19071
|
+
valueSplit.splice(k, 1);
|
|
19072
|
+
k--;
|
|
19073
|
+
}
|
|
18756
19074
|
}
|
|
18757
19075
|
}
|
|
19076
|
+
var changedValue = styleProperty + valueSplit.join(';') + ';';
|
|
19077
|
+
resultElem[j].setAttribute('style', changedValue);
|
|
19078
|
+
}
|
|
19079
|
+
else {
|
|
19080
|
+
values[i] = values[i].replace(/text-indent:-(.*?)(?=;|$)/gm, '');
|
|
19081
|
+
resultElem[j].setAttribute('style', values[i]);
|
|
18758
19082
|
}
|
|
18759
|
-
var changedValue = styleProperty + valueSplit.join(';') + ';';
|
|
18760
|
-
resultElem[j].setAttribute('style', changedValue);
|
|
18761
|
-
}
|
|
18762
|
-
else {
|
|
18763
|
-
values[i] = values[i].replace(/text-indent:-(.*?)(?=;|$)/gm, '');
|
|
18764
|
-
resultElem[j].setAttribute('style', values[i]);
|
|
18765
19083
|
}
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
19084
|
+
fromClass = false;
|
|
19085
|
+
}
|
|
19086
|
+
var listClass = ['MsoListParagraphCxSpFirst', 'MsoListParagraphCxSpMiddle', 'MsoListParagraphCxSpLast'];
|
|
19087
|
+
for (var i = 0; i < listClass.length; i++) {
|
|
19088
|
+
if (keys.indexOf('li.' + listClass[i]) > -1) {
|
|
19089
|
+
var olULElems = elm.querySelectorAll('ol.' + listClass[i] + ', ul.' + listClass[i]);
|
|
19090
|
+
for (var j = 0; j < olULElems.length; j++) {
|
|
19091
|
+
var styleProperty = olULElems[j].getAttribute('style');
|
|
19092
|
+
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '' && olULElems[j].style.marginLeft !== '') {
|
|
19093
|
+
var valueSplit = values[keys.indexOf('li.' + listClass[i])].split(';');
|
|
19094
|
+
for (var k = 0; k < valueSplit.length; k++) {
|
|
19095
|
+
if ('margin-left'.indexOf(valueSplit[k].split(':')[0]) >= 0) {
|
|
19096
|
+
if (!isNullOrUndefined(valueSplit[k].split(':')[1]) &&
|
|
19097
|
+
valueSplit[k].split(':')[1].indexOf('in') >= 0 &&
|
|
19098
|
+
olULElems[j].style.marginLeft.indexOf('in') >= 0) {
|
|
19099
|
+
var classStyle = parseFloat(valueSplit[k].split(':')[1].split('in')[0]);
|
|
19100
|
+
var inlineStyle = parseFloat(olULElems[j].style.marginLeft.split('in')[0]);
|
|
19101
|
+
olULElems[j].style.marginLeft = (inlineStyle - classStyle) + 'in';
|
|
19102
|
+
}
|
|
18785
19103
|
}
|
|
18786
19104
|
}
|
|
18787
19105
|
}
|
|
@@ -19356,7 +19674,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19356
19674
|
* get method
|
|
19357
19675
|
*
|
|
19358
19676
|
* @param {Document} docElement - specifies the document element
|
|
19359
|
-
* @param {Node}
|
|
19677
|
+
* @param {Node} rootNode - specifies the content editable element
|
|
19360
19678
|
* @param {string[]} formatNode - specifies the format node
|
|
19361
19679
|
* @param {string[]} fontSize - specifies the font size
|
|
19362
19680
|
* @param {string[]} fontName - specifies the font name.
|
|
@@ -19365,7 +19683,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19365
19683
|
* @hidden
|
|
19366
19684
|
* @deprecated
|
|
19367
19685
|
*/
|
|
19368
|
-
ToolbarStatus.get = function (docElement,
|
|
19686
|
+
ToolbarStatus.get = function (docElement, rootNode, formatNode, fontSize, fontName, documentNode) {
|
|
19369
19687
|
var formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
19370
19688
|
var nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
19371
19689
|
var nodeSelection = new NodeSelection();
|
|
@@ -19395,7 +19713,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19395
19713
|
}
|
|
19396
19714
|
for (var index = 0; index < nodes.length; index++) {
|
|
19397
19715
|
// eslint-disable-next-line max-len
|
|
19398
|
-
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index],
|
|
19716
|
+
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index], rootNode, formatNode, fontSize, fontName);
|
|
19399
19717
|
if ((index === 0 && formatCollection.bold) || !formatCollection.bold) {
|
|
19400
19718
|
nodeCollection.bold = formatCollection.bold;
|
|
19401
19719
|
}
|
|
@@ -19470,16 +19788,24 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19470
19788
|
return node;
|
|
19471
19789
|
};
|
|
19472
19790
|
ToolbarStatus.getFormatParent = function (docElement, formatCollection, node, targetNode, formatNode, fontSize, fontName) {
|
|
19791
|
+
var isListUpdated = false;
|
|
19792
|
+
var isComplexListUpdated = false;
|
|
19473
19793
|
if (targetNode.contains(node) ||
|
|
19474
19794
|
(node.nodeType === 3 && targetNode.nodeType !== 3 && targetNode.contains(node.parentNode))) {
|
|
19475
19795
|
do {
|
|
19476
|
-
formatCollection = this.isFormattedNode(docElement, formatCollection, node, formatNode, fontSize, fontName);
|
|
19796
|
+
formatCollection = this.isFormattedNode(docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName);
|
|
19797
|
+
if (formatCollection.orderedlist || formatCollection.unorderedlist) {
|
|
19798
|
+
isListUpdated = true;
|
|
19799
|
+
}
|
|
19800
|
+
if (formatCollection.bulletFormatList || formatCollection.numberFormatList) {
|
|
19801
|
+
isComplexListUpdated = true;
|
|
19802
|
+
}
|
|
19477
19803
|
node = node.parentNode;
|
|
19478
19804
|
} while (node && (node !== targetNode));
|
|
19479
19805
|
}
|
|
19480
19806
|
return formatCollection;
|
|
19481
19807
|
};
|
|
19482
|
-
ToolbarStatus.isFormattedNode = function (docElement, formatCollection, node, formatNode, fontSize, fontName) {
|
|
19808
|
+
ToolbarStatus.isFormattedNode = function (docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName) {
|
|
19483
19809
|
if (!formatCollection.bold) {
|
|
19484
19810
|
formatCollection.bold = IsFormatted.isBold(node);
|
|
19485
19811
|
}
|
|
@@ -19510,10 +19836,10 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19510
19836
|
if (!formatCollection.backgroundcolor) {
|
|
19511
19837
|
formatCollection.backgroundcolor = this.isBackgroundColor(node);
|
|
19512
19838
|
}
|
|
19513
|
-
if (!formatCollection.orderedlist) {
|
|
19839
|
+
if (!formatCollection.orderedlist && !isListUpdated) {
|
|
19514
19840
|
formatCollection.orderedlist = this.isOrderedList(node);
|
|
19515
19841
|
}
|
|
19516
|
-
if (!formatCollection.unorderedlist) {
|
|
19842
|
+
if (!formatCollection.unorderedlist && !isListUpdated) {
|
|
19517
19843
|
formatCollection.unorderedlist = this.isUnorderedList(node);
|
|
19518
19844
|
}
|
|
19519
19845
|
if (!formatCollection.alignments) {
|
|
@@ -19528,10 +19854,10 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
19528
19854
|
if (!formatCollection.createlink) {
|
|
19529
19855
|
formatCollection.createlink = this.isLink(node);
|
|
19530
19856
|
}
|
|
19531
|
-
if (!formatCollection.numberFormatList) {
|
|
19857
|
+
if (!formatCollection.numberFormatList && !isComplexListUpdated) {
|
|
19532
19858
|
formatCollection.numberFormatList = this.isNumberFormatList(node);
|
|
19533
19859
|
}
|
|
19534
|
-
if (!formatCollection.bulletFormatList) {
|
|
19860
|
+
if (!formatCollection.bulletFormatList && !isComplexListUpdated) {
|
|
19535
19861
|
formatCollection.bulletFormatList = this.isBulletFormatList(node);
|
|
19536
19862
|
}
|
|
19537
19863
|
return formatCollection;
|
|
@@ -20865,7 +21191,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
|
20865
21191
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
20866
21192
|
};
|
|
20867
21193
|
})();
|
|
20868
|
-
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, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\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-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\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, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {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 , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {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), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { 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, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { 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, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.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
|
|
21194
|
+
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, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\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-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\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, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {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 , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {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), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { 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, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { 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, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }\n .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }\n .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }\n .e-rte-img-caption .e-rte-image.e-imgleft { 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; padding: 2px 5px; 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 .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n li ol, li ul { margin-block-start: 10px;}\n </style>\n </head>";
|
|
20869
21195
|
/**
|
|
20870
21196
|
* Content module is used to render Rich Text Editor content
|
|
20871
21197
|
*
|
|
@@ -20895,6 +21221,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
|
|
|
20895
21221
|
styles: 'display:block;',
|
|
20896
21222
|
attrs: { 'srcdoc': iFrameContent }
|
|
20897
21223
|
});
|
|
21224
|
+
iframe.setAttribute("role", "none");
|
|
20898
21225
|
this.setPanel(iframe);
|
|
20899
21226
|
rteObj.element.appendChild(iframe);
|
|
20900
21227
|
iframe.contentDocument.body.id = this.parent.getID() + '_rte-edit-view';
|
|
@@ -21604,7 +21931,11 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
21604
21931
|
(!isNullOrUndefined(this.deleteRangeElement.nextElementSibling) && this.deleteRangeElement.nextElementSibling.tagName === 'TABLE'))) {
|
|
21605
21932
|
return;
|
|
21606
21933
|
}
|
|
21607
|
-
|
|
21934
|
+
var isImgWithEmptyBlockNode = false;
|
|
21935
|
+
if (this.deleteRangeElement.querySelectorAll('img').length > 0 && this.deleteRangeElement.textContent.trim() === '') {
|
|
21936
|
+
isImgWithEmptyBlockNode = true;
|
|
21937
|
+
}
|
|
21938
|
+
if (this.getCaretIndex(currentRange, this.deleteRangeElement) === this.deleteRangeElement.textContent.length && !isImgWithEmptyBlockNode) {
|
|
21608
21939
|
if (!isNullOrUndefined(liElement)) {
|
|
21609
21940
|
if (isLiElement || !isNullOrUndefined(liElement.nextElementSibling)) {
|
|
21610
21941
|
this.deleteOldRangeElement = this.getRangeElement(liElement.nextElementSibling);
|
|
@@ -21796,19 +22127,6 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
21796
22127
|
}, e, value);
|
|
21797
22128
|
}
|
|
21798
22129
|
};
|
|
21799
|
-
HtmlEditor.prototype.mouseOutHandler = function () {
|
|
21800
|
-
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
21801
|
-
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
21802
|
-
}
|
|
21803
|
-
else {
|
|
21804
|
-
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
21805
|
-
this.parent.contentModule.getDocument();
|
|
21806
|
-
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
21807
|
-
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
21808
|
-
}
|
|
21809
|
-
this.tooltipTargetEle.removeAttribute('data-title');
|
|
21810
|
-
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
21811
|
-
};
|
|
21812
22130
|
HtmlEditor.prototype.onToolbarClick = function (args) {
|
|
21813
22131
|
var _this = this;
|
|
21814
22132
|
var save;
|
|
@@ -21816,17 +22134,8 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
21816
22134
|
var selectParentEle;
|
|
21817
22135
|
var item = args.item;
|
|
21818
22136
|
var closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
21819
|
-
var
|
|
21820
|
-
|
|
21821
|
-
this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
|
|
21822
|
-
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
21823
|
-
this.parent.notify(destroyTooltip, { args: event });
|
|
21824
|
-
if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
|
|
21825
|
-
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
21826
|
-
this.tooltipTargetEle.removeAttribute('title');
|
|
21827
|
-
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
21828
|
-
}
|
|
21829
|
-
}
|
|
22137
|
+
var target = args.originalEvent.target;
|
|
22138
|
+
this.parent.notify(closeTooltip, { target: target });
|
|
21830
22139
|
if (item.command !== 'FormatPainter') {
|
|
21831
22140
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
21832
22141
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -22749,6 +23058,9 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
22749
23058
|
this.setImageProperties(allImg[i]);
|
|
22750
23059
|
}
|
|
22751
23060
|
this.addTempClass(clipBoardElem);
|
|
23061
|
+
if (clipBoardElem.querySelectorAll('picture').length > 0) {
|
|
23062
|
+
this.processPictureElement(clipBoardElem);
|
|
23063
|
+
}
|
|
22752
23064
|
if (clipBoardElem.textContent !== '' || !isNullOrUndefined(clipBoardElem.querySelector('img')) ||
|
|
22753
23065
|
!isNullOrUndefined(clipBoardElem.querySelector('table'))) {
|
|
22754
23066
|
var tempWrapperElem = this.parent.createElement('div');
|
|
@@ -23208,6 +23520,26 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
23208
23520
|
}
|
|
23209
23521
|
return null;
|
|
23210
23522
|
};
|
|
23523
|
+
PasteCleanup.prototype.processPictureElement = function (clipBoardElem) {
|
|
23524
|
+
var pictureElems = clipBoardElem.querySelectorAll('picture');
|
|
23525
|
+
for (var i = 0; i < pictureElems.length; i++) {
|
|
23526
|
+
var imgElem = pictureElems[i].querySelector('img');
|
|
23527
|
+
var sourceElems = pictureElems[i].querySelectorAll('source');
|
|
23528
|
+
if (imgElem && imgElem.getAttribute('src')) {
|
|
23529
|
+
var srcValue = imgElem.getAttribute('src');
|
|
23530
|
+
var url = new URL(srcValue);
|
|
23531
|
+
for (var j = 0; j < sourceElems.length; j++) {
|
|
23532
|
+
var srcset = sourceElems[j].getAttribute('srcset');
|
|
23533
|
+
if (srcset) {
|
|
23534
|
+
if (srcset.indexOf('http') === -1) {
|
|
23535
|
+
var fullPath = url.origin + srcset;
|
|
23536
|
+
sourceElems[j].setAttribute('srcset', fullPath);
|
|
23537
|
+
}
|
|
23538
|
+
}
|
|
23539
|
+
}
|
|
23540
|
+
}
|
|
23541
|
+
}
|
|
23542
|
+
};
|
|
23211
23543
|
/**
|
|
23212
23544
|
* For internal use only - Get the module name.
|
|
23213
23545
|
*
|
|
@@ -23290,7 +23622,8 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
23290
23622
|
this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
|
|
23291
23623
|
}
|
|
23292
23624
|
if (!this.parent.toolbarSettings.enable) {
|
|
23293
|
-
this.parent.
|
|
23625
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23626
|
+
this.parent.setContentHeight('Resize', isExpand);
|
|
23294
23627
|
}
|
|
23295
23628
|
this.parent.refreshUI();
|
|
23296
23629
|
};
|
|
@@ -23646,7 +23979,7 @@ var FullScreen = /** @__PURE__ @class */ (function () {
|
|
|
23646
23979
|
_this.parent.element.classList.add(CLS_FULL_SCREEN);
|
|
23647
23980
|
_this.toggleParentOverflow(true);
|
|
23648
23981
|
var isExpand = _this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23649
|
-
_this.parent.setContentHeight(
|
|
23982
|
+
_this.parent.setContentHeight('Maximize', isExpand);
|
|
23650
23983
|
if (_this.parent.toolbarModule) {
|
|
23651
23984
|
if (!_this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
23652
23985
|
_this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -23698,7 +24031,7 @@ var FullScreen = /** @__PURE__ @class */ (function () {
|
|
|
23698
24031
|
removeClass([elem[i]], ['e-rte-overflow']);
|
|
23699
24032
|
}
|
|
23700
24033
|
var isExpand = _this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23701
|
-
_this.parent.setContentHeight(
|
|
24034
|
+
_this.parent.setContentHeight('Minimize', isExpand);
|
|
23702
24035
|
if (_this.parent.toolbarModule) {
|
|
23703
24036
|
if (!_this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
23704
24037
|
_this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -24049,7 +24382,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
|
24049
24382
|
}
|
|
24050
24383
|
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
24051
24384
|
if (!isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
24052
|
-
this.parent.getToolbar().appendChild(this.popDiv);
|
|
24385
|
+
this.parent.getToolbar().parentElement.appendChild(this.popDiv);
|
|
24053
24386
|
}
|
|
24054
24387
|
else if (this.parent.inlineMode.enable) {
|
|
24055
24388
|
this.parent.element.appendChild(this.popDiv);
|
|
@@ -25483,7 +25816,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25483
25816
|
this.isAllowedTypes = true;
|
|
25484
25817
|
this.pageX = null;
|
|
25485
25818
|
this.pageY = null;
|
|
25486
|
-
this.mouseX = null;
|
|
25487
25819
|
this.deletedImg = [];
|
|
25488
25820
|
this.parent = parent;
|
|
25489
25821
|
this.rteID = parent.element.id;
|
|
@@ -25641,11 +25973,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25641
25973
|
}
|
|
25642
25974
|
var args = { event: e, requestType: 'images' };
|
|
25643
25975
|
this.parent.trigger(resizeStop, args);
|
|
25644
|
-
/* eslint-disable */
|
|
25645
|
-
var pageX = this.getPointX(e);
|
|
25646
|
-
var pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset +
|
|
25647
|
-
this.parent.element.getBoundingClientRect().top + e.clientY : e.pageY;
|
|
25648
|
-
/* eslint-enable */
|
|
25649
25976
|
this.parent.formatter.editorManager.observer.on(checkUndo, this.undoStack, this);
|
|
25650
25977
|
this.parent.formatter.saveData();
|
|
25651
25978
|
};
|
|
@@ -25676,17 +26003,15 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25676
26003
|
if (this.quickToolObj) {
|
|
25677
26004
|
this.quickToolObj.imageQTBar.hidePopup();
|
|
25678
26005
|
}
|
|
25679
|
-
|
|
25680
|
-
|
|
25681
|
-
|
|
25682
|
-
|
|
25683
|
-
|
|
25684
|
-
|
|
25685
|
-
|
|
25686
|
-
|
|
25687
|
-
|
|
25688
|
-
if (target.classList.contains('e-rte-botRight')) {
|
|
25689
|
-
this.resizeBtnStat.botRight = true;
|
|
26006
|
+
var handlers = ['topLeft', 'topRight', 'botLeft', 'botRight'];
|
|
26007
|
+
for (var i = 0; i < handlers.length; i++) {
|
|
26008
|
+
var handler = handlers[i];
|
|
26009
|
+
if (target.classList.contains('e-rte-' + handler)) {
|
|
26010
|
+
this.resizeBtnStat[handler] = true;
|
|
26011
|
+
this.currentResizeHandler = handler;
|
|
26012
|
+
this.aspectRatio = this.findAspectRatio(this.imgEle);
|
|
26013
|
+
break; // Exit the loop once a match is found
|
|
26014
|
+
}
|
|
25690
26015
|
}
|
|
25691
26016
|
if (Browser.isDevice && this.contentModule.getEditPanel().contains(this.imgResizeDiv) &&
|
|
25692
26017
|
!this.imgResizeDiv.classList.contains('e-mob-span')) {
|
|
@@ -25817,89 +26142,80 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25817
26142
|
};
|
|
25818
26143
|
}
|
|
25819
26144
|
};
|
|
25820
|
-
Image.prototype.setAspectRatio = function (img, expectedX, expectedY
|
|
26145
|
+
Image.prototype.setAspectRatio = function (img, expectedX, expectedY) {
|
|
25821
26146
|
if (isNullOrUndefined(img.width)) {
|
|
25822
26147
|
return;
|
|
25823
26148
|
}
|
|
25824
|
-
|
|
25825
|
-
var
|
|
25826
|
-
|
|
25827
|
-
var
|
|
25828
|
-
|
|
25829
|
-
|
|
25830
|
-
if (
|
|
25831
|
-
if (
|
|
25832
|
-
|
|
25833
|
-
|
|
25834
|
-
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
26149
|
+
var width = img.width;
|
|
26150
|
+
var height = img.height;
|
|
26151
|
+
var sameHeightWidth = (width === height);
|
|
26152
|
+
var factor = this.parent.insertImageSettings.resizeByPercent ? '%' : 'px';
|
|
26153
|
+
var emptyStyleDimension = (img.style.width === '' && img.style.height === '');
|
|
26154
|
+
if (!sameHeightWidth && !emptyStyleDimension) {
|
|
26155
|
+
if (img.style.width !== '' && img.style.height !== '') {
|
|
26156
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26157
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26158
|
+
this.removeImageHeight(img);
|
|
25835
26159
|
}
|
|
25836
26160
|
else {
|
|
25837
|
-
|
|
26161
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26162
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25838
26163
|
}
|
|
25839
|
-
img.style.height = null;
|
|
25840
|
-
img.removeAttribute('height');
|
|
25841
|
-
}
|
|
25842
|
-
else if (img.style.width === '' && img.style.height !== '') {
|
|
25843
|
-
img.style.height = expectedY + 'px';
|
|
25844
|
-
}
|
|
25845
|
-
else if (img.style.width !== '' && img.style.height === '') {
|
|
25846
|
-
var currentWidth = ((width / height * expectedY) + width / height) <
|
|
25847
|
-
(this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
25848
|
-
((width / height * expectedY) + width / height) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
25849
|
-
img.style.width = currentWidth.toString() + 'px';
|
|
25850
|
-
img.style.height = expectedY + 'px';
|
|
25851
26164
|
}
|
|
25852
26165
|
else if (img.style.width !== '') {
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
img.style.height = expectedY + 'px';
|
|
25857
|
-
}
|
|
25858
|
-
else {
|
|
25859
|
-
if (this.parent.iframeSettings.enable) {
|
|
25860
|
-
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
26166
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26167
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26168
|
+
this.removeImageHeight(img);
|
|
25861
26169
|
}
|
|
25862
26170
|
else {
|
|
25863
|
-
|
|
25864
|
-
img.setAttribute('width', (currentWidth).toString());
|
|
26171
|
+
this.setImageWidth(img, expectedX, factor);
|
|
25865
26172
|
}
|
|
25866
26173
|
}
|
|
25867
|
-
|
|
25868
|
-
|
|
25869
|
-
|
|
25870
|
-
|
|
25871
|
-
var original = img.offsetWidth + this.mouseX;
|
|
25872
|
-
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() === 'NaN' ?
|
|
25873
|
-
(img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) :
|
|
25874
|
-
parseFloat(img.style.width));
|
|
25875
|
-
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
26174
|
+
else if (img.style.height !== '') {
|
|
26175
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26176
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26177
|
+
this.removeImageHeight(img);
|
|
25876
26178
|
}
|
|
25877
26179
|
else {
|
|
25878
|
-
|
|
26180
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25879
26181
|
}
|
|
25880
|
-
img.style.height = null;
|
|
25881
|
-
img.removeAttribute('height');
|
|
25882
|
-
}
|
|
25883
|
-
else if (img.style.width !== '') {
|
|
25884
|
-
img.style.width = expectedX + 'px';
|
|
25885
|
-
img.style.height = (height / width * expectedX) + 'px';
|
|
25886
|
-
}
|
|
25887
|
-
else {
|
|
25888
|
-
img.setAttribute('width', this.resizeBtnStat.botRight ? (this.getPointX(e.event) - img.getBoundingClientRect().left).toString() : expectedX.toString());
|
|
25889
26182
|
}
|
|
25890
26183
|
}
|
|
25891
26184
|
else {
|
|
26185
|
+
this.setImageWidth(img, expectedX, factor);
|
|
25892
26186
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
25893
|
-
|
|
25894
|
-
img.style.height = null;
|
|
25895
|
-
img.removeAttribute('height');
|
|
26187
|
+
this.removeImageHeight(img);
|
|
25896
26188
|
}
|
|
25897
26189
|
else {
|
|
25898
|
-
|
|
25899
|
-
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
26190
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25900
26191
|
}
|
|
25901
26192
|
}
|
|
25902
26193
|
};
|
|
26194
|
+
Image.prototype.setImageWidth = function (img, value, suffix) {
|
|
26195
|
+
img.style.width = this.getImageDimension(value, img) + suffix;
|
|
26196
|
+
if (!this.parent.insertImageSettings.resizeByPercent) {
|
|
26197
|
+
img.setAttribute('width', value.toString());
|
|
26198
|
+
}
|
|
26199
|
+
};
|
|
26200
|
+
Image.prototype.setImageHeight = function (img, value, suffix) {
|
|
26201
|
+
img.style.height = this.getImageDimension(value, img) + suffix;
|
|
26202
|
+
if (!this.parent.insertImageSettings.resizeByPercent) {
|
|
26203
|
+
img.setAttribute('height', value.toString());
|
|
26204
|
+
}
|
|
26205
|
+
};
|
|
26206
|
+
Image.prototype.removeImageHeight = function (img) {
|
|
26207
|
+
img.style.height = '';
|
|
26208
|
+
img.removeAttribute('height');
|
|
26209
|
+
};
|
|
26210
|
+
Image.prototype.getImageDimension = function (value, img) {
|
|
26211
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26212
|
+
var rootElem = img.parentElement || img.previousElementSibling;
|
|
26213
|
+
return this.pixToPerc(value, rootElem);
|
|
26214
|
+
}
|
|
26215
|
+
else {
|
|
26216
|
+
return value;
|
|
26217
|
+
}
|
|
26218
|
+
};
|
|
25903
26219
|
Image.prototype.pixToPerc = function (expected, parentEle) {
|
|
25904
26220
|
return expected / parseFloat(getComputedStyle(parentEle).width) * 100;
|
|
25905
26221
|
};
|
|
@@ -25922,7 +26238,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25922
26238
|
return;
|
|
25923
26239
|
}
|
|
25924
26240
|
_this.imgEle.parentElement.style.cursor = 'pointer';
|
|
25925
|
-
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10)
|
|
26241
|
+
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10));
|
|
25926
26242
|
_this.resizeImgDupPos(_this.imgEle);
|
|
25927
26243
|
_this.imgResizePos(_this.imgEle, _this.imgResizeDiv);
|
|
25928
26244
|
}
|
|
@@ -25933,35 +26249,37 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25933
26249
|
this.cancelResizeAction();
|
|
25934
26250
|
return;
|
|
25935
26251
|
}
|
|
25936
|
-
if (this.
|
|
25937
|
-
|
|
25938
|
-
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
this.
|
|
25957
|
-
|
|
25958
|
-
else if (this.resizeBtnStat.topRight) {
|
|
25959
|
-
this.imgDupMouseMove(width + 'px', height + 'px', e);
|
|
25960
|
-
}
|
|
25961
|
-
else if (this.resizeBtnStat.topLeft) {
|
|
26252
|
+
if (this.resizeBtnStat.botRight || this.resizeBtnStat.botLeft || this.resizeBtnStat.topRight || this.resizeBtnStat.topLeft) {
|
|
26253
|
+
var pageX = this.getPointX(e);
|
|
26254
|
+
var pageY = this.getPointY(e);
|
|
26255
|
+
var resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
26256
|
+
var diffX = (pageX - this.pageX);
|
|
26257
|
+
var diffY = (pageY - this.pageY);
|
|
26258
|
+
var currentWidth = this.imgEle.clientWidth;
|
|
26259
|
+
var currentHeight = this.imgEle.clientHeight;
|
|
26260
|
+
var width = diffX * resizeFactor[0] + currentWidth;
|
|
26261
|
+
var height = diffY * resizeFactor[1] + currentHeight;
|
|
26262
|
+
width = (width < 16) ? 16 : width;
|
|
26263
|
+
height = (height < 16) ? 16 : height;
|
|
26264
|
+
if (Math.abs(diffX) > Math.abs(diffY)) {
|
|
26265
|
+
height = Math.round(width / this.aspectRatio);
|
|
26266
|
+
width = Math.round(height * this.aspectRatio);
|
|
26267
|
+
}
|
|
26268
|
+
else {
|
|
26269
|
+
width = Math.round(height * this.aspectRatio);
|
|
26270
|
+
height = Math.round(width / this.aspectRatio);
|
|
26271
|
+
}
|
|
26272
|
+
this.pageX = pageX;
|
|
26273
|
+
this.pageY = pageY;
|
|
25962
26274
|
this.imgDupMouseMove(width + 'px', height + 'px', e);
|
|
25963
26275
|
}
|
|
25964
26276
|
};
|
|
26277
|
+
Image.prototype.getResizeFactor = function (value) {
|
|
26278
|
+
return imageResizeFactor[value];
|
|
26279
|
+
};
|
|
26280
|
+
Image.prototype.findAspectRatio = function (image) {
|
|
26281
|
+
return image.clientWidth / image.clientHeight;
|
|
26282
|
+
};
|
|
25965
26283
|
Image.prototype.cancelResizeAction = function () {
|
|
25966
26284
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchMoveEvent, this.resizing);
|
|
25967
26285
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchEndEvent, this.resizeEnd);
|
|
@@ -25971,6 +26289,8 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25971
26289
|
this.imgResizeDiv = null;
|
|
25972
26290
|
this.pageX = null;
|
|
25973
26291
|
this.pageY = null;
|
|
26292
|
+
this.currentResizeHandler = null;
|
|
26293
|
+
this.aspectRatio = null;
|
|
25974
26294
|
}
|
|
25975
26295
|
};
|
|
25976
26296
|
Image.prototype.resizeImgDupPos = function (e) {
|
|
@@ -25981,6 +26301,8 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
25981
26301
|
};
|
|
25982
26302
|
};
|
|
25983
26303
|
Image.prototype.resizeBtnInit = function () {
|
|
26304
|
+
this.aspectRatio = null;
|
|
26305
|
+
this.currentResizeHandler = null;
|
|
25984
26306
|
return this.resizeBtnStat = { botLeft: false, botRight: false, topRight: false, topLeft: false };
|
|
25985
26307
|
};
|
|
25986
26308
|
Image.prototype.onToolbarAction = function (args) {
|
|
@@ -26490,7 +26812,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
26490
26812
|
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target_1, ariaLabel: imageLabel
|
|
26491
26813
|
};
|
|
26492
26814
|
this.dialogObj.setProperties({
|
|
26493
|
-
height: 'inherit',
|
|
26494
26815
|
width: '290px',
|
|
26495
26816
|
header: this.parent.localeObj.getConstant('imageInsertLinkHeader'),
|
|
26496
26817
|
content: linkWrap,
|
|
@@ -26543,7 +26864,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
26543
26864
|
alt: inputAlt
|
|
26544
26865
|
};
|
|
26545
26866
|
this.dialogObj.setProperties({
|
|
26546
|
-
|
|
26867
|
+
width: '290px', header: altHeader, content: altWrap,
|
|
26547
26868
|
buttons: [{
|
|
26548
26869
|
// eslint-disable-next-line
|
|
26549
26870
|
click: function (e) {
|
|
@@ -26792,7 +27113,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
26792
27113
|
var dialogContent = this.imgsizeInput(e);
|
|
26793
27114
|
var selectObj_1 = { args: e.args, selfImage: this, selection: e.selection, selectNode: e.selectNode };
|
|
26794
27115
|
this.dialogObj.setProperties({
|
|
26795
|
-
|
|
27116
|
+
width: '290px', header: imgSizeHeader, content: dialogContent,
|
|
26796
27117
|
buttons: [{
|
|
26797
27118
|
// eslint-disable-next-line
|
|
26798
27119
|
click: function (e) {
|
|
@@ -26993,7 +27314,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
26993
27314
|
for (var i = 0; i < items.length; i++) {
|
|
26994
27315
|
removeClass([items[i]], 'e-img-focus');
|
|
26995
27316
|
removeClass([items[i]], 'e-resize');
|
|
26996
|
-
items[i].style.maxWidth = '';
|
|
26997
27317
|
}
|
|
26998
27318
|
}
|
|
26999
27319
|
};
|
|
@@ -27007,7 +27327,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
27007
27327
|
this.cancelResizeAction();
|
|
27008
27328
|
}
|
|
27009
27329
|
};
|
|
27010
|
-
// eslint-disable-next-line
|
|
27011
27330
|
Image.prototype.imageUrlPopup = function (e) {
|
|
27012
27331
|
var _this = this;
|
|
27013
27332
|
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
@@ -27094,6 +27413,12 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
27094
27413
|
var heightVal = isNullOrUndefined(this.changedHeightValue) && (selectNode.style.height.toString() === 'auto' ||
|
|
27095
27414
|
selectNode.style.height !== '') ? selectNode.style.height : !isNullOrUndefined(this.changedHeightValue) ?
|
|
27096
27415
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
27416
|
+
if (selectNode.style.width === '') {
|
|
27417
|
+
widthVal = 'auto';
|
|
27418
|
+
}
|
|
27419
|
+
if (selectNode.style.height === '') {
|
|
27420
|
+
heightVal = 'auto';
|
|
27421
|
+
}
|
|
27097
27422
|
this.changedWidthValue = null;
|
|
27098
27423
|
this.changedHeightValue = null;
|
|
27099
27424
|
var content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
@@ -27228,7 +27553,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
27228
27553
|
_this.parent.trigger(imageSelected, selectArgs, function (selectArgs) {
|
|
27229
27554
|
if (!selectArgs.cancel) {
|
|
27230
27555
|
_this.checkExtension(selectArgs.filesData[0]);
|
|
27231
|
-
altText = selectArgs.filesData[0].name;
|
|
27556
|
+
altText = selectArgs.filesData[0].name.replace(/\.[a-zA-Z0-9]+$/, '');
|
|
27232
27557
|
if (_this.parent.editorMode === 'HTML' && isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
27233
27558
|
var reader_1 = new FileReader();
|
|
27234
27559
|
// eslint-disable-next-line
|
|
@@ -28802,7 +29127,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
28802
29127
|
var dialogContent = this.vidsizeInput(e);
|
|
28803
29128
|
var selectObj_1 = { args: e.args, selfVideo: this, selection: e.selection, selectNode: e.selectNode };
|
|
28804
29129
|
this.dialogObj.setProperties({
|
|
28805
|
-
|
|
29130
|
+
width: '290px', header: vidSizeHeader, content: dialogContent,
|
|
28806
29131
|
buttons: [{
|
|
28807
29132
|
// eslint-disable-next-line
|
|
28808
29133
|
click: function (e) {
|
|
@@ -29174,7 +29499,6 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
29174
29499
|
_this.setAspectRatio(_this.videoEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
29175
29500
|
_this.resizeVidDupPos(_this.videoEle);
|
|
29176
29501
|
_this.vidResizePos(_this.videoEle, _this.vidResizeDiv);
|
|
29177
|
-
_this.parent.setContentHeight('', false);
|
|
29178
29502
|
}
|
|
29179
29503
|
});
|
|
29180
29504
|
};
|
|
@@ -29987,8 +30311,12 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
29987
30311
|
_this.parent.trigger(fileRemoving, e, function (e) {
|
|
29988
30312
|
proxy.isVideoUploaded = false;
|
|
29989
30313
|
_this.dialogObj.getButtons(0).element.disabled = true;
|
|
29990
|
-
|
|
29991
|
-
|
|
30314
|
+
if (proxy.inputUrl.getAttribute('disabled')) {
|
|
30315
|
+
proxy.inputUrl.removeAttribute('disabled');
|
|
30316
|
+
}
|
|
30317
|
+
if (proxy.embedInputUrl.getAttribute('disabled')) {
|
|
30318
|
+
proxy.embedInputUrl.removeAttribute('disabled');
|
|
30319
|
+
}
|
|
29992
30320
|
if (proxy.uploadUrl) {
|
|
29993
30321
|
proxy.uploadUrl.url = '';
|
|
29994
30322
|
}
|
|
@@ -30224,7 +30552,6 @@ var ViewSource = /** @__PURE__ @class */ (function () {
|
|
|
30224
30552
|
rteContent.appendChild(this.previewElement);
|
|
30225
30553
|
this.parent.element.appendChild(rteContent);
|
|
30226
30554
|
rteContent.style.height = this.contentModule.getPanel().style.height;
|
|
30227
|
-
rteContent.style.marginTop = this.contentModule.getPanel().style.marginTop;
|
|
30228
30555
|
this.getPanel().value = this.getTextAreaValue();
|
|
30229
30556
|
this.contentModule.getPanel().style.display = 'none';
|
|
30230
30557
|
rteContent.style.display = 'block';
|
|
@@ -30245,14 +30572,17 @@ var ViewSource = /** @__PURE__ @class */ (function () {
|
|
|
30245
30572
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
30246
30573
|
}
|
|
30247
30574
|
removeClass(tbItems, [CLS_ACTIVE]);
|
|
30248
|
-
this.parent.
|
|
30575
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
30576
|
+
this.parent.setContentHeight('SourceCode', isExpand);
|
|
30249
30577
|
this.wireEvent(this.previewElement);
|
|
30250
30578
|
this.unWireBaseKeyDown();
|
|
30251
30579
|
this.previewElement.focus();
|
|
30252
30580
|
this.parent.updateValue();
|
|
30253
30581
|
if (!isNullOrUndefined(this.parent.placeholder) && !this.parent.iframeSettings.enable) {
|
|
30254
30582
|
var placeHolderWrapper = this.parent.element.querySelector('.rte-placeholder.e-rte-placeholder');
|
|
30255
|
-
placeHolderWrapper
|
|
30583
|
+
if (placeHolderWrapper) {
|
|
30584
|
+
placeHolderWrapper.style.display = 'none';
|
|
30585
|
+
}
|
|
30256
30586
|
}
|
|
30257
30587
|
this.parent.trigger(actionComplete, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
|
|
30258
30588
|
this.parent.invokeChangeEvent();
|
|
@@ -30308,7 +30638,8 @@ var ViewSource = /** @__PURE__ @class */ (function () {
|
|
|
30308
30638
|
if (this.parent.getToolbar()) {
|
|
30309
30639
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
30310
30640
|
}
|
|
30311
|
-
this.parent.
|
|
30641
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
30642
|
+
this.parent.setContentHeight('Preview', isExpand);
|
|
30312
30643
|
this.unWireEvent();
|
|
30313
30644
|
this.wireBaseKeyDown();
|
|
30314
30645
|
this.contentModule.getEditPanel().focus();
|
|
@@ -30383,6 +30714,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
30383
30714
|
this.pageY = null;
|
|
30384
30715
|
this.moveEle = null;
|
|
30385
30716
|
this.currentColumnResize = '';
|
|
30717
|
+
this.resizeEndTime = 0;
|
|
30386
30718
|
this.parent = parent;
|
|
30387
30719
|
this.rteID = parent.element.id;
|
|
30388
30720
|
this.l10n = serviceLocator.getService('rteLocale');
|
|
@@ -30540,7 +30872,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
30540
30872
|
Table.prototype.keyUp = function (e) {
|
|
30541
30873
|
var target = e.args.target;
|
|
30542
30874
|
if (e.args.key.toLocaleLowerCase() === 'escape' && target && target.classList && (this.popupObj && !closest(target, '[id=' + "'" + this.popupObj.element.id + "'" + ']')) && this.popupObj) {
|
|
30875
|
+
var createTableToolbarBtn = this.popupObj.relateTo;
|
|
30876
|
+
if (createTableToolbarBtn.nodeName !== 'BUTTON') {
|
|
30877
|
+
createTableToolbarBtn = createTableToolbarBtn.querySelector('span.e-create-table');
|
|
30878
|
+
createTableToolbarBtn = createTableToolbarBtn.parentElement;
|
|
30879
|
+
}
|
|
30543
30880
|
this.popupObj.hide();
|
|
30881
|
+
if (createTableToolbarBtn) {
|
|
30882
|
+
createTableToolbarBtn.focus();
|
|
30883
|
+
}
|
|
30544
30884
|
}
|
|
30545
30885
|
};
|
|
30546
30886
|
Table.prototype.keyDown = function (e) {
|
|
@@ -30720,7 +31060,20 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
30720
31060
|
return false;
|
|
30721
31061
|
}
|
|
30722
31062
|
};
|
|
31063
|
+
Table.prototype.removeEmptyTextNodes = function (element) {
|
|
31064
|
+
var children = element.childNodes;
|
|
31065
|
+
for (var i = children.length - 1; i >= 0; i--) {
|
|
31066
|
+
var node = children[i];
|
|
31067
|
+
if (node.nodeType === Node.TEXT_NODE && node.nodeValue.trim() === '') {
|
|
31068
|
+
element.removeChild(node);
|
|
31069
|
+
}
|
|
31070
|
+
}
|
|
31071
|
+
};
|
|
30723
31072
|
Table.prototype.tabSelection = function (event, selection, ele) {
|
|
31073
|
+
var allHeadBodyTRElements = ele.closest('table').querySelectorAll('thead, tbody, tr');
|
|
31074
|
+
for (var i = 0; i < allHeadBodyTRElements.length; i++) {
|
|
31075
|
+
this.removeEmptyTextNodes(allHeadBodyTRElements[i]);
|
|
31076
|
+
}
|
|
30724
31077
|
this.previousTableElement = ele;
|
|
30725
31078
|
var insideList = this.insideList(selection.range);
|
|
30726
31079
|
if ((event.keyCode === 37 || event.keyCode === 39) && selection.range.startContainer.nodeType === 3 ||
|
|
@@ -30857,10 +31210,12 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
30857
31210
|
var startNode = this.parent.getRange().startContainer.parentElement;
|
|
30858
31211
|
var endNode = this.parent.getRange().endContainer.parentElement;
|
|
30859
31212
|
var isAnchorEle = this.getAnchorNode(target);
|
|
31213
|
+
var currentTime = new Date().getTime();
|
|
30860
31214
|
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
30861
31215
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
30862
31216
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
30863
|
-
&& !(range.startContainer.nodeType === 3 && !range.collapsed)
|
|
31217
|
+
&& !(range.startContainer.nodeType === 3 && !range.collapsed) &&
|
|
31218
|
+
currentTime - this.resizeEndTime > 100) {
|
|
30864
31219
|
var range_1 = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
30865
31220
|
this.parent.formatter.editorManager.nodeSelection.save(range_1, this.contentModule.getDocument());
|
|
30866
31221
|
this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());
|
|
@@ -30956,7 +31311,10 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
30956
31311
|
var tdNode = closest(target, 'td,th');
|
|
30957
31312
|
target = (target.nodeName !== 'TD' && tdNode && this.parent.contentModule.getEditPanel().contains(tdNode)) ?
|
|
30958
31313
|
tdNode : target;
|
|
30959
|
-
|
|
31314
|
+
if (!(this.parent.quickToolbarSettings.showOnRightClick && e.args.which === 3 &&
|
|
31315
|
+
target.classList.contains(CLS_TABLE_SEL))) {
|
|
31316
|
+
removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), CLS_TABLE_SEL);
|
|
31317
|
+
}
|
|
30960
31318
|
if (target && (target.tagName === 'TD' || target.tagName === 'TH')) {
|
|
30961
31319
|
addClass([target], CLS_TABLE_SEL);
|
|
30962
31320
|
this.activeCell = target;
|
|
@@ -31345,6 +31703,9 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31345
31703
|
widthCompare = rteWidth;
|
|
31346
31704
|
}
|
|
31347
31705
|
if (_this.resizeBtnStat.column) {
|
|
31706
|
+
if (_this.curTable.closest('li')) {
|
|
31707
|
+
widthCompare = _this.curTable.closest('li').offsetWidth;
|
|
31708
|
+
}
|
|
31348
31709
|
var colGroup = _this.curTable.querySelectorAll('colgroup > col');
|
|
31349
31710
|
var currentTableWidth = void 0;
|
|
31350
31711
|
if (_this.curTable.style.width !== '' && _this.curTable.style.width.includes('%')) {
|
|
@@ -31370,6 +31731,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31370
31731
|
(_this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) + '%');
|
|
31371
31732
|
var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth - mouseX, widthCompare);
|
|
31372
31733
|
var preMarginLeft = 0;
|
|
31734
|
+
var widthType = _this.curTable.style.width.indexOf('%') > -1;
|
|
31735
|
+
if (!widthType && _this.curTable.offsetWidth > _this.contentModule.getEditPanel().offsetWidth) {
|
|
31736
|
+
_this.curTable.style.width = rteWidth + 'px';
|
|
31737
|
+
return;
|
|
31738
|
+
}
|
|
31739
|
+
if (widthType && parseFloat(_this.curTable.style.width.split('%')[0]) > 100) {
|
|
31740
|
+
_this.curTable.style.width = '100%';
|
|
31741
|
+
return;
|
|
31742
|
+
}
|
|
31373
31743
|
if (!isNullOrUndefined(_this.curTable.style.marginLeft) && _this.curTable.style.marginLeft !== '') {
|
|
31374
31744
|
var regex = /[-+]?\d*\.\d+|\d+/;
|
|
31375
31745
|
var value = _this.curTable.style.marginLeft.match(regex);
|
|
@@ -31378,6 +31748,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31378
31748
|
}
|
|
31379
31749
|
}
|
|
31380
31750
|
var currentMarginLeft = preMarginLeft + differenceWidth;
|
|
31751
|
+
if (currentMarginLeft && currentMarginLeft > 100) {
|
|
31752
|
+
var width = parseFloat(_this.curTable.style.width);
|
|
31753
|
+
currentMarginLeft = 100 - width;
|
|
31754
|
+
}
|
|
31755
|
+
if (currentMarginLeft && currentMarginLeft < 1) {
|
|
31756
|
+
_this.curTable.style.marginLeft = null;
|
|
31757
|
+
_this.curTable.style.width = '100%';
|
|
31758
|
+
return;
|
|
31759
|
+
}
|
|
31381
31760
|
_this.curTable.style.marginLeft = 'calc(' + (_this.curTable.style.width === '100%' ? 0 : currentMarginLeft) + '%)';
|
|
31382
31761
|
for (var i = 0; i < firstColumnsCell.length; i++) {
|
|
31383
31762
|
var currentColumnCellWidth = _this.getCurrentColWidth(firstColumnsCell[i], tableWidth);
|
|
@@ -31448,15 +31827,26 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31448
31827
|
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
31449
31828
|
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
31450
31829
|
}
|
|
31451
|
-
var widthType = _this.curTable.style.width.indexOf('%') > -1;
|
|
31452
|
-
_this.curTable.style.width = widthType ? _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
31453
|
-
: tableWidth + mouseX + 'px';
|
|
31454
31830
|
_this.curTable.style.height = tableHeight + mouseY + 'px';
|
|
31455
31831
|
if (!isNullOrUndefined(tableReBox)) {
|
|
31456
31832
|
tableReBox.classList.add('e-rbox-select');
|
|
31457
31833
|
tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top + tableHeight - 4) +
|
|
31458
31834
|
'px; left:' + (_this.calcPos(_this.curTable).left + tableWidth - 4) + 'px;';
|
|
31459
31835
|
}
|
|
31836
|
+
if (_this.curTable.closest('li')) {
|
|
31837
|
+
widthCompare = _this.curTable.closest('li').offsetWidth;
|
|
31838
|
+
}
|
|
31839
|
+
var widthType = _this.curTable.style.width.indexOf('%') > -1;
|
|
31840
|
+
if (widthType && parseFloat(_this.curTable.style.width.split('%')[0]) > 100) {
|
|
31841
|
+
_this.curTable.style.width = '100%';
|
|
31842
|
+
return;
|
|
31843
|
+
}
|
|
31844
|
+
if (!widthType && _this.curTable.offsetWidth > _this.contentModule.getEditPanel().offsetWidth) {
|
|
31845
|
+
_this.curTable.style.width = rteWidth + 'px';
|
|
31846
|
+
return;
|
|
31847
|
+
}
|
|
31848
|
+
_this.curTable.style.width = widthType ? _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
31849
|
+
: tableWidth + mouseX + 'px';
|
|
31460
31850
|
}
|
|
31461
31851
|
}
|
|
31462
31852
|
});
|
|
@@ -31533,6 +31923,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31533
31923
|
var args = { event: e, requestType: 'table' };
|
|
31534
31924
|
this.parent.trigger(resizeStop, args);
|
|
31535
31925
|
this.parent.formatter.saveData();
|
|
31926
|
+
this.resizeEndTime = new Date().getTime();
|
|
31536
31927
|
};
|
|
31537
31928
|
Table.prototype.resetResizeHelper = function (curTable) {
|
|
31538
31929
|
var colHelper = this.parent.element.querySelectorAll('.e-table-rhelper.e-column-helper');
|
|
@@ -31547,6 +31938,9 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31547
31938
|
element.parentNode.removeChild(element);
|
|
31548
31939
|
}
|
|
31549
31940
|
});
|
|
31941
|
+
if (!curTable.style.width) {
|
|
31942
|
+
curTable.style.width = curTable.offsetWidth + 'px';
|
|
31943
|
+
}
|
|
31550
31944
|
var colGroup = curTable.querySelector('colgroup');
|
|
31551
31945
|
if (colGroup) {
|
|
31552
31946
|
for (var i = 0; i < curTable.rows.length; i++) {
|
|
@@ -31643,7 +32037,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31643
32037
|
this.createTableButton.isStringTemplate = true;
|
|
31644
32038
|
this.createTableButton.appendTo(btnEle);
|
|
31645
32039
|
EventHandler.add(btnEle, 'click', this.insertTableDialog, { self: this, args: args.args, selection: args.selection });
|
|
31646
|
-
this.parent.getToolbar().appendChild(this.dlgDiv);
|
|
32040
|
+
this.parent.getToolbar().parentElement.appendChild(this.dlgDiv);
|
|
31647
32041
|
var target = args.args.originalEvent.target;
|
|
31648
32042
|
target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
|
|
31649
32043
|
this.popupObj = new Popup(this.dlgDiv, {
|
|
@@ -32681,7 +33075,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
32681
33075
|
Property(null)
|
|
32682
33076
|
], PasteCleanupSettings.prototype, "deniedAttrs", void 0);
|
|
32683
33077
|
__decorate$2([
|
|
32684
|
-
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
33078
|
+
Property(['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius', 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor', 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style', 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left', 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width', 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-transform', 'text-indent', 'top', 'vertical-align', 'visibility', 'white-space', 'width'])
|
|
32685
33079
|
], PasteCleanupSettings.prototype, "allowedStyleProps", void 0);
|
|
32686
33080
|
__decorate$2([
|
|
32687
33081
|
Property(null)
|
|
@@ -32969,7 +33363,8 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
32969
33363
|
isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
|
|
32970
33364
|
}
|
|
32971
33365
|
if (e.args.which === 13 && !e.args.ctrlKey && (!Browser.isDevice ? e.args.code === 'Enter' : e.args.key === 'Enter')) {
|
|
32972
|
-
if (isNullOrUndefined(this.startNode.closest('LI, UL, OL')) && isNullOrUndefined(this.endNode.closest('LI, UL, OL')) &&
|
|
33366
|
+
if (isNullOrUndefined(this.startNode.closest('LI, UL, OL')) && isNullOrUndefined(this.endNode.closest('LI, UL, OL')) &&
|
|
33367
|
+
isNullOrUndefined(this.startNode.closest('.e-img-inner')) && isTableEnter &&
|
|
32973
33368
|
isNullOrUndefined(this.startNode.closest('PRE')) && isNullOrUndefined(this.endNode.closest('PRE'))) {
|
|
32974
33369
|
var shiftKey_1 = e.args.shiftKey;
|
|
32975
33370
|
var actionBeginArgs = {
|
|
@@ -33484,6 +33879,14 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
33484
33879
|
member: 'image',
|
|
33485
33880
|
args: [this, this.serviceLocator]
|
|
33486
33881
|
});
|
|
33882
|
+
modules.push({
|
|
33883
|
+
member: 'audio',
|
|
33884
|
+
args: [this, this.serviceLocator]
|
|
33885
|
+
});
|
|
33886
|
+
modules.push({
|
|
33887
|
+
member: 'video',
|
|
33888
|
+
args: [this, this.serviceLocator]
|
|
33889
|
+
});
|
|
33487
33890
|
if (this.quickToolbarSettings.enable) {
|
|
33488
33891
|
modules.push({ member: 'quickToolbar', args: [this, this.serviceLocator] });
|
|
33489
33892
|
}
|
|
@@ -33497,14 +33900,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
33497
33900
|
if (this.editorMode === 'HTML') {
|
|
33498
33901
|
modules.push({ member: 'htmlEditor', args: [this, this.serviceLocator] });
|
|
33499
33902
|
modules.push({ member: 'pasteCleanup', args: [this, this.serviceLocator] });
|
|
33500
|
-
modules.push({
|
|
33501
|
-
member: 'audio',
|
|
33502
|
-
args: [this, this.serviceLocator]
|
|
33503
|
-
});
|
|
33504
|
-
modules.push({
|
|
33505
|
-
member: 'video',
|
|
33506
|
-
args: [this, this.serviceLocator]
|
|
33507
|
-
});
|
|
33508
33903
|
modules.push({
|
|
33509
33904
|
member: 'formatPainter',
|
|
33510
33905
|
args: [this]
|
|
@@ -33536,7 +33931,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
33536
33931
|
else {
|
|
33537
33932
|
if (this.getToolbar()) {
|
|
33538
33933
|
removeClass(this.getToolbar().querySelectorAll('.' + CLS_ACTIVE), CLS_ACTIVE);
|
|
33539
|
-
removeClass([this.getToolbar()], [CLS_TB_FLOAT
|
|
33934
|
+
removeClass([this.getToolbar().parentElement], [CLS_TB_FLOAT]);
|
|
33540
33935
|
}
|
|
33541
33936
|
addClass([this.element], CLS_DISABLED);
|
|
33542
33937
|
this.element.tabIndex = -1;
|
|
@@ -33957,7 +34352,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
33957
34352
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
33958
34353
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
33959
34354
|
}
|
|
33960
|
-
this.setContentHeight();
|
|
34355
|
+
this.setContentHeight('Init');
|
|
33961
34356
|
if (this.value !== null) {
|
|
33962
34357
|
this.valueContainer.defaultValue = this.value;
|
|
33963
34358
|
}
|
|
@@ -34163,8 +34558,15 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
34163
34558
|
case 'toolbar-focus':
|
|
34164
34559
|
if (this.toolbarSettings.enable && this.getToolbarElement()) {
|
|
34165
34560
|
var firstActiveItem = this.getToolbarElement().querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
34166
|
-
|
|
34167
|
-
|
|
34561
|
+
var quickToolbarElem = this.getRenderedQuickToolbarElem();
|
|
34562
|
+
if (quickToolbarElem) {
|
|
34563
|
+
firstActiveItem = quickToolbarElem.querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
34564
|
+
}
|
|
34565
|
+
if (firstActiveItem) {
|
|
34566
|
+
var firstChild = firstActiveItem.firstElementChild;
|
|
34567
|
+
firstChild.removeAttribute('tabindex');
|
|
34568
|
+
firstChild.focus();
|
|
34569
|
+
}
|
|
34168
34570
|
}
|
|
34169
34571
|
break;
|
|
34170
34572
|
case 'escape':
|
|
@@ -34381,6 +34783,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
34381
34783
|
_this.notify(pasteClean, { args: e });
|
|
34382
34784
|
}
|
|
34383
34785
|
else {
|
|
34786
|
+
console.warn('[WARNING] :: Module "pasteCleanup" is not available in RichTextEditor component! You either misspelled the module name or forgot to load it.');
|
|
34384
34787
|
var args_2 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
|
|
34385
34788
|
var value = null;
|
|
34386
34789
|
var htmlValue = false;
|
|
@@ -34675,7 +35078,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
34675
35078
|
break;
|
|
34676
35079
|
case 'height':
|
|
34677
35080
|
this.setHeight(newProp[prop]);
|
|
34678
|
-
this.setContentHeight();
|
|
35081
|
+
this.setContentHeight('Init');
|
|
34679
35082
|
this.autoResize();
|
|
34680
35083
|
break;
|
|
34681
35084
|
case 'readonly':
|
|
@@ -34722,11 +35125,11 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
34722
35125
|
break;
|
|
34723
35126
|
case 'inlineMode':
|
|
34724
35127
|
this.notify(modelChanged, { module: 'quickToolbar', newProp: newProp, oldProp: oldProp });
|
|
34725
|
-
this.setContentHeight();
|
|
35128
|
+
this.setContentHeight('Init');
|
|
34726
35129
|
break;
|
|
34727
35130
|
case 'toolbarSettings':
|
|
34728
35131
|
this.notify(modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
|
|
34729
|
-
this.setContentHeight();
|
|
35132
|
+
this.setContentHeight('Init');
|
|
34730
35133
|
break;
|
|
34731
35134
|
case 'maxLength':
|
|
34732
35135
|
if (this.showCharCount) {
|
|
@@ -34885,7 +35288,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
34885
35288
|
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
34886
35289
|
}
|
|
34887
35290
|
}
|
|
34888
|
-
if (this.placeholder && this.iframeSettings.enable) {
|
|
35291
|
+
if (this.placeholder && this.iframeSettings.enable && this.inputElement) {
|
|
34889
35292
|
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
34890
35293
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
|
|
34891
35294
|
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
@@ -35232,12 +35635,9 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35232
35635
|
*/
|
|
35233
35636
|
RichTextEditor.prototype.setContentHeight = function (target, isExpand) {
|
|
35234
35637
|
var heightValue;
|
|
35235
|
-
var topValue = 0;
|
|
35236
35638
|
var rteHeightPercent;
|
|
35237
35639
|
var heightPercent = typeof (this.height) === 'string' && this.height.indexOf('%') > -1;
|
|
35238
|
-
var cntEle =
|
|
35239
|
-
this.sourceCodeModule.getPanel().parentElement.style.display === 'block') ? this.sourceCodeModule.getPanel().parentElement :
|
|
35240
|
-
this.contentModule.getPanel();
|
|
35640
|
+
var cntEle = this.contentModule.getPanel();
|
|
35241
35641
|
var rteHeight = this.element.offsetHeight;
|
|
35242
35642
|
if (rteHeight === 0 && this.height !== 'auto' && !this.getToolbar()) {
|
|
35243
35643
|
rteHeight = parseInt(this.height, 10);
|
|
@@ -35249,39 +35649,36 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35249
35649
|
var rzHandle = this.element.querySelector('.' + CLS_RTE_RES_HANDLE);
|
|
35250
35650
|
var rzHeight = this.enableResize ? (!isNullOrUndefined(rzHandle) ? (rzHandle.offsetHeight + 8) : 0) : 0;
|
|
35251
35651
|
var expandPopHeight = this.getToolbar() ? this.toolbarModule.getExpandTBarPopHeight() : 0;
|
|
35252
|
-
if (this.
|
|
35253
|
-
|
|
35254
|
-
topValue = (!this.toolbarSettings.enableFloating) ? expandPopHeight : 0;
|
|
35652
|
+
if (target && target !== 'Toolbar' && expandPopHeight && this.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0) {
|
|
35653
|
+
tbHeight = tbHeight - expandPopHeight;
|
|
35255
35654
|
}
|
|
35256
|
-
|
|
35257
|
-
if (
|
|
35258
|
-
heightValue = 'auto';
|
|
35655
|
+
if (this.toolbarSettings.type === ToolbarType.Expand) {
|
|
35656
|
+
if (isExpand) {
|
|
35657
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
|
|
35259
35658
|
}
|
|
35260
35659
|
else {
|
|
35261
|
-
heightValue =
|
|
35660
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight - expandPopHeight + rzHeight) + 'px';
|
|
35262
35661
|
}
|
|
35263
35662
|
}
|
|
35264
|
-
|
|
35265
|
-
|
|
35266
|
-
|
|
35267
|
-
|
|
35663
|
+
else {
|
|
35664
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - tbHeight + 'px';
|
|
35665
|
+
}
|
|
35666
|
+
var finalHeight = heightPercent && rteHeightPercent ? rteHeightPercent : heightValue;
|
|
35667
|
+
switch (target) {
|
|
35668
|
+
case 'Init':
|
|
35669
|
+
case 'Toolbar':
|
|
35670
|
+
case 'WindowResize':
|
|
35671
|
+
case 'Refresh':
|
|
35672
|
+
if (this.element.querySelectorAll('.e-source-content').length > 0 && this.element.querySelector('.e-source-content').style.display === 'block') {
|
|
35673
|
+
setStyleAttribute(this.element.querySelector('.e-source-content'), { height: finalHeight });
|
|
35268
35674
|
}
|
|
35269
|
-
|
|
35270
|
-
|
|
35271
|
-
if (target === 'windowResize' && heightPercent) {
|
|
35272
|
-
//cntEle hide the borderBottom of RichTextEditor. so removed the 2px of cntEle height.
|
|
35273
|
-
heightValue = parseInt(heightValue, 10) - 2 + 'px';
|
|
35675
|
+
else {
|
|
35676
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
35274
35677
|
}
|
|
35275
|
-
|
|
35276
|
-
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
var codeElement = select('.' + CLS_RTE_CONTENT, this.element);
|
|
35280
|
-
setStyleAttribute(codeElement, { height: heightValue, marginTop: topValue + 'px' });
|
|
35281
|
-
}
|
|
35282
|
-
if (this.toolbarSettings.enableFloating && this.getToolbar() && !this.inlineMode.enable) {
|
|
35283
|
-
var tbWrapHeight = (isExpand ? (tbHeight + expandPopHeight) : tbHeight) + 'px';
|
|
35284
|
-
setStyleAttribute(this.getToolbar().parentElement, { height: tbWrapHeight });
|
|
35678
|
+
break;
|
|
35679
|
+
case 'Resize':
|
|
35680
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
35681
|
+
break;
|
|
35285
35682
|
}
|
|
35286
35683
|
if (rzHeight === 0) {
|
|
35287
35684
|
this.autoResize();
|
|
@@ -35484,18 +35881,14 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35484
35881
|
RichTextEditor.prototype.resizeHandler = function () {
|
|
35485
35882
|
var isExpand = false;
|
|
35486
35883
|
if (!document.body.contains(this.element)) {
|
|
35487
|
-
document.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
35884
|
+
document.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35488
35885
|
return;
|
|
35489
35886
|
}
|
|
35490
35887
|
if (this.toolbarSettings.enable && !this.inlineMode.enable) {
|
|
35491
35888
|
this.toolbarModule.refreshToolbarOverflow();
|
|
35492
35889
|
isExpand = this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(CLS_EXPAND_OPEN);
|
|
35493
35890
|
}
|
|
35494
|
-
|
|
35495
|
-
// When resize the window,border bottom of cntEle and this.element border visible separatly.so none the cntEle borderBottom.
|
|
35496
|
-
this.contentModule.getPanel().style.borderBottom = 'none';
|
|
35497
|
-
}
|
|
35498
|
-
this.setContentHeight('windowResize', isExpand);
|
|
35891
|
+
this.setContentHeight('WindowResize', isExpand);
|
|
35499
35892
|
this.notify(windowResize, null);
|
|
35500
35893
|
};
|
|
35501
35894
|
RichTextEditor.prototype.scrollHandler = function (e) {
|
|
@@ -35631,6 +36024,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35631
36024
|
this.isRTE = false;
|
|
35632
36025
|
}
|
|
35633
36026
|
this.notify(docClick, { args: e });
|
|
36027
|
+
var hideQuickToolbarChecker = this.quickToolbarModule && !this.inlineMode.enable && isNullOrUndefined(this.quickToolbarModule.inlineQTBar);
|
|
36028
|
+
if ((hideQuickToolbarChecker && !isNullOrUndefined(closest(target, '.' + 'e-toolbar-wrapper'))) || (hideQuickToolbarChecker && (!isNullOrUndefined(closest(target, '.e-rte-table-resize')) || !isNullOrUndefined(closest(target, '.e-table-box'))))) {
|
|
36029
|
+
this.quickToolbarModule.hideQuickToolbars();
|
|
36030
|
+
}
|
|
35634
36031
|
if (Browser.info.name !== 'msie' && e.detail > 3) {
|
|
35635
36032
|
e.preventDefault();
|
|
35636
36033
|
}
|
|
@@ -35780,9 +36177,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35780
36177
|
this.triggerEditArea(e.originalEvent);
|
|
35781
36178
|
};
|
|
35782
36179
|
RichTextEditor.prototype.contextHandler = function (e) {
|
|
35783
|
-
var closestElem = closest(e.target, 'a, table, img');
|
|
36180
|
+
var closestElem = closest(e.target, 'a, table, img, video, audio');
|
|
35784
36181
|
if (this.inlineMode.onSelection === false || (!isNullOrUndefined(closestElem) && this.inputElement.contains(closestElem)
|
|
35785
|
-
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A'
|
|
36182
|
+
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A' ||
|
|
36183
|
+
closestElem.tagName.toLowerCase() === 'video' || closestElem.tagName.toLowerCase() === 'audio'))) {
|
|
35786
36184
|
e.preventDefault();
|
|
35787
36185
|
}
|
|
35788
36186
|
};
|
|
@@ -35816,10 +36214,21 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35816
36214
|
}
|
|
35817
36215
|
};
|
|
35818
36216
|
RichTextEditor.prototype.setAutoHeight = function (element) {
|
|
35819
|
-
if (!isNullOrUndefined(element)) {
|
|
36217
|
+
if (!isNullOrUndefined(element) && !this.iframeSettings.enable) {
|
|
35820
36218
|
element.style.height = this.inputElement.scrollHeight + 'px';
|
|
35821
36219
|
element.style.overflow = 'hidden';
|
|
35822
36220
|
}
|
|
36221
|
+
else if (!isNullOrUndefined(element) && !isNullOrUndefined(element.parentElement) && this.iframeSettings.enable) {
|
|
36222
|
+
var newRange = this.getRange();
|
|
36223
|
+
element.style.height = 'auto';
|
|
36224
|
+
var newHeight = element.contentDocument.body.scrollHeight + 'px';
|
|
36225
|
+
element.style.height = newHeight;
|
|
36226
|
+
element.style.overflow = 'hidden';
|
|
36227
|
+
// 16 px added for padding doesn't affect the editor height
|
|
36228
|
+
if (newRange.startContainer.nodeName !== '#text' && newRange.startContainer.nodeName !== 'BODY' && window.innerHeight < newRange.startContainer.getBoundingClientRect().top + element.getBoundingClientRect().top + 16) {
|
|
36229
|
+
newRange.startContainer.scrollIntoView(false);
|
|
36230
|
+
}
|
|
36231
|
+
}
|
|
35823
36232
|
};
|
|
35824
36233
|
RichTextEditor.prototype.wireEvents = function () {
|
|
35825
36234
|
this.element.addEventListener('focusin', this.onFocusHandler, true);
|
|
@@ -35874,7 +36283,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35874
36283
|
EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
|
|
35875
36284
|
this.wireContextEvent();
|
|
35876
36285
|
this.formatter.editorManager.observer.on(KEY_DOWN_HANDLER, this.editorKeyDown, this);
|
|
35877
|
-
this.element.ownerDocument.defaultView.addEventListener('resize', this.onResizeHandler, true);
|
|
36286
|
+
this.element.ownerDocument.defaultView.addEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35878
36287
|
if (this.iframeSettings.enable) {
|
|
35879
36288
|
EventHandler.add(this.inputElement, 'focusin', this.focusHandler, this);
|
|
35880
36289
|
EventHandler.add(this.inputElement, 'focusout', this.blurHandler, this);
|
|
@@ -35940,7 +36349,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35940
36349
|
if (this.formatter) {
|
|
35941
36350
|
this.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.editorKeyDown);
|
|
35942
36351
|
}
|
|
35943
|
-
this.element.ownerDocument.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
36352
|
+
this.element.ownerDocument.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35944
36353
|
if (this.iframeSettings.enable) {
|
|
35945
36354
|
EventHandler.remove(this.inputElement, 'focusin', this.focusHandler);
|
|
35946
36355
|
EventHandler.remove(this.inputElement, 'focusout', this.blurHandler);
|
|
@@ -36005,6 +36414,15 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
36005
36414
|
}
|
|
36006
36415
|
}
|
|
36007
36416
|
};
|
|
36417
|
+
RichTextEditor.prototype.getRenderedQuickToolbarElem = function () {
|
|
36418
|
+
var quickToolbars = this.quickToolbarModule.getQuickToolbarInstance();
|
|
36419
|
+
for (var i = 0; i < quickToolbars.length; i++) {
|
|
36420
|
+
if (quickToolbars[i] && quickToolbars[i].isRendered) {
|
|
36421
|
+
return quickToolbars[i].element;
|
|
36422
|
+
}
|
|
36423
|
+
}
|
|
36424
|
+
return null;
|
|
36425
|
+
};
|
|
36008
36426
|
__decorate$1([
|
|
36009
36427
|
Complex({}, ToolbarSettings$1)
|
|
36010
36428
|
], RichTextEditor.prototype, "toolbarSettings", void 0);
|
|
@@ -36309,5 +36727,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
36309
36727
|
* Rich Text Editor component exported items
|
|
36310
36728
|
*/
|
|
36311
36729
|
|
|
36312
|
-
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT,
|
|
36730
|
+
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, getTooltipTextDropdownItems, getQuickToolbarTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
|
|
36313
36731
|
//# sourceMappingURL=ej2-richtexteditor.es5.js.map
|