@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.41
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 +27 -1
- 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 +571 -309
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +570 -308
- 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.js +1 -1
- package/src/editor-manager/plugin/audio.js +13 -3
- package/src/editor-manager/plugin/dom-node.js +1 -14
- package/src/editor-manager/plugin/image.js +30 -3
- package/src/editor-manager/plugin/inserthtml.js +5 -2
- package/src/editor-manager/plugin/ms-word-clean-up.js +4 -1
- package/src/editor-manager/plugin/nodecutter.js +1 -1
- package/src/editor-manager/plugin/selection-commands.js +39 -0
- package/src/rich-text-editor/actions/base-quick-toolbar.js +18 -4
- package/src/rich-text-editor/actions/color-picker.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.js +4 -2
- package/src/rich-text-editor/actions/emoji-picker.js +12 -3
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +2 -2
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +36 -5
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +72 -19
- package/src/rich-text-editor/actions/quick-toolbar.js +24 -5
- package/src/rich-text-editor/actions/toolbar.d.ts +1 -0
- package/src/rich-text-editor/actions/toolbar.js +18 -10
- package/src/rich-text-editor/base/classes.d.ts +5 -0
- package/src/rich-text-editor/base/classes.js +5 -0
- package/src/rich-text-editor/base/constant.d.ts +6 -1
- package/src/rich-text-editor/base/constant.js +6 -1
- package/src/rich-text-editor/base/interface.d.ts +10 -0
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +9 -0
- package/src/rich-text-editor/base/rich-text-editor.js +80 -17
- package/src/rich-text-editor/base/util.js +11 -2
- package/src/rich-text-editor/formatter/formatter.js +1 -1
- package/src/rich-text-editor/models/default-locale.js +2 -0
- package/src/rich-text-editor/models/items.js +1 -1
- package/src/rich-text-editor/renderer/dialog-renderer.js +10 -1
- package/src/rich-text-editor/renderer/image-module.js +68 -59
- package/src/rich-text-editor/renderer/link-module.js +43 -23
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +43 -30
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +0 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +13 -93
- package/src/rich-text-editor/renderer/view-source.js +3 -1
- package/styles/bootstrap-dark.css +194 -52
- package/styles/bootstrap.css +197 -53
- package/styles/bootstrap4.css +194 -52
- package/styles/bootstrap5-dark.css +195 -53
- package/styles/bootstrap5.css +195 -53
- package/styles/fabric-dark.css +194 -52
- package/styles/fabric.css +194 -52
- package/styles/fluent-dark.css +197 -53
- package/styles/fluent.css +197 -53
- package/styles/highcontrast-light.css +194 -52
- package/styles/highcontrast.css +194 -52
- package/styles/material-dark.css +196 -53
- package/styles/material.css +196 -53
- package/styles/material3-dark.css +194 -52
- package/styles/material3.css +194 -52
- package/styles/rich-text-editor/_bootstrap5-definition.scss +1 -1
- package/styles/rich-text-editor/_fluent-definition.scss +1 -1
- package/styles/rich-text-editor/_layout.scss +78 -3
- package/styles/rich-text-editor/_theme.scss +1 -1
- package/styles/rich-text-editor/bootstrap-dark.css +194 -52
- package/styles/rich-text-editor/bootstrap.css +197 -53
- package/styles/rich-text-editor/bootstrap4.css +194 -52
- package/styles/rich-text-editor/bootstrap5-dark.css +195 -53
- package/styles/rich-text-editor/bootstrap5.css +195 -53
- package/styles/rich-text-editor/fabric-dark.css +194 -52
- package/styles/rich-text-editor/fabric.css +194 -52
- package/styles/rich-text-editor/fluent-dark.css +197 -53
- package/styles/rich-text-editor/fluent.css +197 -53
- package/styles/rich-text-editor/highcontrast-light.css +194 -52
- package/styles/rich-text-editor/highcontrast.css +194 -52
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap4.scss +3 -3
- package/styles/rich-text-editor/icons/_bootstrap5.scss +3 -3
- package/styles/rich-text-editor/icons/_fabric-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_fabric.scss +3 -3
- package/styles/rich-text-editor/icons/_fluent.scss +3 -3
- package/styles/rich-text-editor/icons/_fusionnew.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast.scss +3 -3
- package/styles/rich-text-editor/icons/_material-dark.scss +3 -3
- package/styles/rich-text-editor/icons/_material.scss +3 -3
- package/styles/rich-text-editor/icons/_material3.scss +3 -3
- package/styles/rich-text-editor/icons/_tailwind.scss +3 -3
- package/styles/rich-text-editor/material-dark.css +196 -53
- package/styles/rich-text-editor/material.css +196 -53
- package/styles/rich-text-editor/material3-dark.css +194 -52
- package/styles/rich-text-editor/material3.css +194 -52
- package/styles/rich-text-editor/tailwind-dark.css +194 -52
- package/styles/rich-text-editor/tailwind.css +194 -52
- package/styles/tailwind-dark.css +194 -52
- package/styles/tailwind.css +194 -52
|
@@ -738,12 +738,17 @@ const emojiPicker = 'emojiPicker';
|
|
|
738
738
|
* @hidden
|
|
739
739
|
* @deprecated
|
|
740
740
|
*/
|
|
741
|
-
const
|
|
741
|
+
const destroyTooltip = 'destroyTooltip';
|
|
742
742
|
/**
|
|
743
743
|
* @hidden
|
|
744
744
|
* @deprecated
|
|
745
745
|
*/
|
|
746
746
|
const hidePopup = 'hidePopup';
|
|
747
|
+
/**
|
|
748
|
+
* @hidden
|
|
749
|
+
* @deprecated
|
|
750
|
+
*/
|
|
751
|
+
const cleanupResizeElements = 'cleanupResizeElements';
|
|
747
752
|
/**
|
|
748
753
|
* @hidden
|
|
749
754
|
* @deprecated
|
|
@@ -840,6 +845,11 @@ const CLS_FULL_SCREEN = 'e-rte-full-screen';
|
|
|
840
845
|
* @deprecated
|
|
841
846
|
*/
|
|
842
847
|
const CLS_QUICK_TB = 'e-rte-quick-toolbar';
|
|
848
|
+
/**
|
|
849
|
+
* @hidden
|
|
850
|
+
* @deprecated
|
|
851
|
+
*/
|
|
852
|
+
const CLS_TEXT_QUICK_TB = 'e-rte-text-quicktoolbar';
|
|
843
853
|
/**
|
|
844
854
|
* @hidden
|
|
845
855
|
* @deprecated
|
|
@@ -2217,7 +2227,7 @@ let windowKeys = {
|
|
|
2217
2227
|
'Number Format List': 'Ctrl+Shift+O',
|
|
2218
2228
|
'Bullet Format List': 'Ctrl+Alt+O',
|
|
2219
2229
|
'Insert Audio': 'Ctrl+Shift+A',
|
|
2220
|
-
'Insert Video': 'Ctrl+
|
|
2230
|
+
'Insert Video': 'Ctrl+Alt+V',
|
|
2221
2231
|
'Increase Indent': 'Ctrl+]',
|
|
2222
2232
|
'Decrease Indent': 'Ctrl+[',
|
|
2223
2233
|
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
@@ -2638,6 +2648,7 @@ let toolsLocale = {
|
|
|
2638
2648
|
'bulletformatlist': 'bulletFormatList',
|
|
2639
2649
|
'undo': 'undo',
|
|
2640
2650
|
'redo': 'redo',
|
|
2651
|
+
'filemanager': 'fileManager',
|
|
2641
2652
|
'superscript': 'superscript',
|
|
2642
2653
|
'subscript': 'subscript',
|
|
2643
2654
|
'createlink': 'createLink',
|
|
@@ -2704,6 +2715,7 @@ let toolsLocale = {
|
|
|
2704
2715
|
'emojiPickerTypeToFind': 'Type to find',
|
|
2705
2716
|
'emojiPickerNoResultFound': 'No results found',
|
|
2706
2717
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2718
|
+
'ImageLinkAriaLabel': 'Open in new window',
|
|
2707
2719
|
};
|
|
2708
2720
|
let fontNameLocale = [
|
|
2709
2721
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -2999,11 +3011,11 @@ function getTBarItemsIndex(items, toolbarItems) {
|
|
|
2999
3011
|
continue;
|
|
3000
3012
|
}
|
|
3001
3013
|
else {
|
|
3002
|
-
if (items[i] === 'OrderedList' && toolbarItems[j].subCommand === 'OL') {
|
|
3014
|
+
if ((items[i] === 'OrderedList' || items[i] === 'NumberFormatList') && toolbarItems[j].subCommand === 'OL') {
|
|
3003
3015
|
itemsIndex.push(j);
|
|
3004
3016
|
break;
|
|
3005
3017
|
}
|
|
3006
|
-
else if (items[i] === 'UnorderedList' && toolbarItems[j].subCommand === 'UL') {
|
|
3018
|
+
else if ((items[i] === 'UnorderedList' || items[i] === 'BulletFormatList') && toolbarItems[j].subCommand === 'UL') {
|
|
3007
3019
|
itemsIndex.push(j);
|
|
3008
3020
|
break;
|
|
3009
3021
|
}
|
|
@@ -3155,6 +3167,15 @@ function updateTextNode(value, rteObj) {
|
|
|
3155
3167
|
for (let i = 0; i < emptyBlockElem.length; i++) {
|
|
3156
3168
|
emptyBlockElem[i].innerHTML = '<br>';
|
|
3157
3169
|
}
|
|
3170
|
+
// To handle the Empty block node with \n
|
|
3171
|
+
const allPNodes = tempNode.querySelectorAll('p');
|
|
3172
|
+
for (let i = 0; i < allPNodes.length; i++) {
|
|
3173
|
+
if (allPNodes[i].textContent.trim().length === 0 && allPNodes[i].childNodes.length === 1
|
|
3174
|
+
&& allPNodes[i].childNodes[0].nodeName === '#text' &&
|
|
3175
|
+
isNullOrUndefined(allPNodes[i].childNodes[0].textContent.match(/\u00a0/g))) {
|
|
3176
|
+
allPNodes[i].innerHTML = '<br>';
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3158
3179
|
const emptyInlineElem = tempNode.querySelectorAll(inlineEmptyNodes);
|
|
3159
3180
|
for (let i = 0; i < emptyInlineElem.length; i++) {
|
|
3160
3181
|
emptyInlineElem[i].innerHTML = '​';
|
|
@@ -3341,21 +3362,19 @@ class ToolbarRenderer {
|
|
|
3341
3362
|
}
|
|
3342
3363
|
wireEvent() {
|
|
3343
3364
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3344
|
-
this.parent.on(
|
|
3365
|
+
this.parent.on(destroyTooltip, this.destroyTooltip, this);
|
|
3345
3366
|
}
|
|
3346
3367
|
destroyTooltip() {
|
|
3347
|
-
|
|
3348
|
-
|
|
3368
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3369
|
+
this.parent.contentModule.getDocument();
|
|
3370
|
+
if (!isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap')) && !isNullOrUndefined(currentDocument.querySelector('[data-tooltip-id]'))) {
|
|
3371
|
+
const tooltipTargetEle = currentDocument.querySelector('[data-tooltip-id]');
|
|
3349
3372
|
const event = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
3350
3373
|
tooltipTargetEle.dispatchEvent(event);
|
|
3351
3374
|
}
|
|
3352
3375
|
}
|
|
3353
3376
|
unWireEvent() {
|
|
3354
3377
|
this.parent.off(destroy, this.unWireEvent);
|
|
3355
|
-
if (this.popupOverlay) {
|
|
3356
|
-
EventHandler.remove(this.popupOverlay, 'click touchmove', this.onPopupOverlay);
|
|
3357
|
-
}
|
|
3358
|
-
this.removePopupContainer();
|
|
3359
3378
|
}
|
|
3360
3379
|
toolbarBeforeCreate(e) {
|
|
3361
3380
|
if (this.mode === 'Extended') {
|
|
@@ -3376,7 +3395,6 @@ class ToolbarRenderer {
|
|
|
3376
3395
|
}
|
|
3377
3396
|
dropDownSelected(args) {
|
|
3378
3397
|
this.parent.notify(dropDownSelect, args);
|
|
3379
|
-
this.onPopupOverlay();
|
|
3380
3398
|
}
|
|
3381
3399
|
beforeDropDownItemRender(args) {
|
|
3382
3400
|
if (this.parent.readonly || !this.parent.enabled) {
|
|
@@ -3413,27 +3431,11 @@ class ToolbarRenderer {
|
|
|
3413
3431
|
addClass([listEle[1], listEle[2]], 'e-disabled');
|
|
3414
3432
|
}
|
|
3415
3433
|
}
|
|
3416
|
-
if (Browser.isDevice && !args.element.parentElement.classList.contains(CLS_QUICK_DROPDOWN)) {
|
|
3417
|
-
this.popupModal(args.element.parentElement);
|
|
3418
|
-
}
|
|
3419
3434
|
this.parent.notify(selectionSave, args);
|
|
3420
3435
|
}
|
|
3421
3436
|
dropDownClose(args) {
|
|
3422
|
-
this.removePopupContainer();
|
|
3423
3437
|
this.parent.notify(selectionRestore, args);
|
|
3424
3438
|
}
|
|
3425
|
-
removePopupContainer() {
|
|
3426
|
-
if (Browser.isDevice && !isNullOrUndefined(this.popupContainer)) {
|
|
3427
|
-
const popupEle = this.popupContainer.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3428
|
-
if (popupEle) {
|
|
3429
|
-
this.popupContainer.parentNode.insertBefore(popupEle, this.popupContainer.nextSibling);
|
|
3430
|
-
popupEle.style.removeProperty('position');
|
|
3431
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3432
|
-
}
|
|
3433
|
-
detach(this.popupContainer);
|
|
3434
|
-
this.popupContainer = undefined;
|
|
3435
|
-
}
|
|
3436
|
-
}
|
|
3437
3439
|
/**
|
|
3438
3440
|
* renderToolbar method
|
|
3439
3441
|
*
|
|
@@ -3467,7 +3469,7 @@ class ToolbarRenderer {
|
|
|
3467
3469
|
openDelay: 400,
|
|
3468
3470
|
opensOn: 'Hover',
|
|
3469
3471
|
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
3470
|
-
cssClass: this.parent.
|
|
3472
|
+
cssClass: this.parent.getCssClass(),
|
|
3471
3473
|
windowCollision: true,
|
|
3472
3474
|
position: 'BottomCenter'
|
|
3473
3475
|
});
|
|
@@ -3526,7 +3528,7 @@ class ToolbarRenderer {
|
|
|
3526
3528
|
}
|
|
3527
3529
|
//Alignments preselect
|
|
3528
3530
|
let alignEle = proxy.parent.getRange().startContainer;
|
|
3529
|
-
while (alignEle !== proxy.parent.
|
|
3531
|
+
while (alignEle !== proxy.parent.inputElement && !isNullOrUndefined(alignEle.parentElement)) {
|
|
3530
3532
|
if (alignEle.nodeName === '#text') {
|
|
3531
3533
|
alignEle = alignEle.parentElement;
|
|
3532
3534
|
}
|
|
@@ -3552,7 +3554,8 @@ class ToolbarRenderer {
|
|
|
3552
3554
|
alignEle = alignEle.parentElement;
|
|
3553
3555
|
}
|
|
3554
3556
|
//image preselect
|
|
3555
|
-
const
|
|
3557
|
+
const closestNode = startNode.closest('img');
|
|
3558
|
+
const imageEle = closestNode ? closestNode : startNode.querySelector('img');
|
|
3556
3559
|
if (args.items[0].command === 'Images') {
|
|
3557
3560
|
if (!isNullOrUndefined(imageEle)) {
|
|
3558
3561
|
let index;
|
|
@@ -3664,39 +3667,6 @@ class ToolbarRenderer {
|
|
|
3664
3667
|
};
|
|
3665
3668
|
return dropDown;
|
|
3666
3669
|
}
|
|
3667
|
-
// eslint-disable-next-line
|
|
3668
|
-
onPopupOverlay(args) {
|
|
3669
|
-
if (!isNullOrUndefined(this.popupOverlay)) {
|
|
3670
|
-
closest(this.popupOverlay, '.e-popup-container').style.display = 'none';
|
|
3671
|
-
this.popupOverlay.style.display = 'none';
|
|
3672
|
-
removeClass([this.popupOverlay], 'e-popup-overlay');
|
|
3673
|
-
}
|
|
3674
|
-
}
|
|
3675
|
-
setIsModel(element) {
|
|
3676
|
-
if (!closest(element, '.e-popup-container')) {
|
|
3677
|
-
this.popupContainer = this.parent.createElement('div', {
|
|
3678
|
-
className: 'e-rte-modal-popup e-popup-container e-center'
|
|
3679
|
-
});
|
|
3680
|
-
element.parentNode.insertBefore(this.popupContainer, element);
|
|
3681
|
-
this.popupContainer.appendChild(element);
|
|
3682
|
-
this.popupContainer.style.zIndex = element.style.zIndex;
|
|
3683
|
-
this.popupContainer.style.display = 'flex';
|
|
3684
|
-
element.style.position = 'relative';
|
|
3685
|
-
addClass([element], 'e-popup-modal');
|
|
3686
|
-
this.popupOverlay = this.parent.createElement('div', { className: 'e-popup-overlay' });
|
|
3687
|
-
// eslint-disable-next-line
|
|
3688
|
-
this.popupOverlay.style.zIndex = (parseInt(element.style.zIndex, null) - 1).toString();
|
|
3689
|
-
this.popupOverlay.style.display = 'block';
|
|
3690
|
-
this.popupContainer.appendChild(this.popupOverlay);
|
|
3691
|
-
EventHandler.add(this.popupOverlay, 'click touchmove', this.onPopupOverlay, this);
|
|
3692
|
-
}
|
|
3693
|
-
else {
|
|
3694
|
-
element.parentElement.style.display = 'flex';
|
|
3695
|
-
this.popupOverlay = element.nextElementSibling;
|
|
3696
|
-
this.popupOverlay.style.display = 'block';
|
|
3697
|
-
addClass([this.popupOverlay], 'e-popup-overlay');
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
3670
|
paletteSelection(dropDownArgs, currentElement) {
|
|
3701
3671
|
const ele = dropDownArgs.element.querySelector('.e-control.e-colorpicker');
|
|
3702
3672
|
const colorbox = [].slice.call(selectAll('.e-tile', ele.parentElement));
|
|
@@ -3724,7 +3694,7 @@ class ToolbarRenderer {
|
|
|
3724
3694
|
const proxy = this;
|
|
3725
3695
|
let css = CLS_RTE_ELEMENTS + ' ' + CLS_TB_BTN + ((this.parent.inlineMode) ? (' ' + CLS_INLINE_DROPDOWN) : '');
|
|
3726
3696
|
css += (' ' + ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_DROPDOWN : CLS_FONT_COLOR_DROPDOWN));
|
|
3727
|
-
css +=
|
|
3697
|
+
css += this.parent.getCssClass(true);
|
|
3728
3698
|
const content = proxy.parent.createElement('span', { className: CLS_COLOR_CONTENT });
|
|
3729
3699
|
const inlineEle = proxy.parent.createElement('span', { className: args.cssClass });
|
|
3730
3700
|
let range;
|
|
@@ -3796,9 +3766,6 @@ class ToolbarRenderer {
|
|
|
3796
3766
|
if (focusEle) {
|
|
3797
3767
|
focusEle.focus();
|
|
3798
3768
|
}
|
|
3799
|
-
if (Browser.isDevice) {
|
|
3800
|
-
this.popupModal(dropDownArgs.element.parentElement);
|
|
3801
|
-
}
|
|
3802
3769
|
this.pickerRefresh(dropDownArgs);
|
|
3803
3770
|
},
|
|
3804
3771
|
beforeClose: (dropDownArgs) => {
|
|
@@ -3826,22 +3793,6 @@ class ToolbarRenderer {
|
|
|
3826
3793
|
},
|
|
3827
3794
|
close: (dropDownArgs) => {
|
|
3828
3795
|
proxy.parent.notify(selectionRestore, {});
|
|
3829
|
-
const dropElement = closest(dropDownArgs.element.parentElement, '.e-popup-container');
|
|
3830
|
-
if (dropElement) {
|
|
3831
|
-
dropElement.style.display = 'none';
|
|
3832
|
-
dropElement.lastElementChild.style.display = 'none';
|
|
3833
|
-
removeClass([dropElement.lastElementChild], 'e-popup-overlay');
|
|
3834
|
-
}
|
|
3835
|
-
if (Browser.isDevice && !isNullOrUndefined(dropElement)) {
|
|
3836
|
-
const popupEle = dropElement.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3837
|
-
if (popupEle) {
|
|
3838
|
-
dropElement.parentNode.insertBefore(popupEle, dropElement.nextSibling);
|
|
3839
|
-
popupEle.style.removeProperty('position');
|
|
3840
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3841
|
-
}
|
|
3842
|
-
detach(dropElement);
|
|
3843
|
-
proxy.popupContainer = undefined;
|
|
3844
|
-
}
|
|
3845
3796
|
}
|
|
3846
3797
|
});
|
|
3847
3798
|
dropDown.isStringTemplate = true;
|
|
@@ -3869,16 +3820,6 @@ class ToolbarRenderer {
|
|
|
3869
3820
|
popupElem.style.width = (popupElem.offsetWidth - 5).toString() + 'px';
|
|
3870
3821
|
}
|
|
3871
3822
|
}
|
|
3872
|
-
popupModal(element) {
|
|
3873
|
-
const popupInst = getInstance(element, Popup);
|
|
3874
|
-
popupInst.relateTo = document.body;
|
|
3875
|
-
popupInst.position = { X: 0, Y: 0 };
|
|
3876
|
-
popupInst.targetType = 'container';
|
|
3877
|
-
popupInst.collision = { X: 'fit', Y: 'fit' };
|
|
3878
|
-
popupInst.offsetY = 4;
|
|
3879
|
-
popupInst.dataBind();
|
|
3880
|
-
this.setIsModel(element);
|
|
3881
|
-
}
|
|
3882
3823
|
setColorPickerContentWidth(colorPicker) {
|
|
3883
3824
|
const colorPickerContent = colorPicker.element.nextSibling;
|
|
3884
3825
|
if (colorPickerContent.style.width === '0px') {
|
|
@@ -3916,7 +3857,7 @@ class ToolbarRenderer {
|
|
|
3916
3857
|
args.element.classList.add(CLS_COLOR_PALETTE);
|
|
3917
3858
|
args.element.classList.add(CLS_CUSTOM_TILE);
|
|
3918
3859
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
3919
|
-
const allClassName = this.parent.
|
|
3860
|
+
const allClassName = this.parent.getCssClass().split(' ');
|
|
3920
3861
|
for (let i = 0; i < allClassName.length; i++) {
|
|
3921
3862
|
if (allClassName[i].trim() !== '') {
|
|
3922
3863
|
args.element.classList.add(allClassName[i]);
|
|
@@ -4383,7 +4324,7 @@ class DropDownButtons {
|
|
|
4383
4324
|
}
|
|
4384
4325
|
});
|
|
4385
4326
|
if (this.parent.inlineMode.enable) {
|
|
4386
|
-
this.setCssClass({ cssClass: this.parent.
|
|
4327
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
4387
4328
|
}
|
|
4388
4329
|
}
|
|
4389
4330
|
getUpdateItems(items, value) {
|
|
@@ -4700,7 +4641,9 @@ class DropDownButtons {
|
|
|
4700
4641
|
this.parent.on(bindCssClass, this.setCssClass, this);
|
|
4701
4642
|
}
|
|
4702
4643
|
onIframeMouseDown() {
|
|
4703
|
-
|
|
4644
|
+
if (this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length > 0) {
|
|
4645
|
+
dispatchEvent(document, 'mousedown');
|
|
4646
|
+
}
|
|
4704
4647
|
}
|
|
4705
4648
|
removeEventListener() {
|
|
4706
4649
|
if (this.parent.isDestroyed) {
|
|
@@ -4917,6 +4860,10 @@ class Toolbar$2 {
|
|
|
4917
4860
|
case 'escape':
|
|
4918
4861
|
this.parent.contentModule.getEditPanel().focus();
|
|
4919
4862
|
break;
|
|
4863
|
+
case 'enter':
|
|
4864
|
+
if (e.target.classList.contains('e-hor-nav')) {
|
|
4865
|
+
this.adjustContentHeight(e.target, true);
|
|
4866
|
+
}
|
|
4920
4867
|
}
|
|
4921
4868
|
}
|
|
4922
4869
|
createToolbarElement() {
|
|
@@ -4972,7 +4919,7 @@ class Toolbar$2 {
|
|
|
4972
4919
|
items: this.parent.toolbarSettings.items,
|
|
4973
4920
|
mode: tBarMode,
|
|
4974
4921
|
target: ele,
|
|
4975
|
-
cssClass: this.parent.
|
|
4922
|
+
cssClass: this.parent.getCssClass()
|
|
4976
4923
|
});
|
|
4977
4924
|
if (this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
4978
4925
|
addClass([ele], ['e-rte-tb-mobile']);
|
|
@@ -5091,7 +5038,7 @@ class Toolbar$2 {
|
|
|
5091
5038
|
items: this.parent.toolbarSettings.items,
|
|
5092
5039
|
mode: this.getToolbarMode(),
|
|
5093
5040
|
target: this.tbElement,
|
|
5094
|
-
cssClass: this.parent.
|
|
5041
|
+
cssClass: this.parent.getCssClass()
|
|
5095
5042
|
});
|
|
5096
5043
|
if (!this.parent.inlineMode.enable) {
|
|
5097
5044
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
@@ -5121,7 +5068,7 @@ class Toolbar$2 {
|
|
|
5121
5068
|
});
|
|
5122
5069
|
this.refreshToolbarOverflow();
|
|
5123
5070
|
}
|
|
5124
|
-
const divEle = this.parent.element.querySelector('.
|
|
5071
|
+
const divEle = this.parent.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
5125
5072
|
const iframeEle = this.parent.element.querySelector('.e-source-content');
|
|
5126
5073
|
if ((!this.parent.iframeSettings.enable && (!isNullOrUndefined(divEle) && divEle.style.display === 'block')) ||
|
|
5127
5074
|
(this.parent.iframeSettings.enable && (!isNullOrUndefined(iframeEle) && iframeEle.style.display === 'block'))) {
|
|
@@ -5251,7 +5198,7 @@ class Toolbar$2 {
|
|
|
5251
5198
|
baseToolbar.toolbarObj.enableItems(item, isEnable);
|
|
5252
5199
|
}
|
|
5253
5200
|
}
|
|
5254
|
-
if (!select('.
|
|
5201
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element) && !muteToolbarUpdate) {
|
|
5255
5202
|
updateUndoRedoStatus(baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5256
5203
|
}
|
|
5257
5204
|
}
|
|
@@ -5424,20 +5371,24 @@ class Toolbar$2 {
|
|
|
5424
5371
|
}
|
|
5425
5372
|
toolbarClickHandler(e) {
|
|
5426
5373
|
const trg = closest(e.originalEvent.target, '.e-hor-nav');
|
|
5374
|
+
this.adjustContentHeight(trg, false);
|
|
5375
|
+
}
|
|
5376
|
+
adjustContentHeight(trg, isKeyboard) {
|
|
5427
5377
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNullOrUndefined(trg)) {
|
|
5428
5378
|
const extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
5429
5379
|
if (!isNullOrUndefined(extendedTbar)) {
|
|
5430
5380
|
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
5431
5381
|
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
5432
5382
|
}
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5383
|
+
const hasActiveClass = trg.classList.contains('e-nav-active');
|
|
5384
|
+
const isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
5385
|
+
if (isExpand) {
|
|
5386
|
+
addClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5436
5387
|
}
|
|
5437
5388
|
else {
|
|
5438
|
-
|
|
5439
|
-
this.parent.setContentHeight('toolbar', true);
|
|
5389
|
+
removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5440
5390
|
}
|
|
5391
|
+
this.parent.setContentHeight('toolbar', isExpand);
|
|
5441
5392
|
}
|
|
5442
5393
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
5443
5394
|
this.isToolbar = true;
|
|
@@ -5560,7 +5511,7 @@ class Toolbar$2 {
|
|
|
5560
5511
|
this.addEventListener();
|
|
5561
5512
|
this.renderToolbar();
|
|
5562
5513
|
this.parent.wireScrollElementsEvents();
|
|
5563
|
-
if (!select('.
|
|
5514
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
5564
5515
|
updateUndoRedoStatus(this.baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5565
5516
|
}
|
|
5566
5517
|
this.parent.notify(dynamicModule, {});
|
|
@@ -5837,7 +5788,7 @@ class ColorPickerInput {
|
|
|
5837
5788
|
document.body.appendChild(fontNode);
|
|
5838
5789
|
options = {
|
|
5839
5790
|
cssClass: this.tools[item.toLocaleLowerCase()].icon
|
|
5840
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5791
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + this.parent.getCssClass(true),
|
|
5841
5792
|
value: this.tools[item.toLocaleLowerCase()].value,
|
|
5842
5793
|
command: this.tools[item.toLocaleLowerCase()].command,
|
|
5843
5794
|
subCommand: this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5864,7 +5815,7 @@ class ColorPickerInput {
|
|
|
5864
5815
|
document.body.appendChild(backNode);
|
|
5865
5816
|
options = {
|
|
5866
5817
|
cssClass: this.tools[item.toLocaleLowerCase()].icon
|
|
5867
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5818
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + this.parent.getCssClass(true),
|
|
5868
5819
|
value: this.tools[item.toLocaleLowerCase()].value,
|
|
5869
5820
|
command: this.tools[item.toLocaleLowerCase()].command,
|
|
5870
5821
|
subCommand: this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5879,7 +5830,7 @@ class ColorPickerInput {
|
|
|
5879
5830
|
}
|
|
5880
5831
|
});
|
|
5881
5832
|
if (this.parent.inlineMode.enable) {
|
|
5882
|
-
this.setCssClass({ cssClass: this.parent.
|
|
5833
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
5883
5834
|
}
|
|
5884
5835
|
}
|
|
5885
5836
|
destroy() {
|
|
@@ -6038,6 +5989,9 @@ class BaseQuickToolbar {
|
|
|
6038
5989
|
}
|
|
6039
5990
|
appendPopupContent() {
|
|
6040
5991
|
this.toolbarElement = this.parent.createElement('div', { className: CLS_QUICK_TB });
|
|
5992
|
+
if (this.element.classList.contains(CLS_TEXT_POP)) {
|
|
5993
|
+
this.toolbarElement.classList.add(CLS_TEXT_QUICK_TB);
|
|
5994
|
+
}
|
|
6041
5995
|
this.element.appendChild(this.toolbarElement);
|
|
6042
5996
|
}
|
|
6043
5997
|
/**
|
|
@@ -6229,7 +6183,7 @@ class BaseQuickToolbar {
|
|
|
6229
6183
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
6230
6184
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
6231
6185
|
}
|
|
6232
|
-
if (!this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
6186
|
+
if ((!this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
|
|
6233
6187
|
this.parent.disableToolbarItem(this.parent.toolbarSettings.items);
|
|
6234
6188
|
this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
6235
6189
|
}
|
|
@@ -6372,7 +6326,18 @@ class BaseQuickToolbar {
|
|
|
6372
6326
|
tbItems: this.quickTBarObj.toolbarObj.items
|
|
6373
6327
|
};
|
|
6374
6328
|
setToolbarStatus(options, true, this.parent);
|
|
6375
|
-
if (
|
|
6329
|
+
if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
|
|
6330
|
+
const options = {
|
|
6331
|
+
args: args,
|
|
6332
|
+
dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
|
|
6333
|
+
parent: this.parent,
|
|
6334
|
+
tbElements: selectAll('.' + CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
|
|
6335
|
+
tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
|
|
6336
|
+
};
|
|
6337
|
+
setToolbarStatus(options, true, this.parent);
|
|
6338
|
+
updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6339
|
+
}
|
|
6340
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
6376
6341
|
updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6377
6342
|
}
|
|
6378
6343
|
}
|
|
@@ -6404,7 +6369,7 @@ class BaseQuickToolbar {
|
|
|
6404
6369
|
}
|
|
6405
6370
|
this.parent.on(destroy, this.destroy, this);
|
|
6406
6371
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
6407
|
-
if (this.parent.inlineMode.enable) {
|
|
6372
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6408
6373
|
this.parent.on(toolbarUpdated, this.updateStatus, this);
|
|
6409
6374
|
}
|
|
6410
6375
|
}
|
|
@@ -6445,7 +6410,7 @@ class BaseQuickToolbar {
|
|
|
6445
6410
|
}
|
|
6446
6411
|
this.parent.off(destroy, this.destroy);
|
|
6447
6412
|
this.parent.off(modelChanged, this.onPropertyChanged);
|
|
6448
|
-
if (this.parent.inlineMode.enable) {
|
|
6413
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6449
6414
|
this.parent.off(toolbarUpdated, this.updateStatus);
|
|
6450
6415
|
}
|
|
6451
6416
|
}
|
|
@@ -6564,7 +6529,7 @@ class QuickToolbar {
|
|
|
6564
6529
|
toolbarItems: items,
|
|
6565
6530
|
mode: mode,
|
|
6566
6531
|
renderType: type,
|
|
6567
|
-
cssClass: this.parent.
|
|
6532
|
+
cssClass: this.parent.getCssClass()
|
|
6568
6533
|
};
|
|
6569
6534
|
}
|
|
6570
6535
|
/**
|
|
@@ -6777,6 +6742,9 @@ class QuickToolbar {
|
|
|
6777
6742
|
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
6778
6743
|
this.hideInlineQTBar();
|
|
6779
6744
|
}
|
|
6745
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6746
|
+
this.textQTBar.hidePopup();
|
|
6747
|
+
}
|
|
6780
6748
|
}
|
|
6781
6749
|
inlineQTBarMouseDownHandler() {
|
|
6782
6750
|
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
@@ -6790,8 +6758,8 @@ class QuickToolbar {
|
|
|
6790
6758
|
}
|
|
6791
6759
|
}
|
|
6792
6760
|
keyUpHandler(e) {
|
|
6761
|
+
const args = e.args;
|
|
6793
6762
|
if (this.parent.inlineMode.enable && !Browser.isDevice) {
|
|
6794
|
-
const args = e.args;
|
|
6795
6763
|
if (this.parent.inlineMode.onSelection) {
|
|
6796
6764
|
if (this.parent.getSelection().length > 0) {
|
|
6797
6765
|
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
@@ -6804,6 +6772,13 @@ class QuickToolbar {
|
|
|
6804
6772
|
}
|
|
6805
6773
|
this.deBounce(this.offsetX, this.offsetY, args.target);
|
|
6806
6774
|
}
|
|
6775
|
+
if (this.parent.quickToolbarSettings.text && !Browser.isDevice) {
|
|
6776
|
+
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
6777
|
+
args.keyCode === 35 || args.keyCode === 36 || args.keyCode === 37 || args.keyCode === 38 ||
|
|
6778
|
+
args.keyCode === 39 || args.keyCode === 40))) {
|
|
6779
|
+
this.textQTBar.showPopup(this.offsetX, this.offsetY, args.target, 'text');
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6807
6782
|
}
|
|
6808
6783
|
selectionChangeHandler(e) {
|
|
6809
6784
|
clearTimeout(this.deBouncer);
|
|
@@ -6962,6 +6937,15 @@ class QuickToolbar {
|
|
|
6962
6937
|
if (this.videoQTBar && !hasClass(this.videoQTBar.element, 'e-popup-close')) {
|
|
6963
6938
|
this.videoQTBar.hidePopup();
|
|
6964
6939
|
}
|
|
6940
|
+
if (this.tableQTBar && !hasClass(this.tableQTBar.element, 'e-popup-close')) {
|
|
6941
|
+
this.tableQTBar.hidePopup();
|
|
6942
|
+
}
|
|
6943
|
+
if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close')) {
|
|
6944
|
+
this.linkQTBar.hidePopup();
|
|
6945
|
+
}
|
|
6946
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6947
|
+
this.textQTBar.hidePopup();
|
|
6948
|
+
}
|
|
6965
6949
|
}
|
|
6966
6950
|
}
|
|
6967
6951
|
onIframeMouseDown() {
|
|
@@ -7014,6 +6998,9 @@ class QuickToolbar {
|
|
|
7014
6998
|
* @deprecated
|
|
7015
6999
|
*/
|
|
7016
7000
|
removeEventListener() {
|
|
7001
|
+
if (this.deBouncer) {
|
|
7002
|
+
clearTimeout(this.deBouncer);
|
|
7003
|
+
}
|
|
7017
7004
|
if (this.parent.isDestroyed) {
|
|
7018
7005
|
return;
|
|
7019
7006
|
}
|
|
@@ -7034,9 +7021,6 @@ class QuickToolbar {
|
|
|
7034
7021
|
this.parent.off(rtlMode, this.setRtl);
|
|
7035
7022
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
7036
7023
|
this.parent.off(hidePopup, this.hideQuickToolbars);
|
|
7037
|
-
if (this.deBouncer) {
|
|
7038
|
-
clearTimeout(this.deBouncer);
|
|
7039
|
-
}
|
|
7040
7024
|
}
|
|
7041
7025
|
/**
|
|
7042
7026
|
* Called internally if any of the property value changed.
|
|
@@ -7905,7 +7889,7 @@ class Formatter {
|
|
|
7905
7889
|
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
7906
7890
|
currentInsertContentLength = 1;
|
|
7907
7891
|
}
|
|
7908
|
-
const currentLength = self.getText().trim().length;
|
|
7892
|
+
const currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
7909
7893
|
const selectionLength = self.getSelection().length;
|
|
7910
7894
|
const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
7911
7895
|
if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
|
|
@@ -9211,7 +9195,7 @@ const htmlKeyConfig = {
|
|
|
9211
9195
|
'insert-link': 'ctrl+k',
|
|
9212
9196
|
'insert-image': 'ctrl+shift+i',
|
|
9213
9197
|
'insert-audio': 'ctrl+shift+a',
|
|
9214
|
-
'insert-video': 'ctrl+
|
|
9198
|
+
'insert-video': 'ctrl+alt+v',
|
|
9215
9199
|
'insert-table': 'ctrl+shift+e',
|
|
9216
9200
|
'undo': 'ctrl+z',
|
|
9217
9201
|
'redo': 'ctrl+y',
|
|
@@ -11324,19 +11308,6 @@ class DOMNode {
|
|
|
11324
11308
|
let end = this.parent.querySelector('.' + markerClassName.endSelection);
|
|
11325
11309
|
let startTextNode;
|
|
11326
11310
|
let endTextNode;
|
|
11327
|
-
if (start.textContent === '' && isNullOrUndefined(end) && action !== 'tab') {
|
|
11328
|
-
// To Do Apply Heading and Back space press in empty content.
|
|
11329
|
-
// if (isNOU(action) && save.range.startContainer.nodeType === 1 &&
|
|
11330
|
-
// (save.range.startContainer as HTMLElement).querySelectorAll('audio,video,image').length === 0) {
|
|
11331
|
-
// start.innerHTML = '<br>';
|
|
11332
|
-
// }
|
|
11333
|
-
if (start.childNodes.length === 1 && start.childNodes[0].nodeName === 'BR') {
|
|
11334
|
-
start.innerHTML = '<br>';
|
|
11335
|
-
}
|
|
11336
|
-
else {
|
|
11337
|
-
start.innerHTML = '';
|
|
11338
|
-
}
|
|
11339
|
-
}
|
|
11340
11311
|
if (this.hasClass(start, markerClassName.startSelection) && start.classList.length > 1) {
|
|
11341
11312
|
const replace = this.createTagString(DEFAULT_TAG, start, this.encode(start.textContent));
|
|
11342
11313
|
this.replaceWith(start, replace);
|
|
@@ -11459,7 +11430,7 @@ class DOMNode {
|
|
|
11459
11430
|
else if (start.tagName === 'BR') {
|
|
11460
11431
|
this.replaceWith(start, this.marker(className, this.encode(start.textContent)));
|
|
11461
11432
|
const markerStart = range.startContainer.querySelector('.' + className);
|
|
11462
|
-
markerStart.appendChild(start);
|
|
11433
|
+
markerStart.parentElement.appendChild(start);
|
|
11463
11434
|
}
|
|
11464
11435
|
else {
|
|
11465
11436
|
if (start.tagName === 'IMG') {
|
|
@@ -12767,7 +12738,7 @@ class NodeCutter {
|
|
|
12767
12738
|
if ((indexes.indexOf(range.startOffset) >= 0)
|
|
12768
12739
|
|| ((indexes.indexOf(range.startOffset - 1) >= 0) && (range.startOffset !== 1
|
|
12769
12740
|
|| (range.startOffset === 1 && new RegExp('\\s').test(str[0])))
|
|
12770
|
-
|| ((indexes[indexes.length - 1] - 1) === range.startOffset))) {
|
|
12741
|
+
|| (((indexes[indexes.length - 1] - 1) === range.startOffset) && !new RegExp('\\s').test(str[0])))) {
|
|
12771
12742
|
cursorRange = range;
|
|
12772
12743
|
this.position = 1;
|
|
12773
12744
|
}
|
|
@@ -13286,6 +13257,9 @@ class InsertHtml {
|
|
|
13286
13257
|
InsertMethods.AppendBefore(node, parentNode.firstChild, false);
|
|
13287
13258
|
}
|
|
13288
13259
|
}
|
|
13260
|
+
else if (isNullOrUndefined(preNode.previousSibling) && insertNode.tagName === 'TABLE') {
|
|
13261
|
+
parentNode.prepend(node);
|
|
13262
|
+
}
|
|
13289
13263
|
else {
|
|
13290
13264
|
parentNode.appendChild(node);
|
|
13291
13265
|
}
|
|
@@ -13463,7 +13437,7 @@ class InsertHtml {
|
|
|
13463
13437
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0 && isFirstTextNode)) {
|
|
13464
13438
|
lastSelectionNode = node.firstChild;
|
|
13465
13439
|
if (isNullOrUndefined(node.previousElementSibling)) {
|
|
13466
|
-
const firstParaElm = createElement('p');
|
|
13440
|
+
const firstParaElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13467
13441
|
node.parentElement.insertBefore(firstParaElm, node);
|
|
13468
13442
|
}
|
|
13469
13443
|
if (node.previousElementSibling.nodeName === 'BR') {
|
|
@@ -13478,7 +13452,7 @@ class InsertHtml {
|
|
|
13478
13452
|
if (node.firstChild.nodeName === '#text' ||
|
|
13479
13453
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0)) {
|
|
13480
13454
|
if (!isPreviousInlineElem) {
|
|
13481
|
-
paraElm = createElement('p');
|
|
13455
|
+
paraElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13482
13456
|
paraElm.appendChild(node.firstChild);
|
|
13483
13457
|
fragment.appendChild(paraElm);
|
|
13484
13458
|
}
|
|
@@ -14336,8 +14310,8 @@ class ImageCommand {
|
|
|
14336
14310
|
e.item.url = isNullOrUndefined(e.item.url) || e.item.url === 'undefined' ? e.item.src : e.item.url;
|
|
14337
14311
|
if (!isNullOrUndefined(e.item.selectParent) && e.item.selectParent[0].tagName === 'IMG') {
|
|
14338
14312
|
const imgEle = e.item.selectParent[0];
|
|
14339
|
-
this.setStyle(imgEle, e);
|
|
14340
14313
|
isReplaced = true;
|
|
14314
|
+
this.setStyle(imgEle, e, isReplaced);
|
|
14341
14315
|
}
|
|
14342
14316
|
else {
|
|
14343
14317
|
const imgElement = createElement('img');
|
|
@@ -14373,12 +14347,33 @@ class ImageCommand {
|
|
|
14373
14347
|
}
|
|
14374
14348
|
});
|
|
14375
14349
|
}
|
|
14350
|
+
if (e.value === 'Replace') {
|
|
14351
|
+
e.item.subCommand = 'Replace';
|
|
14352
|
+
this.callBack(e);
|
|
14353
|
+
}
|
|
14376
14354
|
}
|
|
14377
|
-
setStyle(imgElement, e) {
|
|
14355
|
+
setStyle(imgElement, e, imgReplace) {
|
|
14378
14356
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14379
14357
|
imgElement.setAttribute('src', e.item.url);
|
|
14380
14358
|
}
|
|
14381
|
-
|
|
14359
|
+
let alignClassName;
|
|
14360
|
+
if (imgReplace) {
|
|
14361
|
+
const alignClass = {
|
|
14362
|
+
'e-imgcenter': 'e-imgcenter',
|
|
14363
|
+
'e-imgright': 'e-imgright',
|
|
14364
|
+
'e-imgleft': 'e-imgleft'
|
|
14365
|
+
};
|
|
14366
|
+
const imgClassList = imgElement.classList;
|
|
14367
|
+
for (let i = 0; i < imgClassList.length; i++) {
|
|
14368
|
+
// eslint-disable-next-line
|
|
14369
|
+
if (!isNullOrUndefined(alignClass[imgClassList[i]])) {
|
|
14370
|
+
// eslint-disable-next-line
|
|
14371
|
+
alignClassName = alignClass[imgClassList[i]];
|
|
14372
|
+
}
|
|
14373
|
+
}
|
|
14374
|
+
}
|
|
14375
|
+
imgElement.setAttribute('class', 'e-rte-image' + (isNullOrUndefined(e.item.cssClass) ? '' : ' ' + e.item.cssClass)
|
|
14376
|
+
+ (isNullOrUndefined(alignClassName) ? '' : ' ' + alignClassName));
|
|
14382
14377
|
if (!isNullOrUndefined(e.item.altText)) {
|
|
14383
14378
|
imgElement.setAttribute('alt', e.item.altText);
|
|
14384
14379
|
}
|
|
@@ -14430,6 +14425,9 @@ class ImageCommand {
|
|
|
14430
14425
|
if (!isNullOrUndefined(e.item.target)) {
|
|
14431
14426
|
anchor.setAttribute('target', e.item.target);
|
|
14432
14427
|
}
|
|
14428
|
+
if (!isNullOrUndefined(e.item.ariaLabel)) {
|
|
14429
|
+
anchor.setAttribute('aria-label', e.item.ariaLabel);
|
|
14430
|
+
}
|
|
14433
14431
|
InsertHtml.Insert(this.parent.currentDocument, anchor, this.parent.editableElement);
|
|
14434
14432
|
this.callBack(e);
|
|
14435
14433
|
}
|
|
@@ -14461,9 +14459,11 @@ class ImageCommand {
|
|
|
14461
14459
|
e.item.selectNode[0].parentElement.href = e.item.url;
|
|
14462
14460
|
if (isNullOrUndefined(e.item.target)) {
|
|
14463
14461
|
e.item.selectNode[0].parentElement.removeAttribute('target');
|
|
14462
|
+
e.item.selectNode[0].parentElement.removeAttribute('aria-label');
|
|
14464
14463
|
}
|
|
14465
14464
|
else {
|
|
14466
14465
|
e.item.selectNode[0].parentElement.target = e.item.target;
|
|
14466
|
+
e.item.selectNode[0].parentElement.ariaLabel = e.item.ariaLabel;
|
|
14467
14467
|
}
|
|
14468
14468
|
this.callBack(e);
|
|
14469
14469
|
}
|
|
@@ -14728,9 +14728,19 @@ class AudioCommand {
|
|
|
14728
14728
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14729
14729
|
sourceElement.setAttribute('src', e.item.url);
|
|
14730
14730
|
}
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14731
|
+
const fileExtension = e.item.fileName ? e.item.fileName.split('.').pop().toLowerCase() :
|
|
14732
|
+
e.item.url ? e.item.url.split('.').pop().toLowerCase() : '';
|
|
14733
|
+
if (fileExtension === 'opus') {
|
|
14734
|
+
sourceElement.type = 'audio/ogg';
|
|
14735
|
+
}
|
|
14736
|
+
else if (fileExtension === 'm4a') {
|
|
14737
|
+
sourceElement.type = 'audio/mp4';
|
|
14738
|
+
}
|
|
14739
|
+
else {
|
|
14740
|
+
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
14741
|
+
'audio/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
14742
|
+
e.item.url && e.item.url.split('.').length > 0 ? 'audio/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
14743
|
+
}
|
|
14734
14744
|
}
|
|
14735
14745
|
callBack(e) {
|
|
14736
14746
|
if (e.callBack) {
|
|
@@ -16472,6 +16482,19 @@ class SelectionCommands {
|
|
|
16472
16482
|
}
|
|
16473
16483
|
else {
|
|
16474
16484
|
child = InsertMethods.unwrap(formatNode);
|
|
16485
|
+
let liElement = nodes[index].parentElement;
|
|
16486
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16487
|
+
liElement = closest(liElement, 'li');
|
|
16488
|
+
}
|
|
16489
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16490
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16491
|
+
if (format === 'bold') {
|
|
16492
|
+
liElement.style.fontWeight = 'normal';
|
|
16493
|
+
}
|
|
16494
|
+
else if (format === "italic") {
|
|
16495
|
+
liElement.style.fontStyle = 'normal';
|
|
16496
|
+
}
|
|
16497
|
+
}
|
|
16475
16498
|
}
|
|
16476
16499
|
if (child[0] && !isFontStyle) {
|
|
16477
16500
|
let nodeTraverse = child[index] ? child[index] : child[0];
|
|
@@ -16520,6 +16543,16 @@ class SelectionCommands {
|
|
|
16520
16543
|
if (child[num].nodeType !== 3 || (child[num].textContent &&
|
|
16521
16544
|
child[num].textContent.trim().length > 0)) {
|
|
16522
16545
|
child[num] = InsertMethods.Wrap(child[num], this.GetFormatNode(format, value, formatNodeTagName, formatNodeStyles));
|
|
16546
|
+
let liElement = nodes[index].parentElement;
|
|
16547
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16548
|
+
liElement = closest(liElement, 'li');
|
|
16549
|
+
}
|
|
16550
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16551
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16552
|
+
if (format === 'fontname') {
|
|
16553
|
+
liElement.style.fontFamily = value;
|
|
16554
|
+
}
|
|
16555
|
+
}
|
|
16523
16556
|
if (child[num].textContent === startText) {
|
|
16524
16557
|
if (num === 0) {
|
|
16525
16558
|
range.setStartBefore(child[num]);
|
|
@@ -16633,6 +16666,9 @@ class SelectionCommands {
|
|
|
16633
16666
|
liElement.style.color = value;
|
|
16634
16667
|
liElement.style.textDecoration = 'inherit';
|
|
16635
16668
|
}
|
|
16669
|
+
else if (format === 'fontname') {
|
|
16670
|
+
liElement.style.fontFamily = value;
|
|
16671
|
+
}
|
|
16636
16672
|
}
|
|
16637
16673
|
if (value === 'formatPainter') {
|
|
16638
16674
|
return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
|
|
@@ -16680,6 +16716,19 @@ class SelectionCommands {
|
|
|
16680
16716
|
}
|
|
16681
16717
|
else {
|
|
16682
16718
|
nodes[index] = this.applyStyles(nodes, index, element);
|
|
16719
|
+
let liElement = nodes[index].parentElement;
|
|
16720
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16721
|
+
liElement = closest(liElement, 'li');
|
|
16722
|
+
}
|
|
16723
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16724
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16725
|
+
if (format === 'bold') {
|
|
16726
|
+
liElement.style.fontWeight = 'bold';
|
|
16727
|
+
}
|
|
16728
|
+
else if (format === "italic") {
|
|
16729
|
+
liElement.style.fontStyle = 'italic';
|
|
16730
|
+
}
|
|
16731
|
+
}
|
|
16683
16732
|
}
|
|
16684
16733
|
}
|
|
16685
16734
|
}
|
|
@@ -18002,6 +18051,9 @@ class MsWordPaste {
|
|
|
18002
18051
|
resultElem = elm.querySelectorAll(keys[i]);
|
|
18003
18052
|
}
|
|
18004
18053
|
for (let j = 0; j < resultElem.length; j++) {
|
|
18054
|
+
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
18055
|
+
continue;
|
|
18056
|
+
}
|
|
18005
18057
|
const styleProperty = resultElem[j].getAttribute('style');
|
|
18006
18058
|
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '') {
|
|
18007
18059
|
const valueSplit = values[i].split(';');
|
|
@@ -18300,7 +18352,7 @@ class MsWordPaste {
|
|
|
18300
18352
|
!isNormalList) {
|
|
18301
18353
|
prevList = null;
|
|
18302
18354
|
}
|
|
18303
|
-
const pElement = createElement('p');
|
|
18355
|
+
const pElement = createElement('p', { className: 'MsoNormal' });
|
|
18304
18356
|
pElement.innerHTML = collection[index].content.join(' ');
|
|
18305
18357
|
if ((collection[index].nestedLevel === 1) && listCount === 0 && collection[index].content) {
|
|
18306
18358
|
root.appendChild(temp = createElement(collection[index].listType, { className: collection[index].class }));
|
|
@@ -20455,7 +20507,7 @@ class HtmlEditor {
|
|
|
20455
20507
|
e.args.keyCode === 13) {
|
|
20456
20508
|
this.spaceLink(e.args);
|
|
20457
20509
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
20458
|
-
const currentLength = this.parent.getText().trim().length;
|
|
20510
|
+
const currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
20459
20511
|
const selectionLength = this.parent.getSelection().length;
|
|
20460
20512
|
const totalLength = (currentLength - selectionLength) + 1;
|
|
20461
20513
|
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
@@ -20465,6 +20517,10 @@ class HtmlEditor {
|
|
|
20465
20517
|
}
|
|
20466
20518
|
else {
|
|
20467
20519
|
this.parent.notify(enterHandler, { args: e.args });
|
|
20520
|
+
const newRange = this.parent.getRange();
|
|
20521
|
+
if (!isNullOrUndefined(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text') {
|
|
20522
|
+
newRange.startContainer.scrollIntoView({ block: "end", inline: "nearest" });
|
|
20523
|
+
}
|
|
20468
20524
|
}
|
|
20469
20525
|
}
|
|
20470
20526
|
}
|
|
@@ -20613,7 +20669,7 @@ class HtmlEditor {
|
|
|
20613
20669
|
let liElement;
|
|
20614
20670
|
let rootElement;
|
|
20615
20671
|
if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
|
|
20616
|
-
this.parent.contentModule.getText().trim().length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
20672
|
+
this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
20617
20673
|
currentRange.startContainer.parentElement.tagName !== 'TH') {
|
|
20618
20674
|
this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
|
|
20619
20675
|
if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
|
|
@@ -20661,8 +20717,13 @@ class HtmlEditor {
|
|
|
20661
20717
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.deleteRangeElement, this.deleteRangeElement.childNodes.length);
|
|
20662
20718
|
this.isImageDelete = false;
|
|
20663
20719
|
}
|
|
20664
|
-
|
|
20665
|
-
|
|
20720
|
+
const brNode = this.deleteRangeElement.querySelector('BR');
|
|
20721
|
+
if (brNode && brNode.classList.contains('e-rte-image-remove-focus')) {
|
|
20722
|
+
removeClass([brNode], ['e-rte-image-focus']);
|
|
20723
|
+
return;
|
|
20724
|
+
}
|
|
20725
|
+
else if (brNode) {
|
|
20726
|
+
detach(brNode);
|
|
20666
20727
|
}
|
|
20667
20728
|
if (!isNullOrUndefined(this.deleteRangeElement) && (this.deleteOldRangeElement.tagName !== 'OL' && this.deleteOldRangeElement.tagName !== 'UL')
|
|
20668
20729
|
&& this.deleteOldRangeElement !== this.deleteRangeElement) {
|
|
@@ -20823,12 +20884,34 @@ class HtmlEditor {
|
|
|
20823
20884
|
}, e, value);
|
|
20824
20885
|
}
|
|
20825
20886
|
}
|
|
20887
|
+
mouseOutHandler() {
|
|
20888
|
+
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
20889
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20890
|
+
}
|
|
20891
|
+
else {
|
|
20892
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20893
|
+
this.parent.contentModule.getDocument();
|
|
20894
|
+
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
20895
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20896
|
+
}
|
|
20897
|
+
this.tooltipTargetEle.removeAttribute('data-title');
|
|
20898
|
+
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
20899
|
+
}
|
|
20826
20900
|
onToolbarClick(args) {
|
|
20827
20901
|
let save;
|
|
20828
20902
|
let selectNodeEle;
|
|
20829
20903
|
let selectParentEle;
|
|
20830
20904
|
const item = args.item;
|
|
20831
20905
|
const closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
20906
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20907
|
+
this.parent.contentModule.getDocument();
|
|
20908
|
+
this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
|
|
20909
|
+
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
20910
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
20911
|
+
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
20912
|
+
this.tooltipTargetEle.removeAttribute('title');
|
|
20913
|
+
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
20914
|
+
}
|
|
20832
20915
|
if (item.command !== 'FormatPainter') {
|
|
20833
20916
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
20834
20917
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -21139,6 +21222,7 @@ class PasteCleanup {
|
|
|
21139
21222
|
event: e
|
|
21140
21223
|
};
|
|
21141
21224
|
let value = null;
|
|
21225
|
+
let isClipboardHTMLDataNull = false;
|
|
21142
21226
|
let imageproperties;
|
|
21143
21227
|
if (e.args && !isNullOrUndefined(e.args.clipboardData)) {
|
|
21144
21228
|
value = e.args.clipboardData.getData('text/html');
|
|
@@ -21177,6 +21261,7 @@ class PasteCleanup {
|
|
|
21177
21261
|
const divElement = this.parent.createElement('div');
|
|
21178
21262
|
divElement.innerHTML = this.splitBreakLine(value);
|
|
21179
21263
|
value = divElement.innerHTML;
|
|
21264
|
+
isClipboardHTMLDataNull = true;
|
|
21180
21265
|
}
|
|
21181
21266
|
}
|
|
21182
21267
|
else if (value.length > 0) {
|
|
@@ -21198,10 +21283,13 @@ class PasteCleanup {
|
|
|
21198
21283
|
tempDivElem.innerHTML = value;
|
|
21199
21284
|
const isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
|
|
21200
21285
|
!isNullOrUndefined(tempDivElem.querySelector('table'));
|
|
21286
|
+
this.parent.trigger(cleanupResizeElements, { value: value }, (args) => {
|
|
21287
|
+
value = args.value;
|
|
21288
|
+
});
|
|
21201
21289
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21202
21290
|
if (isValueNotEmpty) {
|
|
21203
21291
|
e.args.preventDefault();
|
|
21204
|
-
this.pasteDialog(value, args);
|
|
21292
|
+
this.pasteDialog(value, args, isClipboardHTMLDataNull);
|
|
21205
21293
|
}
|
|
21206
21294
|
else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNullOrUndefined(file)) {
|
|
21207
21295
|
this.fireFoxImageUpload();
|
|
@@ -21213,7 +21301,7 @@ class PasteCleanup {
|
|
|
21213
21301
|
}
|
|
21214
21302
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21215
21303
|
e.args.preventDefault();
|
|
21216
|
-
this.plainFormatting(value, args);
|
|
21304
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21217
21305
|
}
|
|
21218
21306
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21219
21307
|
e.args.preventDefault();
|
|
@@ -21254,13 +21342,17 @@ class PasteCleanup {
|
|
|
21254
21342
|
splitBreakLine(value) {
|
|
21255
21343
|
const enterSplitText = value.split('\n');
|
|
21256
21344
|
let contentInnerElem = '';
|
|
21345
|
+
const startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
21346
|
+
const endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
21257
21347
|
for (let i = 0; i < enterSplitText.length; i++) {
|
|
21258
21348
|
if (enterSplitText[i].trim() === '') {
|
|
21259
21349
|
contentInnerElem += getDefaultValue(this.parent);
|
|
21260
21350
|
}
|
|
21261
21351
|
else {
|
|
21262
21352
|
const contentWithSpace = this.makeSpace(enterSplitText[i]);
|
|
21263
|
-
contentInnerElem += '<
|
|
21353
|
+
contentInnerElem += (i === 0 && this.parent.enterKey !== 'BR' ? '<span>' : startNode) +
|
|
21354
|
+
(contentWithSpace.trim() === '' ? '<br>' : contentWithSpace.trim()) +
|
|
21355
|
+
(enterSplitText.length - 1 === i && this.parent.enterKey === 'BR' ? '' : (i === 0 && this.parent.enterKey !== 'BR' ? '</span>' : endNode));
|
|
21264
21356
|
}
|
|
21265
21357
|
}
|
|
21266
21358
|
return contentInnerElem;
|
|
@@ -21524,10 +21616,10 @@ class PasteCleanup {
|
|
|
21524
21616
|
const range = this.nodeSelectionObj.getRange(currentDocument);
|
|
21525
21617
|
this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
|
|
21526
21618
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21527
|
-
this.pasteDialog(imageValue, pasteArgs);
|
|
21619
|
+
this.pasteDialog(imageValue, pasteArgs, false);
|
|
21528
21620
|
}
|
|
21529
21621
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21530
|
-
this.plainFormatting(imageValue, pasteArgs);
|
|
21622
|
+
this.plainFormatting(imageValue, pasteArgs, false);
|
|
21531
21623
|
}
|
|
21532
21624
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21533
21625
|
this.formatting(imageValue, false, pasteArgs);
|
|
@@ -21551,7 +21643,7 @@ class PasteCleanup {
|
|
|
21551
21643
|
const plainTextElement = this.parent.element.querySelector('#plainTextFormat');
|
|
21552
21644
|
this.plainTextRadioButton.appendTo(plainTextElement);
|
|
21553
21645
|
}
|
|
21554
|
-
selectFormatting(value, args, keepChecked, cleanChecked) {
|
|
21646
|
+
selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull) {
|
|
21555
21647
|
if (keepChecked) {
|
|
21556
21648
|
this.formatting(value, false, args);
|
|
21557
21649
|
}
|
|
@@ -21559,10 +21651,10 @@ class PasteCleanup {
|
|
|
21559
21651
|
this.formatting(value, true, args);
|
|
21560
21652
|
}
|
|
21561
21653
|
else {
|
|
21562
|
-
this.plainFormatting(value, args);
|
|
21654
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21563
21655
|
}
|
|
21564
21656
|
}
|
|
21565
|
-
pasteDialog(value, args) {
|
|
21657
|
+
pasteDialog(value, args, isClipboardHTMLDataNull) {
|
|
21566
21658
|
let isHeight = false;
|
|
21567
21659
|
const preRTEHeight = this.parent.height;
|
|
21568
21660
|
const dialogModel = {
|
|
@@ -21578,7 +21670,7 @@ class PasteCleanup {
|
|
|
21578
21670
|
const argument = this.dialogObj;
|
|
21579
21671
|
this.dialogRenderObj.close(argument);
|
|
21580
21672
|
this.dialogObj.destroy();
|
|
21581
|
-
this.selectFormatting(value, args, keepChecked, cleanChecked);
|
|
21673
|
+
this.selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull);
|
|
21582
21674
|
}
|
|
21583
21675
|
},
|
|
21584
21676
|
buttonModel: {
|
|
@@ -21639,7 +21731,7 @@ class PasteCleanup {
|
|
|
21639
21731
|
isHeight = true;
|
|
21640
21732
|
}
|
|
21641
21733
|
this.dialogObj.show();
|
|
21642
|
-
this.setCssClass({ cssClass: this.parent.
|
|
21734
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
21643
21735
|
}
|
|
21644
21736
|
updateCss(currentObj, e) {
|
|
21645
21737
|
if (currentObj && e.cssClass) {
|
|
@@ -21847,8 +21939,8 @@ class PasteCleanup {
|
|
|
21847
21939
|
return value;
|
|
21848
21940
|
}
|
|
21849
21941
|
//Plain Formatting
|
|
21850
|
-
plainFormatting(value, args) {
|
|
21851
|
-
|
|
21942
|
+
plainFormatting(value, args, isClipboardHTMLDataNull) {
|
|
21943
|
+
let clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
21852
21944
|
clipBoardElem.innerHTML = value;
|
|
21853
21945
|
this.detachInlineElements(clipBoardElem);
|
|
21854
21946
|
this.getTextContent(clipBoardElem);
|
|
@@ -21884,6 +21976,13 @@ class PasteCleanup {
|
|
|
21884
21976
|
this.saveSelection.restore();
|
|
21885
21977
|
clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
|
|
21886
21978
|
this.addTempClass(clipBoardElem);
|
|
21979
|
+
this.removingComments(clipBoardElem);
|
|
21980
|
+
if (this.parent.enterKey === 'BR' && !isClipboardHTMLDataNull) {
|
|
21981
|
+
clipBoardElem = this.reframeToBrContent(clipBoardElem);
|
|
21982
|
+
}
|
|
21983
|
+
else if (this.parent.enterKey === 'DIV') {
|
|
21984
|
+
clipBoardElem.innerHTML = clipBoardElem.innerHTML.replace(/<p class="pasteContent_RTE">/g, '<div>').replace(/<\/p>/g, '</div>');
|
|
21985
|
+
}
|
|
21887
21986
|
this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: null }, (updatedArgs) => { value = updatedArgs.value; });
|
|
21888
21987
|
clipBoardElem.innerHTML = value;
|
|
21889
21988
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
|
|
@@ -21898,6 +21997,41 @@ class PasteCleanup {
|
|
|
21898
21997
|
this.parent.formatter.onSuccess(this.parent, args);
|
|
21899
21998
|
}
|
|
21900
21999
|
}
|
|
22000
|
+
removingComments(elm) {
|
|
22001
|
+
let innerElement = elm.innerHTML;
|
|
22002
|
+
innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
|
|
22003
|
+
elm.innerHTML = innerElement;
|
|
22004
|
+
}
|
|
22005
|
+
reframeToBrContent(clipBoardElem) {
|
|
22006
|
+
const newClipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
22007
|
+
while (!isNullOrUndefined(clipBoardElem.firstChild)) {
|
|
22008
|
+
const brElem = this.parent.createElement('br');
|
|
22009
|
+
const currentFirstChild = clipBoardElem.firstChild;
|
|
22010
|
+
if (currentFirstChild.nodeName === '#text') {
|
|
22011
|
+
const isNextSibPresent = !isNullOrUndefined(currentFirstChild.nextSibling);
|
|
22012
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22013
|
+
if (isNextSibPresent) {
|
|
22014
|
+
newClipBoardElem.appendChild(brElem);
|
|
22015
|
+
}
|
|
22016
|
+
}
|
|
22017
|
+
else {
|
|
22018
|
+
const isCurrentNodeBRElm = currentFirstChild.nodeName === 'BR';
|
|
22019
|
+
if (isCurrentNodeBRElm) {
|
|
22020
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22021
|
+
}
|
|
22022
|
+
else {
|
|
22023
|
+
newClipBoardElem.appendChild(currentFirstChild.childNodes[0]);
|
|
22024
|
+
}
|
|
22025
|
+
if (!isNullOrUndefined(currentFirstChild) && !isNullOrUndefined(currentFirstChild.nextSibling)) {
|
|
22026
|
+
newClipBoardElem.appendChild(brElem);
|
|
22027
|
+
}
|
|
22028
|
+
if (!isCurrentNodeBRElm && !isNullOrUndefined(currentFirstChild)) {
|
|
22029
|
+
detach(currentFirstChild);
|
|
22030
|
+
}
|
|
22031
|
+
}
|
|
22032
|
+
}
|
|
22033
|
+
return newClipBoardElem;
|
|
22034
|
+
}
|
|
21901
22035
|
getTextContent(clipBoardElem) {
|
|
21902
22036
|
for (let i = 0; i < this.blockNode.length; i++) {
|
|
21903
22037
|
const inElem = clipBoardElem.querySelectorAll(this.blockNode[i]);
|
|
@@ -21945,14 +22079,16 @@ class PasteCleanup {
|
|
|
21945
22079
|
for (let i = 0; i < this.inlineNode.length; i++) {
|
|
21946
22080
|
const inElem = clipBoardElem.querySelectorAll(this.inlineNode[i]);
|
|
21947
22081
|
for (let j = 0; j < inElem.length; j++) {
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
22082
|
+
if (!(inElem[j] === clipBoardElem.firstChild && inElem[j].nodeName === 'SPAN')) {
|
|
22083
|
+
let parElem;
|
|
22084
|
+
for (let k = 0; k < inElem[j].childNodes.length; k++) {
|
|
22085
|
+
parElem = inElem[j].childNodes[k].parentElement;
|
|
22086
|
+
inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
|
|
22087
|
+
k--;
|
|
22088
|
+
}
|
|
22089
|
+
if (!isNullOrUndefined(parElem)) {
|
|
22090
|
+
detach(parElem);
|
|
22091
|
+
}
|
|
21956
22092
|
}
|
|
21957
22093
|
}
|
|
21958
22094
|
}
|
|
@@ -22309,7 +22445,7 @@ class FileManager$1 {
|
|
|
22309
22445
|
this.dialogObj.createElement = this.parent.createElement;
|
|
22310
22446
|
this.dialogObj.appendTo(dlgTarget);
|
|
22311
22447
|
this.dialogObj.show(Browser.isDevice ? true : false);
|
|
22312
|
-
this.setCssClass({ cssClass: this.parent.
|
|
22448
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
22313
22449
|
}
|
|
22314
22450
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
22315
22451
|
setCssClass(e) {
|
|
@@ -22506,7 +22642,7 @@ class FullScreen {
|
|
|
22506
22642
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22507
22643
|
}
|
|
22508
22644
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22509
|
-
this.parent.notify(
|
|
22645
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22510
22646
|
}
|
|
22511
22647
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
22512
22648
|
if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
@@ -22560,7 +22696,7 @@ class FullScreen {
|
|
|
22560
22696
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22561
22697
|
}
|
|
22562
22698
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22563
|
-
this.parent.notify(
|
|
22699
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22564
22700
|
}
|
|
22565
22701
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
22566
22702
|
const evenArgs = {
|
|
@@ -22751,7 +22887,7 @@ class FormatPainter {
|
|
|
22751
22887
|
}
|
|
22752
22888
|
onKeyDown(event) {
|
|
22753
22889
|
const originalEvent = event.args;
|
|
22754
|
-
if ((originalEvent
|
|
22890
|
+
if (!isNullOrUndefined(originalEvent) && !isNullOrUndefined(originalEvent.action) && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')
|
|
22755
22891
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
22756
22892
|
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
22757
22893
|
originalEvent.stopPropagation();
|
|
@@ -22905,6 +23041,9 @@ class EmojiPicker {
|
|
|
22905
23041
|
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
22906
23042
|
}
|
|
22907
23043
|
this.divElement = spanElement.closest('div');
|
|
23044
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
23045
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
23046
|
+
}
|
|
22908
23047
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
22909
23048
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
22910
23049
|
this.clickEvent = args.args;
|
|
@@ -23544,7 +23683,8 @@ class EmojiPicker {
|
|
|
23544
23683
|
}
|
|
23545
23684
|
onkeyPress(e) {
|
|
23546
23685
|
const originalEvent = e.args;
|
|
23547
|
-
const selection = this.parent.contentModule.
|
|
23686
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23687
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23548
23688
|
if (selection.rangeCount <= 0) {
|
|
23549
23689
|
return;
|
|
23550
23690
|
}
|
|
@@ -23564,6 +23704,10 @@ class EmojiPicker {
|
|
|
23564
23704
|
}
|
|
23565
23705
|
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
23566
23706
|
removeClass([this.divElement], 'e-active');
|
|
23707
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument : this.parent.contentModule.getDocument();
|
|
23708
|
+
if (this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
23709
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
23710
|
+
}
|
|
23567
23711
|
this.popupObj.hide();
|
|
23568
23712
|
}
|
|
23569
23713
|
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
@@ -23574,7 +23718,8 @@ class EmojiPicker {
|
|
|
23574
23718
|
}
|
|
23575
23719
|
onkeyUp(e) {
|
|
23576
23720
|
const originalEvent = e.args;
|
|
23577
|
-
const selection = this.parent.contentModule.
|
|
23721
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23722
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23578
23723
|
if (selection.rangeCount <= 0) {
|
|
23579
23724
|
return;
|
|
23580
23725
|
}
|
|
@@ -23600,7 +23745,7 @@ class EmojiPicker {
|
|
|
23600
23745
|
}
|
|
23601
23746
|
getCoordinates() {
|
|
23602
23747
|
let coordinates;
|
|
23603
|
-
const selection = this.parent.contentModule.
|
|
23748
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
23604
23749
|
const range = selection.getRangeAt(0);
|
|
23605
23750
|
let firstChild;
|
|
23606
23751
|
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
@@ -23889,7 +24034,7 @@ class Link {
|
|
|
23889
24034
|
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + parentTop + args.clientY : args.pageY;
|
|
23890
24035
|
}
|
|
23891
24036
|
if (this.quickToolObj.linkQTBar) {
|
|
23892
|
-
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer);
|
|
24037
|
+
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer, 'link');
|
|
23893
24038
|
}
|
|
23894
24039
|
}
|
|
23895
24040
|
}
|
|
@@ -23920,12 +24065,32 @@ class Link {
|
|
|
23920
24065
|
if (isPopupOpen) {
|
|
23921
24066
|
return;
|
|
23922
24067
|
}
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
24068
|
+
if (e.args.ctrlKey === false) {
|
|
24069
|
+
this.showLinkQuickToolbar({
|
|
24070
|
+
args: args,
|
|
24071
|
+
isNotify: false,
|
|
24072
|
+
type: 'Links',
|
|
24073
|
+
elements: [args.target]
|
|
24074
|
+
});
|
|
24075
|
+
}
|
|
24076
|
+
else {
|
|
24077
|
+
const selection = this.parent.formatter.editorManager.nodeSelection;
|
|
24078
|
+
const range = selection.getRange(this.parent.contentModule.getDocument());
|
|
24079
|
+
const args = {
|
|
24080
|
+
args: {
|
|
24081
|
+
item: {
|
|
24082
|
+
subCommand: 'OpenLink',
|
|
24083
|
+
command: 'Links',
|
|
24084
|
+
name: ''
|
|
24085
|
+
},
|
|
24086
|
+
originalEvent: e.args
|
|
24087
|
+
},
|
|
24088
|
+
selectNode: selection.getNodeCollection(range),
|
|
24089
|
+
selectParent: selection.getParentNodeCollection(range),
|
|
24090
|
+
selection: selection.save(range, this.parent.contentModule.getDocument())
|
|
24091
|
+
};
|
|
24092
|
+
this.parent.notify(openLink, args);
|
|
24093
|
+
}
|
|
23929
24094
|
}
|
|
23930
24095
|
else {
|
|
23931
24096
|
this.hideLinkQuickToolbar();
|
|
@@ -23982,7 +24147,7 @@ class Link {
|
|
|
23982
24147
|
}
|
|
23983
24148
|
showDialog() {
|
|
23984
24149
|
this.openDialog(false);
|
|
23985
|
-
this.setCssClass({ cssClass: this.parent.
|
|
24150
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
23986
24151
|
}
|
|
23987
24152
|
closeDialog() {
|
|
23988
24153
|
if (this.dialogObj) {
|
|
@@ -24014,22 +24179,22 @@ class Link {
|
|
|
24014
24179
|
const textPlace = this.i10n.getConstant('textPlaceholder');
|
|
24015
24180
|
const title = this.i10n.getConstant('linkTitle');
|
|
24016
24181
|
const linkDialogEle = this.parent.createElement('div', {
|
|
24017
|
-
className: 'e-rte-link-dialog' +
|
|
24182
|
+
className: 'e-rte-link-dialog' + this.parent.getCssClass(true), id: this.rteID + '_rtelink'
|
|
24018
24183
|
});
|
|
24019
24184
|
this.parent.element.appendChild(linkDialogEle);
|
|
24020
24185
|
const linkContent = this.parent.createElement('div', {
|
|
24021
|
-
className: 'e-rte-linkcontent' +
|
|
24186
|
+
className: 'e-rte-linkcontent' + this.parent.getCssClass(true), id: this.rteID + '_linkContent'
|
|
24022
24187
|
});
|
|
24023
24188
|
const htmlTextbox = (this.parent.editorMode === 'HTML') ? '<label>' + linkTooltip +
|
|
24024
|
-
'</label></div><div class="e-rte-field' +
|
|
24025
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' +
|
|
24026
|
-
'<div class="e-rte-label' +
|
|
24027
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
24028
|
-
const content = '<div class="e-rte-label' +
|
|
24029
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' +
|
|
24030
|
-
'<div class="e-rte-label' +
|
|
24031
|
-
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' +
|
|
24032
|
-
'</div><div class="e-rte-label' +
|
|
24189
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24190
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' + this.parent.getCssClass(true) + '"></div>' +
|
|
24191
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '"></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24192
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>' : '';
|
|
24193
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24194
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' + this.parent.getCssClass(true) + '"/></div>' +
|
|
24195
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
24196
|
+
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' + this.parent.getCssClass(true) + '"aria-label="' + this.i10n.getConstant('linkText') + '" placeholder="' + textPlace + '">' +
|
|
24197
|
+
'</div><div class="e-rte-label' + this.parent.getCssClass(true) + '">' + htmlTextbox;
|
|
24033
24198
|
const contentElem = parseHtml(content);
|
|
24034
24199
|
linkContent.appendChild(contentElem);
|
|
24035
24200
|
const linkTarget = linkContent.querySelector('.e-rte-linkTarget');
|
|
@@ -24038,7 +24203,7 @@ class Link {
|
|
|
24038
24203
|
const linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
24039
24204
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
24040
24205
|
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
24041
|
-
cssClass: this.parent.
|
|
24206
|
+
cssClass: this.parent.getCssClass() });
|
|
24042
24207
|
this.checkBoxObj.isStringTemplate = true;
|
|
24043
24208
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
24044
24209
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -24051,16 +24216,16 @@ class Link {
|
|
|
24051
24216
|
const dialogModel = {
|
|
24052
24217
|
header: this.i10n.getConstant('linkHeader'),
|
|
24053
24218
|
content: linkContent,
|
|
24054
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
24219
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
24055
24220
|
enableRtl: this.parent.enableRtl,
|
|
24056
24221
|
locale: this.parent.locale,
|
|
24057
24222
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
24058
24223
|
isModal: Browser.isDevice,
|
|
24059
24224
|
buttons: [{
|
|
24060
24225
|
click: this.insertlink.bind(selectObj),
|
|
24061
|
-
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' +
|
|
24226
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
24062
24227
|
},
|
|
24063
|
-
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' +
|
|
24228
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
24064
24229
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
24065
24230
|
animationSettings: { effect: 'None' },
|
|
24066
24231
|
close: (event) => {
|
|
@@ -24560,18 +24725,18 @@ class Image$1 {
|
|
|
24560
24725
|
this.resizeBtnInit();
|
|
24561
24726
|
this.imgEle = e;
|
|
24562
24727
|
addClass([this.imgEle], 'e-resize');
|
|
24563
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' +
|
|
24728
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + this.parent.getCssClass(true), id: this.rteID + '_imgResize' });
|
|
24564
24729
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24565
|
-
className: 'e-rte-imageboxmark e-rte-topLeft' +
|
|
24730
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24566
24731
|
}));
|
|
24567
24732
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24568
|
-
className: 'e-rte-imageboxmark e-rte-topRight' +
|
|
24733
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24569
24734
|
}));
|
|
24570
24735
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24571
|
-
className: 'e-rte-imageboxmark e-rte-botLeft' +
|
|
24736
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24572
24737
|
}));
|
|
24573
24738
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24574
|
-
className: 'e-rte-imageboxmark e-rte-botRight' +
|
|
24739
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24575
24740
|
}));
|
|
24576
24741
|
if (Browser.isDevice) {
|
|
24577
24742
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -24724,8 +24889,8 @@ class Image$1 {
|
|
|
24724
24889
|
img.removeAttribute('height');
|
|
24725
24890
|
}
|
|
24726
24891
|
else {
|
|
24727
|
-
img.style.width = expectedX + 'px';
|
|
24728
|
-
img.style.height = expectedX + 'px';
|
|
24892
|
+
img.style.width = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24893
|
+
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24729
24894
|
}
|
|
24730
24895
|
}
|
|
24731
24896
|
}
|
|
@@ -24753,7 +24918,6 @@ class Image$1 {
|
|
|
24753
24918
|
this.setAspectRatio(this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
24754
24919
|
this.resizeImgDupPos(this.imgEle);
|
|
24755
24920
|
this.imgResizePos(this.imgEle, this.imgResizeDiv);
|
|
24756
|
-
this.parent.setContentHeight('', false);
|
|
24757
24921
|
}
|
|
24758
24922
|
});
|
|
24759
24923
|
}
|
|
@@ -24768,7 +24932,7 @@ class Image$1 {
|
|
|
24768
24932
|
else if (isNullOrUndefined(this.parent.insertImageSettings.maxHeight)) {
|
|
24769
24933
|
this.imgEle.style.maxHeight = '';
|
|
24770
24934
|
}
|
|
24771
|
-
this.imgEle.style.maxWidth = this.parent.getInsertImgMaxWidth() + 'px';
|
|
24935
|
+
this.imgEle.style.maxWidth = (closest(this.imgEle, 'ol,ul') != null ? this.parent.getInsertImgMaxWidth() - parseInt((getComputedStyle(closest(this.imgEle, 'ol,ul')).paddingLeft), 0) : this.parent.getInsertImgMaxWidth()) + 'px';
|
|
24772
24936
|
const pageX = this.getPointX(e);
|
|
24773
24937
|
const pageY = this.getPointY(e);
|
|
24774
24938
|
const mouseX = (this.resizeBtnStat.botLeft || this.resizeBtnStat.topLeft) ? -(pageX - this.pageX) : (pageX - this.pageX);
|
|
@@ -24993,13 +25157,22 @@ class Image$1 {
|
|
|
24993
25157
|
}
|
|
24994
25158
|
}
|
|
24995
25159
|
}
|
|
24996
|
-
else if (
|
|
24997
|
-
range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE))
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25160
|
+
else if (range.startContainer.nodeType === 1) {
|
|
25161
|
+
if (range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE)) {
|
|
25162
|
+
detach(range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE));
|
|
25163
|
+
}
|
|
25164
|
+
else if (range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_IMGBREAK)) {
|
|
25165
|
+
detach(range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_IMGBREAK));
|
|
25166
|
+
}
|
|
25167
|
+
else if (range.startContainer.classList.contains('e-img-wrap') && closest(range.startContainer, '.' + CLS_CAPTION)) {
|
|
25168
|
+
const parentElem = range.startContainer.parentElement.parentElement;
|
|
25169
|
+
detach(closest(range.startContainer, '.' + CLS_CAPTION));
|
|
25170
|
+
if (parentElem && parentElem.textContent.trim() === '') {
|
|
25171
|
+
const brElem = this.parent.createElement('br');
|
|
25172
|
+
brElem.classList.add('e-rte-image-remove-focus');
|
|
25173
|
+
parentElem.appendChild(brElem);
|
|
25174
|
+
}
|
|
25175
|
+
}
|
|
25003
25176
|
}
|
|
25004
25177
|
}
|
|
25005
25178
|
break;
|
|
@@ -25056,7 +25229,7 @@ class Image$1 {
|
|
|
25056
25229
|
}
|
|
25057
25230
|
showDialog() {
|
|
25058
25231
|
this.openDialog(false);
|
|
25059
|
-
this.setCssClass({ cssClass: this.parent.
|
|
25232
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
25060
25233
|
}
|
|
25061
25234
|
closeDialog() {
|
|
25062
25235
|
if (this.dialogObj) {
|
|
@@ -25262,19 +25435,19 @@ class Image$1 {
|
|
|
25262
25435
|
}
|
|
25263
25436
|
this.imagDialog(e);
|
|
25264
25437
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25265
|
-
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' +
|
|
25438
|
+
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + this.parent.getCssClass(true) });
|
|
25266
25439
|
const linkUrl = this.i10n.getConstant('linkurl');
|
|
25267
|
-
const content = '<div class="e-rte-field' +
|
|
25268
|
-
'<input type="text" data-role ="none" class="e-input e-img-link' +
|
|
25440
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25441
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + this.parent.getCssClass(true) + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
25269
25442
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
25270
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
25443
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>';
|
|
25271
25444
|
const contentElem = parseHtml(content);
|
|
25272
25445
|
linkWrap.appendChild(contentElem);
|
|
25273
25446
|
const linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
25274
25447
|
const inputLink = linkWrap.querySelector('.e-img-link');
|
|
25275
25448
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
25276
25449
|
this.checkBoxObj = new CheckBox({
|
|
25277
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
25450
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25278
25451
|
change: (e) => {
|
|
25279
25452
|
if (e.checked) {
|
|
25280
25453
|
target = '_blank';
|
|
@@ -25288,11 +25461,12 @@ class Image$1 {
|
|
|
25288
25461
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
25289
25462
|
this.checkBoxObj.appendTo(linkTarget);
|
|
25290
25463
|
let target = this.checkBoxObj.checked ? '_blank' : null;
|
|
25464
|
+
let imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
|
|
25291
25465
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25292
25466
|
const linkargs = {
|
|
25293
25467
|
args: e.args,
|
|
25294
25468
|
selfImage: this, selection: e.selection,
|
|
25295
|
-
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target
|
|
25469
|
+
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target, ariaLabel: imageLabel
|
|
25296
25470
|
};
|
|
25297
25471
|
this.dialogObj.setProperties({
|
|
25298
25472
|
height: 'inherit',
|
|
@@ -25305,7 +25479,7 @@ class Image$1 {
|
|
|
25305
25479
|
this.insertlink(linkargs);
|
|
25306
25480
|
},
|
|
25307
25481
|
buttonModel: {
|
|
25308
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link' +
|
|
25482
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
25309
25483
|
}
|
|
25310
25484
|
}],
|
|
25311
25485
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
@@ -25330,13 +25504,13 @@ class Image$1 {
|
|
|
25330
25504
|
this.imagDialog(e);
|
|
25331
25505
|
const altText = this.i10n.getConstant('altText');
|
|
25332
25506
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25333
|
-
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' +
|
|
25507
|
+
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + this.parent.getCssClass(true) });
|
|
25334
25508
|
const altHeader = this.i10n.getConstant('alternateHeader');
|
|
25335
25509
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25336
25510
|
const getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
25337
25511
|
e.selectNode[0].getAttribute('alt');
|
|
25338
|
-
const content = '<div class="e-rte-field' +
|
|
25339
|
-
'<input type="text" spellcheck="false" class="e-input e-img-alt' +
|
|
25512
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25513
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + this.parent.getCssClass(true) + '" placeholder="' + altText + '"/>' +
|
|
25340
25514
|
'</div>';
|
|
25341
25515
|
const contentElem = parseHtml(content);
|
|
25342
25516
|
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
@@ -25354,7 +25528,7 @@ class Image$1 {
|
|
|
25354
25528
|
this.insertAlt(altArgs);
|
|
25355
25529
|
},
|
|
25356
25530
|
buttonModel: {
|
|
25357
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt' +
|
|
25531
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
25358
25532
|
}
|
|
25359
25533
|
}],
|
|
25360
25534
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
@@ -25406,14 +25580,14 @@ class Image$1 {
|
|
|
25406
25580
|
}
|
|
25407
25581
|
if (e.selectNode[0].parentElement.nodeName === 'A') {
|
|
25408
25582
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25409
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25583
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25410
25584
|
subCommand: e.args.item.subCommand
|
|
25411
25585
|
});
|
|
25412
25586
|
proxy.dialogObj.hide({ returnValue: true });
|
|
25413
25587
|
return;
|
|
25414
25588
|
}
|
|
25415
25589
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25416
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25590
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25417
25591
|
subCommand: e.args.item.subCommand, selection: e.selection
|
|
25418
25592
|
});
|
|
25419
25593
|
const captionEle = closest(e.selectNode[0], '.e-img-caption');
|
|
@@ -25524,11 +25698,11 @@ class Image$1 {
|
|
|
25524
25698
|
}
|
|
25525
25699
|
else {
|
|
25526
25700
|
this.captionEle = this.parent.createElement('span', {
|
|
25527
|
-
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION +
|
|
25701
|
+
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION + this.parent.getCssClass(true),
|
|
25528
25702
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
25529
25703
|
});
|
|
25530
|
-
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' +
|
|
25531
|
-
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' +
|
|
25704
|
+
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
25705
|
+
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
25532
25706
|
attrs: { contenteditable: 'true' } });
|
|
25533
25707
|
const parent = e.selectNode[0].parentElement;
|
|
25534
25708
|
if (parent.tagName === 'A') {
|
|
@@ -25580,7 +25754,7 @@ class Image$1 {
|
|
|
25580
25754
|
this.insertSize(selectObj);
|
|
25581
25755
|
},
|
|
25582
25756
|
buttonModel: {
|
|
25583
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size' +
|
|
25757
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
25584
25758
|
}
|
|
25585
25759
|
}],
|
|
25586
25760
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
@@ -25625,7 +25799,7 @@ class Image$1 {
|
|
|
25625
25799
|
this.dialogObj.hide({ returnValue: true });
|
|
25626
25800
|
return;
|
|
25627
25801
|
}
|
|
25628
|
-
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' +
|
|
25802
|
+
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + this.parent.getCssClass(true), id: this.rteID + '_image' });
|
|
25629
25803
|
this.parent.element.appendChild(imgDialog);
|
|
25630
25804
|
const imgInsert = this.i10n.getConstant('dialogInsert');
|
|
25631
25805
|
const imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -25634,20 +25808,20 @@ class Image$1 {
|
|
|
25634
25808
|
const selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
25635
25809
|
const dialogModel = {
|
|
25636
25810
|
header: imgHeader,
|
|
25637
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
25811
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
25638
25812
|
enableRtl: this.parent.enableRtl,
|
|
25639
25813
|
locale: this.parent.locale,
|
|
25640
25814
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
25641
25815
|
isModal: Browser.isDevice,
|
|
25642
25816
|
buttons: [{
|
|
25643
25817
|
click: this.insertImageUrl.bind(selectObj),
|
|
25644
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' +
|
|
25818
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
|
|
25645
25819
|
},
|
|
25646
25820
|
{
|
|
25647
25821
|
click: (e) => {
|
|
25648
25822
|
this.cancelDialog(e);
|
|
25649
25823
|
},
|
|
25650
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
25824
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
25651
25825
|
}],
|
|
25652
25826
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
25653
25827
|
animationSettings: { effect: 'None' },
|
|
@@ -25670,12 +25844,12 @@ class Image$1 {
|
|
|
25670
25844
|
this.dialogObj = null;
|
|
25671
25845
|
}
|
|
25672
25846
|
};
|
|
25673
|
-
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' +
|
|
25847
|
+
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' + this.parent.getCssClass(true) });
|
|
25674
25848
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
25675
25849
|
|| this.parent.editorMode === 'HTML') {
|
|
25676
25850
|
dialogContent.appendChild(this.imgUpload(e));
|
|
25677
25851
|
}
|
|
25678
|
-
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' +
|
|
25852
|
+
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + this.parent.getCssClass(true) });
|
|
25679
25853
|
const linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
25680
25854
|
if (this.parent.editorMode === 'HTML') {
|
|
25681
25855
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -25791,10 +25965,10 @@ class Image$1 {
|
|
|
25791
25965
|
}
|
|
25792
25966
|
// eslint-disable-next-line
|
|
25793
25967
|
imageUrlPopup(e) {
|
|
25794
|
-
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' +
|
|
25968
|
+
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
25795
25969
|
const placeUrl = this.i10n.getConstant('imageUrl');
|
|
25796
25970
|
this.inputUrl = this.parent.createElement('input', {
|
|
25797
|
-
className: 'e-input e-img-url' +
|
|
25971
|
+
className: 'e-input e-img-url' + this.parent.getCssClass(true),
|
|
25798
25972
|
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
25799
25973
|
});
|
|
25800
25974
|
this.inputUrl.addEventListener('input', () => {
|
|
@@ -25860,7 +26034,7 @@ class Image$1 {
|
|
|
25860
26034
|
const selectNode = e.selectNode[0];
|
|
25861
26035
|
const imgHeight = this.i10n.getConstant('imageHeight');
|
|
25862
26036
|
const imgWidth = this.i10n.getConstant('imageWidth');
|
|
25863
|
-
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' +
|
|
26037
|
+
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
25864
26038
|
const widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
25865
26039
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
25866
26040
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -25869,10 +26043,10 @@ class Image$1 {
|
|
|
25869
26043
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
25870
26044
|
this.changedWidthValue = null;
|
|
25871
26045
|
this.changedHeightValue = null;
|
|
25872
|
-
const content = '<div class="e-rte-label' +
|
|
25873
|
-
'</label></div><div class="e-rte-field' +
|
|
25874
|
-
'<div class="e-rte-label' +
|
|
25875
|
-
'<input type="text" id="imgheight" class="e-img-height' +
|
|
26046
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
26047
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" id="imgwidth" class="e-img-width' + this.parent.getCssClass(true) + '"/></div>' +
|
|
26048
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
26049
|
+
'<input type="text" id="imgheight" class="e-img-height' + this.parent.getCssClass(true) + '"/></div>';
|
|
25876
26050
|
const contentElem = parseHtml(content);
|
|
25877
26051
|
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
25878
26052
|
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
@@ -25880,7 +26054,7 @@ class Image$1 {
|
|
|
25880
26054
|
this.widthNum = new TextBox({
|
|
25881
26055
|
value: formatUnit(widthVal),
|
|
25882
26056
|
enableRtl: this.parent.enableRtl,
|
|
25883
|
-
cssClass: this.parent.
|
|
26057
|
+
cssClass: this.parent.getCssClass(),
|
|
25884
26058
|
input: (e) => {
|
|
25885
26059
|
this.inputWidthValue = formatUnit(this.inputValue(e.value));
|
|
25886
26060
|
}
|
|
@@ -25890,7 +26064,7 @@ class Image$1 {
|
|
|
25890
26064
|
this.heightNum = new TextBox({
|
|
25891
26065
|
value: formatUnit(heightVal),
|
|
25892
26066
|
enableRtl: this.parent.enableRtl,
|
|
25893
|
-
cssClass: this.parent.
|
|
26067
|
+
cssClass: this.parent.getCssClass(),
|
|
25894
26068
|
input: (e) => {
|
|
25895
26069
|
this.inputHeightValue = formatUnit(this.inputValue(e.value));
|
|
25896
26070
|
}
|
|
@@ -25961,16 +26135,16 @@ class Image$1 {
|
|
|
25961
26135
|
save = e.selection;
|
|
25962
26136
|
selectParent = e.selectParent;
|
|
25963
26137
|
}
|
|
25964
|
-
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' +
|
|
26138
|
+
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + this.parent.getCssClass(true) });
|
|
25965
26139
|
const deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
25966
26140
|
const imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
25967
|
-
const span = this.parent.createElement('span', { className: 'e-droptext' +
|
|
26141
|
+
const span = this.parent.createElement('span', { className: 'e-droptext' + this.parent.getCssClass(true) });
|
|
25968
26142
|
const spanMsg = this.parent.createElement('span', {
|
|
25969
|
-
className: 'e-rte-upload-text' +
|
|
26143
|
+
className: 'e-rte-upload-text' + this.parent.getCssClass(true), innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
25970
26144
|
});
|
|
25971
26145
|
span.appendChild(spanMsg);
|
|
25972
26146
|
const btnEle = this.parent.createElement('button', {
|
|
25973
|
-
className: 'e-browsebtn' +
|
|
26147
|
+
className: 'e-browsebtn' + this.parent.getCssClass(true), id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
25974
26148
|
});
|
|
25975
26149
|
span.appendChild(btnEle);
|
|
25976
26150
|
uploadParentEle.appendChild(span);
|
|
@@ -25982,7 +26156,7 @@ class Image$1 {
|
|
|
25982
26156
|
const btnClick = (Browser.isDevice) ? span : btnEle;
|
|
25983
26157
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
25984
26158
|
const uploadEle = this.parent.createElement('input', {
|
|
25985
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.
|
|
26159
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.getCssClass()
|
|
25986
26160
|
});
|
|
25987
26161
|
uploadParentEle.appendChild(uploadEle);
|
|
25988
26162
|
let altText;
|
|
@@ -25990,7 +26164,7 @@ class Image$1 {
|
|
|
25990
26164
|
let filesData;
|
|
25991
26165
|
this.uploadObj = new Uploader({
|
|
25992
26166
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
25993
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
26167
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25994
26168
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
25995
26169
|
selected: (e) => {
|
|
25996
26170
|
proxy.isImgUploaded = true;
|
|
@@ -26063,9 +26237,9 @@ class Image$1 {
|
|
|
26063
26237
|
failure: (e) => {
|
|
26064
26238
|
this.parent.trigger(imageUploadFailed, e);
|
|
26065
26239
|
},
|
|
26066
|
-
removing: () => {
|
|
26240
|
+
removing: (removeEventArgs) => {
|
|
26067
26241
|
// eslint-disable-next-line
|
|
26068
|
-
this.parent.trigger(imageRemoving,
|
|
26242
|
+
this.parent.trigger(imageRemoving, removeEventArgs, (e) => {
|
|
26069
26243
|
proxy.isImgUploaded = false;
|
|
26070
26244
|
this.dialogObj.getButtons(0).element.disabled = true;
|
|
26071
26245
|
proxy.inputUrl.removeAttribute('disabled');
|
|
@@ -26350,7 +26524,7 @@ class Image$1 {
|
|
|
26350
26524
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
26351
26525
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
26352
26526
|
},
|
|
26353
|
-
cssClass: CLS_RTE_DIALOG_UPLOAD +
|
|
26527
|
+
cssClass: CLS_RTE_DIALOG_UPLOAD + this.parent.getCssClass(true),
|
|
26354
26528
|
dropArea: this.parent.element,
|
|
26355
26529
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26356
26530
|
removing: () => {
|
|
@@ -26553,10 +26727,10 @@ class Image$1 {
|
|
|
26553
26727
|
*/
|
|
26554
26728
|
/* eslint-enable */
|
|
26555
26729
|
destroy() {
|
|
26556
|
-
this.prevSelectedImgEle = undefined;
|
|
26557
26730
|
if (isNullOrUndefined(this.parent)) {
|
|
26558
26731
|
return;
|
|
26559
26732
|
}
|
|
26733
|
+
this.prevSelectedImgEle = undefined;
|
|
26560
26734
|
this.removeEventListener();
|
|
26561
26735
|
}
|
|
26562
26736
|
moduleDestroy() {
|
|
@@ -28846,7 +29020,7 @@ class ViewSource {
|
|
|
28846
29020
|
this.parent.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.onKeyDown);
|
|
28847
29021
|
}
|
|
28848
29022
|
getSourceCode() {
|
|
28849
|
-
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA +
|
|
29023
|
+
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA + this.parent.getCssClass(true) });
|
|
28850
29024
|
}
|
|
28851
29025
|
wireEvent(element) {
|
|
28852
29026
|
this.keyboardModule = new KeyboardEvents$1(element, {
|
|
@@ -28943,8 +29117,10 @@ class ViewSource {
|
|
|
28943
29117
|
this.getPanel().style.display = 'block';
|
|
28944
29118
|
}
|
|
28945
29119
|
else {
|
|
29120
|
+
const height = this.parent.inputElement.offsetHeight;
|
|
28946
29121
|
this.contentModule.getPanel().appendChild(this.previewElement);
|
|
28947
29122
|
this.getPanel().value = this.getTextAreaValue();
|
|
29123
|
+
this.previewElement.style.height = height + 'px';
|
|
28948
29124
|
this.contentModule.getEditPanel().style.display = 'none';
|
|
28949
29125
|
this.previewElement.style.display = 'block';
|
|
28950
29126
|
}
|
|
@@ -29106,6 +29282,7 @@ class Table {
|
|
|
29106
29282
|
this.parent.on(showTableDialog, this.showDialog, this);
|
|
29107
29283
|
this.parent.on(closeTableDialog, this.closeDialog, this);
|
|
29108
29284
|
this.parent.on(docClick, this.docClick, this);
|
|
29285
|
+
this.parent.on(iframeMouseDown, this.onIframeMouseDown, this);
|
|
29109
29286
|
this.parent.on(editAreaClick, this.editAreaClickHandler, this);
|
|
29110
29287
|
this.parent.on(clearDialogObj, this.clearDialogObj, this);
|
|
29111
29288
|
this.parent.on(tableToolbarAction, this.onToolbarAction, this);
|
|
@@ -29126,6 +29303,7 @@ class Table {
|
|
|
29126
29303
|
this.parent.off(initialEnd, this.afterRender);
|
|
29127
29304
|
this.parent.off(dynamicModule, this.afterRender);
|
|
29128
29305
|
this.parent.off(docClick, this.docClick);
|
|
29306
|
+
this.parent.off(iframeMouseDown, this.onIframeMouseDown);
|
|
29129
29307
|
this.parent.off(showTableDialog, this.showDialog);
|
|
29130
29308
|
this.parent.off(closeTableDialog, this.closeDialog);
|
|
29131
29309
|
this.parent.off(editAreaClick, this.editAreaClickHandler);
|
|
@@ -29134,8 +29312,8 @@ class Table {
|
|
|
29134
29312
|
this.parent.off(dropDownSelect, this.dropdownSelect);
|
|
29135
29313
|
this.parent.off(mouseDown, this.cellSelect);
|
|
29136
29314
|
this.parent.off(tableColorPickerChanged, this.setBGColor);
|
|
29137
|
-
this.parent.off(keyUp, this.keyUp);
|
|
29138
29315
|
this.parent.off(keyDown, this.keyDown);
|
|
29316
|
+
this.parent.off(keyUp, this.keyUp);
|
|
29139
29317
|
this.parent.off(mouseUp, this.selectionTable);
|
|
29140
29318
|
this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
|
|
29141
29319
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
@@ -29331,11 +29509,12 @@ class Table {
|
|
|
29331
29509
|
name: !isInternal ? 'showDialog' : null
|
|
29332
29510
|
};
|
|
29333
29511
|
this.insertTableDialog({ self: this, args: args, selection: selection });
|
|
29512
|
+
this.parent.formatter.editorManager.nodeSelection.restore();
|
|
29334
29513
|
}
|
|
29335
29514
|
}
|
|
29336
29515
|
showDialog() {
|
|
29337
29516
|
this.openDialog(false);
|
|
29338
|
-
this.setCssClass({ cssClass: this.parent.
|
|
29517
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
29339
29518
|
}
|
|
29340
29519
|
closeDialog() {
|
|
29341
29520
|
if (this.editdlgObj) {
|
|
@@ -29525,6 +29704,10 @@ class Table {
|
|
|
29525
29704
|
tableHeader(selection, e) {
|
|
29526
29705
|
this.parent.formatter.process(this.parent, e, e.originalEvent, { selection: selection, subCommand: e.item.subCommand });
|
|
29527
29706
|
}
|
|
29707
|
+
getAnchorNode(element) {
|
|
29708
|
+
const selectParent = closest(element, 'a');
|
|
29709
|
+
return (selectParent ? selectParent : element);
|
|
29710
|
+
}
|
|
29528
29711
|
editAreaClickHandler(e) {
|
|
29529
29712
|
if (this.parent.readonly || !isNullOrUndefined(closest(e.args.target, '.e-img-caption'))) {
|
|
29530
29713
|
return;
|
|
@@ -29546,7 +29729,8 @@ class Table {
|
|
|
29546
29729
|
const closestTable = closest(target, 'table');
|
|
29547
29730
|
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
29548
29731
|
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
29549
|
-
|
|
29732
|
+
const isAnchorEle = this.getAnchorNode(target);
|
|
29733
|
+
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
29550
29734
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
29551
29735
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
29552
29736
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
@@ -29732,7 +29916,7 @@ class Table {
|
|
|
29732
29916
|
this.contentModule.getEditPanel().appendChild(rowReEle);
|
|
29733
29917
|
}
|
|
29734
29918
|
const tableReBox = this.parent.createElement('span', {
|
|
29735
|
-
className: CLS_TB_BOX_RES +
|
|
29919
|
+
className: CLS_TB_BOX_RES + this.parent.getCssClass(true), attrs: {
|
|
29736
29920
|
'data-col': columns.length.toString(), 'unselectable': 'on', 'contenteditable': 'false'
|
|
29737
29921
|
}
|
|
29738
29922
|
});
|
|
@@ -29884,7 +30068,7 @@ class Table {
|
|
|
29884
30068
|
}
|
|
29885
30069
|
appendHelper() {
|
|
29886
30070
|
this.helper = this.parent.createElement('div', {
|
|
29887
|
-
className: 'e-table-rhelper' +
|
|
30071
|
+
className: 'e-table-rhelper' + this.parent.getCssClass(true)
|
|
29888
30072
|
});
|
|
29889
30073
|
if (Browser.isDevice) {
|
|
29890
30074
|
this.helper.classList.add('e-reicon');
|
|
@@ -30243,16 +30427,16 @@ class Table {
|
|
|
30243
30427
|
this.hideTableQuickToolbar();
|
|
30244
30428
|
const header = '1X1';
|
|
30245
30429
|
const insertbtn = this.l10n.getConstant('inserttablebtn');
|
|
30246
|
-
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' +
|
|
30247
|
-
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' +
|
|
30430
|
+
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
|
|
30431
|
+
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
|
|
30248
30432
|
this.tblHeader.innerHTML = header;
|
|
30249
30433
|
this.dlgDiv.appendChild(this.tblHeader);
|
|
30250
|
-
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' +
|
|
30434
|
+
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' + this.parent.getCssClass(true) });
|
|
30251
30435
|
this.drawTable(tableDiv, args);
|
|
30252
30436
|
this.dlgDiv.appendChild(tableDiv);
|
|
30253
|
-
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' +
|
|
30437
|
+
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' + this.parent.getCssClass(true) }));
|
|
30254
30438
|
const btnEle = this.parent.createElement('button', {
|
|
30255
|
-
className: 'e-insert-table-btn' +
|
|
30439
|
+
className: 'e-insert-table-btn' + this.parent.getCssClass(true), id: this.rteID + '_insertTable',
|
|
30256
30440
|
attrs: { type: 'button', tabindex: '0' }
|
|
30257
30441
|
});
|
|
30258
30442
|
if (!isNullOrUndefined(this.parent.getToolbarElement().querySelector('.e-expended-nav'))) {
|
|
@@ -30260,7 +30444,7 @@ class Table {
|
|
|
30260
30444
|
}
|
|
30261
30445
|
this.dlgDiv.appendChild(btnEle);
|
|
30262
30446
|
this.createTableButton = new Button({
|
|
30263
|
-
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' +
|
|
30447
|
+
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' + this.parent.getCssClass(true),
|
|
30264
30448
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
30265
30449
|
});
|
|
30266
30450
|
this.createTableButton.isStringTemplate = true;
|
|
@@ -30288,10 +30472,15 @@ class Table {
|
|
|
30288
30472
|
});
|
|
30289
30473
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
30290
30474
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
30291
|
-
addClass([this.popupObj.element], this.parent.
|
|
30475
|
+
addClass([this.popupObj.element], this.parent.getCssClass());
|
|
30292
30476
|
}
|
|
30293
30477
|
this.popupObj.refreshPosition(target);
|
|
30294
30478
|
}
|
|
30479
|
+
onIframeMouseDown() {
|
|
30480
|
+
if (this.popupObj) {
|
|
30481
|
+
this.popupObj.hide();
|
|
30482
|
+
}
|
|
30483
|
+
}
|
|
30295
30484
|
docClick(e) {
|
|
30296
30485
|
const target = e.args.target;
|
|
30297
30486
|
// eslint-disable-next-line
|
|
@@ -30328,10 +30517,10 @@ class Table {
|
|
|
30328
30517
|
let rowDiv;
|
|
30329
30518
|
let tableCell;
|
|
30330
30519
|
for (let row = 0; row < 3; row++) {
|
|
30331
|
-
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' +
|
|
30520
|
+
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' + this.parent.getCssClass(true), attrs: { 'data-column': '' + row } });
|
|
30332
30521
|
for (let col = 0; col < 10; col++) {
|
|
30333
30522
|
const display = (row > 2) ? 'none' : 'inline-block';
|
|
30334
|
-
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' +
|
|
30523
|
+
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' + this.parent.getCssClass(true), attrs: { 'data-cell': '' + col } });
|
|
30335
30524
|
rowDiv.appendChild(tableCell);
|
|
30336
30525
|
tableCell.style.display = display;
|
|
30337
30526
|
if (col === 0 && row === 0) {
|
|
@@ -30354,13 +30543,13 @@ class Table {
|
|
|
30354
30543
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
30355
30544
|
buttons: [{
|
|
30356
30545
|
click: this.applyProperties.bind(this, args),
|
|
30357
|
-
buttonModel: { content: update, cssClass: 'e-flat e-size-update' +
|
|
30546
|
+
buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
|
|
30358
30547
|
},
|
|
30359
30548
|
{
|
|
30360
30549
|
click: (e) => {
|
|
30361
30550
|
this.cancelDialog(e);
|
|
30362
30551
|
},
|
|
30363
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30552
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30364
30553
|
}],
|
|
30365
30554
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
30366
30555
|
});
|
|
@@ -30402,10 +30591,10 @@ class Table {
|
|
|
30402
30591
|
tableCellDlgContent() {
|
|
30403
30592
|
const tableColumn = this.l10n.getConstant('columns');
|
|
30404
30593
|
const tableRow = this.l10n.getConstant('rows');
|
|
30405
|
-
const tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' +
|
|
30406
|
-
const content = '<div class="e-rte-field' +
|
|
30407
|
-
+ ' data-role ="none" id="tableColumn" class="e-table-column' +
|
|
30408
|
-
+ '<div class="e-rte-field' +
|
|
30594
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' + this.parent.getCssClass(true) });
|
|
30595
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" '
|
|
30596
|
+
+ ' data-role ="none" id="tableColumn" class="e-table-column' + this.parent.getCssClass(true) + '"/></div>'
|
|
30597
|
+
+ '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="tableRow" class="e-table-row' + this.parent.getCssClass(true) + '" /></div>';
|
|
30409
30598
|
const contentElem = parseHtml(content);
|
|
30410
30599
|
tableWrap.appendChild(contentElem);
|
|
30411
30600
|
this.columnTextBox = new NumericTextBox({
|
|
@@ -30416,7 +30605,7 @@ class Table {
|
|
|
30416
30605
|
floatLabelType: 'Auto',
|
|
30417
30606
|
max: 50,
|
|
30418
30607
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30419
|
-
cssClass: this.parent.
|
|
30608
|
+
cssClass: this.parent.getCssClass()
|
|
30420
30609
|
});
|
|
30421
30610
|
this.columnTextBox.isStringTemplate = true;
|
|
30422
30611
|
this.columnTextBox.appendTo(tableWrap.querySelector('#tableColumn'));
|
|
@@ -30428,7 +30617,7 @@ class Table {
|
|
|
30428
30617
|
floatLabelType: 'Auto',
|
|
30429
30618
|
max: 1000,
|
|
30430
30619
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30431
|
-
cssClass: this.parent.
|
|
30620
|
+
cssClass: this.parent.getCssClass()
|
|
30432
30621
|
});
|
|
30433
30622
|
this.rowTextBox.isStringTemplate = true;
|
|
30434
30623
|
this.rowTextBox.appendTo(tableWrap.querySelector('#tableRow'));
|
|
@@ -30448,7 +30637,7 @@ class Table {
|
|
|
30448
30637
|
return;
|
|
30449
30638
|
}
|
|
30450
30639
|
const tableDialog = this.parent.createElement('div', {
|
|
30451
|
-
className: 'e-rte-edit-table' +
|
|
30640
|
+
className: 'e-rte-edit-table' + this.parent.getCssClass(true), id: this.rteID + '_tabledialog'
|
|
30452
30641
|
});
|
|
30453
30642
|
this.parent.element.appendChild(tableDialog);
|
|
30454
30643
|
const insert = this.l10n.getConstant('dialogInsert');
|
|
@@ -30456,20 +30645,20 @@ class Table {
|
|
|
30456
30645
|
const header = this.l10n.getConstant('tabledialogHeader');
|
|
30457
30646
|
const dialogModel = {
|
|
30458
30647
|
header: header,
|
|
30459
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
30648
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
30460
30649
|
enableRtl: this.parent.enableRtl,
|
|
30461
30650
|
locale: this.parent.locale,
|
|
30462
30651
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'initial',
|
|
30463
30652
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
30464
30653
|
isModal: Browser.isDevice,
|
|
30465
30654
|
buttons: [{
|
|
30466
|
-
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' +
|
|
30655
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
|
|
30467
30656
|
},
|
|
30468
30657
|
{
|
|
30469
30658
|
click: (e) => {
|
|
30470
30659
|
this.cancelDialog(e);
|
|
30471
30660
|
},
|
|
30472
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30661
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30473
30662
|
}],
|
|
30474
30663
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
30475
30664
|
animationSettings: { effect: 'None' },
|
|
@@ -30542,13 +30731,13 @@ class Table {
|
|
|
30542
30731
|
const tableWidth = this.l10n.getConstant('tableWidth');
|
|
30543
30732
|
const cellPadding = this.l10n.getConstant('cellpadding');
|
|
30544
30733
|
const cellSpacing = this.l10n.getConstant('cellspacing');
|
|
30545
|
-
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' +
|
|
30734
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' + this.parent.getCssClass(true) });
|
|
30546
30735
|
const widthVal = closest(selectNode, 'table').getClientRects()[0].width;
|
|
30547
30736
|
const padVal = closest(selectNode, 'td').style.padding;
|
|
30548
30737
|
const brdSpcVal = closest(selectNode, 'table').getAttribute('cellspacing');
|
|
30549
|
-
const content = '<div class="e-rte-field' +
|
|
30550
|
-
+ ' /></div>' + '<div class="e-rte-field' +
|
|
30551
|
-
+ ' </div><div class="e-rte-field' +
|
|
30738
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="tableWidth" class="e-table-width' + this.parent.getCssClass(true) + '" '
|
|
30739
|
+
+ ' /></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="cellPadding" class="e-cell-padding' + this.parent.getCssClass(true) + '" />'
|
|
30740
|
+
+ ' </div><div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing' + this.parent.getCssClass(true) + '" /></div>';
|
|
30552
30741
|
const contentElem = parseHtml(content);
|
|
30553
30742
|
tableWrap.appendChild(contentElem);
|
|
30554
30743
|
this.tableWidthNum = new NumericTextBox({
|
|
@@ -30694,7 +30883,16 @@ class DialogRenderer {
|
|
|
30694
30883
|
getDialogPosition() {
|
|
30695
30884
|
let distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
30696
30885
|
if (distanceFromVisibleTop < 0) {
|
|
30697
|
-
|
|
30886
|
+
let topHeight = 0;
|
|
30887
|
+
let parentElement = this.parent.element;
|
|
30888
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
30889
|
+
const top = parentElement.getBoundingClientRect().top;
|
|
30890
|
+
if (top > 0) {
|
|
30891
|
+
topHeight = top;
|
|
30892
|
+
}
|
|
30893
|
+
parentElement = parentElement.parentElement;
|
|
30894
|
+
}
|
|
30895
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
30698
30896
|
return distanceFromVisibleTop.toString();
|
|
30699
30897
|
}
|
|
30700
30898
|
else {
|
|
@@ -31591,7 +31789,8 @@ class EnterKeyAction {
|
|
|
31591
31789
|
}
|
|
31592
31790
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
31593
31791
|
}
|
|
31594
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
31792
|
+
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
31793
|
+
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
31595
31794
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
31596
31795
|
const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, false).cloneNode(true);
|
|
31597
31796
|
this.parent.formatter.editorManager.domNode.insertAfter(newElem, nearBlockNode);
|
|
@@ -32185,7 +32384,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32185
32384
|
if (tool.command === 'InsertText') {
|
|
32186
32385
|
currentInsertContentLength = value.length;
|
|
32187
32386
|
}
|
|
32188
|
-
const currentLength = this.getText().trim().length;
|
|
32387
|
+
const currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32189
32388
|
const selectionLength = this.getSelection().length;
|
|
32190
32389
|
const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
32191
32390
|
if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
|
|
@@ -32360,7 +32559,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32360
32559
|
if (this.enableXhtml) {
|
|
32361
32560
|
this.setProperties({ value: this.getXhtml() }, true);
|
|
32362
32561
|
}
|
|
32363
|
-
if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNullOrUndefined(this.getToolbar()) &&
|
|
32562
|
+
if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNullOrUndefined(this.getToolbar()) &&
|
|
32364
32563
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
32365
32564
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
32366
32565
|
}
|
|
@@ -32370,7 +32569,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32370
32569
|
}
|
|
32371
32570
|
// eslint-disable-next-line
|
|
32372
32571
|
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
32373
|
-
this.notify(bindCssClass, { cssClass: this.
|
|
32572
|
+
this.notify(bindCssClass, { cssClass: this.getCssClass() });
|
|
32374
32573
|
this.addAudioVideoWrapper();
|
|
32375
32574
|
this.notify(tableclass, {});
|
|
32376
32575
|
this.renderComplete();
|
|
@@ -32460,7 +32659,13 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32460
32659
|
range.endContainer;
|
|
32461
32660
|
const closestLI = closest(endNode, 'LI');
|
|
32462
32661
|
let isDetached = false;
|
|
32463
|
-
|
|
32662
|
+
let currentRangeEndOffset = range.endOffset;
|
|
32663
|
+
if (currentEndContainer.nodeType === Node.TEXT_NODE) {
|
|
32664
|
+
if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
|
|
32665
|
+
currentRangeEndOffset--;
|
|
32666
|
+
}
|
|
32667
|
+
}
|
|
32668
|
+
if (!isNullOrUndefined(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
|
|
32464
32669
|
!range.collapsed && isNullOrUndefined(endNode.nextElementSibling)) {
|
|
32465
32670
|
for (let i = 0; i < closestLI.childNodes.length; i++) {
|
|
32466
32671
|
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
@@ -32539,7 +32744,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32539
32744
|
}
|
|
32540
32745
|
const notFormatPainterCopy = isNullOrUndefined(e.action) ? true : (e.action !== 'format-copy' ? true : false);
|
|
32541
32746
|
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
|
|
32542
|
-
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which
|
|
32747
|
+
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
|
|
32543
32748
|
this.formatter.saveData();
|
|
32544
32749
|
}
|
|
32545
32750
|
if (e.action !== 'insert-link' &&
|
|
@@ -32608,7 +32813,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32608
32813
|
this.formatter.onKeyHandler(this, e);
|
|
32609
32814
|
}
|
|
32610
32815
|
if (this.inputElement && this.inputElement.textContent.length !== 0
|
|
32611
|
-
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
|
|
32816
|
+
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
|
|
32612
32817
|
this.notify(toolbarRefresh, { args: e });
|
|
32613
32818
|
}
|
|
32614
32819
|
if (!isNullOrUndefined(this.placeholder)) {
|
|
@@ -32700,20 +32905,61 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32700
32905
|
return;
|
|
32701
32906
|
}
|
|
32702
32907
|
}
|
|
32703
|
-
this.notifyMouseUp(e);
|
|
32704
32908
|
if (e.detail === 3) {
|
|
32705
32909
|
const range = this.getRange();
|
|
32706
32910
|
const selection = this.formatter.editorManager.domNode.getSelection();
|
|
32707
|
-
|
|
32708
|
-
|
|
32709
|
-
|
|
32710
|
-
|
|
32711
|
-
|
|
32712
|
-
|
|
32713
|
-
|
|
32911
|
+
// To handle the triple click node selection improper range due to browser behavior.
|
|
32912
|
+
if (selection.rangeCount > 0 && !isNullOrUndefined(range.startContainer.parentElement) && (!isNullOrUndefined(range.startContainer.parentElement.nextSibling) &&
|
|
32913
|
+
(range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
|
|
32914
|
+
/\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
|
|
32915
|
+
|| range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
|
|
32916
|
+
const newRange = new Range();
|
|
32917
|
+
let start = range.startContainer;
|
|
32918
|
+
let end = range.endContainer;
|
|
32919
|
+
let isInvalid = false;
|
|
32920
|
+
const isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
|
|
32921
|
+
|| range.commonAncestorContainer.nodeName === 'LI';
|
|
32922
|
+
if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
|
|
32923
|
+
end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
|
|
32924
|
+
}
|
|
32925
|
+
else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
|
|
32926
|
+
if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
|
|
32927
|
+
end = end.previousElementSibling.lastElementChild;
|
|
32928
|
+
}
|
|
32929
|
+
else {
|
|
32930
|
+
end = closest(end.parentElement, 'li');
|
|
32931
|
+
if (end && end.nodeName === 'LI') {
|
|
32932
|
+
end = end.previousElementSibling;
|
|
32933
|
+
}
|
|
32934
|
+
}
|
|
32714
32935
|
}
|
|
32936
|
+
else {
|
|
32937
|
+
if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
|
|
32938
|
+
end.previousElementSibling.textContent.trim().length > 0) {
|
|
32939
|
+
end = end.previousElementSibling.lastChild;
|
|
32940
|
+
}
|
|
32941
|
+
else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
|
|
32942
|
+
end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
|
|
32943
|
+
}
|
|
32944
|
+
}
|
|
32945
|
+
if (!end || end === this.inputElement) {
|
|
32946
|
+
end = start;
|
|
32947
|
+
isInvalid = true;
|
|
32948
|
+
}
|
|
32949
|
+
while (end.nodeName !== '#text' && !isInvalid) {
|
|
32950
|
+
if (end.lastElementChild) {
|
|
32951
|
+
end = end.lastElementChild;
|
|
32952
|
+
}
|
|
32953
|
+
else {
|
|
32954
|
+
end = end.lastChild;
|
|
32955
|
+
}
|
|
32956
|
+
}
|
|
32957
|
+
newRange.setStart(start, 0);
|
|
32958
|
+
newRange.setEnd(end, end.textContent.length);
|
|
32959
|
+
this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
|
|
32715
32960
|
}
|
|
32716
32961
|
}
|
|
32962
|
+
this.notifyMouseUp(e);
|
|
32717
32963
|
}
|
|
32718
32964
|
/**
|
|
32719
32965
|
* @param {Function} module - specifies the module function.
|
|
@@ -32756,7 +33002,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32756
33002
|
const currentLength = this.inputElement.textContent.length;
|
|
32757
33003
|
const selectionLength = this.getSelection().length;
|
|
32758
33004
|
const pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
32759
|
-
? 0 : e.clipboardData.getData('text/plain').length;
|
|
33005
|
+
? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32760
33006
|
const totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
32761
33007
|
if (this.editorMode === 'Markdown') {
|
|
32762
33008
|
const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
|
|
@@ -33187,7 +33433,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33187
33433
|
updatePanelValue() {
|
|
33188
33434
|
let value = this.value;
|
|
33189
33435
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
33190
|
-
const getTextArea = this.element.querySelector('.
|
|
33436
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33191
33437
|
if (value) {
|
|
33192
33438
|
if (getTextArea && getTextArea.style.display === 'block') {
|
|
33193
33439
|
getTextArea.value = this.value;
|
|
@@ -33816,6 +34062,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33816
34062
|
getID() {
|
|
33817
34063
|
return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
|
|
33818
34064
|
}
|
|
34065
|
+
/**
|
|
34066
|
+
* @returns {void}
|
|
34067
|
+
* getCssClass method
|
|
34068
|
+
*
|
|
34069
|
+
* @hidden
|
|
34070
|
+
* @deprecated
|
|
34071
|
+
*/
|
|
34072
|
+
getCssClass(isSpace) {
|
|
34073
|
+
return (isNullOrUndefined(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
|
|
34074
|
+
}
|
|
33819
34075
|
mouseDownHandler(e) {
|
|
33820
34076
|
const touch = (e.touches ? e.changedTouches[0] : e);
|
|
33821
34077
|
addClass([this.element], [CLS_FOCUS]);
|
|
@@ -33927,7 +34183,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33927
34183
|
}
|
|
33928
34184
|
getUpdatedValue() {
|
|
33929
34185
|
let value;
|
|
33930
|
-
const getTextArea = this.element.querySelector('.
|
|
34186
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33931
34187
|
if (this.editorMode === 'HTML') {
|
|
33932
34188
|
value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
|
|
33933
34189
|
this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
|
|
@@ -33958,6 +34214,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33958
34214
|
clearTimeout(this.idleInterval);
|
|
33959
34215
|
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
33960
34216
|
}
|
|
34217
|
+
cleanupResizeElements(args) {
|
|
34218
|
+
const value = this.removeResizeElement(args.value);
|
|
34219
|
+
return value;
|
|
34220
|
+
}
|
|
33961
34221
|
removeResizeElement(value) {
|
|
33962
34222
|
let valueElementWrapper = document.createElement("div");
|
|
33963
34223
|
valueElementWrapper.innerHTML = value;
|
|
@@ -34176,6 +34436,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34176
34436
|
this.on(contentChanged, this.contentChanged, this);
|
|
34177
34437
|
this.on(resizeInitialized, this.updateResizeFlag, this);
|
|
34178
34438
|
this.on(updateTbItemsStatus, this.updateStatus, this);
|
|
34439
|
+
this.on(cleanupResizeElements, this.cleanupResizeElements, this);
|
|
34179
34440
|
if (this.readonly && this.enabled) {
|
|
34180
34441
|
return;
|
|
34181
34442
|
}
|
|
@@ -34262,6 +34523,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34262
34523
|
this.off(contentChanged, this.contentChanged);
|
|
34263
34524
|
this.off(resizeInitialized, this.updateResizeFlag);
|
|
34264
34525
|
this.off(updateTbItemsStatus, this.updateStatus);
|
|
34526
|
+
this.off(cleanupResizeElements, this.cleanupResizeElements);
|
|
34265
34527
|
if (this.readonly && this.enabled) {
|
|
34266
34528
|
return;
|
|
34267
34529
|
}
|
|
@@ -34633,5 +34895,5 @@ RichTextEditor = __decorate$1([
|
|
|
34633
34895
|
* Rich Text Editor component exported items
|
|
34634
34896
|
*/
|
|
34635
34897
|
|
|
34636
|
-
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,
|
|
34898
|
+
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, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_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, 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, 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, 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 };
|
|
34637
34899
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|