@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.43
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 +35 -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 +574 -309
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +573 -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 +75 -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 +11 -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,16 @@ 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.notify(cleanupResizeElements, {
|
|
21287
|
+
value: value,
|
|
21288
|
+
callBack: (currentValue) => {
|
|
21289
|
+
value = currentValue;
|
|
21290
|
+
}
|
|
21291
|
+
});
|
|
21201
21292
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21202
21293
|
if (isValueNotEmpty) {
|
|
21203
21294
|
e.args.preventDefault();
|
|
21204
|
-
this.pasteDialog(value, args);
|
|
21295
|
+
this.pasteDialog(value, args, isClipboardHTMLDataNull);
|
|
21205
21296
|
}
|
|
21206
21297
|
else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNullOrUndefined(file)) {
|
|
21207
21298
|
this.fireFoxImageUpload();
|
|
@@ -21213,7 +21304,7 @@ class PasteCleanup {
|
|
|
21213
21304
|
}
|
|
21214
21305
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21215
21306
|
e.args.preventDefault();
|
|
21216
|
-
this.plainFormatting(value, args);
|
|
21307
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21217
21308
|
}
|
|
21218
21309
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21219
21310
|
e.args.preventDefault();
|
|
@@ -21254,13 +21345,17 @@ class PasteCleanup {
|
|
|
21254
21345
|
splitBreakLine(value) {
|
|
21255
21346
|
const enterSplitText = value.split('\n');
|
|
21256
21347
|
let contentInnerElem = '';
|
|
21348
|
+
const startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
21349
|
+
const endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
21257
21350
|
for (let i = 0; i < enterSplitText.length; i++) {
|
|
21258
21351
|
if (enterSplitText[i].trim() === '') {
|
|
21259
21352
|
contentInnerElem += getDefaultValue(this.parent);
|
|
21260
21353
|
}
|
|
21261
21354
|
else {
|
|
21262
21355
|
const contentWithSpace = this.makeSpace(enterSplitText[i]);
|
|
21263
|
-
contentInnerElem += '<
|
|
21356
|
+
contentInnerElem += (i === 0 && this.parent.enterKey !== 'BR' ? '<span>' : startNode) +
|
|
21357
|
+
(contentWithSpace.trim() === '' ? '<br>' : contentWithSpace.trim()) +
|
|
21358
|
+
(enterSplitText.length - 1 === i && this.parent.enterKey === 'BR' ? '' : (i === 0 && this.parent.enterKey !== 'BR' ? '</span>' : endNode));
|
|
21264
21359
|
}
|
|
21265
21360
|
}
|
|
21266
21361
|
return contentInnerElem;
|
|
@@ -21524,10 +21619,10 @@ class PasteCleanup {
|
|
|
21524
21619
|
const range = this.nodeSelectionObj.getRange(currentDocument);
|
|
21525
21620
|
this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
|
|
21526
21621
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21527
|
-
this.pasteDialog(imageValue, pasteArgs);
|
|
21622
|
+
this.pasteDialog(imageValue, pasteArgs, false);
|
|
21528
21623
|
}
|
|
21529
21624
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21530
|
-
this.plainFormatting(imageValue, pasteArgs);
|
|
21625
|
+
this.plainFormatting(imageValue, pasteArgs, false);
|
|
21531
21626
|
}
|
|
21532
21627
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21533
21628
|
this.formatting(imageValue, false, pasteArgs);
|
|
@@ -21551,7 +21646,7 @@ class PasteCleanup {
|
|
|
21551
21646
|
const plainTextElement = this.parent.element.querySelector('#plainTextFormat');
|
|
21552
21647
|
this.plainTextRadioButton.appendTo(plainTextElement);
|
|
21553
21648
|
}
|
|
21554
|
-
selectFormatting(value, args, keepChecked, cleanChecked) {
|
|
21649
|
+
selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull) {
|
|
21555
21650
|
if (keepChecked) {
|
|
21556
21651
|
this.formatting(value, false, args);
|
|
21557
21652
|
}
|
|
@@ -21559,10 +21654,10 @@ class PasteCleanup {
|
|
|
21559
21654
|
this.formatting(value, true, args);
|
|
21560
21655
|
}
|
|
21561
21656
|
else {
|
|
21562
|
-
this.plainFormatting(value, args);
|
|
21657
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21563
21658
|
}
|
|
21564
21659
|
}
|
|
21565
|
-
pasteDialog(value, args) {
|
|
21660
|
+
pasteDialog(value, args, isClipboardHTMLDataNull) {
|
|
21566
21661
|
let isHeight = false;
|
|
21567
21662
|
const preRTEHeight = this.parent.height;
|
|
21568
21663
|
const dialogModel = {
|
|
@@ -21578,7 +21673,7 @@ class PasteCleanup {
|
|
|
21578
21673
|
const argument = this.dialogObj;
|
|
21579
21674
|
this.dialogRenderObj.close(argument);
|
|
21580
21675
|
this.dialogObj.destroy();
|
|
21581
|
-
this.selectFormatting(value, args, keepChecked, cleanChecked);
|
|
21676
|
+
this.selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull);
|
|
21582
21677
|
}
|
|
21583
21678
|
},
|
|
21584
21679
|
buttonModel: {
|
|
@@ -21639,7 +21734,7 @@ class PasteCleanup {
|
|
|
21639
21734
|
isHeight = true;
|
|
21640
21735
|
}
|
|
21641
21736
|
this.dialogObj.show();
|
|
21642
|
-
this.setCssClass({ cssClass: this.parent.
|
|
21737
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
21643
21738
|
}
|
|
21644
21739
|
updateCss(currentObj, e) {
|
|
21645
21740
|
if (currentObj && e.cssClass) {
|
|
@@ -21847,8 +21942,8 @@ class PasteCleanup {
|
|
|
21847
21942
|
return value;
|
|
21848
21943
|
}
|
|
21849
21944
|
//Plain Formatting
|
|
21850
|
-
plainFormatting(value, args) {
|
|
21851
|
-
|
|
21945
|
+
plainFormatting(value, args, isClipboardHTMLDataNull) {
|
|
21946
|
+
let clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
21852
21947
|
clipBoardElem.innerHTML = value;
|
|
21853
21948
|
this.detachInlineElements(clipBoardElem);
|
|
21854
21949
|
this.getTextContent(clipBoardElem);
|
|
@@ -21884,6 +21979,13 @@ class PasteCleanup {
|
|
|
21884
21979
|
this.saveSelection.restore();
|
|
21885
21980
|
clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
|
|
21886
21981
|
this.addTempClass(clipBoardElem);
|
|
21982
|
+
this.removingComments(clipBoardElem);
|
|
21983
|
+
if (this.parent.enterKey === 'BR' && !isClipboardHTMLDataNull) {
|
|
21984
|
+
clipBoardElem = this.reframeToBrContent(clipBoardElem);
|
|
21985
|
+
}
|
|
21986
|
+
else if (this.parent.enterKey === 'DIV') {
|
|
21987
|
+
clipBoardElem.innerHTML = clipBoardElem.innerHTML.replace(/<p class="pasteContent_RTE">/g, '<div>').replace(/<\/p>/g, '</div>');
|
|
21988
|
+
}
|
|
21887
21989
|
this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: null }, (updatedArgs) => { value = updatedArgs.value; });
|
|
21888
21990
|
clipBoardElem.innerHTML = value;
|
|
21889
21991
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
|
|
@@ -21898,6 +22000,41 @@ class PasteCleanup {
|
|
|
21898
22000
|
this.parent.formatter.onSuccess(this.parent, args);
|
|
21899
22001
|
}
|
|
21900
22002
|
}
|
|
22003
|
+
removingComments(elm) {
|
|
22004
|
+
let innerElement = elm.innerHTML;
|
|
22005
|
+
innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
|
|
22006
|
+
elm.innerHTML = innerElement;
|
|
22007
|
+
}
|
|
22008
|
+
reframeToBrContent(clipBoardElem) {
|
|
22009
|
+
const newClipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
22010
|
+
while (!isNullOrUndefined(clipBoardElem.firstChild)) {
|
|
22011
|
+
const brElem = this.parent.createElement('br');
|
|
22012
|
+
const currentFirstChild = clipBoardElem.firstChild;
|
|
22013
|
+
if (currentFirstChild.nodeName === '#text') {
|
|
22014
|
+
const isNextSibPresent = !isNullOrUndefined(currentFirstChild.nextSibling);
|
|
22015
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22016
|
+
if (isNextSibPresent) {
|
|
22017
|
+
newClipBoardElem.appendChild(brElem);
|
|
22018
|
+
}
|
|
22019
|
+
}
|
|
22020
|
+
else {
|
|
22021
|
+
const isCurrentNodeBRElm = currentFirstChild.nodeName === 'BR';
|
|
22022
|
+
if (isCurrentNodeBRElm) {
|
|
22023
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22024
|
+
}
|
|
22025
|
+
else {
|
|
22026
|
+
newClipBoardElem.appendChild(currentFirstChild.childNodes[0]);
|
|
22027
|
+
}
|
|
22028
|
+
if (!isNullOrUndefined(currentFirstChild) && !isNullOrUndefined(currentFirstChild.nextSibling)) {
|
|
22029
|
+
newClipBoardElem.appendChild(brElem);
|
|
22030
|
+
}
|
|
22031
|
+
if (!isCurrentNodeBRElm && !isNullOrUndefined(currentFirstChild)) {
|
|
22032
|
+
detach(currentFirstChild);
|
|
22033
|
+
}
|
|
22034
|
+
}
|
|
22035
|
+
}
|
|
22036
|
+
return newClipBoardElem;
|
|
22037
|
+
}
|
|
21901
22038
|
getTextContent(clipBoardElem) {
|
|
21902
22039
|
for (let i = 0; i < this.blockNode.length; i++) {
|
|
21903
22040
|
const inElem = clipBoardElem.querySelectorAll(this.blockNode[i]);
|
|
@@ -21945,14 +22082,16 @@ class PasteCleanup {
|
|
|
21945
22082
|
for (let i = 0; i < this.inlineNode.length; i++) {
|
|
21946
22083
|
const inElem = clipBoardElem.querySelectorAll(this.inlineNode[i]);
|
|
21947
22084
|
for (let j = 0; j < inElem.length; j++) {
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
22085
|
+
if (!(inElem[j] === clipBoardElem.firstChild && inElem[j].nodeName === 'SPAN')) {
|
|
22086
|
+
let parElem;
|
|
22087
|
+
for (let k = 0; k < inElem[j].childNodes.length; k++) {
|
|
22088
|
+
parElem = inElem[j].childNodes[k].parentElement;
|
|
22089
|
+
inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
|
|
22090
|
+
k--;
|
|
22091
|
+
}
|
|
22092
|
+
if (!isNullOrUndefined(parElem)) {
|
|
22093
|
+
detach(parElem);
|
|
22094
|
+
}
|
|
21956
22095
|
}
|
|
21957
22096
|
}
|
|
21958
22097
|
}
|
|
@@ -22309,7 +22448,7 @@ class FileManager$1 {
|
|
|
22309
22448
|
this.dialogObj.createElement = this.parent.createElement;
|
|
22310
22449
|
this.dialogObj.appendTo(dlgTarget);
|
|
22311
22450
|
this.dialogObj.show(Browser.isDevice ? true : false);
|
|
22312
|
-
this.setCssClass({ cssClass: this.parent.
|
|
22451
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
22313
22452
|
}
|
|
22314
22453
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
22315
22454
|
setCssClass(e) {
|
|
@@ -22506,7 +22645,7 @@ class FullScreen {
|
|
|
22506
22645
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22507
22646
|
}
|
|
22508
22647
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22509
|
-
this.parent.notify(
|
|
22648
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22510
22649
|
}
|
|
22511
22650
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
22512
22651
|
if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
@@ -22560,7 +22699,7 @@ class FullScreen {
|
|
|
22560
22699
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22561
22700
|
}
|
|
22562
22701
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22563
|
-
this.parent.notify(
|
|
22702
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22564
22703
|
}
|
|
22565
22704
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
22566
22705
|
const evenArgs = {
|
|
@@ -22751,7 +22890,7 @@ class FormatPainter {
|
|
|
22751
22890
|
}
|
|
22752
22891
|
onKeyDown(event) {
|
|
22753
22892
|
const originalEvent = event.args;
|
|
22754
|
-
if ((originalEvent
|
|
22893
|
+
if (!isNullOrUndefined(originalEvent) && !isNullOrUndefined(originalEvent.action) && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')
|
|
22755
22894
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
22756
22895
|
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
22757
22896
|
originalEvent.stopPropagation();
|
|
@@ -22905,6 +23044,9 @@ class EmojiPicker {
|
|
|
22905
23044
|
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
22906
23045
|
}
|
|
22907
23046
|
this.divElement = spanElement.closest('div');
|
|
23047
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
23048
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
23049
|
+
}
|
|
22908
23050
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
22909
23051
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
22910
23052
|
this.clickEvent = args.args;
|
|
@@ -23544,7 +23686,8 @@ class EmojiPicker {
|
|
|
23544
23686
|
}
|
|
23545
23687
|
onkeyPress(e) {
|
|
23546
23688
|
const originalEvent = e.args;
|
|
23547
|
-
const selection = this.parent.contentModule.
|
|
23689
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23690
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23548
23691
|
if (selection.rangeCount <= 0) {
|
|
23549
23692
|
return;
|
|
23550
23693
|
}
|
|
@@ -23564,6 +23707,10 @@ class EmojiPicker {
|
|
|
23564
23707
|
}
|
|
23565
23708
|
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
23566
23709
|
removeClass([this.divElement], 'e-active');
|
|
23710
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument : this.parent.contentModule.getDocument();
|
|
23711
|
+
if (this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
23712
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
23713
|
+
}
|
|
23567
23714
|
this.popupObj.hide();
|
|
23568
23715
|
}
|
|
23569
23716
|
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
@@ -23574,7 +23721,8 @@ class EmojiPicker {
|
|
|
23574
23721
|
}
|
|
23575
23722
|
onkeyUp(e) {
|
|
23576
23723
|
const originalEvent = e.args;
|
|
23577
|
-
const selection = this.parent.contentModule.
|
|
23724
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23725
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23578
23726
|
if (selection.rangeCount <= 0) {
|
|
23579
23727
|
return;
|
|
23580
23728
|
}
|
|
@@ -23600,7 +23748,7 @@ class EmojiPicker {
|
|
|
23600
23748
|
}
|
|
23601
23749
|
getCoordinates() {
|
|
23602
23750
|
let coordinates;
|
|
23603
|
-
const selection = this.parent.contentModule.
|
|
23751
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
23604
23752
|
const range = selection.getRangeAt(0);
|
|
23605
23753
|
let firstChild;
|
|
23606
23754
|
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
@@ -23889,7 +24037,7 @@ class Link {
|
|
|
23889
24037
|
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + parentTop + args.clientY : args.pageY;
|
|
23890
24038
|
}
|
|
23891
24039
|
if (this.quickToolObj.linkQTBar) {
|
|
23892
|
-
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer);
|
|
24040
|
+
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer, 'link');
|
|
23893
24041
|
}
|
|
23894
24042
|
}
|
|
23895
24043
|
}
|
|
@@ -23920,12 +24068,32 @@ class Link {
|
|
|
23920
24068
|
if (isPopupOpen) {
|
|
23921
24069
|
return;
|
|
23922
24070
|
}
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
24071
|
+
if (e.args.ctrlKey === false) {
|
|
24072
|
+
this.showLinkQuickToolbar({
|
|
24073
|
+
args: args,
|
|
24074
|
+
isNotify: false,
|
|
24075
|
+
type: 'Links',
|
|
24076
|
+
elements: [args.target]
|
|
24077
|
+
});
|
|
24078
|
+
}
|
|
24079
|
+
else {
|
|
24080
|
+
const selection = this.parent.formatter.editorManager.nodeSelection;
|
|
24081
|
+
const range = selection.getRange(this.parent.contentModule.getDocument());
|
|
24082
|
+
const args = {
|
|
24083
|
+
args: {
|
|
24084
|
+
item: {
|
|
24085
|
+
subCommand: 'OpenLink',
|
|
24086
|
+
command: 'Links',
|
|
24087
|
+
name: ''
|
|
24088
|
+
},
|
|
24089
|
+
originalEvent: e.args
|
|
24090
|
+
},
|
|
24091
|
+
selectNode: selection.getNodeCollection(range),
|
|
24092
|
+
selectParent: selection.getParentNodeCollection(range),
|
|
24093
|
+
selection: selection.save(range, this.parent.contentModule.getDocument())
|
|
24094
|
+
};
|
|
24095
|
+
this.parent.notify(openLink, args);
|
|
24096
|
+
}
|
|
23929
24097
|
}
|
|
23930
24098
|
else {
|
|
23931
24099
|
this.hideLinkQuickToolbar();
|
|
@@ -23982,7 +24150,7 @@ class Link {
|
|
|
23982
24150
|
}
|
|
23983
24151
|
showDialog() {
|
|
23984
24152
|
this.openDialog(false);
|
|
23985
|
-
this.setCssClass({ cssClass: this.parent.
|
|
24153
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
23986
24154
|
}
|
|
23987
24155
|
closeDialog() {
|
|
23988
24156
|
if (this.dialogObj) {
|
|
@@ -24014,22 +24182,22 @@ class Link {
|
|
|
24014
24182
|
const textPlace = this.i10n.getConstant('textPlaceholder');
|
|
24015
24183
|
const title = this.i10n.getConstant('linkTitle');
|
|
24016
24184
|
const linkDialogEle = this.parent.createElement('div', {
|
|
24017
|
-
className: 'e-rte-link-dialog' +
|
|
24185
|
+
className: 'e-rte-link-dialog' + this.parent.getCssClass(true), id: this.rteID + '_rtelink'
|
|
24018
24186
|
});
|
|
24019
24187
|
this.parent.element.appendChild(linkDialogEle);
|
|
24020
24188
|
const linkContent = this.parent.createElement('div', {
|
|
24021
|
-
className: 'e-rte-linkcontent' +
|
|
24189
|
+
className: 'e-rte-linkcontent' + this.parent.getCssClass(true), id: this.rteID + '_linkContent'
|
|
24022
24190
|
});
|
|
24023
24191
|
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' +
|
|
24192
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24193
|
+
'<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>' +
|
|
24194
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '"></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24195
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>' : '';
|
|
24196
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24197
|
+
'<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>' +
|
|
24198
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
24199
|
+
'<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 + '">' +
|
|
24200
|
+
'</div><div class="e-rte-label' + this.parent.getCssClass(true) + '">' + htmlTextbox;
|
|
24033
24201
|
const contentElem = parseHtml(content);
|
|
24034
24202
|
linkContent.appendChild(contentElem);
|
|
24035
24203
|
const linkTarget = linkContent.querySelector('.e-rte-linkTarget');
|
|
@@ -24038,7 +24206,7 @@ class Link {
|
|
|
24038
24206
|
const linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
24039
24207
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
24040
24208
|
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
24041
|
-
cssClass: this.parent.
|
|
24209
|
+
cssClass: this.parent.getCssClass() });
|
|
24042
24210
|
this.checkBoxObj.isStringTemplate = true;
|
|
24043
24211
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
24044
24212
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -24051,16 +24219,16 @@ class Link {
|
|
|
24051
24219
|
const dialogModel = {
|
|
24052
24220
|
header: this.i10n.getConstant('linkHeader'),
|
|
24053
24221
|
content: linkContent,
|
|
24054
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
24222
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
24055
24223
|
enableRtl: this.parent.enableRtl,
|
|
24056
24224
|
locale: this.parent.locale,
|
|
24057
24225
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
24058
24226
|
isModal: Browser.isDevice,
|
|
24059
24227
|
buttons: [{
|
|
24060
24228
|
click: this.insertlink.bind(selectObj),
|
|
24061
|
-
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' +
|
|
24229
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
24062
24230
|
},
|
|
24063
|
-
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' +
|
|
24231
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
24064
24232
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
24065
24233
|
animationSettings: { effect: 'None' },
|
|
24066
24234
|
close: (event) => {
|
|
@@ -24560,18 +24728,18 @@ class Image$1 {
|
|
|
24560
24728
|
this.resizeBtnInit();
|
|
24561
24729
|
this.imgEle = e;
|
|
24562
24730
|
addClass([this.imgEle], 'e-resize');
|
|
24563
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' +
|
|
24731
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + this.parent.getCssClass(true), id: this.rteID + '_imgResize' });
|
|
24564
24732
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24565
|
-
className: 'e-rte-imageboxmark e-rte-topLeft' +
|
|
24733
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24566
24734
|
}));
|
|
24567
24735
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24568
|
-
className: 'e-rte-imageboxmark e-rte-topRight' +
|
|
24736
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24569
24737
|
}));
|
|
24570
24738
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24571
|
-
className: 'e-rte-imageboxmark e-rte-botLeft' +
|
|
24739
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24572
24740
|
}));
|
|
24573
24741
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24574
|
-
className: 'e-rte-imageboxmark e-rte-botRight' +
|
|
24742
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24575
24743
|
}));
|
|
24576
24744
|
if (Browser.isDevice) {
|
|
24577
24745
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -24724,8 +24892,8 @@ class Image$1 {
|
|
|
24724
24892
|
img.removeAttribute('height');
|
|
24725
24893
|
}
|
|
24726
24894
|
else {
|
|
24727
|
-
img.style.width = expectedX + 'px';
|
|
24728
|
-
img.style.height = expectedX + 'px';
|
|
24895
|
+
img.style.width = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24896
|
+
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24729
24897
|
}
|
|
24730
24898
|
}
|
|
24731
24899
|
}
|
|
@@ -24753,7 +24921,6 @@ class Image$1 {
|
|
|
24753
24921
|
this.setAspectRatio(this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
24754
24922
|
this.resizeImgDupPos(this.imgEle);
|
|
24755
24923
|
this.imgResizePos(this.imgEle, this.imgResizeDiv);
|
|
24756
|
-
this.parent.setContentHeight('', false);
|
|
24757
24924
|
}
|
|
24758
24925
|
});
|
|
24759
24926
|
}
|
|
@@ -24768,7 +24935,7 @@ class Image$1 {
|
|
|
24768
24935
|
else if (isNullOrUndefined(this.parent.insertImageSettings.maxHeight)) {
|
|
24769
24936
|
this.imgEle.style.maxHeight = '';
|
|
24770
24937
|
}
|
|
24771
|
-
this.imgEle.style.maxWidth = this.parent.getInsertImgMaxWidth() + 'px';
|
|
24938
|
+
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
24939
|
const pageX = this.getPointX(e);
|
|
24773
24940
|
const pageY = this.getPointY(e);
|
|
24774
24941
|
const mouseX = (this.resizeBtnStat.botLeft || this.resizeBtnStat.topLeft) ? -(pageX - this.pageX) : (pageX - this.pageX);
|
|
@@ -24993,13 +25160,22 @@ class Image$1 {
|
|
|
24993
25160
|
}
|
|
24994
25161
|
}
|
|
24995
25162
|
}
|
|
24996
|
-
else if (
|
|
24997
|
-
range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE))
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25163
|
+
else if (range.startContainer.nodeType === 1) {
|
|
25164
|
+
if (range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE)) {
|
|
25165
|
+
detach(range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE));
|
|
25166
|
+
}
|
|
25167
|
+
else if (range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_IMGBREAK)) {
|
|
25168
|
+
detach(range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_IMGBREAK));
|
|
25169
|
+
}
|
|
25170
|
+
else if (range.startContainer.classList.contains('e-img-wrap') && closest(range.startContainer, '.' + CLS_CAPTION)) {
|
|
25171
|
+
const parentElem = range.startContainer.parentElement.parentElement;
|
|
25172
|
+
detach(closest(range.startContainer, '.' + CLS_CAPTION));
|
|
25173
|
+
if (parentElem && parentElem.textContent.trim() === '') {
|
|
25174
|
+
const brElem = this.parent.createElement('br');
|
|
25175
|
+
brElem.classList.add('e-rte-image-remove-focus');
|
|
25176
|
+
parentElem.appendChild(brElem);
|
|
25177
|
+
}
|
|
25178
|
+
}
|
|
25003
25179
|
}
|
|
25004
25180
|
}
|
|
25005
25181
|
break;
|
|
@@ -25056,7 +25232,7 @@ class Image$1 {
|
|
|
25056
25232
|
}
|
|
25057
25233
|
showDialog() {
|
|
25058
25234
|
this.openDialog(false);
|
|
25059
|
-
this.setCssClass({ cssClass: this.parent.
|
|
25235
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
25060
25236
|
}
|
|
25061
25237
|
closeDialog() {
|
|
25062
25238
|
if (this.dialogObj) {
|
|
@@ -25262,19 +25438,19 @@ class Image$1 {
|
|
|
25262
25438
|
}
|
|
25263
25439
|
this.imagDialog(e);
|
|
25264
25440
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25265
|
-
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' +
|
|
25441
|
+
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + this.parent.getCssClass(true) });
|
|
25266
25442
|
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' +
|
|
25443
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25444
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + this.parent.getCssClass(true) + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
25269
25445
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
25270
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
25446
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>';
|
|
25271
25447
|
const contentElem = parseHtml(content);
|
|
25272
25448
|
linkWrap.appendChild(contentElem);
|
|
25273
25449
|
const linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
25274
25450
|
const inputLink = linkWrap.querySelector('.e-img-link');
|
|
25275
25451
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
25276
25452
|
this.checkBoxObj = new CheckBox({
|
|
25277
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
25453
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25278
25454
|
change: (e) => {
|
|
25279
25455
|
if (e.checked) {
|
|
25280
25456
|
target = '_blank';
|
|
@@ -25288,11 +25464,12 @@ class Image$1 {
|
|
|
25288
25464
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
25289
25465
|
this.checkBoxObj.appendTo(linkTarget);
|
|
25290
25466
|
let target = this.checkBoxObj.checked ? '_blank' : null;
|
|
25467
|
+
let imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
|
|
25291
25468
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25292
25469
|
const linkargs = {
|
|
25293
25470
|
args: e.args,
|
|
25294
25471
|
selfImage: this, selection: e.selection,
|
|
25295
|
-
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target
|
|
25472
|
+
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target, ariaLabel: imageLabel
|
|
25296
25473
|
};
|
|
25297
25474
|
this.dialogObj.setProperties({
|
|
25298
25475
|
height: 'inherit',
|
|
@@ -25305,7 +25482,7 @@ class Image$1 {
|
|
|
25305
25482
|
this.insertlink(linkargs);
|
|
25306
25483
|
},
|
|
25307
25484
|
buttonModel: {
|
|
25308
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link' +
|
|
25485
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
25309
25486
|
}
|
|
25310
25487
|
}],
|
|
25311
25488
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
@@ -25330,13 +25507,13 @@ class Image$1 {
|
|
|
25330
25507
|
this.imagDialog(e);
|
|
25331
25508
|
const altText = this.i10n.getConstant('altText');
|
|
25332
25509
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25333
|
-
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' +
|
|
25510
|
+
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + this.parent.getCssClass(true) });
|
|
25334
25511
|
const altHeader = this.i10n.getConstant('alternateHeader');
|
|
25335
25512
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25336
25513
|
const getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
25337
25514
|
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' +
|
|
25515
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25516
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + this.parent.getCssClass(true) + '" placeholder="' + altText + '"/>' +
|
|
25340
25517
|
'</div>';
|
|
25341
25518
|
const contentElem = parseHtml(content);
|
|
25342
25519
|
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
@@ -25354,7 +25531,7 @@ class Image$1 {
|
|
|
25354
25531
|
this.insertAlt(altArgs);
|
|
25355
25532
|
},
|
|
25356
25533
|
buttonModel: {
|
|
25357
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt' +
|
|
25534
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
25358
25535
|
}
|
|
25359
25536
|
}],
|
|
25360
25537
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
@@ -25406,14 +25583,14 @@ class Image$1 {
|
|
|
25406
25583
|
}
|
|
25407
25584
|
if (e.selectNode[0].parentElement.nodeName === 'A') {
|
|
25408
25585
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25409
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25586
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25410
25587
|
subCommand: e.args.item.subCommand
|
|
25411
25588
|
});
|
|
25412
25589
|
proxy.dialogObj.hide({ returnValue: true });
|
|
25413
25590
|
return;
|
|
25414
25591
|
}
|
|
25415
25592
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25416
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25593
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25417
25594
|
subCommand: e.args.item.subCommand, selection: e.selection
|
|
25418
25595
|
});
|
|
25419
25596
|
const captionEle = closest(e.selectNode[0], '.e-img-caption');
|
|
@@ -25524,11 +25701,11 @@ class Image$1 {
|
|
|
25524
25701
|
}
|
|
25525
25702
|
else {
|
|
25526
25703
|
this.captionEle = this.parent.createElement('span', {
|
|
25527
|
-
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION +
|
|
25704
|
+
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION + this.parent.getCssClass(true),
|
|
25528
25705
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
25529
25706
|
});
|
|
25530
|
-
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' +
|
|
25531
|
-
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' +
|
|
25707
|
+
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
25708
|
+
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
25532
25709
|
attrs: { contenteditable: 'true' } });
|
|
25533
25710
|
const parent = e.selectNode[0].parentElement;
|
|
25534
25711
|
if (parent.tagName === 'A') {
|
|
@@ -25580,7 +25757,7 @@ class Image$1 {
|
|
|
25580
25757
|
this.insertSize(selectObj);
|
|
25581
25758
|
},
|
|
25582
25759
|
buttonModel: {
|
|
25583
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size' +
|
|
25760
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
25584
25761
|
}
|
|
25585
25762
|
}],
|
|
25586
25763
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
@@ -25625,7 +25802,7 @@ class Image$1 {
|
|
|
25625
25802
|
this.dialogObj.hide({ returnValue: true });
|
|
25626
25803
|
return;
|
|
25627
25804
|
}
|
|
25628
|
-
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' +
|
|
25805
|
+
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + this.parent.getCssClass(true), id: this.rteID + '_image' });
|
|
25629
25806
|
this.parent.element.appendChild(imgDialog);
|
|
25630
25807
|
const imgInsert = this.i10n.getConstant('dialogInsert');
|
|
25631
25808
|
const imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -25634,20 +25811,20 @@ class Image$1 {
|
|
|
25634
25811
|
const selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
25635
25812
|
const dialogModel = {
|
|
25636
25813
|
header: imgHeader,
|
|
25637
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
25814
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
25638
25815
|
enableRtl: this.parent.enableRtl,
|
|
25639
25816
|
locale: this.parent.locale,
|
|
25640
25817
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
25641
25818
|
isModal: Browser.isDevice,
|
|
25642
25819
|
buttons: [{
|
|
25643
25820
|
click: this.insertImageUrl.bind(selectObj),
|
|
25644
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' +
|
|
25821
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
|
|
25645
25822
|
},
|
|
25646
25823
|
{
|
|
25647
25824
|
click: (e) => {
|
|
25648
25825
|
this.cancelDialog(e);
|
|
25649
25826
|
},
|
|
25650
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
25827
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
25651
25828
|
}],
|
|
25652
25829
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
25653
25830
|
animationSettings: { effect: 'None' },
|
|
@@ -25670,12 +25847,12 @@ class Image$1 {
|
|
|
25670
25847
|
this.dialogObj = null;
|
|
25671
25848
|
}
|
|
25672
25849
|
};
|
|
25673
|
-
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' +
|
|
25850
|
+
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' + this.parent.getCssClass(true) });
|
|
25674
25851
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
25675
25852
|
|| this.parent.editorMode === 'HTML') {
|
|
25676
25853
|
dialogContent.appendChild(this.imgUpload(e));
|
|
25677
25854
|
}
|
|
25678
|
-
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' +
|
|
25855
|
+
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + this.parent.getCssClass(true) });
|
|
25679
25856
|
const linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
25680
25857
|
if (this.parent.editorMode === 'HTML') {
|
|
25681
25858
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -25791,10 +25968,10 @@ class Image$1 {
|
|
|
25791
25968
|
}
|
|
25792
25969
|
// eslint-disable-next-line
|
|
25793
25970
|
imageUrlPopup(e) {
|
|
25794
|
-
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' +
|
|
25971
|
+
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
25795
25972
|
const placeUrl = this.i10n.getConstant('imageUrl');
|
|
25796
25973
|
this.inputUrl = this.parent.createElement('input', {
|
|
25797
|
-
className: 'e-input e-img-url' +
|
|
25974
|
+
className: 'e-input e-img-url' + this.parent.getCssClass(true),
|
|
25798
25975
|
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
25799
25976
|
});
|
|
25800
25977
|
this.inputUrl.addEventListener('input', () => {
|
|
@@ -25860,7 +26037,7 @@ class Image$1 {
|
|
|
25860
26037
|
const selectNode = e.selectNode[0];
|
|
25861
26038
|
const imgHeight = this.i10n.getConstant('imageHeight');
|
|
25862
26039
|
const imgWidth = this.i10n.getConstant('imageWidth');
|
|
25863
|
-
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' +
|
|
26040
|
+
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
25864
26041
|
const widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
25865
26042
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
25866
26043
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -25869,10 +26046,10 @@ class Image$1 {
|
|
|
25869
26046
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
25870
26047
|
this.changedWidthValue = null;
|
|
25871
26048
|
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' +
|
|
26049
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
26050
|
+
'</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>' +
|
|
26051
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
26052
|
+
'<input type="text" id="imgheight" class="e-img-height' + this.parent.getCssClass(true) + '"/></div>';
|
|
25876
26053
|
const contentElem = parseHtml(content);
|
|
25877
26054
|
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
25878
26055
|
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
@@ -25880,7 +26057,7 @@ class Image$1 {
|
|
|
25880
26057
|
this.widthNum = new TextBox({
|
|
25881
26058
|
value: formatUnit(widthVal),
|
|
25882
26059
|
enableRtl: this.parent.enableRtl,
|
|
25883
|
-
cssClass: this.parent.
|
|
26060
|
+
cssClass: this.parent.getCssClass(),
|
|
25884
26061
|
input: (e) => {
|
|
25885
26062
|
this.inputWidthValue = formatUnit(this.inputValue(e.value));
|
|
25886
26063
|
}
|
|
@@ -25890,7 +26067,7 @@ class Image$1 {
|
|
|
25890
26067
|
this.heightNum = new TextBox({
|
|
25891
26068
|
value: formatUnit(heightVal),
|
|
25892
26069
|
enableRtl: this.parent.enableRtl,
|
|
25893
|
-
cssClass: this.parent.
|
|
26070
|
+
cssClass: this.parent.getCssClass(),
|
|
25894
26071
|
input: (e) => {
|
|
25895
26072
|
this.inputHeightValue = formatUnit(this.inputValue(e.value));
|
|
25896
26073
|
}
|
|
@@ -25961,16 +26138,16 @@ class Image$1 {
|
|
|
25961
26138
|
save = e.selection;
|
|
25962
26139
|
selectParent = e.selectParent;
|
|
25963
26140
|
}
|
|
25964
|
-
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' +
|
|
26141
|
+
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + this.parent.getCssClass(true) });
|
|
25965
26142
|
const deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
25966
26143
|
const imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
25967
|
-
const span = this.parent.createElement('span', { className: 'e-droptext' +
|
|
26144
|
+
const span = this.parent.createElement('span', { className: 'e-droptext' + this.parent.getCssClass(true) });
|
|
25968
26145
|
const spanMsg = this.parent.createElement('span', {
|
|
25969
|
-
className: 'e-rte-upload-text' +
|
|
26146
|
+
className: 'e-rte-upload-text' + this.parent.getCssClass(true), innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
25970
26147
|
});
|
|
25971
26148
|
span.appendChild(spanMsg);
|
|
25972
26149
|
const btnEle = this.parent.createElement('button', {
|
|
25973
|
-
className: 'e-browsebtn' +
|
|
26150
|
+
className: 'e-browsebtn' + this.parent.getCssClass(true), id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
25974
26151
|
});
|
|
25975
26152
|
span.appendChild(btnEle);
|
|
25976
26153
|
uploadParentEle.appendChild(span);
|
|
@@ -25982,7 +26159,7 @@ class Image$1 {
|
|
|
25982
26159
|
const btnClick = (Browser.isDevice) ? span : btnEle;
|
|
25983
26160
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
25984
26161
|
const uploadEle = this.parent.createElement('input', {
|
|
25985
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.
|
|
26162
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.getCssClass()
|
|
25986
26163
|
});
|
|
25987
26164
|
uploadParentEle.appendChild(uploadEle);
|
|
25988
26165
|
let altText;
|
|
@@ -25990,7 +26167,7 @@ class Image$1 {
|
|
|
25990
26167
|
let filesData;
|
|
25991
26168
|
this.uploadObj = new Uploader({
|
|
25992
26169
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
25993
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
26170
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25994
26171
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
25995
26172
|
selected: (e) => {
|
|
25996
26173
|
proxy.isImgUploaded = true;
|
|
@@ -26063,9 +26240,9 @@ class Image$1 {
|
|
|
26063
26240
|
failure: (e) => {
|
|
26064
26241
|
this.parent.trigger(imageUploadFailed, e);
|
|
26065
26242
|
},
|
|
26066
|
-
removing: () => {
|
|
26243
|
+
removing: (removeEventArgs) => {
|
|
26067
26244
|
// eslint-disable-next-line
|
|
26068
|
-
this.parent.trigger(imageRemoving,
|
|
26245
|
+
this.parent.trigger(imageRemoving, removeEventArgs, (e) => {
|
|
26069
26246
|
proxy.isImgUploaded = false;
|
|
26070
26247
|
this.dialogObj.getButtons(0).element.disabled = true;
|
|
26071
26248
|
proxy.inputUrl.removeAttribute('disabled');
|
|
@@ -26350,7 +26527,7 @@ class Image$1 {
|
|
|
26350
26527
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
26351
26528
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
26352
26529
|
},
|
|
26353
|
-
cssClass: CLS_RTE_DIALOG_UPLOAD +
|
|
26530
|
+
cssClass: CLS_RTE_DIALOG_UPLOAD + this.parent.getCssClass(true),
|
|
26354
26531
|
dropArea: this.parent.element,
|
|
26355
26532
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26356
26533
|
removing: () => {
|
|
@@ -26553,10 +26730,10 @@ class Image$1 {
|
|
|
26553
26730
|
*/
|
|
26554
26731
|
/* eslint-enable */
|
|
26555
26732
|
destroy() {
|
|
26556
|
-
this.prevSelectedImgEle = undefined;
|
|
26557
26733
|
if (isNullOrUndefined(this.parent)) {
|
|
26558
26734
|
return;
|
|
26559
26735
|
}
|
|
26736
|
+
this.prevSelectedImgEle = undefined;
|
|
26560
26737
|
this.removeEventListener();
|
|
26561
26738
|
}
|
|
26562
26739
|
moduleDestroy() {
|
|
@@ -28846,7 +29023,7 @@ class ViewSource {
|
|
|
28846
29023
|
this.parent.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.onKeyDown);
|
|
28847
29024
|
}
|
|
28848
29025
|
getSourceCode() {
|
|
28849
|
-
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA +
|
|
29026
|
+
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA + this.parent.getCssClass(true) });
|
|
28850
29027
|
}
|
|
28851
29028
|
wireEvent(element) {
|
|
28852
29029
|
this.keyboardModule = new KeyboardEvents$1(element, {
|
|
@@ -28943,8 +29120,10 @@ class ViewSource {
|
|
|
28943
29120
|
this.getPanel().style.display = 'block';
|
|
28944
29121
|
}
|
|
28945
29122
|
else {
|
|
29123
|
+
const height = this.parent.inputElement.offsetHeight;
|
|
28946
29124
|
this.contentModule.getPanel().appendChild(this.previewElement);
|
|
28947
29125
|
this.getPanel().value = this.getTextAreaValue();
|
|
29126
|
+
this.previewElement.style.height = height + 'px';
|
|
28948
29127
|
this.contentModule.getEditPanel().style.display = 'none';
|
|
28949
29128
|
this.previewElement.style.display = 'block';
|
|
28950
29129
|
}
|
|
@@ -29106,6 +29285,7 @@ class Table {
|
|
|
29106
29285
|
this.parent.on(showTableDialog, this.showDialog, this);
|
|
29107
29286
|
this.parent.on(closeTableDialog, this.closeDialog, this);
|
|
29108
29287
|
this.parent.on(docClick, this.docClick, this);
|
|
29288
|
+
this.parent.on(iframeMouseDown, this.onIframeMouseDown, this);
|
|
29109
29289
|
this.parent.on(editAreaClick, this.editAreaClickHandler, this);
|
|
29110
29290
|
this.parent.on(clearDialogObj, this.clearDialogObj, this);
|
|
29111
29291
|
this.parent.on(tableToolbarAction, this.onToolbarAction, this);
|
|
@@ -29126,6 +29306,7 @@ class Table {
|
|
|
29126
29306
|
this.parent.off(initialEnd, this.afterRender);
|
|
29127
29307
|
this.parent.off(dynamicModule, this.afterRender);
|
|
29128
29308
|
this.parent.off(docClick, this.docClick);
|
|
29309
|
+
this.parent.off(iframeMouseDown, this.onIframeMouseDown);
|
|
29129
29310
|
this.parent.off(showTableDialog, this.showDialog);
|
|
29130
29311
|
this.parent.off(closeTableDialog, this.closeDialog);
|
|
29131
29312
|
this.parent.off(editAreaClick, this.editAreaClickHandler);
|
|
@@ -29134,8 +29315,8 @@ class Table {
|
|
|
29134
29315
|
this.parent.off(dropDownSelect, this.dropdownSelect);
|
|
29135
29316
|
this.parent.off(mouseDown, this.cellSelect);
|
|
29136
29317
|
this.parent.off(tableColorPickerChanged, this.setBGColor);
|
|
29137
|
-
this.parent.off(keyUp, this.keyUp);
|
|
29138
29318
|
this.parent.off(keyDown, this.keyDown);
|
|
29319
|
+
this.parent.off(keyUp, this.keyUp);
|
|
29139
29320
|
this.parent.off(mouseUp, this.selectionTable);
|
|
29140
29321
|
this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
|
|
29141
29322
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
@@ -29331,11 +29512,12 @@ class Table {
|
|
|
29331
29512
|
name: !isInternal ? 'showDialog' : null
|
|
29332
29513
|
};
|
|
29333
29514
|
this.insertTableDialog({ self: this, args: args, selection: selection });
|
|
29515
|
+
this.parent.formatter.editorManager.nodeSelection.restore();
|
|
29334
29516
|
}
|
|
29335
29517
|
}
|
|
29336
29518
|
showDialog() {
|
|
29337
29519
|
this.openDialog(false);
|
|
29338
|
-
this.setCssClass({ cssClass: this.parent.
|
|
29520
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
29339
29521
|
}
|
|
29340
29522
|
closeDialog() {
|
|
29341
29523
|
if (this.editdlgObj) {
|
|
@@ -29525,6 +29707,10 @@ class Table {
|
|
|
29525
29707
|
tableHeader(selection, e) {
|
|
29526
29708
|
this.parent.formatter.process(this.parent, e, e.originalEvent, { selection: selection, subCommand: e.item.subCommand });
|
|
29527
29709
|
}
|
|
29710
|
+
getAnchorNode(element) {
|
|
29711
|
+
const selectParent = closest(element, 'a');
|
|
29712
|
+
return (selectParent ? selectParent : element);
|
|
29713
|
+
}
|
|
29528
29714
|
editAreaClickHandler(e) {
|
|
29529
29715
|
if (this.parent.readonly || !isNullOrUndefined(closest(e.args.target, '.e-img-caption'))) {
|
|
29530
29716
|
return;
|
|
@@ -29546,7 +29732,8 @@ class Table {
|
|
|
29546
29732
|
const closestTable = closest(target, 'table');
|
|
29547
29733
|
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
29548
29734
|
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
29549
|
-
|
|
29735
|
+
const isAnchorEle = this.getAnchorNode(target);
|
|
29736
|
+
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
29550
29737
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
29551
29738
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
29552
29739
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
@@ -29732,7 +29919,7 @@ class Table {
|
|
|
29732
29919
|
this.contentModule.getEditPanel().appendChild(rowReEle);
|
|
29733
29920
|
}
|
|
29734
29921
|
const tableReBox = this.parent.createElement('span', {
|
|
29735
|
-
className: CLS_TB_BOX_RES +
|
|
29922
|
+
className: CLS_TB_BOX_RES + this.parent.getCssClass(true), attrs: {
|
|
29736
29923
|
'data-col': columns.length.toString(), 'unselectable': 'on', 'contenteditable': 'false'
|
|
29737
29924
|
}
|
|
29738
29925
|
});
|
|
@@ -29884,7 +30071,7 @@ class Table {
|
|
|
29884
30071
|
}
|
|
29885
30072
|
appendHelper() {
|
|
29886
30073
|
this.helper = this.parent.createElement('div', {
|
|
29887
|
-
className: 'e-table-rhelper' +
|
|
30074
|
+
className: 'e-table-rhelper' + this.parent.getCssClass(true)
|
|
29888
30075
|
});
|
|
29889
30076
|
if (Browser.isDevice) {
|
|
29890
30077
|
this.helper.classList.add('e-reicon');
|
|
@@ -30243,16 +30430,16 @@ class Table {
|
|
|
30243
30430
|
this.hideTableQuickToolbar();
|
|
30244
30431
|
const header = '1X1';
|
|
30245
30432
|
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' +
|
|
30433
|
+
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
|
|
30434
|
+
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
|
|
30248
30435
|
this.tblHeader.innerHTML = header;
|
|
30249
30436
|
this.dlgDiv.appendChild(this.tblHeader);
|
|
30250
|
-
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' +
|
|
30437
|
+
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' + this.parent.getCssClass(true) });
|
|
30251
30438
|
this.drawTable(tableDiv, args);
|
|
30252
30439
|
this.dlgDiv.appendChild(tableDiv);
|
|
30253
|
-
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' +
|
|
30440
|
+
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' + this.parent.getCssClass(true) }));
|
|
30254
30441
|
const btnEle = this.parent.createElement('button', {
|
|
30255
|
-
className: 'e-insert-table-btn' +
|
|
30442
|
+
className: 'e-insert-table-btn' + this.parent.getCssClass(true), id: this.rteID + '_insertTable',
|
|
30256
30443
|
attrs: { type: 'button', tabindex: '0' }
|
|
30257
30444
|
});
|
|
30258
30445
|
if (!isNullOrUndefined(this.parent.getToolbarElement().querySelector('.e-expended-nav'))) {
|
|
@@ -30260,7 +30447,7 @@ class Table {
|
|
|
30260
30447
|
}
|
|
30261
30448
|
this.dlgDiv.appendChild(btnEle);
|
|
30262
30449
|
this.createTableButton = new Button({
|
|
30263
|
-
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' +
|
|
30450
|
+
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' + this.parent.getCssClass(true),
|
|
30264
30451
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
30265
30452
|
});
|
|
30266
30453
|
this.createTableButton.isStringTemplate = true;
|
|
@@ -30288,10 +30475,15 @@ class Table {
|
|
|
30288
30475
|
});
|
|
30289
30476
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
30290
30477
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
30291
|
-
addClass([this.popupObj.element], this.parent.
|
|
30478
|
+
addClass([this.popupObj.element], this.parent.getCssClass());
|
|
30292
30479
|
}
|
|
30293
30480
|
this.popupObj.refreshPosition(target);
|
|
30294
30481
|
}
|
|
30482
|
+
onIframeMouseDown() {
|
|
30483
|
+
if (this.popupObj) {
|
|
30484
|
+
this.popupObj.hide();
|
|
30485
|
+
}
|
|
30486
|
+
}
|
|
30295
30487
|
docClick(e) {
|
|
30296
30488
|
const target = e.args.target;
|
|
30297
30489
|
// eslint-disable-next-line
|
|
@@ -30328,10 +30520,10 @@ class Table {
|
|
|
30328
30520
|
let rowDiv;
|
|
30329
30521
|
let tableCell;
|
|
30330
30522
|
for (let row = 0; row < 3; row++) {
|
|
30331
|
-
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' +
|
|
30523
|
+
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' + this.parent.getCssClass(true), attrs: { 'data-column': '' + row } });
|
|
30332
30524
|
for (let col = 0; col < 10; col++) {
|
|
30333
30525
|
const display = (row > 2) ? 'none' : 'inline-block';
|
|
30334
|
-
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' +
|
|
30526
|
+
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' + this.parent.getCssClass(true), attrs: { 'data-cell': '' + col } });
|
|
30335
30527
|
rowDiv.appendChild(tableCell);
|
|
30336
30528
|
tableCell.style.display = display;
|
|
30337
30529
|
if (col === 0 && row === 0) {
|
|
@@ -30354,13 +30546,13 @@ class Table {
|
|
|
30354
30546
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
30355
30547
|
buttons: [{
|
|
30356
30548
|
click: this.applyProperties.bind(this, args),
|
|
30357
|
-
buttonModel: { content: update, cssClass: 'e-flat e-size-update' +
|
|
30549
|
+
buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
|
|
30358
30550
|
},
|
|
30359
30551
|
{
|
|
30360
30552
|
click: (e) => {
|
|
30361
30553
|
this.cancelDialog(e);
|
|
30362
30554
|
},
|
|
30363
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30555
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30364
30556
|
}],
|
|
30365
30557
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
30366
30558
|
});
|
|
@@ -30402,10 +30594,10 @@ class Table {
|
|
|
30402
30594
|
tableCellDlgContent() {
|
|
30403
30595
|
const tableColumn = this.l10n.getConstant('columns');
|
|
30404
30596
|
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' +
|
|
30597
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' + this.parent.getCssClass(true) });
|
|
30598
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" '
|
|
30599
|
+
+ ' data-role ="none" id="tableColumn" class="e-table-column' + this.parent.getCssClass(true) + '"/></div>'
|
|
30600
|
+
+ '<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
30601
|
const contentElem = parseHtml(content);
|
|
30410
30602
|
tableWrap.appendChild(contentElem);
|
|
30411
30603
|
this.columnTextBox = new NumericTextBox({
|
|
@@ -30416,7 +30608,7 @@ class Table {
|
|
|
30416
30608
|
floatLabelType: 'Auto',
|
|
30417
30609
|
max: 50,
|
|
30418
30610
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30419
|
-
cssClass: this.parent.
|
|
30611
|
+
cssClass: this.parent.getCssClass()
|
|
30420
30612
|
});
|
|
30421
30613
|
this.columnTextBox.isStringTemplate = true;
|
|
30422
30614
|
this.columnTextBox.appendTo(tableWrap.querySelector('#tableColumn'));
|
|
@@ -30428,7 +30620,7 @@ class Table {
|
|
|
30428
30620
|
floatLabelType: 'Auto',
|
|
30429
30621
|
max: 1000,
|
|
30430
30622
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30431
|
-
cssClass: this.parent.
|
|
30623
|
+
cssClass: this.parent.getCssClass()
|
|
30432
30624
|
});
|
|
30433
30625
|
this.rowTextBox.isStringTemplate = true;
|
|
30434
30626
|
this.rowTextBox.appendTo(tableWrap.querySelector('#tableRow'));
|
|
@@ -30448,7 +30640,7 @@ class Table {
|
|
|
30448
30640
|
return;
|
|
30449
30641
|
}
|
|
30450
30642
|
const tableDialog = this.parent.createElement('div', {
|
|
30451
|
-
className: 'e-rte-edit-table' +
|
|
30643
|
+
className: 'e-rte-edit-table' + this.parent.getCssClass(true), id: this.rteID + '_tabledialog'
|
|
30452
30644
|
});
|
|
30453
30645
|
this.parent.element.appendChild(tableDialog);
|
|
30454
30646
|
const insert = this.l10n.getConstant('dialogInsert');
|
|
@@ -30456,20 +30648,20 @@ class Table {
|
|
|
30456
30648
|
const header = this.l10n.getConstant('tabledialogHeader');
|
|
30457
30649
|
const dialogModel = {
|
|
30458
30650
|
header: header,
|
|
30459
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
30651
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
30460
30652
|
enableRtl: this.parent.enableRtl,
|
|
30461
30653
|
locale: this.parent.locale,
|
|
30462
30654
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'initial',
|
|
30463
30655
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
30464
30656
|
isModal: Browser.isDevice,
|
|
30465
30657
|
buttons: [{
|
|
30466
|
-
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' +
|
|
30658
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
|
|
30467
30659
|
},
|
|
30468
30660
|
{
|
|
30469
30661
|
click: (e) => {
|
|
30470
30662
|
this.cancelDialog(e);
|
|
30471
30663
|
},
|
|
30472
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30664
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30473
30665
|
}],
|
|
30474
30666
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
30475
30667
|
animationSettings: { effect: 'None' },
|
|
@@ -30542,13 +30734,13 @@ class Table {
|
|
|
30542
30734
|
const tableWidth = this.l10n.getConstant('tableWidth');
|
|
30543
30735
|
const cellPadding = this.l10n.getConstant('cellpadding');
|
|
30544
30736
|
const cellSpacing = this.l10n.getConstant('cellspacing');
|
|
30545
|
-
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' +
|
|
30737
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' + this.parent.getCssClass(true) });
|
|
30546
30738
|
const widthVal = closest(selectNode, 'table').getClientRects()[0].width;
|
|
30547
30739
|
const padVal = closest(selectNode, 'td').style.padding;
|
|
30548
30740
|
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' +
|
|
30741
|
+
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) + '" '
|
|
30742
|
+
+ ' /></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) + '" />'
|
|
30743
|
+
+ ' </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
30744
|
const contentElem = parseHtml(content);
|
|
30553
30745
|
tableWrap.appendChild(contentElem);
|
|
30554
30746
|
this.tableWidthNum = new NumericTextBox({
|
|
@@ -30694,7 +30886,16 @@ class DialogRenderer {
|
|
|
30694
30886
|
getDialogPosition() {
|
|
30695
30887
|
let distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
30696
30888
|
if (distanceFromVisibleTop < 0) {
|
|
30697
|
-
|
|
30889
|
+
let topHeight = 0;
|
|
30890
|
+
let parentElement = this.parent.element;
|
|
30891
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
30892
|
+
const top = parentElement.getBoundingClientRect().top;
|
|
30893
|
+
if (top > 0) {
|
|
30894
|
+
topHeight = top;
|
|
30895
|
+
}
|
|
30896
|
+
parentElement = parentElement.parentElement;
|
|
30897
|
+
}
|
|
30898
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
30698
30899
|
return distanceFromVisibleTop.toString();
|
|
30699
30900
|
}
|
|
30700
30901
|
else {
|
|
@@ -31591,7 +31792,8 @@ class EnterKeyAction {
|
|
|
31591
31792
|
}
|
|
31592
31793
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
31593
31794
|
}
|
|
31594
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
31795
|
+
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
31796
|
+
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
31595
31797
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
31596
31798
|
const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, false).cloneNode(true);
|
|
31597
31799
|
this.parent.formatter.editorManager.domNode.insertAfter(newElem, nearBlockNode);
|
|
@@ -32185,7 +32387,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32185
32387
|
if (tool.command === 'InsertText') {
|
|
32186
32388
|
currentInsertContentLength = value.length;
|
|
32187
32389
|
}
|
|
32188
|
-
const currentLength = this.getText().trim().length;
|
|
32390
|
+
const currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32189
32391
|
const selectionLength = this.getSelection().length;
|
|
32190
32392
|
const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
32191
32393
|
if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
|
|
@@ -32360,7 +32562,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32360
32562
|
if (this.enableXhtml) {
|
|
32361
32563
|
this.setProperties({ value: this.getXhtml() }, true);
|
|
32362
32564
|
}
|
|
32363
|
-
if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNullOrUndefined(this.getToolbar()) &&
|
|
32565
|
+
if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNullOrUndefined(this.getToolbar()) &&
|
|
32364
32566
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
32365
32567
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
32366
32568
|
}
|
|
@@ -32370,7 +32572,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32370
32572
|
}
|
|
32371
32573
|
// eslint-disable-next-line
|
|
32372
32574
|
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
32373
|
-
this.notify(bindCssClass, { cssClass: this.
|
|
32575
|
+
this.notify(bindCssClass, { cssClass: this.getCssClass() });
|
|
32374
32576
|
this.addAudioVideoWrapper();
|
|
32375
32577
|
this.notify(tableclass, {});
|
|
32376
32578
|
this.renderComplete();
|
|
@@ -32460,7 +32662,13 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32460
32662
|
range.endContainer;
|
|
32461
32663
|
const closestLI = closest(endNode, 'LI');
|
|
32462
32664
|
let isDetached = false;
|
|
32463
|
-
|
|
32665
|
+
let currentRangeEndOffset = range.endOffset;
|
|
32666
|
+
if (currentEndContainer.nodeType === Node.TEXT_NODE) {
|
|
32667
|
+
if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
|
|
32668
|
+
currentRangeEndOffset--;
|
|
32669
|
+
}
|
|
32670
|
+
}
|
|
32671
|
+
if (!isNullOrUndefined(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
|
|
32464
32672
|
!range.collapsed && isNullOrUndefined(endNode.nextElementSibling)) {
|
|
32465
32673
|
for (let i = 0; i < closestLI.childNodes.length; i++) {
|
|
32466
32674
|
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
@@ -32539,7 +32747,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32539
32747
|
}
|
|
32540
32748
|
const notFormatPainterCopy = isNullOrUndefined(e.action) ? true : (e.action !== 'format-copy' ? true : false);
|
|
32541
32749
|
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
|
|
32542
|
-
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which
|
|
32750
|
+
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
|
|
32543
32751
|
this.formatter.saveData();
|
|
32544
32752
|
}
|
|
32545
32753
|
if (e.action !== 'insert-link' &&
|
|
@@ -32608,7 +32816,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32608
32816
|
this.formatter.onKeyHandler(this, e);
|
|
32609
32817
|
}
|
|
32610
32818
|
if (this.inputElement && this.inputElement.textContent.length !== 0
|
|
32611
|
-
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
|
|
32819
|
+
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
|
|
32612
32820
|
this.notify(toolbarRefresh, { args: e });
|
|
32613
32821
|
}
|
|
32614
32822
|
if (!isNullOrUndefined(this.placeholder)) {
|
|
@@ -32700,20 +32908,61 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32700
32908
|
return;
|
|
32701
32909
|
}
|
|
32702
32910
|
}
|
|
32703
|
-
this.notifyMouseUp(e);
|
|
32704
32911
|
if (e.detail === 3) {
|
|
32705
32912
|
const range = this.getRange();
|
|
32706
32913
|
const selection = this.formatter.editorManager.domNode.getSelection();
|
|
32707
|
-
|
|
32708
|
-
|
|
32709
|
-
|
|
32710
|
-
|
|
32711
|
-
|
|
32712
|
-
|
|
32713
|
-
|
|
32914
|
+
// To handle the triple click node selection improper range due to browser behavior.
|
|
32915
|
+
if (selection.rangeCount > 0 && !isNullOrUndefined(range.startContainer.parentElement) && (!isNullOrUndefined(range.startContainer.parentElement.nextSibling) &&
|
|
32916
|
+
(range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
|
|
32917
|
+
/\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
|
|
32918
|
+
|| range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
|
|
32919
|
+
const newRange = new Range();
|
|
32920
|
+
let start = range.startContainer;
|
|
32921
|
+
let end = range.endContainer;
|
|
32922
|
+
let isInvalid = false;
|
|
32923
|
+
const isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
|
|
32924
|
+
|| range.commonAncestorContainer.nodeName === 'LI';
|
|
32925
|
+
if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
|
|
32926
|
+
end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
|
|
32927
|
+
}
|
|
32928
|
+
else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
|
|
32929
|
+
if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
|
|
32930
|
+
end = end.previousElementSibling.lastElementChild;
|
|
32931
|
+
}
|
|
32932
|
+
else {
|
|
32933
|
+
end = closest(end.parentElement, 'li');
|
|
32934
|
+
if (end && end.nodeName === 'LI') {
|
|
32935
|
+
end = end.previousElementSibling;
|
|
32936
|
+
}
|
|
32937
|
+
}
|
|
32714
32938
|
}
|
|
32939
|
+
else {
|
|
32940
|
+
if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
|
|
32941
|
+
end.previousElementSibling.textContent.trim().length > 0) {
|
|
32942
|
+
end = end.previousElementSibling.lastChild;
|
|
32943
|
+
}
|
|
32944
|
+
else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
|
|
32945
|
+
end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
|
|
32946
|
+
}
|
|
32947
|
+
}
|
|
32948
|
+
if (!end || end === this.inputElement) {
|
|
32949
|
+
end = start;
|
|
32950
|
+
isInvalid = true;
|
|
32951
|
+
}
|
|
32952
|
+
while (end.nodeName !== '#text' && !isInvalid) {
|
|
32953
|
+
if (end.lastElementChild) {
|
|
32954
|
+
end = end.lastElementChild;
|
|
32955
|
+
}
|
|
32956
|
+
else {
|
|
32957
|
+
end = end.lastChild;
|
|
32958
|
+
}
|
|
32959
|
+
}
|
|
32960
|
+
newRange.setStart(start, 0);
|
|
32961
|
+
newRange.setEnd(end, end.textContent.length);
|
|
32962
|
+
this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
|
|
32715
32963
|
}
|
|
32716
32964
|
}
|
|
32965
|
+
this.notifyMouseUp(e);
|
|
32717
32966
|
}
|
|
32718
32967
|
/**
|
|
32719
32968
|
* @param {Function} module - specifies the module function.
|
|
@@ -32756,7 +33005,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32756
33005
|
const currentLength = this.inputElement.textContent.length;
|
|
32757
33006
|
const selectionLength = this.getSelection().length;
|
|
32758
33007
|
const pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
32759
|
-
? 0 : e.clipboardData.getData('text/plain').length;
|
|
33008
|
+
? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32760
33009
|
const totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
32761
33010
|
if (this.editorMode === 'Markdown') {
|
|
32762
33011
|
const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
|
|
@@ -33187,7 +33436,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33187
33436
|
updatePanelValue() {
|
|
33188
33437
|
let value = this.value;
|
|
33189
33438
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
33190
|
-
const getTextArea = this.element.querySelector('.
|
|
33439
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33191
33440
|
if (value) {
|
|
33192
33441
|
if (getTextArea && getTextArea.style.display === 'block') {
|
|
33193
33442
|
getTextArea.value = this.value;
|
|
@@ -33816,6 +34065,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33816
34065
|
getID() {
|
|
33817
34066
|
return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
|
|
33818
34067
|
}
|
|
34068
|
+
/**
|
|
34069
|
+
* @returns {void}
|
|
34070
|
+
* getCssClass method
|
|
34071
|
+
*
|
|
34072
|
+
* @hidden
|
|
34073
|
+
* @deprecated
|
|
34074
|
+
*/
|
|
34075
|
+
getCssClass(isSpace) {
|
|
34076
|
+
return (isNullOrUndefined(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
|
|
34077
|
+
}
|
|
33819
34078
|
mouseDownHandler(e) {
|
|
33820
34079
|
const touch = (e.touches ? e.changedTouches[0] : e);
|
|
33821
34080
|
addClass([this.element], [CLS_FOCUS]);
|
|
@@ -33927,7 +34186,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33927
34186
|
}
|
|
33928
34187
|
getUpdatedValue() {
|
|
33929
34188
|
let value;
|
|
33930
|
-
const getTextArea = this.element.querySelector('.
|
|
34189
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33931
34190
|
if (this.editorMode === 'HTML') {
|
|
33932
34191
|
value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
|
|
33933
34192
|
this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
|
|
@@ -33958,6 +34217,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33958
34217
|
clearTimeout(this.idleInterval);
|
|
33959
34218
|
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
33960
34219
|
}
|
|
34220
|
+
cleanupResizeElements(args) {
|
|
34221
|
+
const value = this.removeResizeElement(args.value);
|
|
34222
|
+
args.callBack(value);
|
|
34223
|
+
}
|
|
33961
34224
|
removeResizeElement(value) {
|
|
33962
34225
|
let valueElementWrapper = document.createElement("div");
|
|
33963
34226
|
valueElementWrapper.innerHTML = value;
|
|
@@ -34176,6 +34439,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34176
34439
|
this.on(contentChanged, this.contentChanged, this);
|
|
34177
34440
|
this.on(resizeInitialized, this.updateResizeFlag, this);
|
|
34178
34441
|
this.on(updateTbItemsStatus, this.updateStatus, this);
|
|
34442
|
+
this.on(cleanupResizeElements, this.cleanupResizeElements, this);
|
|
34179
34443
|
if (this.readonly && this.enabled) {
|
|
34180
34444
|
return;
|
|
34181
34445
|
}
|
|
@@ -34262,6 +34526,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34262
34526
|
this.off(contentChanged, this.contentChanged);
|
|
34263
34527
|
this.off(resizeInitialized, this.updateResizeFlag);
|
|
34264
34528
|
this.off(updateTbItemsStatus, this.updateStatus);
|
|
34529
|
+
this.off(cleanupResizeElements, this.cleanupResizeElements);
|
|
34265
34530
|
if (this.readonly && this.enabled) {
|
|
34266
34531
|
return;
|
|
34267
34532
|
}
|
|
@@ -34633,5 +34898,5 @@ RichTextEditor = __decorate$1([
|
|
|
34633
34898
|
* Rich Text Editor component exported items
|
|
34634
34899
|
*/
|
|
34635
34900
|
|
|
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,
|
|
34901
|
+
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
34902
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|