@syncfusion/ej2-richtexteditor 24.2.9 → 25.1.37
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 +32 -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 +936 -500
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +921 -490
- 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 +163 -13
- 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 +36 -2
- package/src/editor-manager/plugin/ms-word-clean-up.js +67 -59
- package/src/editor-manager/plugin/selection-commands.js +56 -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 +83 -62
- 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 +68 -11
- 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 +61 -17
- package/styles/bootstrap.css +62 -18
- package/styles/bootstrap4.css +62 -18
- package/styles/bootstrap5-dark.css +68 -17
- package/styles/bootstrap5.css +68 -17
- package/styles/fabric-dark.css +61 -17
- package/styles/fabric.css +62 -18
- package/styles/fluent-dark.css +61 -17
- package/styles/fluent.css +61 -17
- package/styles/highcontrast-light.css +61 -17
- package/styles/highcontrast.css +62 -18
- package/styles/material-dark.css +61 -17
- package/styles/material.css +61 -17
- package/styles/material3-dark.css +63 -19
- package/styles/material3.css +63 -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 +51 -17
- 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 +61 -17
- package/styles/rich-text-editor/bootstrap.css +62 -18
- package/styles/rich-text-editor/bootstrap4.css +62 -18
- package/styles/rich-text-editor/bootstrap5-dark.css +68 -17
- package/styles/rich-text-editor/bootstrap5.css +68 -17
- package/styles/rich-text-editor/fabric-dark.css +61 -17
- package/styles/rich-text-editor/fabric.css +62 -18
- package/styles/rich-text-editor/fluent-dark.css +61 -17
- package/styles/rich-text-editor/fluent.css +61 -17
- package/styles/rich-text-editor/highcontrast-light.css +61 -17
- package/styles/rich-text-editor/highcontrast.css +62 -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 +61 -17
- package/styles/rich-text-editor/material.css +61 -17
- package/styles/rich-text-editor/material3-dark.css +63 -19
- package/styles/rich-text-editor/material3.css +63 -19
- package/styles/rich-text-editor/tailwind-dark.css +65 -25
- package/styles/rich-text-editor/tailwind.css +65 -25
- package/styles/tailwind-dark.css +65 -25
- package/styles/tailwind.css +65 -25
|
@@ -769,6 +769,11 @@ const documentClickClosedBy = 'documentClickClosedBy';
|
|
|
769
769
|
* @deprecated
|
|
770
770
|
*/
|
|
771
771
|
const showColorPicker = 'showColorPicker';
|
|
772
|
+
/**
|
|
773
|
+
* @hidden
|
|
774
|
+
* @deprecated
|
|
775
|
+
*/
|
|
776
|
+
const closeTooltip = 'closeTooltip';
|
|
772
777
|
/**
|
|
773
778
|
* @hidden
|
|
774
779
|
* @deprecated
|
|
@@ -1019,11 +1024,6 @@ const CLS_TB_FIXED = 'e-rte-tb-fixed';
|
|
|
1019
1024
|
* @deprecated
|
|
1020
1025
|
*/
|
|
1021
1026
|
const CLS_TB_FLOAT = 'e-rte-tb-float';
|
|
1022
|
-
/**
|
|
1023
|
-
* @hidden
|
|
1024
|
-
* @deprecated
|
|
1025
|
-
*/
|
|
1026
|
-
const CLS_TB_ABS_FLOAT = 'e-rte-tb-abs-float';
|
|
1027
1027
|
/**
|
|
1028
1028
|
* @hidden
|
|
1029
1029
|
* @deprecated
|
|
@@ -2694,7 +2694,7 @@ let defaultLocale = {
|
|
|
2694
2694
|
'linkTooltipLabel': 'Title',
|
|
2695
2695
|
'linkWebUrl': 'Web address',
|
|
2696
2696
|
'linkTitle': 'Enter a title',
|
|
2697
|
-
'linkurl': '
|
|
2697
|
+
'linkurl': 'https://example.com',
|
|
2698
2698
|
'linkOpenInNewWindow': 'Open link in new window',
|
|
2699
2699
|
'linkHeader': 'Insert Link',
|
|
2700
2700
|
'dialogInsert': 'Insert',
|
|
@@ -2717,9 +2717,9 @@ let defaultLocale = {
|
|
|
2717
2717
|
'imageAlternateText': 'Alternate Text',
|
|
2718
2718
|
'alternateHeader': 'Alternative Text',
|
|
2719
2719
|
'browse': 'Browse',
|
|
2720
|
-
'imageUrl': '
|
|
2721
|
-
'audioUrl': '
|
|
2722
|
-
'videoUrl': '
|
|
2720
|
+
'imageUrl': 'https://example.com/image.png',
|
|
2721
|
+
'audioUrl': 'https://example.com/audio.mp3',
|
|
2722
|
+
'videoUrl': 'https://example.com/video.mp4',
|
|
2723
2723
|
'webUrl': 'Web URL',
|
|
2724
2724
|
'embedUrl': 'Embed Code',
|
|
2725
2725
|
'imageCaption': 'Caption',
|
|
@@ -2730,7 +2730,7 @@ let defaultLocale = {
|
|
|
2730
2730
|
'videoHeight': 'Height',
|
|
2731
2731
|
'videoWidth': 'Width',
|
|
2732
2732
|
'textPlaceholder': 'Enter text',
|
|
2733
|
-
'inserttablebtn': 'Insert
|
|
2733
|
+
'inserttablebtn': 'Insert Table',
|
|
2734
2734
|
'tabledialogHeader': 'Insert Table',
|
|
2735
2735
|
'tableWidth': 'Width',
|
|
2736
2736
|
'cellpadding': 'Cell Padding',
|
|
@@ -2744,7 +2744,7 @@ let defaultLocale = {
|
|
|
2744
2744
|
'createTable': 'Create Table',
|
|
2745
2745
|
'removeTable': 'Remove Table',
|
|
2746
2746
|
'tableHeader': 'Header Row',
|
|
2747
|
-
'tableRemove': 'Delete',
|
|
2747
|
+
'tableRemove': 'Delete Table',
|
|
2748
2748
|
'tableCellBackground': 'Table Cell Background',
|
|
2749
2749
|
'tableEditProperties': 'Table Edit Properties',
|
|
2750
2750
|
'styles': 'Styles',
|
|
@@ -2806,11 +2806,11 @@ let defaultLocale = {
|
|
|
2806
2806
|
'fontNameTimesNewRoman': 'Times New Roman',
|
|
2807
2807
|
'fontNameVerdana': 'Verdana',
|
|
2808
2808
|
'numberFormatListNumber': 'Number',
|
|
2809
|
-
'numberFormatListLowerAlpha': '
|
|
2810
|
-
'numberFormatListUpperAlpha': '
|
|
2811
|
-
'numberFormatListLowerRoman': '
|
|
2812
|
-
'numberFormatListUpperRoman': '
|
|
2813
|
-
'numberFormatListLowerGreek': '
|
|
2809
|
+
'numberFormatListLowerAlpha': 'Lower Alpha',
|
|
2810
|
+
'numberFormatListUpperAlpha': 'Upper Alpha',
|
|
2811
|
+
'numberFormatListLowerRoman': 'Lower Roman',
|
|
2812
|
+
'numberFormatListUpperRoman': 'Upper Roman',
|
|
2813
|
+
'numberFormatListLowerGreek': 'Lower Greek',
|
|
2814
2814
|
'bulletFormatListDisc': 'Disc',
|
|
2815
2815
|
'bulletFormatListCircle': 'Circle',
|
|
2816
2816
|
'bulletFormatListSquare': 'Square',
|
|
@@ -2824,7 +2824,10 @@ let defaultLocale = {
|
|
|
2824
2824
|
'emojiPickerNoResultFound': 'No results found',
|
|
2825
2825
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2826
2826
|
'linkAriaLabel': 'Open in new window',
|
|
2827
|
-
'unsupportedImage': 'Unsupported file format'
|
|
2827
|
+
'unsupportedImage': 'Unsupported file format',
|
|
2828
|
+
'mergecells': 'Merge cells',
|
|
2829
|
+
'verticalsplit': 'Vertical split',
|
|
2830
|
+
'horizontalsplit': 'Horizontal split'
|
|
2828
2831
|
};
|
|
2829
2832
|
let toolsLocale = {
|
|
2830
2833
|
'alignments': 'alignments',
|
|
@@ -3215,7 +3218,12 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
3215
3218
|
}
|
|
3216
3219
|
case 'bulletFormatList':
|
|
3217
3220
|
case 'numberFormatList': {
|
|
3218
|
-
|
|
3221
|
+
if (value !== '') {
|
|
3222
|
+
addClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
3223
|
+
}
|
|
3224
|
+
else {
|
|
3225
|
+
removeClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
3226
|
+
}
|
|
3219
3227
|
}
|
|
3220
3228
|
}
|
|
3221
3229
|
}
|
|
@@ -3456,7 +3464,8 @@ function updateTextNode(value, rteObj) {
|
|
|
3456
3464
|
imageElm[i].classList.add(CLS_RTE_IMAGE);
|
|
3457
3465
|
}
|
|
3458
3466
|
if (!(imageElm[i].classList.contains(CLS_IMGINLINE) ||
|
|
3459
|
-
imageElm[i].classList.contains(CLS_IMGBREAK))
|
|
3467
|
+
imageElm[i].classList.contains(CLS_IMGBREAK)) &&
|
|
3468
|
+
!(imageElm[i].classList.contains('e-imgleft') || imageElm[i].classList.contains('e-imgright') || imageElm[i].classList.contains('e-imgcenter'))) {
|
|
3460
3469
|
imageElm[i].classList.add(CLS_IMGINLINE);
|
|
3461
3470
|
}
|
|
3462
3471
|
}
|
|
@@ -3605,6 +3614,7 @@ class ToolbarRenderer {
|
|
|
3605
3614
|
wireEvent() {
|
|
3606
3615
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3607
3616
|
this.parent.on(destroyTooltip, this.destroyTooltip, this);
|
|
3617
|
+
this.parent.on(closeTooltip, this.closeTooltip, this);
|
|
3608
3618
|
}
|
|
3609
3619
|
destroyTooltip() {
|
|
3610
3620
|
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
@@ -3617,6 +3627,8 @@ class ToolbarRenderer {
|
|
|
3617
3627
|
}
|
|
3618
3628
|
unWireEvent() {
|
|
3619
3629
|
this.parent.off(destroy, this.unWireEvent);
|
|
3630
|
+
this.parent.off(destroyTooltip, this.destroyTooltip);
|
|
3631
|
+
this.parent.off(closeTooltip, this.closeTooltip);
|
|
3620
3632
|
}
|
|
3621
3633
|
toolbarBeforeCreate(e) {
|
|
3622
3634
|
if (this.mode === 'Extended') {
|
|
@@ -3735,7 +3747,7 @@ class ToolbarRenderer {
|
|
|
3735
3747
|
windowCollision: true,
|
|
3736
3748
|
position: 'BottomCenter'
|
|
3737
3749
|
});
|
|
3738
|
-
this.tooltip.appendTo(args.target);
|
|
3750
|
+
this.tooltip.appendTo(args.target.parentElement);
|
|
3739
3751
|
}
|
|
3740
3752
|
}
|
|
3741
3753
|
/**
|
|
@@ -3866,6 +3878,32 @@ class ToolbarRenderer {
|
|
|
3866
3878
|
popupElement.setAttribute('aria-owns', this.parent.getID());
|
|
3867
3879
|
return dropDown;
|
|
3868
3880
|
}
|
|
3881
|
+
mouseOutHandler() {
|
|
3882
|
+
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
3883
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
3884
|
+
}
|
|
3885
|
+
else {
|
|
3886
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3887
|
+
this.parent.contentModule.getDocument();
|
|
3888
|
+
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
3889
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
3890
|
+
}
|
|
3891
|
+
this.tooltipTargetEle.removeAttribute('data-title');
|
|
3892
|
+
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
3893
|
+
}
|
|
3894
|
+
closeTooltip(args) {
|
|
3895
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3896
|
+
this.parent.contentModule.getDocument();
|
|
3897
|
+
this.tooltipTargetEle = closest(args.target, '[data-tooltip-id]');
|
|
3898
|
+
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
3899
|
+
this.destroyTooltip();
|
|
3900
|
+
if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
|
|
3901
|
+
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
3902
|
+
this.tooltipTargetEle.removeAttribute('title');
|
|
3903
|
+
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3869
3907
|
/**
|
|
3870
3908
|
* renderListDropDown method
|
|
3871
3909
|
*
|
|
@@ -3890,6 +3928,35 @@ class ToolbarRenderer {
|
|
|
3890
3928
|
enableRtl: this.parent.enableRtl,
|
|
3891
3929
|
select: this.dropDownSelected.bind(this),
|
|
3892
3930
|
beforeOpen: (args) => {
|
|
3931
|
+
if (proxy.parent.editorMode !== 'Markdown') {
|
|
3932
|
+
const startNode = proxy.parent.getRange().startContainer.parentElement;
|
|
3933
|
+
const listElem = startNode.closest('LI');
|
|
3934
|
+
const currentLiElem = !isNullOrUndefined(listElem) ? listElem.parentElement : null;
|
|
3935
|
+
if (!isNullOrUndefined(currentLiElem) && (currentLiElem.nodeName === 'OL' || currentLiElem.nodeName === 'UL')) {
|
|
3936
|
+
if (currentLiElem.nodeName === 'UL' && args.items[0].subCommand === 'NumberFormatList') {
|
|
3937
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3938
|
+
}
|
|
3939
|
+
else if (currentLiElem.nodeName === 'OL' && args.items[0].subCommand === 'BulletFormatList') {
|
|
3940
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3941
|
+
}
|
|
3942
|
+
else {
|
|
3943
|
+
let currentListStyle = currentLiElem.style.listStyleType.split('-').join('').toLocaleLowerCase();
|
|
3944
|
+
currentListStyle = currentListStyle === 'decimal' ? 'number' : currentListStyle;
|
|
3945
|
+
for (let index = 0; index < args.element.childNodes.length; index++) {
|
|
3946
|
+
if (currentListStyle === args.element.childNodes[index].innerHTML.split(' ').join('').toLocaleLowerCase()) {
|
|
3947
|
+
addClass([args.element.childNodes[index]], 'e-active');
|
|
3948
|
+
}
|
|
3949
|
+
else if (currentListStyle === '') {
|
|
3950
|
+
addClass([args.element.childNodes[index]], 'e-active');
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3954
|
+
}
|
|
3955
|
+
else {
|
|
3956
|
+
addClass([args.element.childNodes[0]], 'e-active');
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
this.closeTooltip({ target: args.event.target });
|
|
3893
3960
|
if (proxy.parent.readonly || !proxy.parent.enabled) {
|
|
3894
3961
|
args.cancel = true;
|
|
3895
3962
|
return;
|
|
@@ -3968,8 +4035,6 @@ class ToolbarRenderer {
|
|
|
3968
4035
|
target: colorPicker.element.parentElement, cssClass: css,
|
|
3969
4036
|
enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
|
|
3970
4037
|
beforeOpen: (dropDownArgs) => {
|
|
3971
|
-
colorPicker.inline = true;
|
|
3972
|
-
colorPicker.dataBind();
|
|
3973
4038
|
if (proxy.parent.readonly || !proxy.parent.enabled) {
|
|
3974
4039
|
dropDownArgs.cancel = true;
|
|
3975
4040
|
return;
|
|
@@ -4107,14 +4172,18 @@ class ToolbarRenderer {
|
|
|
4107
4172
|
const colorPicker = new ColorPicker({
|
|
4108
4173
|
enablePersistence: this.parent.enablePersistence,
|
|
4109
4174
|
enableRtl: this.parent.enableRtl,
|
|
4110
|
-
inline:
|
|
4111
|
-
value:
|
|
4175
|
+
inline: true,
|
|
4176
|
+
value: null,
|
|
4177
|
+
cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
|
|
4112
4178
|
created: () => {
|
|
4113
4179
|
const value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
|
|
4114
|
-
colorPicker.
|
|
4180
|
+
colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
|
|
4181
|
+
colorPicker.value = value;
|
|
4115
4182
|
},
|
|
4116
4183
|
mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
|
|
4117
4184
|
modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
|
|
4185
|
+
presetColors: (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode : this.parent.fontColor.colorCode,
|
|
4186
|
+
columns: (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns,
|
|
4118
4187
|
beforeTileRender: (args) => {
|
|
4119
4188
|
args.element.classList.add(CLS_COLOR_PALETTE);
|
|
4120
4189
|
args.element.classList.add(CLS_CUSTOM_TILE);
|
|
@@ -4159,10 +4228,6 @@ class ToolbarRenderer {
|
|
|
4159
4228
|
}
|
|
4160
4229
|
});
|
|
4161
4230
|
colorPicker.isStringTemplate = true;
|
|
4162
|
-
colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
|
|
4163
|
-
colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
|
|
4164
|
-
this.parent.fontColor.colorCode;
|
|
4165
|
-
colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
|
|
4166
4231
|
colorPicker.createElement = this.parent.createElement;
|
|
4167
4232
|
colorPicker.appendTo(document.getElementById(args.target));
|
|
4168
4233
|
return colorPicker;
|
|
@@ -4303,23 +4368,13 @@ class BaseToolbar {
|
|
|
4303
4368
|
case '-':
|
|
4304
4369
|
return { type: 'Separator', cssClass: CLS_HR_SEPARATOR };
|
|
4305
4370
|
default:
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
};
|
|
4314
|
-
}
|
|
4315
|
-
else {
|
|
4316
|
-
return {
|
|
4317
|
-
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
4318
|
-
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
4319
|
-
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
4320
|
-
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
4321
|
-
};
|
|
4322
|
-
}
|
|
4371
|
+
return {
|
|
4372
|
+
id: this.parent.getID() + '_' + container + '_' + this.tools[itemStr.toLocaleLowerCase()].id,
|
|
4373
|
+
prefixIcon: this.tools[itemStr.toLocaleLowerCase()].icon,
|
|
4374
|
+
tooltipText: getTooltipText(itemStr, this.locator),
|
|
4375
|
+
command: this.tools[itemStr.toLocaleLowerCase()].command,
|
|
4376
|
+
subCommand: this.tools[itemStr.toLocaleLowerCase()].subCommand
|
|
4377
|
+
};
|
|
4323
4378
|
}
|
|
4324
4379
|
}
|
|
4325
4380
|
}
|
|
@@ -4366,17 +4421,21 @@ class BaseToolbar {
|
|
|
4366
4421
|
items.push(item);
|
|
4367
4422
|
}
|
|
4368
4423
|
}
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4424
|
+
if (this.parent.showTooltip) {
|
|
4425
|
+
for (let num = 0; num < items.length; num++) {
|
|
4426
|
+
const tooltipText = items[num].tooltipText;
|
|
4427
|
+
let shortCutKey;
|
|
4428
|
+
if (windowKeys[`${tooltipText}`]) {
|
|
4429
|
+
shortCutKey = window.navigator.platform.toLocaleLowerCase().includes('mac') ? windowKeys[`${tooltipText}`].replace('Ctrl', 'Cmd') : windowKeys[`${tooltipText}`];
|
|
4430
|
+
}
|
|
4431
|
+
else {
|
|
4432
|
+
shortCutKey = tooltipText;
|
|
4433
|
+
}
|
|
4434
|
+
if (shortCutKey) {
|
|
4435
|
+
if (!(items[num].command === "Images" && items[num].subCommand === "InsertLink")) {
|
|
4436
|
+
items[num].tooltipText = (tooltipText !== shortCutKey) ? tooltipText + ' (' + shortCutKey + ')' : tooltipText;
|
|
4437
|
+
}
|
|
4438
|
+
}
|
|
4380
4439
|
}
|
|
4381
4440
|
}
|
|
4382
4441
|
return items;
|
|
@@ -4425,7 +4484,7 @@ class DropDownButtons {
|
|
|
4425
4484
|
addClass([args.element], item.cssClass);
|
|
4426
4485
|
}
|
|
4427
4486
|
if (item.command === 'Images' || item.command === 'Videos' || item.command === 'Audios' || item.command === 'Table') {
|
|
4428
|
-
args.element.setAttribute('title', getQuickToolbarTooltipText(item.text));
|
|
4487
|
+
args.element.setAttribute('title', getQuickToolbarTooltipText(item.text) !== '' ? getQuickToolbarTooltipText(item.text) : item.text);
|
|
4429
4488
|
}
|
|
4430
4489
|
if (item.command === 'Alignments' || item.subCommand === 'JustifyLeft'
|
|
4431
4490
|
|| item.subCommand === 'JustifyRight' || item.subCommand === 'JustifyCenter') {
|
|
@@ -4435,13 +4494,13 @@ class DropDownButtons {
|
|
|
4435
4494
|
args.element.setAttribute('title', getTooltipTextDropdownItems(item.subCommand.toLocaleLowerCase(), this.locator, formatsLocale));
|
|
4436
4495
|
}
|
|
4437
4496
|
if (item.command === 'Font') {
|
|
4438
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.
|
|
4497
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, fontNameLocale) : item.text);
|
|
4439
4498
|
}
|
|
4440
4499
|
if (item.subCommand === 'BulletFormatList') {
|
|
4441
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.
|
|
4500
|
+
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, bulletFormatListLocale) : item.text);
|
|
4442
4501
|
}
|
|
4443
4502
|
if (item.subCommand === 'NumberFormatList') {
|
|
4444
|
-
args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.
|
|
4503
|
+
args.element.setAttribute('title', (getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale)) !== '' ? getTooltipTextDropdownItems(item.text.toLocaleLowerCase(), this.locator, numberFormatListLocale) : item.text);
|
|
4445
4504
|
}
|
|
4446
4505
|
if (item.subCommand === 'FontSize') {
|
|
4447
4506
|
args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), null, null, this.parent));
|
|
@@ -5242,72 +5301,14 @@ class Toolbar$2 {
|
|
|
5242
5301
|
}
|
|
5243
5302
|
}
|
|
5244
5303
|
toggleFloatClass(e) {
|
|
5245
|
-
let topValue;
|
|
5246
|
-
let isBody = false;
|
|
5247
|
-
let isFloat = false;
|
|
5248
|
-
let scrollParent;
|
|
5249
5304
|
const floatOffset = this.parent.floatingToolbarOffset;
|
|
5250
|
-
if (
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
else if (e && e.target !== document) {
|
|
5254
|
-
scrollParent = e.target;
|
|
5255
|
-
}
|
|
5256
|
-
else {
|
|
5257
|
-
isBody = true;
|
|
5258
|
-
scrollParent = document.body;
|
|
5259
|
-
}
|
|
5260
|
-
const tbHeight = this.getToolbarHeight() + this.getExpandTBarPopHeight();
|
|
5261
|
-
if (this.isTransformChild) {
|
|
5262
|
-
topValue = 0;
|
|
5263
|
-
let scrollParentRelativeTop = 0;
|
|
5264
|
-
const trgHeight = this.parent.element.offsetHeight;
|
|
5265
|
-
if (isBody) {
|
|
5266
|
-
const bodyStyle = window.getComputedStyle(scrollParent);
|
|
5267
|
-
scrollParentRelativeTop = parseFloat(bodyStyle.marginTop.split('px')[0]) + parseFloat(bodyStyle.paddingTop.split('px')[0]);
|
|
5268
|
-
}
|
|
5269
|
-
const targetTop = this.parent.element.getBoundingClientRect().top;
|
|
5270
|
-
const scrollParentYOffset = (Browser.isMSPointer && isBody) ? window.pageYOffset : scrollParent.parentElement.scrollTop;
|
|
5271
|
-
const scrollParentRect = scrollParent.getBoundingClientRect();
|
|
5272
|
-
const scrollParentTop = (!isBody) ? scrollParentRect.top : (scrollParentRect.top + scrollParentYOffset);
|
|
5273
|
-
const outOfRange = ((targetTop - ((!isBody) ? scrollParentTop : 0))
|
|
5274
|
-
+ trgHeight > tbHeight + floatOffset) ? false : true;
|
|
5275
|
-
if (targetTop > (scrollParentTop + floatOffset) || targetTop < -trgHeight || ((targetTop < 0) ? outOfRange : false)) {
|
|
5276
|
-
isFloat = false;
|
|
5277
|
-
removeClass([this.tbElement], [CLS_TB_ABS_FLOAT]);
|
|
5278
|
-
}
|
|
5279
|
-
else if (targetTop < (scrollParentTop + floatOffset)) {
|
|
5280
|
-
if (targetTop < 0) {
|
|
5281
|
-
topValue = (-targetTop) + scrollParentTop;
|
|
5282
|
-
}
|
|
5283
|
-
else {
|
|
5284
|
-
topValue = scrollParentTop - targetTop;
|
|
5285
|
-
}
|
|
5286
|
-
topValue = (isBody) ? topValue - scrollParentRelativeTop : topValue;
|
|
5287
|
-
addClass([this.tbElement], [CLS_TB_ABS_FLOAT]);
|
|
5288
|
-
isFloat = true;
|
|
5289
|
-
}
|
|
5290
|
-
}
|
|
5291
|
-
else {
|
|
5292
|
-
const parent = this.parent.element.getBoundingClientRect();
|
|
5293
|
-
if (window.innerHeight < parent.top) {
|
|
5294
|
-
return;
|
|
5295
|
-
}
|
|
5296
|
-
topValue = (e && e.target !== document) ? scrollParent.getBoundingClientRect().top : 0;
|
|
5297
|
-
if ((parent.bottom < (floatOffset + tbHeight + topValue)) || parent.bottom < 0 || parent.top > floatOffset + topValue) {
|
|
5298
|
-
isFloat = false;
|
|
5299
|
-
}
|
|
5300
|
-
else if (parent.top < floatOffset || parent.top < floatOffset + topValue) {
|
|
5301
|
-
isFloat = true;
|
|
5302
|
-
}
|
|
5303
|
-
}
|
|
5304
|
-
if (!isFloat) {
|
|
5305
|
-
removeClass([this.tbElement], [CLS_TB_FLOAT]);
|
|
5306
|
-
setStyleAttribute(this.tbElement, { top: 0 + 'px', width: '100%' });
|
|
5305
|
+
if (this.parent.toolbarSettings.enableFloating) {
|
|
5306
|
+
addClass([this.tbElement.parentElement], [CLS_TB_FLOAT]);
|
|
5307
|
+
setStyleAttribute(this.tbElement.parentElement, { top: (floatOffset) + 'px' });
|
|
5307
5308
|
}
|
|
5308
5309
|
else {
|
|
5309
|
-
|
|
5310
|
-
setStyleAttribute(this.tbElement, {
|
|
5310
|
+
removeClass([this.tbElement.parentElement], [CLS_TB_FLOAT]);
|
|
5311
|
+
setStyleAttribute(this.tbElement.parentElement, { top: '' });
|
|
5311
5312
|
}
|
|
5312
5313
|
}
|
|
5313
5314
|
renderToolbar() {
|
|
@@ -5613,19 +5614,6 @@ class Toolbar$2 {
|
|
|
5613
5614
|
this.toolbarActionModule.parent = null;
|
|
5614
5615
|
this.dropDownModule.parent = null;
|
|
5615
5616
|
}
|
|
5616
|
-
scrollHandler(e) {
|
|
5617
|
-
if (!this.parent.inlineMode.enable) {
|
|
5618
|
-
if (this.parent.toolbarSettings.enableFloating && this.getDOMVisibility(this.tbElement)) {
|
|
5619
|
-
this.toggleFloatClass(e.args);
|
|
5620
|
-
}
|
|
5621
|
-
}
|
|
5622
|
-
}
|
|
5623
|
-
getDOMVisibility(el) {
|
|
5624
|
-
if (!el.offsetParent && el.offsetWidth === 0 && el.offsetHeight === 0) {
|
|
5625
|
-
return false;
|
|
5626
|
-
}
|
|
5627
|
-
return true;
|
|
5628
|
-
}
|
|
5629
5617
|
mouseDownHandler() {
|
|
5630
5618
|
if (Browser.isDevice && this.parent.inlineMode.enable && !isIDevice()) {
|
|
5631
5619
|
this.showFixedTBar();
|
|
@@ -5662,11 +5650,6 @@ class Toolbar$2 {
|
|
|
5662
5650
|
}
|
|
5663
5651
|
adjustContentHeight(trg, isKeyboard) {
|
|
5664
5652
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNullOrUndefined(trg)) {
|
|
5665
|
-
const extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
5666
|
-
if (!isNullOrUndefined(extendedTbar)) {
|
|
5667
|
-
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
5668
|
-
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
5669
|
-
}
|
|
5670
5653
|
const hasActiveClass = trg.classList.contains('e-nav-active');
|
|
5671
5654
|
const isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
5672
5655
|
if (isExpand) {
|
|
@@ -5675,7 +5658,7 @@ class Toolbar$2 {
|
|
|
5675
5658
|
else {
|
|
5676
5659
|
removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5677
5660
|
}
|
|
5678
|
-
this.parent.setContentHeight('
|
|
5661
|
+
this.parent.setContentHeight('Toolbar', isExpand);
|
|
5679
5662
|
}
|
|
5680
5663
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
5681
5664
|
this.isToolbar = true;
|
|
@@ -5700,7 +5683,6 @@ class Toolbar$2 {
|
|
|
5700
5683
|
this.dropDownModule = new DropDownButtons(this.parent, this.locator);
|
|
5701
5684
|
this.toolbarActionModule = new ToolbarAction(this.parent);
|
|
5702
5685
|
this.parent.on(initialEnd, this.renderToolbar, this);
|
|
5703
|
-
this.parent.on(scroll, this.scrollHandler, this);
|
|
5704
5686
|
this.parent.on(bindOnEnd, this.toolbarBindEvent, this);
|
|
5705
5687
|
this.parent.on(toolbarUpdated, this.updateToolbarStatus, this);
|
|
5706
5688
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
@@ -5725,7 +5707,6 @@ class Toolbar$2 {
|
|
|
5725
5707
|
return;
|
|
5726
5708
|
}
|
|
5727
5709
|
this.parent.off(initialEnd, this.renderToolbar);
|
|
5728
|
-
this.parent.off(scroll, this.scrollHandler);
|
|
5729
5710
|
this.parent.off(bindOnEnd, this.toolbarBindEvent);
|
|
5730
5711
|
this.parent.off(toolbarUpdated, this.updateToolbarStatus);
|
|
5731
5712
|
this.parent.off(modelChanged, this.onPropertyChanged);
|
|
@@ -5760,7 +5741,8 @@ class Toolbar$2 {
|
|
|
5760
5741
|
if (!this.parent.inlineMode.enable) {
|
|
5761
5742
|
this.refreshToolbarOverflow();
|
|
5762
5743
|
}
|
|
5763
|
-
this.parent.
|
|
5744
|
+
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
5745
|
+
this.parent.setContentHeight('Refresh', isExpand);
|
|
5764
5746
|
}
|
|
5765
5747
|
/**
|
|
5766
5748
|
* Called internally if any of the property value changed.
|
|
@@ -5780,6 +5762,11 @@ class Toolbar$2 {
|
|
|
5780
5762
|
}
|
|
5781
5763
|
}
|
|
5782
5764
|
}
|
|
5765
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings)) {
|
|
5766
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings.enableFloating)) {
|
|
5767
|
+
this.toggleFloatClass();
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5783
5770
|
if (e.module !== this.getModuleName()) {
|
|
5784
5771
|
return;
|
|
5785
5772
|
}
|
|
@@ -6279,7 +6266,7 @@ class BaseQuickToolbar {
|
|
|
6279
6266
|
constructor(parent, locator) {
|
|
6280
6267
|
this.parent = parent;
|
|
6281
6268
|
this.locator = locator;
|
|
6282
|
-
this.
|
|
6269
|
+
this.isRendered = false;
|
|
6283
6270
|
this.renderFactory = this.locator.getService('rendererFactory');
|
|
6284
6271
|
this.contentRenderer = this.renderFactory.getRenderer(RenderType.Content);
|
|
6285
6272
|
this.popupRenderer = this.renderFactory.getRenderer(RenderType.Popup);
|
|
@@ -6343,7 +6330,18 @@ class BaseQuickToolbar {
|
|
|
6343
6330
|
e.target.classList.contains('e-imgbreak')) ? false : true;
|
|
6344
6331
|
let target = !isNullOrUndefined(imgWrapper) ? imgWrapper : e.target;
|
|
6345
6332
|
addClass([this.toolbarElement], [CLS_RM_WHITE_SPACE]);
|
|
6346
|
-
|
|
6333
|
+
let targetOffsetTop;
|
|
6334
|
+
if (!isNullOrUndefined(closest(target, 'table'))) {
|
|
6335
|
+
targetOffsetTop = target.offsetTop;
|
|
6336
|
+
let parentTable = closest(target, 'table');
|
|
6337
|
+
while (!isNullOrUndefined(parentTable)) {
|
|
6338
|
+
targetOffsetTop += parentTable.offsetTop;
|
|
6339
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
6340
|
+
}
|
|
6341
|
+
}
|
|
6342
|
+
else {
|
|
6343
|
+
targetOffsetTop = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetTop : target.offsetTop;
|
|
6344
|
+
}
|
|
6347
6345
|
const parentOffsetTop = window.pageYOffset + e.parentData.top;
|
|
6348
6346
|
if ((targetOffsetTop - e.editTop) > e.popHeight) {
|
|
6349
6347
|
y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) - e.popHeight - 5;
|
|
@@ -6355,11 +6353,30 @@ class BaseQuickToolbar {
|
|
|
6355
6353
|
y = e.y;
|
|
6356
6354
|
}
|
|
6357
6355
|
target = isAligned ? e.target : target;
|
|
6358
|
-
|
|
6359
|
-
|
|
6356
|
+
let targetOffsetLeft;
|
|
6357
|
+
let currentOffsetWidth;
|
|
6358
|
+
if (!isNullOrUndefined(closest(target, 'table'))) {
|
|
6359
|
+
targetOffsetLeft = target.offsetLeft;
|
|
6360
|
+
let parentTable = closest(target, 'table');
|
|
6361
|
+
let checkOffSetParentWidth = false;
|
|
6362
|
+
if (!isNullOrUndefined(closest(parentTable, 'TD'))) {
|
|
6363
|
+
checkOffSetParentWidth = true;
|
|
6364
|
+
}
|
|
6365
|
+
while (!isNullOrUndefined(parentTable)) {
|
|
6366
|
+
targetOffsetLeft += parentTable.offsetLeft;
|
|
6367
|
+
currentOffsetWidth = checkOffSetParentWidth ? parentTable.offsetWidth : target.offsetWidth;
|
|
6368
|
+
parentTable = closest(parentTable.parentElement, 'table');
|
|
6369
|
+
}
|
|
6360
6370
|
}
|
|
6361
6371
|
else {
|
|
6362
|
-
|
|
6372
|
+
currentOffsetWidth = target.offsetWidth;
|
|
6373
|
+
targetOffsetLeft = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetLeft : target.offsetLeft;
|
|
6374
|
+
}
|
|
6375
|
+
if (currentOffsetWidth > e.popWidth) {
|
|
6376
|
+
x = (currentOffsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + targetOffsetLeft;
|
|
6377
|
+
}
|
|
6378
|
+
else {
|
|
6379
|
+
x = e.parentData.left + targetOffsetLeft;
|
|
6363
6380
|
}
|
|
6364
6381
|
this.popupObj.position.X = ((x + e.popWidth) > e.parentData.right) ? e.parentData.right - e.popWidth : x;
|
|
6365
6382
|
this.popupObj.position.Y = (y >= 0) ? y : e.y + 5;
|
|
@@ -6496,7 +6513,8 @@ class BaseQuickToolbar {
|
|
|
6496
6513
|
openDelay: 400,
|
|
6497
6514
|
showTipPointer: true,
|
|
6498
6515
|
windowCollision: true,
|
|
6499
|
-
position: 'BottomCenter'
|
|
6516
|
+
position: 'BottomCenter',
|
|
6517
|
+
cssClass: this.parent.getCssClass()
|
|
6500
6518
|
});
|
|
6501
6519
|
this.tooltip.appendTo(this.element);
|
|
6502
6520
|
}
|
|
@@ -6530,7 +6548,7 @@ class BaseQuickToolbar {
|
|
|
6530
6548
|
parentData: parent.getBoundingClientRect(),
|
|
6531
6549
|
tBarElementHeight: tBarHeight
|
|
6532
6550
|
};
|
|
6533
|
-
if ((target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
6551
|
+
if ((closest(target, 'TABLE') || target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
|
|
6534
6552
|
(target.classList.contains(CLS_AUDIOWRAP) || target.classList.contains(CLS_CLICKELEM) ||
|
|
6535
6553
|
target.classList.contains(CLS_VID_CLICK_ELEM)))) && (x == beforeQuickToolbarArgs.positionX || y == beforeQuickToolbarArgs.positionY)) {
|
|
6536
6554
|
this.setPosition(showPopupData);
|
|
@@ -6550,7 +6568,7 @@ class BaseQuickToolbar {
|
|
|
6550
6568
|
maxWidth: window.outerWidth + 'px'
|
|
6551
6569
|
});
|
|
6552
6570
|
addClass([this.element], [CLS_POP]);
|
|
6553
|
-
this.
|
|
6571
|
+
this.isRendered = true;
|
|
6554
6572
|
}
|
|
6555
6573
|
});
|
|
6556
6574
|
}
|
|
@@ -6590,7 +6608,7 @@ class BaseQuickToolbar {
|
|
|
6590
6608
|
this.parent.notify(destroyTooltip, { args: event });
|
|
6591
6609
|
}
|
|
6592
6610
|
this.removeEleFromDOM();
|
|
6593
|
-
this.
|
|
6611
|
+
this.isRendered = false;
|
|
6594
6612
|
}
|
|
6595
6613
|
/**
|
|
6596
6614
|
* @param {string} item - specifies the string value
|
|
@@ -6613,7 +6631,7 @@ class BaseQuickToolbar {
|
|
|
6613
6631
|
}
|
|
6614
6632
|
removeEleFromDOM() {
|
|
6615
6633
|
const element = this.popupObj.element;
|
|
6616
|
-
if (this.
|
|
6634
|
+
if (this.isRendered) {
|
|
6617
6635
|
this.dropDownButtons.destroyDropDowns();
|
|
6618
6636
|
this.colorPickerObj.destroyColorPicker();
|
|
6619
6637
|
removeClass([this.element], [CLS_POP]);
|
|
@@ -7024,6 +7042,9 @@ class QuickToolbar {
|
|
|
7024
7042
|
}
|
|
7025
7043
|
}
|
|
7026
7044
|
if (!isNullOrUndefined(this.textQTBar) && !isNullOrUndefined(this.parent.quickToolbarSettings.text) && !this.parent.inlineMode.enable) {
|
|
7045
|
+
if (!isNullOrUndefined(e) && !isNullOrUndefined(e.name) && e.name === 'sourceCodeMouseDown') {
|
|
7046
|
+
return;
|
|
7047
|
+
}
|
|
7027
7048
|
const args = e.args.touches ?
|
|
7028
7049
|
e.args.changedTouches[0] : e.args;
|
|
7029
7050
|
const target = e.args.target;
|
|
@@ -7034,7 +7055,7 @@ class QuickToolbar {
|
|
|
7034
7055
|
this.offsetY = pageYOffset(args, this.parent.element, this.parent.iframeSettings.enable);
|
|
7035
7056
|
const range = this.parent.getRange();
|
|
7036
7057
|
if ((range.endContainer.parentElement.tagName === range.startContainer.parentElement.tagName && (range.startContainer.parentElement.tagName === 'A' && range.endContainer.parentElement.tagName === 'A')) ||
|
|
7037
|
-
(target.tagName === 'IMG') || (target.tagName === 'VIDEO') || (target.tagName === 'AUDIO') || (target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
|
|
7058
|
+
(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')) ||
|
|
7038
7059
|
(this.parent.getRange().startOffset === this.parent.getRange().endOffset)) {
|
|
7039
7060
|
return;
|
|
7040
7061
|
}
|
|
@@ -7042,13 +7063,16 @@ class QuickToolbar {
|
|
|
7042
7063
|
this.textQTBar.showPopup(this.offsetX, this.offsetY, target, 'text');
|
|
7043
7064
|
}
|
|
7044
7065
|
}
|
|
7045
|
-
keyDownHandler() {
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
this.
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7066
|
+
keyDownHandler(e) {
|
|
7067
|
+
const preventHide = e.args.altKey;
|
|
7068
|
+
if (!preventHide) {
|
|
7069
|
+
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
7070
|
+
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
7071
|
+
this.hideInlineQTBar();
|
|
7072
|
+
}
|
|
7073
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
7074
|
+
this.textQTBar.hidePopup();
|
|
7075
|
+
}
|
|
7052
7076
|
}
|
|
7053
7077
|
}
|
|
7054
7078
|
inlineQTBarMouseDownHandler() {
|
|
@@ -7374,6 +7398,15 @@ class QuickToolbar {
|
|
|
7374
7398
|
getModuleName() {
|
|
7375
7399
|
return 'quickToolbar';
|
|
7376
7400
|
}
|
|
7401
|
+
/**
|
|
7402
|
+
*
|
|
7403
|
+
* @returns {BaseQuickToolbar[]} - specifies the quick toolbar instance.
|
|
7404
|
+
* @hidden
|
|
7405
|
+
* @private
|
|
7406
|
+
*/
|
|
7407
|
+
getQuickToolbarInstance() {
|
|
7408
|
+
return [this.linkQTBar, this.imageQTBar, this.audioQTBar, this.videoQTBar, this.tableQTBar, this.textQTBar, this.inlineQTBar];
|
|
7409
|
+
}
|
|
7377
7410
|
}
|
|
7378
7411
|
|
|
7379
7412
|
/**
|
|
@@ -9645,6 +9678,17 @@ const selfClosingTags = [
|
|
|
9645
9678
|
'BR',
|
|
9646
9679
|
'IMG'
|
|
9647
9680
|
];
|
|
9681
|
+
/**
|
|
9682
|
+
* Resize factor for image.
|
|
9683
|
+
* @hidden
|
|
9684
|
+
*
|
|
9685
|
+
*/
|
|
9686
|
+
const imageResizeFactor = {
|
|
9687
|
+
topLeft: [-1, -1],
|
|
9688
|
+
topRight: [1, -1],
|
|
9689
|
+
botRight: [1, 1],
|
|
9690
|
+
botLeft: [-1, 1]
|
|
9691
|
+
};
|
|
9648
9692
|
|
|
9649
9693
|
/**
|
|
9650
9694
|
* `Undo` module is used to handle undo actions.
|
|
@@ -10578,7 +10622,9 @@ class MarkdownEditor {
|
|
|
10578
10622
|
onToolbarClick(args) {
|
|
10579
10623
|
const item = args.item;
|
|
10580
10624
|
const textArea = this.parent.contentModule.getEditPanel();
|
|
10581
|
-
|
|
10625
|
+
if (item.command !== 'Formats') {
|
|
10626
|
+
textArea.focus();
|
|
10627
|
+
}
|
|
10582
10628
|
const startOffset = textArea.selectionStart;
|
|
10583
10629
|
const endOffset = textArea.selectionEnd;
|
|
10584
10630
|
const text = textArea.value.substring(startOffset, endOffset);
|
|
@@ -11809,7 +11855,8 @@ class DOMNode {
|
|
|
11809
11855
|
}
|
|
11810
11856
|
}
|
|
11811
11857
|
else {
|
|
11812
|
-
|
|
11858
|
+
let tagName = !isNullOrUndefined(start.parentElement) ? start.parentElement.tagName.toLocaleLowerCase() : '';
|
|
11859
|
+
if (start.tagName === 'IMG' && tagName !== 'p' && tagName !== 'div') {
|
|
11813
11860
|
const parNode = document.createElement('p');
|
|
11814
11861
|
start.parentElement.insertBefore(parNode, start);
|
|
11815
11862
|
parNode.appendChild(start);
|
|
@@ -11899,11 +11946,12 @@ class DOMNode {
|
|
|
11899
11946
|
/**
|
|
11900
11947
|
* blockNodes method
|
|
11901
11948
|
*
|
|
11949
|
+
* @param {boolean} action - Optional Boolean that specifies the action is whether performed.
|
|
11902
11950
|
* @returns {Node[]} - returns the node array values
|
|
11903
11951
|
* @hidden
|
|
11904
11952
|
* @deprecated
|
|
11905
11953
|
*/
|
|
11906
|
-
blockNodes() {
|
|
11954
|
+
blockNodes(action) {
|
|
11907
11955
|
const collectionNodes = [];
|
|
11908
11956
|
const selection = this.getSelection();
|
|
11909
11957
|
if (this.isEditorArea() && selection.rangeCount) {
|
|
@@ -11917,23 +11965,46 @@ class DOMNode {
|
|
|
11917
11965
|
collectionNodes.push(startNode);
|
|
11918
11966
|
}
|
|
11919
11967
|
parentNode = this.blockParentNode(startNode);
|
|
11968
|
+
const endParentNode = this.blockParentNode(endNode);
|
|
11920
11969
|
if (parentNode && collectionNodes.indexOf(parentNode) < 0) {
|
|
11921
|
-
if (
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11970
|
+
if (!isNullOrUndefined(action) && action) {
|
|
11971
|
+
if (range.commonAncestorContainer.nodeName === 'TD' || parentNode.nodeName === 'TD' || endParentNode.nodeName === 'TD') {
|
|
11972
|
+
const processedNodes = this.getPreBlockNodeCollection(range);
|
|
11973
|
+
if (processedNodes.length > 1) {
|
|
11974
|
+
this.wrapWithBlockNode(processedNodes, collectionNodes);
|
|
11975
|
+
}
|
|
11976
|
+
else if (processedNodes.length > 0) {
|
|
11977
|
+
if (startNode !== endNode && startNode.nodeName !== 'BR') {
|
|
11978
|
+
collectionNodes.push(this.createTempNode(startNode));
|
|
11979
|
+
}
|
|
11980
|
+
else if (startNode === endNode && startNode.nodeName === 'SPAN' && (startNode.classList.contains(markerClassName.startSelection)
|
|
11981
|
+
|| startNode.classList.contains(markerClassName.endSelection))) {
|
|
11982
|
+
collectionNodes.push(this.createTempNode(startNode));
|
|
11983
|
+
}
|
|
11984
|
+
}
|
|
11930
11985
|
}
|
|
11931
11986
|
else {
|
|
11932
|
-
collectionNodes.push(
|
|
11987
|
+
collectionNodes.push(parentNode);
|
|
11933
11988
|
}
|
|
11934
11989
|
}
|
|
11935
11990
|
else {
|
|
11936
|
-
|
|
11991
|
+
if (IGNORE_BLOCK_TAGS.indexOf(parentNode.tagName.toLocaleLowerCase()) >= 0 && (startNode.tagName === 'BR' ||
|
|
11992
|
+
startNode.nodeType === Node.TEXT_NODE ||
|
|
11993
|
+
startNode.classList.contains(markerClassName.startSelection) ||
|
|
11994
|
+
startNode.classList.contains(markerClassName.endSelection))) {
|
|
11995
|
+
const tempNode = startNode.previousSibling &&
|
|
11996
|
+
startNode.previousSibling.nodeType === Node.TEXT_NODE ?
|
|
11997
|
+
startNode.previousSibling : startNode;
|
|
11998
|
+
if (!startNode.nextSibling && !startNode.previousSibling && startNode.tagName === 'BR') {
|
|
11999
|
+
collectionNodes.push(tempNode);
|
|
12000
|
+
}
|
|
12001
|
+
else {
|
|
12002
|
+
collectionNodes.push(this.createTempNode(tempNode));
|
|
12003
|
+
}
|
|
12004
|
+
}
|
|
12005
|
+
else {
|
|
12006
|
+
collectionNodes.push(parentNode);
|
|
12007
|
+
}
|
|
11937
12008
|
}
|
|
11938
12009
|
}
|
|
11939
12010
|
const nodes = [];
|
|
@@ -12002,6 +12073,131 @@ class DOMNode {
|
|
|
12002
12073
|
ignoreTableTag(element) {
|
|
12003
12074
|
return !(TABLE_BLOCK_TAGS.indexOf(element.tagName.toLocaleLowerCase()) >= 0);
|
|
12004
12075
|
}
|
|
12076
|
+
getPreBlockNodeCollection(range) {
|
|
12077
|
+
const startNode = this.getSelectedNode(range.startContainer, range.startOffset);
|
|
12078
|
+
const endNode = this.getSelectedNode(range.endContainer, range.endOffset);
|
|
12079
|
+
const nodes = [];
|
|
12080
|
+
const rootNode = startNode.closest('td, th');
|
|
12081
|
+
if (isNullOrUndefined(rootNode)) {
|
|
12082
|
+
return nodes;
|
|
12083
|
+
}
|
|
12084
|
+
const rootChildNode = Array.from(rootNode.childNodes);
|
|
12085
|
+
let isContinue = true;
|
|
12086
|
+
const processedStart = this.getClosestInlineParent(startNode, rootNode, true);
|
|
12087
|
+
const processedEnd = this.getClosestInlineParent(endNode, rootNode, false);
|
|
12088
|
+
for (let i = 0; i < rootChildNode.length; i++) {
|
|
12089
|
+
const child = rootChildNode[i];
|
|
12090
|
+
if (processedStart === processedEnd && child === processedStart) {
|
|
12091
|
+
nodes.push(child);
|
|
12092
|
+
isContinue = true;
|
|
12093
|
+
}
|
|
12094
|
+
else if (child === processedStart) {
|
|
12095
|
+
isContinue = false;
|
|
12096
|
+
}
|
|
12097
|
+
else if (child === processedEnd) {
|
|
12098
|
+
nodes.push(child); // Early Exit so Push the end node.
|
|
12099
|
+
isContinue = true;
|
|
12100
|
+
}
|
|
12101
|
+
if (isContinue) {
|
|
12102
|
+
continue;
|
|
12103
|
+
}
|
|
12104
|
+
else {
|
|
12105
|
+
nodes.push(child);
|
|
12106
|
+
}
|
|
12107
|
+
}
|
|
12108
|
+
return nodes;
|
|
12109
|
+
}
|
|
12110
|
+
getClosestInlineParent(node, rootNode, isStart) {
|
|
12111
|
+
// 1. If the node is a text node, return the node
|
|
12112
|
+
// 2. If the node is a block node return block node
|
|
12113
|
+
// 3. If the node is a inline node,
|
|
12114
|
+
// Traverse back untill the TD or TH node
|
|
12115
|
+
// Check if the the previous sibling , next sibling is a block node.
|
|
12116
|
+
// If yes return the inline node that is closest to the block node.
|
|
12117
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
12118
|
+
return node;
|
|
12119
|
+
}
|
|
12120
|
+
if (this.isBlockNode(node)) {
|
|
12121
|
+
return node;
|
|
12122
|
+
}
|
|
12123
|
+
let currentNode = node;
|
|
12124
|
+
let rootFlag = false;
|
|
12125
|
+
while (currentNode) {
|
|
12126
|
+
const previousNode = currentNode;
|
|
12127
|
+
if (rootFlag) {
|
|
12128
|
+
if (this.isBlockNode(currentNode)) {
|
|
12129
|
+
return previousNode;
|
|
12130
|
+
}
|
|
12131
|
+
if (isStart && currentNode.previousSibling) {
|
|
12132
|
+
if (this.isBlockNode(currentNode.previousSibling) || currentNode.previousSibling.nodeName === 'BR') {
|
|
12133
|
+
return previousNode;
|
|
12134
|
+
}
|
|
12135
|
+
else {
|
|
12136
|
+
currentNode = currentNode.previousSibling;
|
|
12137
|
+
}
|
|
12138
|
+
}
|
|
12139
|
+
else if (!isStart && currentNode.nextSibling) {
|
|
12140
|
+
if (this.isBlockNode(currentNode.nextSibling) || currentNode.nextSibling.nodeName === 'BR') {
|
|
12141
|
+
return previousNode;
|
|
12142
|
+
}
|
|
12143
|
+
else {
|
|
12144
|
+
currentNode = currentNode.nextSibling;
|
|
12145
|
+
}
|
|
12146
|
+
}
|
|
12147
|
+
else {
|
|
12148
|
+
return currentNode;
|
|
12149
|
+
}
|
|
12150
|
+
}
|
|
12151
|
+
else {
|
|
12152
|
+
currentNode = currentNode.parentElement;
|
|
12153
|
+
if (currentNode === rootNode) {
|
|
12154
|
+
currentNode = previousNode;
|
|
12155
|
+
rootFlag = true;
|
|
12156
|
+
}
|
|
12157
|
+
}
|
|
12158
|
+
}
|
|
12159
|
+
return null;
|
|
12160
|
+
}
|
|
12161
|
+
wrapWithBlockNode(nodes, collectionNodes) {
|
|
12162
|
+
let wrapperElement = createElement('p');
|
|
12163
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
12164
|
+
const child = nodes[i];
|
|
12165
|
+
if (child.nodeName === 'BR') {
|
|
12166
|
+
child.parentNode.insertBefore(wrapperElement, child);
|
|
12167
|
+
wrapperElement.appendChild(child);
|
|
12168
|
+
if (wrapperElement.childNodes.length > 0) {
|
|
12169
|
+
collectionNodes.push(wrapperElement);
|
|
12170
|
+
}
|
|
12171
|
+
wrapperElement = createElement('p');
|
|
12172
|
+
}
|
|
12173
|
+
else {
|
|
12174
|
+
if (!this.isBlockNode(child)) {
|
|
12175
|
+
if (child.nodeName === '#text' && child.textContent.trim() === '') {
|
|
12176
|
+
continue;
|
|
12177
|
+
}
|
|
12178
|
+
if (wrapperElement.childElementCount === 0) {
|
|
12179
|
+
child.parentNode.insertBefore(wrapperElement, child);
|
|
12180
|
+
wrapperElement.appendChild(child);
|
|
12181
|
+
}
|
|
12182
|
+
else {
|
|
12183
|
+
wrapperElement.appendChild(child);
|
|
12184
|
+
}
|
|
12185
|
+
}
|
|
12186
|
+
else {
|
|
12187
|
+
collectionNodes.push(child);
|
|
12188
|
+
}
|
|
12189
|
+
// Use case when the BR is next sibling but the BR is not the part of selection.
|
|
12190
|
+
if ((i === nodes.length - 1) && wrapperElement.nextElementSibling &&
|
|
12191
|
+
wrapperElement.querySelectorAll('br').length === 0 &&
|
|
12192
|
+
wrapperElement.nextElementSibling.nodeName === 'BR') {
|
|
12193
|
+
wrapperElement.appendChild(wrapperElement.nextElementSibling);
|
|
12194
|
+
}
|
|
12195
|
+
}
|
|
12196
|
+
}
|
|
12197
|
+
if (wrapperElement.childNodes.length > 0 && collectionNodes.indexOf(wrapperElement) < 0) {
|
|
12198
|
+
collectionNodes.push(wrapperElement);
|
|
12199
|
+
}
|
|
12200
|
+
}
|
|
12005
12201
|
}
|
|
12006
12202
|
|
|
12007
12203
|
/**
|
|
@@ -12113,7 +12309,8 @@ class Lists {
|
|
|
12113
12309
|
startNode.textContent = '';
|
|
12114
12310
|
}
|
|
12115
12311
|
const startNodeParent = startNode.parentElement;
|
|
12116
|
-
|
|
12312
|
+
const parentOfCurrentOLUL = startNodeParent.parentElement;
|
|
12313
|
+
if (isNullOrUndefined(parentOfCurrentOLUL.closest('UL')) && isNullOrUndefined(parentOfCurrentOLUL.closest('OL'))) {
|
|
12117
12314
|
if (!isNullOrUndefined(startNode.nextElementSibling)) {
|
|
12118
12315
|
const nearBlockNode = this.parent.domNode.blockParentNode(startNode);
|
|
12119
12316
|
this.parent.nodeCutter.GetSpliceNode(range, nearBlockNode);
|
|
@@ -12140,6 +12337,15 @@ class Lists {
|
|
|
12140
12337
|
detach(startNode);
|
|
12141
12338
|
}
|
|
12142
12339
|
}
|
|
12340
|
+
// To handle the nested enter key press in the list for the first LI element
|
|
12341
|
+
if (!isNullOrUndefined(parentOfCurrentOLUL) && (!isNullOrUndefined(parentOfCurrentOLUL.closest('UL')) || !isNullOrUndefined(parentOfCurrentOLUL.closest('OL'))) &&
|
|
12342
|
+
parentOfCurrentOLUL.nodeName === 'LI' && parentOfCurrentOLUL.style.listStyleType === 'none' &&
|
|
12343
|
+
parentOfCurrentOLUL.textContent === '' && startNode.textContent === '' && startNode === startNodeParent.firstElementChild &&
|
|
12344
|
+
isNullOrUndefined(startNode.nextSibling)) {
|
|
12345
|
+
detach(startNodeParent);
|
|
12346
|
+
parentOfCurrentOLUL.style.removeProperty('list-style-type');
|
|
12347
|
+
e.event.preventDefault();
|
|
12348
|
+
}
|
|
12143
12349
|
}
|
|
12144
12350
|
}
|
|
12145
12351
|
backspaceList(e) {
|
|
@@ -12513,7 +12719,7 @@ class Lists {
|
|
|
12513
12719
|
this.currentAction = e.subCommand;
|
|
12514
12720
|
this.currentAction = e.subCommand = this.currentAction === 'NumberFormatList' ? 'OL' : this.currentAction === 'BulletFormatList' ? 'UL' : this.currentAction;
|
|
12515
12721
|
this.domNode.setMarker(this.saveSelection);
|
|
12516
|
-
let listsNodes = this.domNode.blockNodes();
|
|
12722
|
+
let listsNodes = this.domNode.blockNodes(true);
|
|
12517
12723
|
if (e.enterAction === 'BR') {
|
|
12518
12724
|
this.setSelectionBRConfig();
|
|
12519
12725
|
const allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
|
|
@@ -12627,6 +12833,17 @@ class Lists {
|
|
|
12627
12833
|
listEle.innerHTML = '<li><br/></li>';
|
|
12628
12834
|
elements[i].appendChild(listEle);
|
|
12629
12835
|
}
|
|
12836
|
+
else if ('LI' !== elements[i].tagName && isNullOrUndefined(item) &&
|
|
12837
|
+
elements[i].nodeName === 'BLOCKQUOTE') {
|
|
12838
|
+
const elemAtt = this.domNode.attributes(elements[i]);
|
|
12839
|
+
const openTag = '<' + type + '>';
|
|
12840
|
+
const closeTag = '</' + type + '>';
|
|
12841
|
+
const newTag = 'li' + elemAtt;
|
|
12842
|
+
const replaceHTML = elements[i].innerHTML;
|
|
12843
|
+
const innerHTML = this.domNode.createTagString(newTag, null, replaceHTML);
|
|
12844
|
+
const collectionString = openTag + innerHTML + closeTag;
|
|
12845
|
+
elements[i].innerHTML = collectionString;
|
|
12846
|
+
}
|
|
12630
12847
|
else if ('LI' !== elements[i].tagName && isNullOrUndefined(item)) {
|
|
12631
12848
|
const elemAtt = elements[i].tagName === 'IMG' ? '' : this.domNode.attributes(elements[i]);
|
|
12632
12849
|
const openTag = '<' + type + '>';
|
|
@@ -12717,8 +12934,17 @@ class Lists {
|
|
|
12717
12934
|
}
|
|
12718
12935
|
cleanNode() {
|
|
12719
12936
|
const liParents = this.parent.editableElement.querySelectorAll('ol + ol, ul + ul');
|
|
12937
|
+
let listStyleType;
|
|
12938
|
+
let firstNodeOL;
|
|
12720
12939
|
for (let c = 0; c < liParents.length; c++) {
|
|
12721
12940
|
const node = liParents[c];
|
|
12941
|
+
let toFindtopOlUl = true;
|
|
12942
|
+
if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
|
|
12943
|
+
toFindtopOlUl = false;
|
|
12944
|
+
const preElement = liParents[c].parentElement.parentElement;
|
|
12945
|
+
listStyleType = preElement.style.listStyleType;
|
|
12946
|
+
firstNodeOL = node.previousElementSibling;
|
|
12947
|
+
}
|
|
12722
12948
|
if (this.domNode.isList(node.previousElementSibling) &&
|
|
12723
12949
|
this.domNode.openTagString(node) === this.domNode.openTagString(node.previousElementSibling)) {
|
|
12724
12950
|
const contentNodes = this.domNode.contents(node);
|
|
@@ -12733,6 +12959,9 @@ class Lists {
|
|
|
12733
12959
|
}
|
|
12734
12960
|
}
|
|
12735
12961
|
}
|
|
12962
|
+
if (firstNodeOL) {
|
|
12963
|
+
firstNodeOL.style.listStyleType = listStyleType;
|
|
12964
|
+
}
|
|
12736
12965
|
}
|
|
12737
12966
|
findUnSelected(temp, elements) {
|
|
12738
12967
|
temp = temp.slice().reverse();
|
|
@@ -13413,7 +13642,7 @@ class Formats {
|
|
|
13413
13642
|
}
|
|
13414
13643
|
let save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
|
|
13415
13644
|
this.parent.domNode.setMarker(save);
|
|
13416
|
-
let formatsNodes = this.parent.domNode.blockNodes();
|
|
13645
|
+
let formatsNodes = this.parent.domNode.blockNodes(true);
|
|
13417
13646
|
if (e.enterAction === 'BR') {
|
|
13418
13647
|
this.setSelectionBRConfig();
|
|
13419
13648
|
const allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
|
|
@@ -13630,6 +13859,10 @@ class InsertHtml {
|
|
|
13630
13859
|
const isCollapsed = range.collapsed;
|
|
13631
13860
|
const nodes = this.getNodeCollection(range, nodeSelection, node);
|
|
13632
13861
|
const closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
|
|
13862
|
+
if (closestParentNode && closestParentNode.nodeName === 'LI' && node.nodeName.toLowerCase() === 'table') {
|
|
13863
|
+
this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
|
|
13864
|
+
return;
|
|
13865
|
+
}
|
|
13633
13866
|
if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
|
|
13634
13867
|
node.classList.contains('pasteContent'))) {
|
|
13635
13868
|
this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
|
|
@@ -14125,6 +14358,9 @@ class InsertHtml {
|
|
|
14125
14358
|
}
|
|
14126
14359
|
static closestEle(element, editNode) {
|
|
14127
14360
|
let el = element;
|
|
14361
|
+
if (closest(el, 'li')) {
|
|
14362
|
+
return closest(el, 'li');
|
|
14363
|
+
}
|
|
14128
14364
|
while (el && el.nodeType === 1) {
|
|
14129
14365
|
if (el.parentNode === editNode ||
|
|
14130
14366
|
(!isNullOrUndefined(el.parentNode.tagName) &&
|
|
@@ -14135,6 +14371,30 @@ class InsertHtml {
|
|
|
14135
14371
|
}
|
|
14136
14372
|
return null;
|
|
14137
14373
|
}
|
|
14374
|
+
static insertTableInList(range, insertNode, parentNode, currentNode, nodeCutter) {
|
|
14375
|
+
if (range.collapsed) {
|
|
14376
|
+
const isStart = range.startOffset === 0;
|
|
14377
|
+
const isEnd = range.startContainer.textContent.trimEnd().length === range.startOffset;
|
|
14378
|
+
if (isStart || isEnd) {
|
|
14379
|
+
if (isStart) {
|
|
14380
|
+
InsertMethods.AppendBefore(insertNode, currentNode, false);
|
|
14381
|
+
}
|
|
14382
|
+
else {
|
|
14383
|
+
InsertMethods.AppendBefore(insertNode, currentNode, true);
|
|
14384
|
+
}
|
|
14385
|
+
}
|
|
14386
|
+
else {
|
|
14387
|
+
const preNode = nodeCutter.SplitNode(range, parentNode, true);
|
|
14388
|
+
const sibNode = preNode.previousSibling;
|
|
14389
|
+
sibNode.appendChild(insertNode);
|
|
14390
|
+
}
|
|
14391
|
+
}
|
|
14392
|
+
else {
|
|
14393
|
+
range.deleteContents();
|
|
14394
|
+
parentNode.appendChild(insertNode);
|
|
14395
|
+
}
|
|
14396
|
+
insertNode.classList.add('ignore-table');
|
|
14397
|
+
}
|
|
14138
14398
|
}
|
|
14139
14399
|
/**
|
|
14140
14400
|
* Insert method
|
|
@@ -14340,7 +14600,7 @@ class LinkCommand {
|
|
|
14340
14600
|
for (let i = 0, j = 0, k = 0; i <= finalinlineNodes.length; i++) {
|
|
14341
14601
|
if (i === 0) {
|
|
14342
14602
|
finalinlineNodes[i].parentNode.insertBefore(anchorNodes[j], finalinlineNodes[i].nextSibling);
|
|
14343
|
-
if (this.parent.domNode.blockNodes().length === 1) {
|
|
14603
|
+
if (this.parent.domNode.blockNodes().length === 1 && anchorNodes.length === 1) {
|
|
14344
14604
|
this.parent.nodeSelection.setSelectionNode(this.parent.currentDocument, anchorNodes[j]);
|
|
14345
14605
|
}
|
|
14346
14606
|
removeNodes[k] = finalinlineNodes[i];
|
|
@@ -14797,21 +15057,18 @@ class ImageCommand {
|
|
|
14797
15057
|
const selectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0];
|
|
14798
15058
|
const imgElm = (e.value === 'Replace' || isReplaced) ? e.item.selectParent[0] :
|
|
14799
15059
|
(Browser.isIE ? selectedNode.previousSibling : selectedNode.previousElementSibling);
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
}
|
|
14811
|
-
|
|
14812
|
-
if (e.value === 'Replace') {
|
|
14813
|
-
e.item.subCommand = 'Replace';
|
|
14814
|
-
this.callBack(e);
|
|
15060
|
+
let imageInstance = this;
|
|
15061
|
+
const onImageLoadEvent = () => {
|
|
15062
|
+
e.callBack({
|
|
15063
|
+
requestType: (e.value === 'Replace') ? (e.item.subCommand = 'Replace', "Replace") : 'Images',
|
|
15064
|
+
editorMode: 'HTML',
|
|
15065
|
+
event: e.event,
|
|
15066
|
+
range: imageInstance.parent.nodeSelection.getRange(imageInstance.parent.currentDocument),
|
|
15067
|
+
elements: [imgElm]
|
|
15068
|
+
});
|
|
15069
|
+
imgElm.removeEventListener('load', onImageLoadEvent);
|
|
15070
|
+
};
|
|
15071
|
+
imgElm.addEventListener('load', onImageLoadEvent);
|
|
14815
15072
|
}
|
|
14816
15073
|
}
|
|
14817
15074
|
setStyle(imgElement, e, imgReplace) {
|
|
@@ -15523,7 +15780,7 @@ class TableCommand {
|
|
|
15523
15780
|
e.item.selection.restore();
|
|
15524
15781
|
InsertHtml.Insert(this.parent.currentDocument, table, this.parent.editableElement);
|
|
15525
15782
|
e.item.selection.setSelectionText(this.parent.currentDocument, table.querySelector('td'), table.querySelector('td'), 0, 0);
|
|
15526
|
-
if (table.nextElementSibling === null) {
|
|
15783
|
+
if (table.nextElementSibling === null && !table.classList.contains('ignore-table')) {
|
|
15527
15784
|
let insertElem;
|
|
15528
15785
|
if (e.enterAction === 'DIV') {
|
|
15529
15786
|
insertElem = createElement('div');
|
|
@@ -15538,6 +15795,9 @@ class TableCommand {
|
|
|
15538
15795
|
}
|
|
15539
15796
|
this.insertAfter(insertElem, table);
|
|
15540
15797
|
}
|
|
15798
|
+
if (table.classList.contains('ignore-table')) {
|
|
15799
|
+
table.classList.remove('ignore-table');
|
|
15800
|
+
}
|
|
15541
15801
|
table.querySelector('td').classList.add('e-cell-select');
|
|
15542
15802
|
if (e.callBack) {
|
|
15543
15803
|
e.callBack({
|
|
@@ -15957,10 +16217,22 @@ class TableCommand {
|
|
|
15957
16217
|
firstCell.setAttribute('rowspan', (minMaxIndexes.endRow - minMaxIndexes.startRow + 1).toString());
|
|
15958
16218
|
}
|
|
15959
16219
|
let totalWidth = 0;
|
|
16220
|
+
let unit;
|
|
15960
16221
|
for (let j = rowSelectedCells.length - 1; j >= 0; j--) {
|
|
15961
|
-
|
|
16222
|
+
if (!isNullOrUndefined(rowSelectedCells[j].style.width)
|
|
16223
|
+
&& rowSelectedCells[j].style.width !== '') {
|
|
16224
|
+
if (!unit) {
|
|
16225
|
+
const match = rowSelectedCells[j].style.width.match(/^([\d.]+)([a-z%]+)$/i);
|
|
16226
|
+
unit = match ? match[2] : '%';
|
|
16227
|
+
}
|
|
16228
|
+
totalWidth = totalWidth + parseFloat(rowSelectedCells[j].style.width);
|
|
16229
|
+
}
|
|
16230
|
+
else {
|
|
16231
|
+
totalWidth = totalWidth + ((rowSelectedCells[j].offsetWidth / this.curTable.offsetWidth) * 100);
|
|
16232
|
+
unit = '%';
|
|
16233
|
+
}
|
|
15962
16234
|
}
|
|
15963
|
-
firstCell.style.width = totalWidth +
|
|
16235
|
+
firstCell.style.width = totalWidth + unit;
|
|
15964
16236
|
for (let i = 1; i <= selectedCells.length - 1; i++) {
|
|
15965
16237
|
detach(selectedCells[i]);
|
|
15966
16238
|
}
|
|
@@ -16886,11 +17158,15 @@ class SelectionCommands {
|
|
|
16886
17158
|
&& range.endOffset === range.startContainer.length)) {
|
|
16887
17159
|
const nodeIndex = [];
|
|
16888
17160
|
let cloneNode = nodes[index];
|
|
17161
|
+
const clonedElement = cloneNode;
|
|
16889
17162
|
do {
|
|
16890
17163
|
nodeIndex.push(domSelection.getIndex(cloneNode));
|
|
16891
17164
|
cloneNode = cloneNode.parentNode;
|
|
16892
17165
|
} while (cloneNode && (cloneNode !== formatNode));
|
|
16893
17166
|
if (nodes[index].nodeName !== 'BR') {
|
|
17167
|
+
if (clonedElement.nodeName === '#text' && clonedElement.textContent.includes('\u200B')) {
|
|
17168
|
+
clonedElement.remove();
|
|
17169
|
+
}
|
|
16894
17170
|
cloneNode = splitNode = (isCursor && (formatNode.textContent.length - 1) === range.startOffset) ?
|
|
16895
17171
|
nodeCutter.SplitNode(range, formatNode, true)
|
|
16896
17172
|
: nodeCutter.GetSpliceNode(range, formatNode);
|
|
@@ -16968,6 +17244,30 @@ class SelectionCommands {
|
|
|
16968
17244
|
formatNode.style.textDecoration = 'none';
|
|
16969
17245
|
child = [formatNode];
|
|
16970
17246
|
}
|
|
17247
|
+
else if (IsFormatted.inlineTags.indexOf(formatNodeTagName.toLowerCase()) !== -1 && isFontStyle && formatNodeTagName.toLocaleLowerCase() !== 'span') {
|
|
17248
|
+
let fontNodeStyle = formatNode.style;
|
|
17249
|
+
if (fontNodeStyle.color && format === 'fontcolor') {
|
|
17250
|
+
if (formatNode.nodeName === 'A') {
|
|
17251
|
+
fontNodeStyle.color = value;
|
|
17252
|
+
}
|
|
17253
|
+
else {
|
|
17254
|
+
fontNodeStyle.color = '';
|
|
17255
|
+
}
|
|
17256
|
+
}
|
|
17257
|
+
else if (fontNodeStyle.backgroundColor && format === 'backgroundcolor') {
|
|
17258
|
+
fontNodeStyle.backgroundColor = '';
|
|
17259
|
+
}
|
|
17260
|
+
else if (fontNodeStyle.fontSize && format === 'fontsize') {
|
|
17261
|
+
fontNodeStyle.fontSize = '';
|
|
17262
|
+
}
|
|
17263
|
+
else if (fontNodeStyle.fontFamily && format === 'fontname') {
|
|
17264
|
+
fontNodeStyle.fontFamily = '';
|
|
17265
|
+
}
|
|
17266
|
+
if (formatNode.getAttribute("style") === '') {
|
|
17267
|
+
formatNode.removeAttribute("style");
|
|
17268
|
+
}
|
|
17269
|
+
child = [formatNode];
|
|
17270
|
+
}
|
|
16971
17271
|
else {
|
|
16972
17272
|
child = InsertMethods.unwrap(formatNode);
|
|
16973
17273
|
let liElement = nodes[index].parentElement;
|
|
@@ -17148,19 +17448,44 @@ class SelectionCommands {
|
|
|
17148
17448
|
parentElement = parentElement.parentElement;
|
|
17149
17449
|
liElement = parentElement;
|
|
17150
17450
|
}
|
|
17151
|
-
if (format === 'fontcolor') {
|
|
17451
|
+
if (format === 'fontcolor' || format === 'fontname') {
|
|
17152
17452
|
const parentElem = nodes[index].parentElement;
|
|
17153
17453
|
if (!isNullOrUndefined(parentElem) && parentElem.childNodes) {
|
|
17154
17454
|
for (let i = 0; i < parentElem.childNodes.length; i++) {
|
|
17155
17455
|
if (this.concatenateTextExcludingList(nodes, index) === nodes[index].textContent) {
|
|
17456
|
+
let liElement;
|
|
17156
17457
|
if (parentElem.tagName === 'LI') {
|
|
17157
|
-
|
|
17458
|
+
liElement = parentElem;
|
|
17459
|
+
}
|
|
17460
|
+
else if (parentElem.closest('li')) {
|
|
17461
|
+
liElement = parentElem.closest('li');
|
|
17462
|
+
}
|
|
17463
|
+
if (!isNullOrUndefined(liElement)) {
|
|
17464
|
+
switch (format) {
|
|
17465
|
+
case 'fontcolor':
|
|
17466
|
+
liElement.style.color = value;
|
|
17467
|
+
break;
|
|
17468
|
+
case 'fontname':
|
|
17469
|
+
liElement.style.fontFamily = value;
|
|
17470
|
+
break;
|
|
17471
|
+
default:
|
|
17472
|
+
break;
|
|
17473
|
+
}
|
|
17158
17474
|
}
|
|
17159
17475
|
}
|
|
17160
17476
|
// eslint-disable-next-line
|
|
17161
17477
|
const childElement = parentElem.childNodes[i];
|
|
17162
17478
|
if (childElement.tagName === 'OL' || childElement.tagName === 'UL') {
|
|
17163
|
-
|
|
17479
|
+
switch (format) {
|
|
17480
|
+
case 'fontcolor':
|
|
17481
|
+
childElement.style.color = 'initial';
|
|
17482
|
+
break;
|
|
17483
|
+
case 'fontname':
|
|
17484
|
+
childElement.style.fontFamily = 'initial';
|
|
17485
|
+
break;
|
|
17486
|
+
default:
|
|
17487
|
+
break;
|
|
17488
|
+
}
|
|
17164
17489
|
}
|
|
17165
17490
|
}
|
|
17166
17491
|
}
|
|
@@ -18160,7 +18485,7 @@ class MsWordPaste {
|
|
|
18160
18485
|
'x', 'xi', 'xii', 'xiii', 'xiv', 'xv', 'xvi', 'xvii', 'xviii', 'xix', 'xx'];
|
|
18161
18486
|
this.lowerGreekNumber = ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ',
|
|
18162
18487
|
'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'];
|
|
18163
|
-
this.removableElements = ['o:p', 'style'];
|
|
18488
|
+
this.removableElements = ['o:p', 'style', 'w:sdt'];
|
|
18164
18489
|
this.listContents = [];
|
|
18165
18490
|
this.cropImageDimensions = [];
|
|
18166
18491
|
this.parent = parent;
|
|
@@ -18525,7 +18850,7 @@ class MsWordPaste {
|
|
|
18525
18850
|
let innerElement = elm.innerHTML;
|
|
18526
18851
|
for (let i = 0; i < this.removableElements.length; i++) {
|
|
18527
18852
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
18528
|
-
const regExpStartElem = new RegExp('<' + this.removableElements[i] + '
|
|
18853
|
+
const regExpStartElem = new RegExp('<' + this.removableElements[i] + '\\s*[^>]*>', 'g');
|
|
18529
18854
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
18530
18855
|
const regExpEndElem = new RegExp('</' + this.removableElements[i] + '>', 'g');
|
|
18531
18856
|
innerElement = innerElement.replace(regExpStartElem, '');
|
|
@@ -18588,72 +18913,80 @@ class MsWordPaste {
|
|
|
18588
18913
|
}
|
|
18589
18914
|
styleCorrection(elm, wordPasteStyleConfig) {
|
|
18590
18915
|
const styleElement = elm.querySelectorAll('style');
|
|
18916
|
+
let styles = [];
|
|
18591
18917
|
if (styleElement.length > 0) {
|
|
18592
|
-
|
|
18918
|
+
if (!isNullOrUndefined(styleElement[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi))) {
|
|
18919
|
+
styles = styleElement[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);
|
|
18920
|
+
}
|
|
18921
|
+
else if (styleElement.length > 1) {
|
|
18922
|
+
styles = styleElement[1].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);
|
|
18923
|
+
}
|
|
18593
18924
|
const styleClassObject = !isNullOrUndefined(styles) ? this.findStyleObject(styles) : null;
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
}
|
|
18610
|
-
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
|
|
18611
|
-
resultElem = elm.getElementsByTagName(keys[i]);
|
|
18612
|
-
}
|
|
18613
|
-
else {
|
|
18614
|
-
resultElem = elm.querySelectorAll(keys[i]);
|
|
18615
|
-
}
|
|
18616
|
-
for (let j = 0; j < resultElem.length; j++) {
|
|
18617
|
-
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
18925
|
+
if (!isNullOrUndefined(styleClassObject)) {
|
|
18926
|
+
const keys = Object.keys(styleClassObject);
|
|
18927
|
+
let values = keys.map((key) => {
|
|
18928
|
+
return styleClassObject[`${key}`];
|
|
18929
|
+
});
|
|
18930
|
+
values = this.removeUnwantedStyle(values, wordPasteStyleConfig);
|
|
18931
|
+
this.filterStyles(elm, wordPasteStyleConfig);
|
|
18932
|
+
let resultElem;
|
|
18933
|
+
let fromClass = false;
|
|
18934
|
+
for (let i = 0; i < keys.length; i++) {
|
|
18935
|
+
if (keys[i].split('.')[0] === '') {
|
|
18936
|
+
resultElem = elm.getElementsByClassName(keys[i].split('.')[1]);
|
|
18937
|
+
fromClass = true;
|
|
18938
|
+
}
|
|
18939
|
+
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') >= 0) {
|
|
18618
18940
|
continue;
|
|
18619
18941
|
}
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18942
|
+
else if (keys[i].split('.').length === 1 && keys[i].split('.')[0].indexOf('@') < 0) {
|
|
18943
|
+
resultElem = elm.getElementsByTagName(keys[i]);
|
|
18944
|
+
}
|
|
18945
|
+
else {
|
|
18946
|
+
resultElem = elm.querySelectorAll(keys[i]);
|
|
18947
|
+
}
|
|
18948
|
+
for (let j = 0; j < resultElem.length; j++) {
|
|
18949
|
+
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
18950
|
+
continue;
|
|
18951
|
+
}
|
|
18952
|
+
const styleProperty = resultElem[j].getAttribute('style');
|
|
18953
|
+
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '') {
|
|
18954
|
+
const valueSplit = values[i].split(';');
|
|
18955
|
+
if (!fromClass) {
|
|
18956
|
+
for (let k = 0; k < valueSplit.length; k++) {
|
|
18957
|
+
if (styleProperty.indexOf(valueSplit[k].split(':')[0]) >= 0) {
|
|
18958
|
+
valueSplit.splice(k, 1);
|
|
18959
|
+
k--;
|
|
18960
|
+
}
|
|
18628
18961
|
}
|
|
18629
18962
|
}
|
|
18963
|
+
const changedValue = styleProperty + valueSplit.join(';') + ';';
|
|
18964
|
+
resultElem[j].setAttribute('style', changedValue);
|
|
18965
|
+
}
|
|
18966
|
+
else {
|
|
18967
|
+
values[i] = values[i].replace(/text-indent:-(.*?)(?=;|$)/gm, '');
|
|
18968
|
+
resultElem[j].setAttribute('style', values[i]);
|
|
18630
18969
|
}
|
|
18631
|
-
const changedValue = styleProperty + valueSplit.join(';') + ';';
|
|
18632
|
-
resultElem[j].setAttribute('style', changedValue);
|
|
18633
|
-
}
|
|
18634
|
-
else {
|
|
18635
|
-
values[i] = values[i].replace(/text-indent:-(.*?)(?=;|$)/gm, '');
|
|
18636
|
-
resultElem[j].setAttribute('style', values[i]);
|
|
18637
18970
|
}
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18971
|
+
fromClass = false;
|
|
18972
|
+
}
|
|
18973
|
+
const listClass = ['MsoListParagraphCxSpFirst', 'MsoListParagraphCxSpMiddle', 'MsoListParagraphCxSpLast'];
|
|
18974
|
+
for (let i = 0; i < listClass.length; i++) {
|
|
18975
|
+
if (keys.indexOf('li.' + listClass[i]) > -1) {
|
|
18976
|
+
const olULElems = elm.querySelectorAll('ol.' + listClass[i] + ', ul.' + listClass[i]);
|
|
18977
|
+
for (let j = 0; j < olULElems.length; j++) {
|
|
18978
|
+
const styleProperty = olULElems[j].getAttribute('style');
|
|
18979
|
+
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '' && olULElems[j].style.marginLeft !== '') {
|
|
18980
|
+
const valueSplit = values[keys.indexOf('li.' + listClass[i])].split(';');
|
|
18981
|
+
for (let k = 0; k < valueSplit.length; k++) {
|
|
18982
|
+
if ('margin-left'.indexOf(valueSplit[k].split(':')[0]) >= 0) {
|
|
18983
|
+
if (!isNullOrUndefined(valueSplit[k].split(':')[1]) &&
|
|
18984
|
+
valueSplit[k].split(':')[1].indexOf('in') >= 0 &&
|
|
18985
|
+
olULElems[j].style.marginLeft.indexOf('in') >= 0) {
|
|
18986
|
+
const classStyle = parseFloat(valueSplit[k].split(':')[1].split('in')[0]);
|
|
18987
|
+
const inlineStyle = parseFloat(olULElems[j].style.marginLeft.split('in')[0]);
|
|
18988
|
+
olULElems[j].style.marginLeft = (inlineStyle - classStyle) + 'in';
|
|
18989
|
+
}
|
|
18657
18990
|
}
|
|
18658
18991
|
}
|
|
18659
18992
|
}
|
|
@@ -19224,7 +19557,7 @@ class ToolbarStatus {
|
|
|
19224
19557
|
* get method
|
|
19225
19558
|
*
|
|
19226
19559
|
* @param {Document} docElement - specifies the document element
|
|
19227
|
-
* @param {Node}
|
|
19560
|
+
* @param {Node} rootNode - specifies the content editable element
|
|
19228
19561
|
* @param {string[]} formatNode - specifies the format node
|
|
19229
19562
|
* @param {string[]} fontSize - specifies the font size
|
|
19230
19563
|
* @param {string[]} fontName - specifies the font name.
|
|
@@ -19233,7 +19566,7 @@ class ToolbarStatus {
|
|
|
19233
19566
|
* @hidden
|
|
19234
19567
|
* @deprecated
|
|
19235
19568
|
*/
|
|
19236
|
-
static get(docElement,
|
|
19569
|
+
static get(docElement, rootNode, formatNode, fontSize, fontName, documentNode) {
|
|
19237
19570
|
let formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
19238
19571
|
const nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
19239
19572
|
const nodeSelection = new NodeSelection();
|
|
@@ -19263,7 +19596,7 @@ class ToolbarStatus {
|
|
|
19263
19596
|
}
|
|
19264
19597
|
for (let index = 0; index < nodes.length; index++) {
|
|
19265
19598
|
// eslint-disable-next-line max-len
|
|
19266
|
-
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index],
|
|
19599
|
+
formatCollection = this.getFormatParent(docElement, formatCollection, nodes[index], rootNode, formatNode, fontSize, fontName);
|
|
19267
19600
|
if ((index === 0 && formatCollection.bold) || !formatCollection.bold) {
|
|
19268
19601
|
nodeCollection.bold = formatCollection.bold;
|
|
19269
19602
|
}
|
|
@@ -19338,16 +19671,24 @@ class ToolbarStatus {
|
|
|
19338
19671
|
return node;
|
|
19339
19672
|
}
|
|
19340
19673
|
static getFormatParent(docElement, formatCollection, node, targetNode, formatNode, fontSize, fontName) {
|
|
19674
|
+
let isListUpdated = false;
|
|
19675
|
+
let isComplexListUpdated = false;
|
|
19341
19676
|
if (targetNode.contains(node) ||
|
|
19342
19677
|
(node.nodeType === 3 && targetNode.nodeType !== 3 && targetNode.contains(node.parentNode))) {
|
|
19343
19678
|
do {
|
|
19344
|
-
formatCollection = this.isFormattedNode(docElement, formatCollection, node, formatNode, fontSize, fontName);
|
|
19679
|
+
formatCollection = this.isFormattedNode(docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName);
|
|
19680
|
+
if (formatCollection.orderedlist || formatCollection.unorderedlist) {
|
|
19681
|
+
isListUpdated = true;
|
|
19682
|
+
}
|
|
19683
|
+
if (formatCollection.bulletFormatList || formatCollection.numberFormatList) {
|
|
19684
|
+
isComplexListUpdated = true;
|
|
19685
|
+
}
|
|
19345
19686
|
node = node.parentNode;
|
|
19346
19687
|
} while (node && (node !== targetNode));
|
|
19347
19688
|
}
|
|
19348
19689
|
return formatCollection;
|
|
19349
19690
|
}
|
|
19350
|
-
static isFormattedNode(docElement, formatCollection, node, formatNode, fontSize, fontName) {
|
|
19691
|
+
static isFormattedNode(docElement, formatCollection, node, isListUpdated, isComplexListUpdated, formatNode, fontSize, fontName) {
|
|
19351
19692
|
if (!formatCollection.bold) {
|
|
19352
19693
|
formatCollection.bold = IsFormatted.isBold(node);
|
|
19353
19694
|
}
|
|
@@ -19378,10 +19719,10 @@ class ToolbarStatus {
|
|
|
19378
19719
|
if (!formatCollection.backgroundcolor) {
|
|
19379
19720
|
formatCollection.backgroundcolor = this.isBackgroundColor(node);
|
|
19380
19721
|
}
|
|
19381
|
-
if (!formatCollection.orderedlist) {
|
|
19722
|
+
if (!formatCollection.orderedlist && !isListUpdated) {
|
|
19382
19723
|
formatCollection.orderedlist = this.isOrderedList(node);
|
|
19383
19724
|
}
|
|
19384
|
-
if (!formatCollection.unorderedlist) {
|
|
19725
|
+
if (!formatCollection.unorderedlist && !isListUpdated) {
|
|
19385
19726
|
formatCollection.unorderedlist = this.isUnorderedList(node);
|
|
19386
19727
|
}
|
|
19387
19728
|
if (!formatCollection.alignments) {
|
|
@@ -19396,10 +19737,10 @@ class ToolbarStatus {
|
|
|
19396
19737
|
if (!formatCollection.createlink) {
|
|
19397
19738
|
formatCollection.createlink = this.isLink(node);
|
|
19398
19739
|
}
|
|
19399
|
-
if (!formatCollection.numberFormatList) {
|
|
19740
|
+
if (!formatCollection.numberFormatList && !isComplexListUpdated) {
|
|
19400
19741
|
formatCollection.numberFormatList = this.isNumberFormatList(node);
|
|
19401
19742
|
}
|
|
19402
|
-
if (!formatCollection.bulletFormatList) {
|
|
19743
|
+
if (!formatCollection.bulletFormatList && !isComplexListUpdated) {
|
|
19403
19744
|
formatCollection.bulletFormatList = this.isBulletFormatList(node);
|
|
19404
19745
|
}
|
|
19405
19746
|
return formatCollection;
|
|
@@ -20486,12 +20827,12 @@ class EditorManager {
|
|
|
20486
20827
|
}
|
|
20487
20828
|
}
|
|
20488
20829
|
getParentBlockNode(node) {
|
|
20489
|
-
|
|
20830
|
+
const treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
|
|
20490
20831
|
NodeFilter.SHOW_ELEMENT, // whatToShow
|
|
20491
20832
|
{
|
|
20492
20833
|
acceptNode: function (currentNode) {
|
|
20493
20834
|
// Check if the node is a block element
|
|
20494
|
-
|
|
20835
|
+
const displayStyle = window.getComputedStyle(currentNode).display;
|
|
20495
20836
|
if (displayStyle.indexOf('inline') < 0) {
|
|
20496
20837
|
return NodeFilter.FILTER_ACCEPT;
|
|
20497
20838
|
}
|
|
@@ -20501,11 +20842,11 @@ class EditorManager {
|
|
|
20501
20842
|
}
|
|
20502
20843
|
});
|
|
20503
20844
|
treeWalker.currentNode = node;
|
|
20504
|
-
|
|
20845
|
+
const blockParent = treeWalker.parentNode();
|
|
20505
20846
|
return blockParent;
|
|
20506
20847
|
}
|
|
20507
20848
|
getLastTextNode(node) {
|
|
20508
|
-
|
|
20849
|
+
const treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
|
|
20509
20850
|
let lastTextNode = null;
|
|
20510
20851
|
let currentNode = treeWalker.nextNode();
|
|
20511
20852
|
while (currentNode) {
|
|
@@ -20515,8 +20856,8 @@ class EditorManager {
|
|
|
20515
20856
|
return lastTextNode;
|
|
20516
20857
|
}
|
|
20517
20858
|
getFirstTextNode(node) {
|
|
20518
|
-
|
|
20519
|
-
|
|
20859
|
+
const treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
|
|
20860
|
+
const firstTextNode = treeWalker.nextNode();
|
|
20520
20861
|
return firstTextNode;
|
|
20521
20862
|
}
|
|
20522
20863
|
}
|
|
@@ -20752,8 +21093,12 @@ const IFRAMEHEADER = `
|
|
|
20752
21093
|
.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; }
|
|
20753
21094
|
.e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
|
|
20754
21095
|
.e-img-caption .e-img-inner { outline: 0; }
|
|
21096
|
+
.e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }
|
|
21097
|
+
.e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }
|
|
21098
|
+
.e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }
|
|
20755
21099
|
.e-img-caption a:focus-visible { outline: none; }
|
|
20756
|
-
.e-
|
|
21100
|
+
.e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }
|
|
21101
|
+
.e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }
|
|
20757
21102
|
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
20758
21103
|
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
20759
21104
|
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
@@ -20801,6 +21146,7 @@ const IFRAMEHEADER = `
|
|
|
20801
21146
|
.e-table-rhelper { background-color: #4a90e2;}
|
|
20802
21147
|
.e-rtl { direction: rtl; }
|
|
20803
21148
|
.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; }
|
|
21149
|
+
li ol, li ul { margin-block-start: 10px;}
|
|
20804
21150
|
</style>
|
|
20805
21151
|
</head>`;
|
|
20806
21152
|
/**
|
|
@@ -20828,6 +21174,7 @@ class IframeContentRender extends ContentRender {
|
|
|
20828
21174
|
styles: 'display:block;',
|
|
20829
21175
|
attrs: { 'srcdoc': iFrameContent }
|
|
20830
21176
|
});
|
|
21177
|
+
iframe.setAttribute("role", "none");
|
|
20831
21178
|
this.setPanel(iframe);
|
|
20832
21179
|
rteObj.element.appendChild(iframe);
|
|
20833
21180
|
iframe.contentDocument.body.id = this.parent.getID() + '_rte-edit-view';
|
|
@@ -21528,7 +21875,11 @@ class HtmlEditor {
|
|
|
21528
21875
|
(!isNullOrUndefined(this.deleteRangeElement.nextElementSibling) && this.deleteRangeElement.nextElementSibling.tagName === 'TABLE'))) {
|
|
21529
21876
|
return;
|
|
21530
21877
|
}
|
|
21531
|
-
|
|
21878
|
+
let isImgWithEmptyBlockNode = false;
|
|
21879
|
+
if (this.deleteRangeElement.querySelectorAll('img').length > 0 && this.deleteRangeElement.textContent.trim() === '') {
|
|
21880
|
+
isImgWithEmptyBlockNode = true;
|
|
21881
|
+
}
|
|
21882
|
+
if (this.getCaretIndex(currentRange, this.deleteRangeElement) === this.deleteRangeElement.textContent.length && !isImgWithEmptyBlockNode) {
|
|
21532
21883
|
if (!isNullOrUndefined(liElement)) {
|
|
21533
21884
|
if (isLiElement || !isNullOrUndefined(liElement.nextElementSibling)) {
|
|
21534
21885
|
this.deleteOldRangeElement = this.getRangeElement(liElement.nextElementSibling);
|
|
@@ -21720,36 +22071,14 @@ class HtmlEditor {
|
|
|
21720
22071
|
}, e, value);
|
|
21721
22072
|
}
|
|
21722
22073
|
}
|
|
21723
|
-
mouseOutHandler() {
|
|
21724
|
-
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
21725
|
-
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
21726
|
-
}
|
|
21727
|
-
else {
|
|
21728
|
-
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
21729
|
-
this.parent.contentModule.getDocument();
|
|
21730
|
-
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
21731
|
-
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
21732
|
-
}
|
|
21733
|
-
this.tooltipTargetEle.removeAttribute('data-title');
|
|
21734
|
-
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
21735
|
-
}
|
|
21736
22074
|
onToolbarClick(args) {
|
|
21737
22075
|
let save;
|
|
21738
22076
|
let selectNodeEle;
|
|
21739
22077
|
let selectParentEle;
|
|
21740
22078
|
const item = args.item;
|
|
21741
22079
|
const closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
21742
|
-
|
|
21743
|
-
|
|
21744
|
-
this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
|
|
21745
|
-
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
21746
|
-
this.parent.notify(destroyTooltip, { args: event });
|
|
21747
|
-
if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
|
|
21748
|
-
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
21749
|
-
this.tooltipTargetEle.removeAttribute('title');
|
|
21750
|
-
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
21751
|
-
}
|
|
21752
|
-
}
|
|
22080
|
+
let target = args.originalEvent.target;
|
|
22081
|
+
this.parent.notify(closeTooltip, { target: target });
|
|
21753
22082
|
if (item.command !== 'FormatPainter') {
|
|
21754
22083
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
21755
22084
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -22665,6 +22994,9 @@ class PasteCleanup {
|
|
|
22665
22994
|
this.setImageProperties(allImg[i]);
|
|
22666
22995
|
}
|
|
22667
22996
|
this.addTempClass(clipBoardElem);
|
|
22997
|
+
if (clipBoardElem.querySelectorAll('picture').length > 0) {
|
|
22998
|
+
this.processPictureElement(clipBoardElem);
|
|
22999
|
+
}
|
|
22668
23000
|
if (clipBoardElem.textContent !== '' || !isNullOrUndefined(clipBoardElem.querySelector('img')) ||
|
|
22669
23001
|
!isNullOrUndefined(clipBoardElem.querySelector('table'))) {
|
|
22670
23002
|
const tempWrapperElem = this.parent.createElement('div');
|
|
@@ -23122,6 +23454,26 @@ class PasteCleanup {
|
|
|
23122
23454
|
}
|
|
23123
23455
|
return null;
|
|
23124
23456
|
}
|
|
23457
|
+
processPictureElement(clipBoardElem) {
|
|
23458
|
+
const pictureElems = clipBoardElem.querySelectorAll('picture');
|
|
23459
|
+
for (let i = 0; i < pictureElems.length; i++) {
|
|
23460
|
+
const imgElem = pictureElems[i].querySelector('img');
|
|
23461
|
+
const sourceElems = pictureElems[i].querySelectorAll('source');
|
|
23462
|
+
if (imgElem && imgElem.getAttribute('src')) {
|
|
23463
|
+
const srcValue = imgElem.getAttribute('src');
|
|
23464
|
+
const url = new URL(srcValue);
|
|
23465
|
+
for (let j = 0; j < sourceElems.length; j++) {
|
|
23466
|
+
let srcset = sourceElems[j].getAttribute('srcset');
|
|
23467
|
+
if (srcset) {
|
|
23468
|
+
if (srcset.indexOf('http') === -1) {
|
|
23469
|
+
const fullPath = url.origin + srcset;
|
|
23470
|
+
sourceElems[j].setAttribute('srcset', fullPath);
|
|
23471
|
+
}
|
|
23472
|
+
}
|
|
23473
|
+
}
|
|
23474
|
+
}
|
|
23475
|
+
}
|
|
23476
|
+
}
|
|
23125
23477
|
/**
|
|
23126
23478
|
* For internal use only - Get the module name.
|
|
23127
23479
|
*
|
|
@@ -23201,7 +23553,8 @@ class Resize {
|
|
|
23201
23553
|
this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
|
|
23202
23554
|
}
|
|
23203
23555
|
if (!this.parent.toolbarSettings.enable) {
|
|
23204
|
-
this.parent.
|
|
23556
|
+
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23557
|
+
this.parent.setContentHeight('Resize', isExpand);
|
|
23205
23558
|
}
|
|
23206
23559
|
this.parent.refreshUI();
|
|
23207
23560
|
}
|
|
@@ -23552,7 +23905,7 @@ class FullScreen {
|
|
|
23552
23905
|
this.parent.element.classList.add(CLS_FULL_SCREEN);
|
|
23553
23906
|
this.toggleParentOverflow(true);
|
|
23554
23907
|
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23555
|
-
this.parent.setContentHeight(
|
|
23908
|
+
this.parent.setContentHeight('Maximize', isExpand);
|
|
23556
23909
|
if (this.parent.toolbarModule) {
|
|
23557
23910
|
if (!this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
23558
23911
|
this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -23603,7 +23956,7 @@ class FullScreen {
|
|
|
23603
23956
|
removeClass([elem[i]], ['e-rte-overflow']);
|
|
23604
23957
|
}
|
|
23605
23958
|
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
23606
|
-
this.parent.setContentHeight(
|
|
23959
|
+
this.parent.setContentHeight('Minimize', isExpand);
|
|
23607
23960
|
if (this.parent.toolbarModule) {
|
|
23608
23961
|
if (!this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
23609
23962
|
this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -23949,7 +24302,7 @@ class EmojiPicker {
|
|
|
23949
24302
|
}
|
|
23950
24303
|
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
23951
24304
|
if (!isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
23952
|
-
this.parent.getToolbar().appendChild(this.popDiv);
|
|
24305
|
+
this.parent.getToolbar().parentElement.appendChild(this.popDiv);
|
|
23953
24306
|
}
|
|
23954
24307
|
else if (this.parent.inlineMode.enable) {
|
|
23955
24308
|
this.parent.element.appendChild(this.popDiv);
|
|
@@ -25378,7 +25731,6 @@ class Image$1 {
|
|
|
25378
25731
|
this.isAllowedTypes = true;
|
|
25379
25732
|
this.pageX = null;
|
|
25380
25733
|
this.pageY = null;
|
|
25381
|
-
this.mouseX = null;
|
|
25382
25734
|
this.deletedImg = [];
|
|
25383
25735
|
this.parent = parent;
|
|
25384
25736
|
this.rteID = parent.element.id;
|
|
@@ -25536,11 +25888,6 @@ class Image$1 {
|
|
|
25536
25888
|
}
|
|
25537
25889
|
const args = { event: e, requestType: 'images' };
|
|
25538
25890
|
this.parent.trigger(resizeStop, args);
|
|
25539
|
-
/* eslint-disable */
|
|
25540
|
-
let pageX = this.getPointX(e);
|
|
25541
|
-
let pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset +
|
|
25542
|
-
this.parent.element.getBoundingClientRect().top + e.clientY : e.pageY;
|
|
25543
|
-
/* eslint-enable */
|
|
25544
25891
|
this.parent.formatter.editorManager.observer.on(checkUndo, this.undoStack, this);
|
|
25545
25892
|
this.parent.formatter.saveData();
|
|
25546
25893
|
}
|
|
@@ -25570,17 +25917,15 @@ class Image$1 {
|
|
|
25570
25917
|
if (this.quickToolObj) {
|
|
25571
25918
|
this.quickToolObj.imageQTBar.hidePopup();
|
|
25572
25919
|
}
|
|
25573
|
-
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
|
|
25578
|
-
|
|
25579
|
-
|
|
25580
|
-
|
|
25581
|
-
|
|
25582
|
-
if (target.classList.contains('e-rte-botRight')) {
|
|
25583
|
-
this.resizeBtnStat.botRight = true;
|
|
25920
|
+
const handlers = ['topLeft', 'topRight', 'botLeft', 'botRight'];
|
|
25921
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
25922
|
+
const handler = handlers[i];
|
|
25923
|
+
if (target.classList.contains('e-rte-' + handler)) {
|
|
25924
|
+
this.resizeBtnStat[handler] = true;
|
|
25925
|
+
this.currentResizeHandler = handler;
|
|
25926
|
+
this.aspectRatio = this.findAspectRatio(this.imgEle);
|
|
25927
|
+
break; // Exit the loop once a match is found
|
|
25928
|
+
}
|
|
25584
25929
|
}
|
|
25585
25930
|
if (Browser.isDevice && this.contentModule.getEditPanel().contains(this.imgResizeDiv) &&
|
|
25586
25931
|
!this.imgResizeDiv.classList.contains('e-mob-span')) {
|
|
@@ -25711,89 +26056,80 @@ class Image$1 {
|
|
|
25711
26056
|
};
|
|
25712
26057
|
}
|
|
25713
26058
|
}
|
|
25714
|
-
setAspectRatio(img, expectedX, expectedY
|
|
26059
|
+
setAspectRatio(img, expectedX, expectedY) {
|
|
25715
26060
|
if (isNullOrUndefined(img.width)) {
|
|
25716
26061
|
return;
|
|
25717
26062
|
}
|
|
25718
|
-
|
|
25719
|
-
const
|
|
25720
|
-
|
|
25721
|
-
const
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
if (
|
|
25725
|
-
if (
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
26063
|
+
const width = img.width;
|
|
26064
|
+
const height = img.height;
|
|
26065
|
+
const sameHeightWidth = (width === height);
|
|
26066
|
+
const factor = this.parent.insertImageSettings.resizeByPercent ? '%' : 'px';
|
|
26067
|
+
const emptyStyleDimension = (img.style.width === '' && img.style.height === '');
|
|
26068
|
+
if (!sameHeightWidth && !emptyStyleDimension) {
|
|
26069
|
+
if (img.style.width !== '' && img.style.height !== '') {
|
|
26070
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26071
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26072
|
+
this.removeImageHeight(img);
|
|
25729
26073
|
}
|
|
25730
26074
|
else {
|
|
25731
|
-
|
|
26075
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26076
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25732
26077
|
}
|
|
25733
|
-
img.style.height = null;
|
|
25734
|
-
img.removeAttribute('height');
|
|
25735
|
-
}
|
|
25736
|
-
else if (img.style.width === '' && img.style.height !== '') {
|
|
25737
|
-
img.style.height = expectedY + 'px';
|
|
25738
|
-
}
|
|
25739
|
-
else if (img.style.width !== '' && img.style.height === '') {
|
|
25740
|
-
const currentWidth = ((width / height * expectedY) + width / height) <
|
|
25741
|
-
(this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
25742
|
-
((width / height * expectedY) + width / height) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
25743
|
-
img.style.width = currentWidth.toString() + 'px';
|
|
25744
|
-
img.style.height = expectedY + 'px';
|
|
25745
26078
|
}
|
|
25746
26079
|
else if (img.style.width !== '') {
|
|
25747
|
-
|
|
25748
|
-
|
|
25749
|
-
|
|
25750
|
-
img.style.height = expectedY + 'px';
|
|
25751
|
-
}
|
|
25752
|
-
else {
|
|
25753
|
-
if (this.parent.iframeSettings.enable) {
|
|
25754
|
-
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
26080
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26081
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26082
|
+
this.removeImageHeight(img);
|
|
25755
26083
|
}
|
|
25756
26084
|
else {
|
|
25757
|
-
|
|
25758
|
-
img.setAttribute('width', (currentWidth).toString());
|
|
26085
|
+
this.setImageWidth(img, expectedX, factor);
|
|
25759
26086
|
}
|
|
25760
26087
|
}
|
|
25761
|
-
|
|
25762
|
-
|
|
25763
|
-
|
|
25764
|
-
|
|
25765
|
-
const original = img.offsetWidth + this.mouseX;
|
|
25766
|
-
const finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() === 'NaN' ?
|
|
25767
|
-
(img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) :
|
|
25768
|
-
parseFloat(img.style.width));
|
|
25769
|
-
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
26088
|
+
else if (img.style.height !== '') {
|
|
26089
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26090
|
+
this.setImageWidth(img, expectedX, factor);
|
|
26091
|
+
this.removeImageHeight(img);
|
|
25770
26092
|
}
|
|
25771
26093
|
else {
|
|
25772
|
-
|
|
26094
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25773
26095
|
}
|
|
25774
|
-
img.style.height = null;
|
|
25775
|
-
img.removeAttribute('height');
|
|
25776
|
-
}
|
|
25777
|
-
else if (img.style.width !== '') {
|
|
25778
|
-
img.style.width = expectedX + 'px';
|
|
25779
|
-
img.style.height = (height / width * expectedX) + 'px';
|
|
25780
|
-
}
|
|
25781
|
-
else {
|
|
25782
|
-
img.setAttribute('width', this.resizeBtnStat.botRight ? (this.getPointX(e.event) - img.getBoundingClientRect().left).toString() : expectedX.toString());
|
|
25783
26096
|
}
|
|
25784
26097
|
}
|
|
25785
26098
|
else {
|
|
26099
|
+
this.setImageWidth(img, expectedX, factor);
|
|
25786
26100
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
25787
|
-
|
|
25788
|
-
img.style.height = null;
|
|
25789
|
-
img.removeAttribute('height');
|
|
26101
|
+
this.removeImageHeight(img);
|
|
25790
26102
|
}
|
|
25791
26103
|
else {
|
|
25792
|
-
|
|
25793
|
-
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
26104
|
+
this.setImageHeight(img, expectedY, factor);
|
|
25794
26105
|
}
|
|
25795
26106
|
}
|
|
25796
26107
|
}
|
|
26108
|
+
setImageWidth(img, value, suffix) {
|
|
26109
|
+
img.style.width = this.getImageDimension(value, img) + suffix;
|
|
26110
|
+
if (!this.parent.insertImageSettings.resizeByPercent) {
|
|
26111
|
+
img.setAttribute('width', value.toString());
|
|
26112
|
+
}
|
|
26113
|
+
}
|
|
26114
|
+
setImageHeight(img, value, suffix) {
|
|
26115
|
+
img.style.height = this.getImageDimension(value, img) + suffix;
|
|
26116
|
+
if (!this.parent.insertImageSettings.resizeByPercent) {
|
|
26117
|
+
img.setAttribute('height', value.toString());
|
|
26118
|
+
}
|
|
26119
|
+
}
|
|
26120
|
+
removeImageHeight(img) {
|
|
26121
|
+
img.style.height = '';
|
|
26122
|
+
img.removeAttribute('height');
|
|
26123
|
+
}
|
|
26124
|
+
getImageDimension(value, img) {
|
|
26125
|
+
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
26126
|
+
const rootElem = img.parentElement || img.previousElementSibling;
|
|
26127
|
+
return this.pixToPerc(value, rootElem);
|
|
26128
|
+
}
|
|
26129
|
+
else {
|
|
26130
|
+
return value;
|
|
26131
|
+
}
|
|
26132
|
+
}
|
|
25797
26133
|
pixToPerc(expected, parentEle) {
|
|
25798
26134
|
return expected / parseFloat(getComputedStyle(parentEle).width) * 100;
|
|
25799
26135
|
}
|
|
@@ -25815,7 +26151,7 @@ class Image$1 {
|
|
|
25815
26151
|
return;
|
|
25816
26152
|
}
|
|
25817
26153
|
this.imgEle.parentElement.style.cursor = 'pointer';
|
|
25818
|
-
this.setAspectRatio(this.imgEle, parseInt(width, 10), parseInt(height, 10)
|
|
26154
|
+
this.setAspectRatio(this.imgEle, parseInt(width, 10), parseInt(height, 10));
|
|
25819
26155
|
this.resizeImgDupPos(this.imgEle);
|
|
25820
26156
|
this.imgResizePos(this.imgEle, this.imgResizeDiv);
|
|
25821
26157
|
}
|
|
@@ -25826,35 +26162,37 @@ class Image$1 {
|
|
|
25826
26162
|
this.cancelResizeAction();
|
|
25827
26163
|
return;
|
|
25828
26164
|
}
|
|
25829
|
-
if (this.
|
|
25830
|
-
|
|
25831
|
-
|
|
25832
|
-
|
|
25833
|
-
|
|
25834
|
-
|
|
25835
|
-
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
25839
|
-
|
|
25840
|
-
|
|
25841
|
-
|
|
25842
|
-
|
|
25843
|
-
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
|
|
25847
|
-
|
|
25848
|
-
|
|
25849
|
-
this.
|
|
25850
|
-
|
|
25851
|
-
else if (this.resizeBtnStat.topRight) {
|
|
25852
|
-
this.imgDupMouseMove(width + 'px', height + 'px', e);
|
|
25853
|
-
}
|
|
25854
|
-
else if (this.resizeBtnStat.topLeft) {
|
|
26165
|
+
if (this.resizeBtnStat.botRight || this.resizeBtnStat.botLeft || this.resizeBtnStat.topRight || this.resizeBtnStat.topLeft) {
|
|
26166
|
+
const pageX = this.getPointX(e);
|
|
26167
|
+
const pageY = this.getPointY(e);
|
|
26168
|
+
const resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
26169
|
+
const diffX = (pageX - this.pageX);
|
|
26170
|
+
const diffY = (pageY - this.pageY);
|
|
26171
|
+
const currentWidth = this.imgEle.clientWidth;
|
|
26172
|
+
const currentHeight = this.imgEle.clientHeight;
|
|
26173
|
+
let width = diffX * resizeFactor[0] + currentWidth;
|
|
26174
|
+
let height = diffY * resizeFactor[1] + currentHeight;
|
|
26175
|
+
width = (width < 16) ? 16 : width;
|
|
26176
|
+
height = (height < 16) ? 16 : height;
|
|
26177
|
+
if (Math.abs(diffX) > Math.abs(diffY)) {
|
|
26178
|
+
height = Math.round(width / this.aspectRatio);
|
|
26179
|
+
width = Math.round(height * this.aspectRatio);
|
|
26180
|
+
}
|
|
26181
|
+
else {
|
|
26182
|
+
width = Math.round(height * this.aspectRatio);
|
|
26183
|
+
height = Math.round(width / this.aspectRatio);
|
|
26184
|
+
}
|
|
26185
|
+
this.pageX = pageX;
|
|
26186
|
+
this.pageY = pageY;
|
|
25855
26187
|
this.imgDupMouseMove(width + 'px', height + 'px', e);
|
|
25856
26188
|
}
|
|
25857
26189
|
}
|
|
26190
|
+
getResizeFactor(value) {
|
|
26191
|
+
return imageResizeFactor[value];
|
|
26192
|
+
}
|
|
26193
|
+
findAspectRatio(image) {
|
|
26194
|
+
return image.clientWidth / image.clientHeight;
|
|
26195
|
+
}
|
|
25858
26196
|
cancelResizeAction() {
|
|
25859
26197
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchMoveEvent, this.resizing);
|
|
25860
26198
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchEndEvent, this.resizeEnd);
|
|
@@ -25864,6 +26202,8 @@ class Image$1 {
|
|
|
25864
26202
|
this.imgResizeDiv = null;
|
|
25865
26203
|
this.pageX = null;
|
|
25866
26204
|
this.pageY = null;
|
|
26205
|
+
this.currentResizeHandler = null;
|
|
26206
|
+
this.aspectRatio = null;
|
|
25867
26207
|
}
|
|
25868
26208
|
}
|
|
25869
26209
|
resizeImgDupPos(e) {
|
|
@@ -25874,6 +26214,8 @@ class Image$1 {
|
|
|
25874
26214
|
};
|
|
25875
26215
|
}
|
|
25876
26216
|
resizeBtnInit() {
|
|
26217
|
+
this.aspectRatio = null;
|
|
26218
|
+
this.currentResizeHandler = null;
|
|
25877
26219
|
return this.resizeBtnStat = { botLeft: false, botRight: false, topRight: false, topLeft: false };
|
|
25878
26220
|
}
|
|
25879
26221
|
onToolbarAction(args) {
|
|
@@ -26373,7 +26715,7 @@ class Image$1 {
|
|
|
26373
26715
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
26374
26716
|
this.checkBoxObj.appendTo(linkTarget);
|
|
26375
26717
|
let target = this.checkBoxObj.checked ? '_blank' : null;
|
|
26376
|
-
|
|
26718
|
+
const imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('imageLinkAriaLabel') : null;
|
|
26377
26719
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
26378
26720
|
const linkargs = {
|
|
26379
26721
|
args: e.args,
|
|
@@ -26381,7 +26723,6 @@ class Image$1 {
|
|
|
26381
26723
|
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target, ariaLabel: imageLabel
|
|
26382
26724
|
};
|
|
26383
26725
|
this.dialogObj.setProperties({
|
|
26384
|
-
height: 'inherit',
|
|
26385
26726
|
width: '290px',
|
|
26386
26727
|
header: this.parent.localeObj.getConstant('imageInsertLinkHeader'),
|
|
26387
26728
|
content: linkWrap,
|
|
@@ -26433,7 +26774,7 @@ class Image$1 {
|
|
|
26433
26774
|
alt: inputAlt
|
|
26434
26775
|
};
|
|
26435
26776
|
this.dialogObj.setProperties({
|
|
26436
|
-
|
|
26777
|
+
width: '290px', header: altHeader, content: altWrap,
|
|
26437
26778
|
buttons: [{
|
|
26438
26779
|
// eslint-disable-next-line
|
|
26439
26780
|
click: (e) => {
|
|
@@ -26681,7 +27022,7 @@ class Image$1 {
|
|
|
26681
27022
|
const dialogContent = this.imgsizeInput(e);
|
|
26682
27023
|
const selectObj = { args: e.args, selfImage: this, selection: e.selection, selectNode: e.selectNode };
|
|
26683
27024
|
this.dialogObj.setProperties({
|
|
26684
|
-
|
|
27025
|
+
width: '290px', header: imgSizeHeader, content: dialogContent,
|
|
26685
27026
|
buttons: [{
|
|
26686
27027
|
// eslint-disable-next-line
|
|
26687
27028
|
click: (e) => {
|
|
@@ -26881,7 +27222,6 @@ class Image$1 {
|
|
|
26881
27222
|
for (let i = 0; i < items.length; i++) {
|
|
26882
27223
|
removeClass([items[i]], 'e-img-focus');
|
|
26883
27224
|
removeClass([items[i]], 'e-resize');
|
|
26884
|
-
items[i].style.maxWidth = '';
|
|
26885
27225
|
}
|
|
26886
27226
|
}
|
|
26887
27227
|
}
|
|
@@ -26895,7 +27235,6 @@ class Image$1 {
|
|
|
26895
27235
|
this.cancelResizeAction();
|
|
26896
27236
|
}
|
|
26897
27237
|
}
|
|
26898
|
-
// eslint-disable-next-line
|
|
26899
27238
|
imageUrlPopup(e) {
|
|
26900
27239
|
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
26901
27240
|
const placeUrl = this.i10n.getConstant('imageUrl');
|
|
@@ -26974,12 +27313,18 @@ class Image$1 {
|
|
|
26974
27313
|
const imgHeight = this.i10n.getConstant('imageHeight');
|
|
26975
27314
|
const imgWidth = this.i10n.getConstant('imageWidth');
|
|
26976
27315
|
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
26977
|
-
|
|
27316
|
+
let widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
26978
27317
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
26979
27318
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
26980
|
-
|
|
27319
|
+
let heightVal = isNullOrUndefined(this.changedHeightValue) && (selectNode.style.height.toString() === 'auto' ||
|
|
26981
27320
|
selectNode.style.height !== '') ? selectNode.style.height : !isNullOrUndefined(this.changedHeightValue) ?
|
|
26982
27321
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
27322
|
+
if (selectNode.style.width === '') {
|
|
27323
|
+
widthVal = 'auto';
|
|
27324
|
+
}
|
|
27325
|
+
if (selectNode.style.height === '') {
|
|
27326
|
+
heightVal = 'auto';
|
|
27327
|
+
}
|
|
26983
27328
|
this.changedWidthValue = null;
|
|
26984
27329
|
this.changedHeightValue = null;
|
|
26985
27330
|
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
@@ -27113,7 +27458,7 @@ class Image$1 {
|
|
|
27113
27458
|
this.parent.trigger(imageSelected, selectArgs, (selectArgs) => {
|
|
27114
27459
|
if (!selectArgs.cancel) {
|
|
27115
27460
|
this.checkExtension(selectArgs.filesData[0]);
|
|
27116
|
-
altText = selectArgs.filesData[0].name;
|
|
27461
|
+
altText = selectArgs.filesData[0].name.replace(/\.[a-zA-Z0-9]+$/, '');
|
|
27117
27462
|
if (this.parent.editorMode === 'HTML' && isNullOrUndefined(this.parent.insertImageSettings.path)) {
|
|
27118
27463
|
const reader = new FileReader();
|
|
27119
27464
|
// eslint-disable-next-line
|
|
@@ -28673,7 +29018,7 @@ class Video {
|
|
|
28673
29018
|
const dialogContent = this.vidsizeInput(e);
|
|
28674
29019
|
const selectObj = { args: e.args, selfVideo: this, selection: e.selection, selectNode: e.selectNode };
|
|
28675
29020
|
this.dialogObj.setProperties({
|
|
28676
|
-
|
|
29021
|
+
width: '290px', header: vidSizeHeader, content: dialogContent,
|
|
28677
29022
|
buttons: [{
|
|
28678
29023
|
// eslint-disable-next-line
|
|
28679
29024
|
click: (e) => {
|
|
@@ -29042,7 +29387,6 @@ class Video {
|
|
|
29042
29387
|
this.setAspectRatio(this.videoEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
29043
29388
|
this.resizeVidDupPos(this.videoEle);
|
|
29044
29389
|
this.vidResizePos(this.videoEle, this.vidResizeDiv);
|
|
29045
|
-
this.parent.setContentHeight('', false);
|
|
29046
29390
|
}
|
|
29047
29391
|
});
|
|
29048
29392
|
}
|
|
@@ -29851,8 +30195,12 @@ class Video {
|
|
|
29851
30195
|
this.parent.trigger(fileRemoving, e, (e) => {
|
|
29852
30196
|
proxy.isVideoUploaded = false;
|
|
29853
30197
|
this.dialogObj.getButtons(0).element.disabled = true;
|
|
29854
|
-
|
|
29855
|
-
|
|
30198
|
+
if (proxy.inputUrl.getAttribute('disabled')) {
|
|
30199
|
+
proxy.inputUrl.removeAttribute('disabled');
|
|
30200
|
+
}
|
|
30201
|
+
if (proxy.embedInputUrl.getAttribute('disabled')) {
|
|
30202
|
+
proxy.embedInputUrl.removeAttribute('disabled');
|
|
30203
|
+
}
|
|
29856
30204
|
if (proxy.uploadUrl) {
|
|
29857
30205
|
proxy.uploadUrl.url = '';
|
|
29858
30206
|
}
|
|
@@ -30086,7 +30434,6 @@ class ViewSource {
|
|
|
30086
30434
|
rteContent.appendChild(this.previewElement);
|
|
30087
30435
|
this.parent.element.appendChild(rteContent);
|
|
30088
30436
|
rteContent.style.height = this.contentModule.getPanel().style.height;
|
|
30089
|
-
rteContent.style.marginTop = this.contentModule.getPanel().style.marginTop;
|
|
30090
30437
|
this.getPanel().value = this.getTextAreaValue();
|
|
30091
30438
|
this.contentModule.getPanel().style.display = 'none';
|
|
30092
30439
|
rteContent.style.display = 'block';
|
|
@@ -30107,14 +30454,17 @@ class ViewSource {
|
|
|
30107
30454
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
30108
30455
|
}
|
|
30109
30456
|
removeClass(tbItems, [CLS_ACTIVE]);
|
|
30110
|
-
this.parent.
|
|
30457
|
+
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
30458
|
+
this.parent.setContentHeight('SourceCode', isExpand);
|
|
30111
30459
|
this.wireEvent(this.previewElement);
|
|
30112
30460
|
this.unWireBaseKeyDown();
|
|
30113
30461
|
this.previewElement.focus();
|
|
30114
30462
|
this.parent.updateValue();
|
|
30115
30463
|
if (!isNullOrUndefined(this.parent.placeholder) && !this.parent.iframeSettings.enable) {
|
|
30116
30464
|
const placeHolderWrapper = this.parent.element.querySelector('.rte-placeholder.e-rte-placeholder');
|
|
30117
|
-
placeHolderWrapper
|
|
30465
|
+
if (placeHolderWrapper) {
|
|
30466
|
+
placeHolderWrapper.style.display = 'none';
|
|
30467
|
+
}
|
|
30118
30468
|
}
|
|
30119
30469
|
this.parent.trigger(actionComplete, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
|
|
30120
30470
|
this.parent.invokeChangeEvent();
|
|
@@ -30170,7 +30520,8 @@ class ViewSource {
|
|
|
30170
30520
|
if (this.parent.getToolbar()) {
|
|
30171
30521
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
30172
30522
|
}
|
|
30173
|
-
this.parent.
|
|
30523
|
+
const isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
30524
|
+
this.parent.setContentHeight('Preview', isExpand);
|
|
30174
30525
|
this.unWireEvent();
|
|
30175
30526
|
this.wireBaseKeyDown();
|
|
30176
30527
|
this.contentModule.getEditPanel().focus();
|
|
@@ -30244,6 +30595,7 @@ class Table {
|
|
|
30244
30595
|
this.pageY = null;
|
|
30245
30596
|
this.moveEle = null;
|
|
30246
30597
|
this.currentColumnResize = '';
|
|
30598
|
+
this.resizeEndTime = 0;
|
|
30247
30599
|
this.parent = parent;
|
|
30248
30600
|
this.rteID = parent.element.id;
|
|
30249
30601
|
this.l10n = serviceLocator.getService('rteLocale');
|
|
@@ -30401,7 +30753,15 @@ class Table {
|
|
|
30401
30753
|
keyUp(e) {
|
|
30402
30754
|
const target = e.args.target;
|
|
30403
30755
|
if (e.args.key.toLocaleLowerCase() === 'escape' && target && target.classList && (this.popupObj && !closest(target, '[id=' + "'" + this.popupObj.element.id + "'" + ']')) && this.popupObj) {
|
|
30756
|
+
let createTableToolbarBtn = this.popupObj.relateTo;
|
|
30757
|
+
if (createTableToolbarBtn.nodeName !== 'BUTTON') {
|
|
30758
|
+
createTableToolbarBtn = createTableToolbarBtn.querySelector('span.e-create-table');
|
|
30759
|
+
createTableToolbarBtn = createTableToolbarBtn.parentElement;
|
|
30760
|
+
}
|
|
30404
30761
|
this.popupObj.hide();
|
|
30762
|
+
if (createTableToolbarBtn) {
|
|
30763
|
+
createTableToolbarBtn.focus();
|
|
30764
|
+
}
|
|
30405
30765
|
}
|
|
30406
30766
|
}
|
|
30407
30767
|
keyDown(e) {
|
|
@@ -30581,7 +30941,20 @@ class Table {
|
|
|
30581
30941
|
return false;
|
|
30582
30942
|
}
|
|
30583
30943
|
}
|
|
30944
|
+
removeEmptyTextNodes(element) {
|
|
30945
|
+
const children = element.childNodes;
|
|
30946
|
+
for (let i = children.length - 1; i >= 0; i--) {
|
|
30947
|
+
const node = children[i];
|
|
30948
|
+
if (node.nodeType === Node.TEXT_NODE && node.nodeValue.trim() === '') {
|
|
30949
|
+
element.removeChild(node);
|
|
30950
|
+
}
|
|
30951
|
+
}
|
|
30952
|
+
}
|
|
30584
30953
|
tabSelection(event, selection, ele) {
|
|
30954
|
+
let allHeadBodyTRElements = ele.closest('table').querySelectorAll('thead, tbody, tr');
|
|
30955
|
+
for (let i = 0; i < allHeadBodyTRElements.length; i++) {
|
|
30956
|
+
this.removeEmptyTextNodes(allHeadBodyTRElements[i]);
|
|
30957
|
+
}
|
|
30585
30958
|
this.previousTableElement = ele;
|
|
30586
30959
|
const insideList = this.insideList(selection.range);
|
|
30587
30960
|
if ((event.keyCode === 37 || event.keyCode === 39) && selection.range.startContainer.nodeType === 3 ||
|
|
@@ -30718,10 +31091,12 @@ class Table {
|
|
|
30718
31091
|
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
30719
31092
|
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
30720
31093
|
const isAnchorEle = this.getAnchorNode(target);
|
|
31094
|
+
const currentTime = new Date().getTime();
|
|
30721
31095
|
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
30722
31096
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
30723
31097
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
30724
|
-
&& !(range.startContainer.nodeType === 3 && !range.collapsed)
|
|
31098
|
+
&& !(range.startContainer.nodeType === 3 && !range.collapsed) &&
|
|
31099
|
+
currentTime - this.resizeEndTime > 100) {
|
|
30725
31100
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
30726
31101
|
this.parent.formatter.editorManager.nodeSelection.save(range, this.contentModule.getDocument());
|
|
30727
31102
|
this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());
|
|
@@ -30817,7 +31192,10 @@ class Table {
|
|
|
30817
31192
|
const tdNode = closest(target, 'td,th');
|
|
30818
31193
|
target = (target.nodeName !== 'TD' && tdNode && this.parent.contentModule.getEditPanel().contains(tdNode)) ?
|
|
30819
31194
|
tdNode : target;
|
|
30820
|
-
|
|
31195
|
+
if (!(this.parent.quickToolbarSettings.showOnRightClick && e.args.which === 3 &&
|
|
31196
|
+
target.classList.contains(CLS_TABLE_SEL))) {
|
|
31197
|
+
removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), CLS_TABLE_SEL);
|
|
31198
|
+
}
|
|
30821
31199
|
if (target && (target.tagName === 'TD' || target.tagName === 'TH')) {
|
|
30822
31200
|
addClass([target], CLS_TABLE_SEL);
|
|
30823
31201
|
this.activeCell = target;
|
|
@@ -31204,6 +31582,9 @@ class Table {
|
|
|
31204
31582
|
widthCompare = rteWidth;
|
|
31205
31583
|
}
|
|
31206
31584
|
if (this.resizeBtnStat.column) {
|
|
31585
|
+
if (this.curTable.closest('li')) {
|
|
31586
|
+
widthCompare = this.curTable.closest('li').offsetWidth;
|
|
31587
|
+
}
|
|
31207
31588
|
const colGroup = this.curTable.querySelectorAll('colgroup > col');
|
|
31208
31589
|
let currentTableWidth;
|
|
31209
31590
|
if (this.curTable.style.width !== '' && this.curTable.style.width.includes('%')) {
|
|
@@ -31229,6 +31610,15 @@ class Table {
|
|
|
31229
31610
|
(this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) + '%');
|
|
31230
31611
|
const differenceWidth = currentTableWidth - this.convertPixelToPercentage(tableWidth - mouseX, widthCompare);
|
|
31231
31612
|
let preMarginLeft = 0;
|
|
31613
|
+
const widthType = this.curTable.style.width.indexOf('%') > -1;
|
|
31614
|
+
if (!widthType && this.curTable.offsetWidth > this.contentModule.getEditPanel().offsetWidth) {
|
|
31615
|
+
this.curTable.style.width = rteWidth + 'px';
|
|
31616
|
+
return;
|
|
31617
|
+
}
|
|
31618
|
+
if (widthType && parseFloat(this.curTable.style.width.split('%')[0]) > 100) {
|
|
31619
|
+
this.curTable.style.width = '100%';
|
|
31620
|
+
return;
|
|
31621
|
+
}
|
|
31232
31622
|
if (!isNullOrUndefined(this.curTable.style.marginLeft) && this.curTable.style.marginLeft !== '') {
|
|
31233
31623
|
const regex = /[-+]?\d*\.\d+|\d+/;
|
|
31234
31624
|
const value = this.curTable.style.marginLeft.match(regex);
|
|
@@ -31236,7 +31626,16 @@ class Table {
|
|
|
31236
31626
|
preMarginLeft = parseFloat(value[0]);
|
|
31237
31627
|
}
|
|
31238
31628
|
}
|
|
31239
|
-
|
|
31629
|
+
let currentMarginLeft = preMarginLeft + differenceWidth;
|
|
31630
|
+
if (currentMarginLeft && currentMarginLeft > 100) {
|
|
31631
|
+
const width = parseFloat(this.curTable.style.width);
|
|
31632
|
+
currentMarginLeft = 100 - width;
|
|
31633
|
+
}
|
|
31634
|
+
if (currentMarginLeft && currentMarginLeft < 1) {
|
|
31635
|
+
this.curTable.style.marginLeft = null;
|
|
31636
|
+
this.curTable.style.width = '100%';
|
|
31637
|
+
return;
|
|
31638
|
+
}
|
|
31240
31639
|
this.curTable.style.marginLeft = 'calc(' + (this.curTable.style.width === '100%' ? 0 : currentMarginLeft) + '%)';
|
|
31241
31640
|
for (let i = 0; i < firstColumnsCell.length; i++) {
|
|
31242
31641
|
const currentColumnCellWidth = this.getCurrentColWidth(firstColumnsCell[i], tableWidth);
|
|
@@ -31307,15 +31706,26 @@ class Table {
|
|
|
31307
31706
|
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
31308
31707
|
this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
31309
31708
|
}
|
|
31310
|
-
const widthType = this.curTable.style.width.indexOf('%') > -1;
|
|
31311
|
-
this.curTable.style.width = widthType ? this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
31312
|
-
: tableWidth + mouseX + 'px';
|
|
31313
31709
|
this.curTable.style.height = tableHeight + mouseY + 'px';
|
|
31314
31710
|
if (!isNullOrUndefined(tableReBox)) {
|
|
31315
31711
|
tableReBox.classList.add('e-rbox-select');
|
|
31316
31712
|
tableReBox.style.cssText = 'top: ' + (this.calcPos(this.curTable).top + tableHeight - 4) +
|
|
31317
31713
|
'px; left:' + (this.calcPos(this.curTable).left + tableWidth - 4) + 'px;';
|
|
31318
31714
|
}
|
|
31715
|
+
if (this.curTable.closest('li')) {
|
|
31716
|
+
widthCompare = this.curTable.closest('li').offsetWidth;
|
|
31717
|
+
}
|
|
31718
|
+
const widthType = this.curTable.style.width.indexOf('%') > -1;
|
|
31719
|
+
if (widthType && parseFloat(this.curTable.style.width.split('%')[0]) > 100) {
|
|
31720
|
+
this.curTable.style.width = '100%';
|
|
31721
|
+
return;
|
|
31722
|
+
}
|
|
31723
|
+
if (!widthType && this.curTable.offsetWidth > this.contentModule.getEditPanel().offsetWidth) {
|
|
31724
|
+
this.curTable.style.width = rteWidth + 'px';
|
|
31725
|
+
return;
|
|
31726
|
+
}
|
|
31727
|
+
this.curTable.style.width = widthType ? this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
31728
|
+
: tableWidth + mouseX + 'px';
|
|
31319
31729
|
}
|
|
31320
31730
|
}
|
|
31321
31731
|
});
|
|
@@ -31389,6 +31799,7 @@ class Table {
|
|
|
31389
31799
|
const args = { event: e, requestType: 'table' };
|
|
31390
31800
|
this.parent.trigger(resizeStop, args);
|
|
31391
31801
|
this.parent.formatter.saveData();
|
|
31802
|
+
this.resizeEndTime = new Date().getTime();
|
|
31392
31803
|
}
|
|
31393
31804
|
resetResizeHelper(curTable) {
|
|
31394
31805
|
const colHelper = this.parent.element.querySelectorAll('.e-table-rhelper.e-column-helper');
|
|
@@ -31403,6 +31814,9 @@ class Table {
|
|
|
31403
31814
|
element.parentNode.removeChild(element);
|
|
31404
31815
|
}
|
|
31405
31816
|
});
|
|
31817
|
+
if (!curTable.style.width) {
|
|
31818
|
+
curTable.style.width = curTable.offsetWidth + 'px';
|
|
31819
|
+
}
|
|
31406
31820
|
const colGroup = curTable.querySelector('colgroup');
|
|
31407
31821
|
if (colGroup) {
|
|
31408
31822
|
for (let i = 0; i < curTable.rows.length; i++) {
|
|
@@ -31498,7 +31912,7 @@ class Table {
|
|
|
31498
31912
|
this.createTableButton.isStringTemplate = true;
|
|
31499
31913
|
this.createTableButton.appendTo(btnEle);
|
|
31500
31914
|
EventHandler.add(btnEle, 'click', this.insertTableDialog, { self: this, args: args.args, selection: args.selection });
|
|
31501
|
-
this.parent.getToolbar().appendChild(this.dlgDiv);
|
|
31915
|
+
this.parent.getToolbar().parentElement.appendChild(this.dlgDiv);
|
|
31502
31916
|
let target = args.args.originalEvent.target;
|
|
31503
31917
|
target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
|
|
31504
31918
|
this.popupObj = new Popup(this.dlgDiv, {
|
|
@@ -32470,7 +32884,7 @@ __decorate$2([
|
|
|
32470
32884
|
Property(null)
|
|
32471
32885
|
], PasteCleanupSettings.prototype, "deniedAttrs", void 0);
|
|
32472
32886
|
__decorate$2([
|
|
32473
|
-
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'])
|
|
32887
|
+
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'])
|
|
32474
32888
|
], PasteCleanupSettings.prototype, "allowedStyleProps", void 0);
|
|
32475
32889
|
__decorate$2([
|
|
32476
32890
|
Property(null)
|
|
@@ -32679,7 +33093,8 @@ class EnterKeyAction {
|
|
|
32679
33093
|
isTableEnter = blockElement.tagName === 'TD' || blockElement.tagName === 'TBODY' ? false : true;
|
|
32680
33094
|
}
|
|
32681
33095
|
if (e.args.which === 13 && !e.args.ctrlKey && (!Browser.isDevice ? e.args.code === 'Enter' : e.args.key === 'Enter')) {
|
|
32682
|
-
if (isNullOrUndefined(this.startNode.closest('LI, UL, OL')) && isNullOrUndefined(this.endNode.closest('LI, UL, OL')) &&
|
|
33096
|
+
if (isNullOrUndefined(this.startNode.closest('LI, UL, OL')) && isNullOrUndefined(this.endNode.closest('LI, UL, OL')) &&
|
|
33097
|
+
isNullOrUndefined(this.startNode.closest('.e-img-inner')) && isTableEnter &&
|
|
32683
33098
|
isNullOrUndefined(this.startNode.closest('PRE')) && isNullOrUndefined(this.endNode.closest('PRE'))) {
|
|
32684
33099
|
const shiftKey = e.args.shiftKey;
|
|
32685
33100
|
const actionBeginArgs = {
|
|
@@ -33167,6 +33582,14 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33167
33582
|
member: 'image',
|
|
33168
33583
|
args: [this, this.serviceLocator]
|
|
33169
33584
|
});
|
|
33585
|
+
modules.push({
|
|
33586
|
+
member: 'audio',
|
|
33587
|
+
args: [this, this.serviceLocator]
|
|
33588
|
+
});
|
|
33589
|
+
modules.push({
|
|
33590
|
+
member: 'video',
|
|
33591
|
+
args: [this, this.serviceLocator]
|
|
33592
|
+
});
|
|
33170
33593
|
if (this.quickToolbarSettings.enable) {
|
|
33171
33594
|
modules.push({ member: 'quickToolbar', args: [this, this.serviceLocator] });
|
|
33172
33595
|
}
|
|
@@ -33180,14 +33603,6 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33180
33603
|
if (this.editorMode === 'HTML') {
|
|
33181
33604
|
modules.push({ member: 'htmlEditor', args: [this, this.serviceLocator] });
|
|
33182
33605
|
modules.push({ member: 'pasteCleanup', args: [this, this.serviceLocator] });
|
|
33183
|
-
modules.push({
|
|
33184
|
-
member: 'audio',
|
|
33185
|
-
args: [this, this.serviceLocator]
|
|
33186
|
-
});
|
|
33187
|
-
modules.push({
|
|
33188
|
-
member: 'video',
|
|
33189
|
-
args: [this, this.serviceLocator]
|
|
33190
|
-
});
|
|
33191
33606
|
modules.push({
|
|
33192
33607
|
member: 'formatPainter',
|
|
33193
33608
|
args: [this]
|
|
@@ -33219,7 +33634,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33219
33634
|
else {
|
|
33220
33635
|
if (this.getToolbar()) {
|
|
33221
33636
|
removeClass(this.getToolbar().querySelectorAll('.' + CLS_ACTIVE), CLS_ACTIVE);
|
|
33222
|
-
removeClass([this.getToolbar()], [CLS_TB_FLOAT
|
|
33637
|
+
removeClass([this.getToolbar().parentElement], [CLS_TB_FLOAT]);
|
|
33223
33638
|
}
|
|
33224
33639
|
addClass([this.element], CLS_DISABLED);
|
|
33225
33640
|
this.element.tabIndex = -1;
|
|
@@ -33640,7 +34055,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33640
34055
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
33641
34056
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
33642
34057
|
}
|
|
33643
|
-
this.setContentHeight();
|
|
34058
|
+
this.setContentHeight('Init');
|
|
33644
34059
|
if (this.value !== null) {
|
|
33645
34060
|
this.valueContainer.defaultValue = this.value;
|
|
33646
34061
|
}
|
|
@@ -33844,9 +34259,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33844
34259
|
switch (e.action) {
|
|
33845
34260
|
case 'toolbar-focus':
|
|
33846
34261
|
if (this.toolbarSettings.enable && this.getToolbarElement()) {
|
|
33847
|
-
|
|
33848
|
-
|
|
33849
|
-
|
|
34262
|
+
let firstActiveItem = this.getToolbarElement().querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
34263
|
+
const quickToolbarElem = this.getRenderedQuickToolbarElem();
|
|
34264
|
+
if (quickToolbarElem) {
|
|
34265
|
+
firstActiveItem = quickToolbarElem.querySelector('.e-toolbar-item:not(.e-overlay)[title]');
|
|
34266
|
+
}
|
|
34267
|
+
if (firstActiveItem) {
|
|
34268
|
+
const firstChild = firstActiveItem.firstElementChild;
|
|
34269
|
+
firstChild.removeAttribute('tabindex');
|
|
34270
|
+
firstChild.focus();
|
|
34271
|
+
}
|
|
33850
34272
|
}
|
|
33851
34273
|
break;
|
|
33852
34274
|
case 'escape':
|
|
@@ -34062,6 +34484,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34062
34484
|
this.notify(pasteClean, { args: e });
|
|
34063
34485
|
}
|
|
34064
34486
|
else {
|
|
34487
|
+
console.warn('[WARNING] :: Module "pasteCleanup" is not available in RichTextEditor component! You either misspelled the module name or forgot to load it.');
|
|
34065
34488
|
const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
|
|
34066
34489
|
let value = null;
|
|
34067
34490
|
let htmlValue = false;
|
|
@@ -34355,7 +34778,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34355
34778
|
break;
|
|
34356
34779
|
case 'height':
|
|
34357
34780
|
this.setHeight(newProp[prop]);
|
|
34358
|
-
this.setContentHeight();
|
|
34781
|
+
this.setContentHeight('Init');
|
|
34359
34782
|
this.autoResize();
|
|
34360
34783
|
break;
|
|
34361
34784
|
case 'readonly':
|
|
@@ -34402,11 +34825,11 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34402
34825
|
break;
|
|
34403
34826
|
case 'inlineMode':
|
|
34404
34827
|
this.notify(modelChanged, { module: 'quickToolbar', newProp: newProp, oldProp: oldProp });
|
|
34405
|
-
this.setContentHeight();
|
|
34828
|
+
this.setContentHeight('Init');
|
|
34406
34829
|
break;
|
|
34407
34830
|
case 'toolbarSettings':
|
|
34408
34831
|
this.notify(modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
|
|
34409
|
-
this.setContentHeight();
|
|
34832
|
+
this.setContentHeight('Init');
|
|
34410
34833
|
break;
|
|
34411
34834
|
case 'maxLength':
|
|
34412
34835
|
if (this.showCharCount) {
|
|
@@ -34565,7 +34988,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34565
34988
|
this.inputElement.setAttribute('placeholder', this.placeholder);
|
|
34566
34989
|
}
|
|
34567
34990
|
}
|
|
34568
|
-
if (this.placeholder && this.iframeSettings.enable) {
|
|
34991
|
+
if (this.placeholder && this.iframeSettings.enable && this.inputElement) {
|
|
34569
34992
|
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
34570
34993
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
|
|
34571
34994
|
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
@@ -34910,12 +35333,9 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34910
35333
|
*/
|
|
34911
35334
|
setContentHeight(target, isExpand) {
|
|
34912
35335
|
let heightValue;
|
|
34913
|
-
let topValue = 0;
|
|
34914
35336
|
let rteHeightPercent;
|
|
34915
35337
|
const heightPercent = typeof (this.height) === 'string' && this.height.indexOf('%') > -1;
|
|
34916
|
-
const cntEle =
|
|
34917
|
-
this.sourceCodeModule.getPanel().parentElement.style.display === 'block') ? this.sourceCodeModule.getPanel().parentElement :
|
|
34918
|
-
this.contentModule.getPanel();
|
|
35338
|
+
const cntEle = this.contentModule.getPanel();
|
|
34919
35339
|
let rteHeight = this.element.offsetHeight;
|
|
34920
35340
|
if (rteHeight === 0 && this.height !== 'auto' && !this.getToolbar()) {
|
|
34921
35341
|
rteHeight = parseInt(this.height, 10);
|
|
@@ -34923,43 +35343,40 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34923
35343
|
rteHeightPercent = this.height;
|
|
34924
35344
|
}
|
|
34925
35345
|
}
|
|
34926
|
-
|
|
35346
|
+
let tbHeight = this.getToolbar() ? this.toolbarModule.getToolbarHeight() : 0;
|
|
34927
35347
|
const rzHandle = this.element.querySelector('.' + CLS_RTE_RES_HANDLE);
|
|
34928
35348
|
const rzHeight = this.enableResize ? (!isNullOrUndefined(rzHandle) ? (rzHandle.offsetHeight + 8) : 0) : 0;
|
|
34929
35349
|
const expandPopHeight = this.getToolbar() ? this.toolbarModule.getExpandTBarPopHeight() : 0;
|
|
34930
|
-
if (this.
|
|
34931
|
-
|
|
34932
|
-
topValue = (!this.toolbarSettings.enableFloating) ? expandPopHeight : 0;
|
|
35350
|
+
if (target && target !== 'Toolbar' && expandPopHeight && this.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0) {
|
|
35351
|
+
tbHeight = tbHeight - expandPopHeight;
|
|
34933
35352
|
}
|
|
34934
|
-
|
|
34935
|
-
if (
|
|
34936
|
-
heightValue = 'auto';
|
|
35353
|
+
if (this.toolbarSettings.type === ToolbarType.Expand) {
|
|
35354
|
+
if (isExpand) {
|
|
35355
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
|
|
34937
35356
|
}
|
|
34938
35357
|
else {
|
|
34939
|
-
heightValue =
|
|
35358
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight - expandPopHeight + rzHeight) + 'px';
|
|
34940
35359
|
}
|
|
34941
35360
|
}
|
|
34942
|
-
|
|
34943
|
-
|
|
34944
|
-
|
|
34945
|
-
|
|
35361
|
+
else {
|
|
35362
|
+
heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - tbHeight + 'px';
|
|
35363
|
+
}
|
|
35364
|
+
const finalHeight = heightPercent && rteHeightPercent ? rteHeightPercent : heightValue;
|
|
35365
|
+
switch (target) {
|
|
35366
|
+
case 'Init':
|
|
35367
|
+
case 'Toolbar':
|
|
35368
|
+
case 'WindowResize':
|
|
35369
|
+
case 'Refresh':
|
|
35370
|
+
if (this.element.querySelectorAll('.e-source-content').length > 0 && this.element.querySelector('.e-source-content').style.display === 'block') {
|
|
35371
|
+
setStyleAttribute(this.element.querySelector('.e-source-content'), { height: finalHeight });
|
|
34946
35372
|
}
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
if (target === 'windowResize' && heightPercent) {
|
|
34950
|
-
//cntEle hide the borderBottom of RichTextEditor. so removed the 2px of cntEle height.
|
|
34951
|
-
heightValue = parseInt(heightValue, 10) - 2 + 'px';
|
|
35373
|
+
else {
|
|
35374
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
34952
35375
|
}
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
|
|
34957
|
-
const codeElement = select('.' + CLS_RTE_CONTENT, this.element);
|
|
34958
|
-
setStyleAttribute(codeElement, { height: heightValue, marginTop: topValue + 'px' });
|
|
34959
|
-
}
|
|
34960
|
-
if (this.toolbarSettings.enableFloating && this.getToolbar() && !this.inlineMode.enable) {
|
|
34961
|
-
const tbWrapHeight = (isExpand ? (tbHeight + expandPopHeight) : tbHeight) + 'px';
|
|
34962
|
-
setStyleAttribute(this.getToolbar().parentElement, { height: tbWrapHeight });
|
|
35376
|
+
break;
|
|
35377
|
+
case 'Resize':
|
|
35378
|
+
setStyleAttribute(cntEle, { height: finalHeight });
|
|
35379
|
+
break;
|
|
34963
35380
|
}
|
|
34964
35381
|
if (rzHeight === 0) {
|
|
34965
35382
|
this.autoResize();
|
|
@@ -35162,18 +35579,14 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35162
35579
|
resizeHandler() {
|
|
35163
35580
|
let isExpand = false;
|
|
35164
35581
|
if (!document.body.contains(this.element)) {
|
|
35165
|
-
document.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
35582
|
+
document.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35166
35583
|
return;
|
|
35167
35584
|
}
|
|
35168
35585
|
if (this.toolbarSettings.enable && !this.inlineMode.enable) {
|
|
35169
35586
|
this.toolbarModule.refreshToolbarOverflow();
|
|
35170
35587
|
isExpand = this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(CLS_EXPAND_OPEN);
|
|
35171
35588
|
}
|
|
35172
|
-
|
|
35173
|
-
// When resize the window,border bottom of cntEle and this.element border visible separatly.so none the cntEle borderBottom.
|
|
35174
|
-
this.contentModule.getPanel().style.borderBottom = 'none';
|
|
35175
|
-
}
|
|
35176
|
-
this.setContentHeight('windowResize', isExpand);
|
|
35589
|
+
this.setContentHeight('WindowResize', isExpand);
|
|
35177
35590
|
this.notify(windowResize, null);
|
|
35178
35591
|
}
|
|
35179
35592
|
scrollHandler(e) {
|
|
@@ -35309,6 +35722,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35309
35722
|
this.isRTE = false;
|
|
35310
35723
|
}
|
|
35311
35724
|
this.notify(docClick, { args: e });
|
|
35725
|
+
const hideQuickToolbarChecker = this.quickToolbarModule && !this.inlineMode.enable && isNullOrUndefined(this.quickToolbarModule.inlineQTBar);
|
|
35726
|
+
if ((hideQuickToolbarChecker && !isNullOrUndefined(closest(target, '.' + 'e-toolbar-wrapper'))) || (hideQuickToolbarChecker && (!isNullOrUndefined(closest(target, '.e-rte-table-resize')) || !isNullOrUndefined(closest(target, '.e-table-box'))))) {
|
|
35727
|
+
this.quickToolbarModule.hideQuickToolbars();
|
|
35728
|
+
}
|
|
35312
35729
|
if (Browser.info.name !== 'msie' && e.detail > 3) {
|
|
35313
35730
|
e.preventDefault();
|
|
35314
35731
|
}
|
|
@@ -35456,9 +35873,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35456
35873
|
this.triggerEditArea(e.originalEvent);
|
|
35457
35874
|
}
|
|
35458
35875
|
contextHandler(e) {
|
|
35459
|
-
const closestElem = closest(e.target, 'a, table, img');
|
|
35876
|
+
const closestElem = closest(e.target, 'a, table, img, video, audio');
|
|
35460
35877
|
if (this.inlineMode.onSelection === false || (!isNullOrUndefined(closestElem) && this.inputElement.contains(closestElem)
|
|
35461
|
-
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A'
|
|
35878
|
+
&& (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A' ||
|
|
35879
|
+
closestElem.tagName.toLowerCase() === 'video' || closestElem.tagName.toLowerCase() === 'audio'))) {
|
|
35462
35880
|
e.preventDefault();
|
|
35463
35881
|
}
|
|
35464
35882
|
}
|
|
@@ -35480,9 +35898,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35480
35898
|
}
|
|
35481
35899
|
else if (this.iframeSettings.enable) {
|
|
35482
35900
|
const iframeElement = this.element.querySelector('#' + this.getID() + '_rte-view');
|
|
35483
|
-
|
|
35484
|
-
this.setAutoHeight(iframeElement);
|
|
35485
|
-
}, 100);
|
|
35901
|
+
this.setAutoHeight(iframeElement);
|
|
35486
35902
|
this.inputElement.style.overflow = 'hidden';
|
|
35487
35903
|
}
|
|
35488
35904
|
}
|
|
@@ -35491,10 +35907,21 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35491
35907
|
}
|
|
35492
35908
|
}
|
|
35493
35909
|
setAutoHeight(element) {
|
|
35494
|
-
if (!isNullOrUndefined(element)) {
|
|
35910
|
+
if (!isNullOrUndefined(element) && !this.iframeSettings.enable) {
|
|
35495
35911
|
element.style.height = this.inputElement.scrollHeight + 'px';
|
|
35496
35912
|
element.style.overflow = 'hidden';
|
|
35497
35913
|
}
|
|
35914
|
+
else if (!isNullOrUndefined(element) && !isNullOrUndefined(element.parentElement) && this.iframeSettings.enable) {
|
|
35915
|
+
const newRange = this.getRange();
|
|
35916
|
+
element.style.height = 'auto';
|
|
35917
|
+
const newHeight = element.contentDocument.body.scrollHeight + 'px';
|
|
35918
|
+
element.style.height = newHeight;
|
|
35919
|
+
element.style.overflow = 'hidden';
|
|
35920
|
+
// 16 px added for padding doesn't affect the editor height
|
|
35921
|
+
if (newRange.startContainer.nodeName !== '#text' && newRange.startContainer.nodeName !== 'BODY' && window.innerHeight < newRange.startContainer.getBoundingClientRect().top + element.getBoundingClientRect().top + 16) {
|
|
35922
|
+
newRange.startContainer.scrollIntoView(false);
|
|
35923
|
+
}
|
|
35924
|
+
}
|
|
35498
35925
|
}
|
|
35499
35926
|
wireEvents() {
|
|
35500
35927
|
this.element.addEventListener('focusin', this.onFocusHandler, true);
|
|
@@ -35549,7 +35976,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35549
35976
|
EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
|
|
35550
35977
|
this.wireContextEvent();
|
|
35551
35978
|
this.formatter.editorManager.observer.on(KEY_DOWN_HANDLER, this.editorKeyDown, this);
|
|
35552
|
-
this.element.ownerDocument.defaultView.addEventListener('resize', this.onResizeHandler, true);
|
|
35979
|
+
this.element.ownerDocument.defaultView.addEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35553
35980
|
if (this.iframeSettings.enable) {
|
|
35554
35981
|
EventHandler.add(this.inputElement, 'focusin', this.focusHandler, this);
|
|
35555
35982
|
EventHandler.add(this.inputElement, 'focusout', this.blurHandler, this);
|
|
@@ -35615,7 +36042,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35615
36042
|
if (this.formatter) {
|
|
35616
36043
|
this.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.editorKeyDown);
|
|
35617
36044
|
}
|
|
35618
|
-
this.element.ownerDocument.defaultView.removeEventListener('resize', this.onResizeHandler, true);
|
|
36045
|
+
this.element.ownerDocument.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
|
|
35619
36046
|
if (this.iframeSettings.enable) {
|
|
35620
36047
|
EventHandler.remove(this.inputElement, 'focusin', this.focusHandler);
|
|
35621
36048
|
EventHandler.remove(this.inputElement, 'focusout', this.blurHandler);
|
|
@@ -35680,6 +36107,15 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
35680
36107
|
}
|
|
35681
36108
|
}
|
|
35682
36109
|
}
|
|
36110
|
+
getRenderedQuickToolbarElem() {
|
|
36111
|
+
const quickToolbars = this.quickToolbarModule.getQuickToolbarInstance();
|
|
36112
|
+
for (let i = 0; i < quickToolbars.length; i++) {
|
|
36113
|
+
if (quickToolbars[i] && quickToolbars[i].isRendered) {
|
|
36114
|
+
return quickToolbars[i].element;
|
|
36115
|
+
}
|
|
36116
|
+
}
|
|
36117
|
+
return null;
|
|
36118
|
+
}
|
|
35683
36119
|
};
|
|
35684
36120
|
__decorate$1([
|
|
35685
36121
|
Complex({}, ToolbarSettings$1)
|
|
@@ -35983,5 +36419,5 @@ RichTextEditor = __decorate$1([
|
|
|
35983
36419
|
* Rich Text Editor component exported items
|
|
35984
36420
|
*/
|
|
35985
36421
|
|
|
35986
|
-
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,
|
|
36422
|
+
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 };
|
|
35987
36423
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|