@syncfusion/ej2-richtexteditor 22.2.12 → 23.1.39
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 +67 -1
- package/dist/ej2-richtexteditor.min.js +3 -3
- package/dist/ej2-richtexteditor.umd.min.js +3 -3
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +457 -285
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +457 -281
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +3 -3
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +13 -13
- package/src/editor-manager/plugin/dom-node.js +6 -5
- package/src/editor-manager/plugin/inserthtml.js +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +79 -12
- package/src/editor-manager/plugin/selection-exec.js +1 -1
- package/src/editor-manager/plugin/table.js +1 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +2 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +10 -6
- package/src/rich-text-editor/actions/emoji-picker.js +29 -14
- package/src/rich-text-editor/actions/enter-key.js +9 -2
- package/src/rich-text-editor/actions/format-painter.js +12 -6
- package/src/rich-text-editor/actions/full-screen.js +3 -0
- package/src/rich-text-editor/actions/html-editor.js +14 -1
- package/src/rich-text-editor/actions/markdown-editor.js +3 -0
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +63 -32
- package/src/rich-text-editor/actions/quick-toolbar.js +35 -2
- package/src/rich-text-editor/actions/toolbar.js +4 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- 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 +5 -0
- package/src/rich-text-editor/base/constant.js +5 -0
- package/src/rich-text-editor/base/enum.d.ts +4 -0
- package/src/rich-text-editor/base/interface.d.ts +10 -22
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -39
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -39
- package/src/rich-text-editor/base/rich-text-editor.js +14 -10
- package/src/rich-text-editor/base/util.js +5 -1
- package/src/rich-text-editor/models/items.js +34 -22
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +4 -5
- package/src/rich-text-editor/models/toolbar-settings.d.ts +4 -5
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +5 -33
- package/src/rich-text-editor/renderer/dialog-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +19 -65
- package/src/rich-text-editor/renderer/link-module.js +6 -0
- package/src/rich-text-editor/renderer/render.js +4 -0
- package/src/rich-text-editor/renderer/table-module.js +50 -24
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +5 -1
- package/src/rich-text-editor/renderer/toolbar-renderer.js +28 -2
- package/src/rich-text-editor/renderer/video-module.js +5 -33
- package/src/rich-text-editor/renderer/view-source.js +4 -0
- package/styles/bootstrap-dark.css +4 -4
- package/styles/bootstrap.css +4 -4
- package/styles/bootstrap4.css +4 -4
- package/styles/bootstrap5-dark.css +4 -4
- package/styles/bootstrap5.css +4 -4
- package/styles/fabric-dark.css +4 -4
- package/styles/fabric.css +4 -4
- package/styles/fluent-dark.css +4 -4
- package/styles/fluent.css +4 -4
- package/styles/highcontrast-light.css +4 -4
- package/styles/highcontrast.css +4 -4
- package/styles/material-dark.css +4 -5
- package/styles/material.css +4 -5
- package/styles/material3-dark.css +4 -5
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +4 -5
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_layout.scss +2 -2
- package/styles/rich-text-editor/bootstrap-dark.css +4 -4
- package/styles/rich-text-editor/bootstrap-dark.scss +1 -1
- package/styles/rich-text-editor/bootstrap.css +4 -4
- package/styles/rich-text-editor/bootstrap.scss +1 -1
- package/styles/rich-text-editor/bootstrap4.css +4 -4
- package/styles/rich-text-editor/bootstrap4.scss +1 -1
- package/styles/rich-text-editor/bootstrap5-dark.css +4 -4
- package/styles/rich-text-editor/bootstrap5-dark.scss +1 -1
- package/styles/rich-text-editor/bootstrap5.css +4 -4
- package/styles/rich-text-editor/bootstrap5.scss +1 -1
- package/styles/rich-text-editor/fabric-dark.css +4 -4
- package/styles/rich-text-editor/fabric-dark.scss +1 -1
- package/styles/rich-text-editor/fabric.css +4 -4
- package/styles/rich-text-editor/fabric.scss +1 -1
- package/styles/rich-text-editor/fluent-dark.css +4 -4
- package/styles/rich-text-editor/fluent-dark.scss +1 -1
- package/styles/rich-text-editor/fluent.css +4 -4
- package/styles/rich-text-editor/fluent.scss +1 -1
- package/styles/rich-text-editor/highcontrast-light.css +4 -4
- package/styles/rich-text-editor/highcontrast-light.scss +1 -1
- package/styles/rich-text-editor/highcontrast.css +4 -4
- package/styles/rich-text-editor/highcontrast.scss +1 -1
- package/styles/rich-text-editor/material-dark.css +4 -5
- package/styles/rich-text-editor/material-dark.scss +1 -1
- package/styles/rich-text-editor/material.css +4 -5
- package/styles/rich-text-editor/material.scss +1 -1
- package/styles/rich-text-editor/material3-dark.css +4 -5
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +4 -5
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +4 -5
- package/styles/rich-text-editor/tailwind-dark.scss +1 -1
- package/styles/rich-text-editor/tailwind.css +4 -5
- package/styles/rich-text-editor/tailwind.scss +1 -1
- package/styles/tailwind-dark.css +4 -5
- package/styles/tailwind.css +4 -5
|
@@ -739,6 +739,11 @@ const emojiPicker = 'emojiPicker';
|
|
|
739
739
|
* @deprecated
|
|
740
740
|
*/
|
|
741
741
|
const maximizeMinimizeClick = 'maximizeMinimizeClick';
|
|
742
|
+
/**
|
|
743
|
+
* @hidden
|
|
744
|
+
* @deprecated
|
|
745
|
+
*/
|
|
746
|
+
const hidePopup = 'hidePopup';
|
|
742
747
|
/**
|
|
743
748
|
* @hidden
|
|
744
749
|
* @deprecated
|
|
@@ -860,6 +865,11 @@ const CLS_QUICK_DROPDOWN = 'e-quick-dropdown';
|
|
|
860
865
|
* @deprecated
|
|
861
866
|
*/
|
|
862
867
|
const CLS_IMAGE_POP = 'e-rte-image-popup';
|
|
868
|
+
/**
|
|
869
|
+
* @hidden
|
|
870
|
+
* @deprecated
|
|
871
|
+
*/
|
|
872
|
+
const CLS_TEXT_POP = 'e-rte-text-popup';
|
|
863
873
|
/**
|
|
864
874
|
* @hidden
|
|
865
875
|
* @deprecated
|
|
@@ -2177,29 +2187,41 @@ function updateDropDownLocale(self) {
|
|
|
2177
2187
|
});
|
|
2178
2188
|
}
|
|
2179
2189
|
let windowKeys = {
|
|
2180
|
-
'Insert Link': 'Ctrl
|
|
2181
|
-
'Insert Image': 'Ctrl
|
|
2182
|
-
'Create Table': 'Ctrl
|
|
2183
|
-
'Undo': 'Ctrl
|
|
2184
|
-
'Redo': 'Ctrl
|
|
2185
|
-
'Copy': 'Ctrl
|
|
2186
|
-
'Cut': 'Ctrl
|
|
2187
|
-
'Paste': 'Ctrl
|
|
2188
|
-
'Bold': 'Ctrl
|
|
2189
|
-
'Italic': 'Ctrl
|
|
2190
|
-
'Underline': 'Ctrl
|
|
2191
|
-
'Strikethrough': 'Ctrl
|
|
2192
|
-
'Upper Case': 'Ctrl
|
|
2193
|
-
'Lower Case': 'Ctrl
|
|
2194
|
-
'Superscript': 'Ctrl
|
|
2195
|
-
'Subscript': 'Ctrl
|
|
2196
|
-
'
|
|
2197
|
-
'Maximize': 'Ctrl
|
|
2190
|
+
'Insert Link': 'Ctrl+K',
|
|
2191
|
+
'Insert Image': 'Ctrl+Shift+I',
|
|
2192
|
+
'Create Table': 'Ctrl+Shift+E',
|
|
2193
|
+
'Undo': 'Ctrl+Z',
|
|
2194
|
+
'Redo': 'Ctrl+Y',
|
|
2195
|
+
'Copy': 'Ctrl+C',
|
|
2196
|
+
'Cut': 'Ctrl+X',
|
|
2197
|
+
'Paste': 'Ctrl+V',
|
|
2198
|
+
'Bold': 'Ctrl+B',
|
|
2199
|
+
'Italic': 'Ctrl+I',
|
|
2200
|
+
'Underline': 'Ctrl+U',
|
|
2201
|
+
'Strikethrough': 'Ctrl+Shift+S',
|
|
2202
|
+
'Upper Case': 'Ctrl+Shift+U',
|
|
2203
|
+
'Lower Case': 'Ctrl+Shift+L',
|
|
2204
|
+
'Superscript': 'Ctrl+Shift+=',
|
|
2205
|
+
'Subscript': 'Ctrl+=',
|
|
2206
|
+
'Code View': 'Ctrl+Shift+H',
|
|
2207
|
+
'Maximize': 'Ctrl+Shift+F',
|
|
2198
2208
|
'Minimize': 'Esc',
|
|
2199
|
-
'Clear Format': 'Ctrl
|
|
2200
|
-
'Numbered List': 'Ctrl
|
|
2201
|
-
'Bulleted List': 'Ctrl
|
|
2202
|
-
'Format
|
|
2209
|
+
'Clear Format': 'Ctrl+Shift+R',
|
|
2210
|
+
'Numbered List': 'Ctrl+Shift+O',
|
|
2211
|
+
'Bulleted List': 'Ctrl+Alt+O',
|
|
2212
|
+
'Number Format List': 'Ctrl+Shift+O',
|
|
2213
|
+
'Bullet Format List': 'Ctrl+Alt+O',
|
|
2214
|
+
'Insert Audio': 'Ctrl+Shift+A',
|
|
2215
|
+
'Insert Video': 'Ctrl+Shift+V',
|
|
2216
|
+
'Increase Indent': 'Ctrl+]',
|
|
2217
|
+
'Decrease Indent': 'Ctrl+[',
|
|
2218
|
+
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
2219
|
+
'Increase Fontsize': 'Ctrl+Shift+>',
|
|
2220
|
+
'Justify Center': 'Ctrl+E',
|
|
2221
|
+
'Justify Full': 'Ctrl+J',
|
|
2222
|
+
'Justify Left': 'Ctrl+L',
|
|
2223
|
+
'Justify Right': 'Ctrl+R',
|
|
2224
|
+
'Format Painter': 'Alt+Shift+C, Alt+Shift+V'
|
|
2203
2225
|
};
|
|
2204
2226
|
const defaultEmojiIcons = [{
|
|
2205
2227
|
name: 'Smilies & People', code: '1F600', iconCss: 'e-emoji', icons: [{ code: '1F600', desc: 'Grinning face' },
|
|
@@ -2869,7 +2891,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2869
2891
|
}
|
|
2870
2892
|
}
|
|
2871
2893
|
else if ((typeof data[`${key}`] === 'string' || data[`${key}`] === null) &&
|
|
2872
|
-
getIndex(key, e.parent.toolbarSettings.items)
|
|
2894
|
+
getIndex(key, e.parent.toolbarSettings.items) >= -1) {
|
|
2873
2895
|
const value = ((data[`${key}`]) ? data[`${key}`] : '');
|
|
2874
2896
|
let result = '';
|
|
2875
2897
|
switch (key) {
|
|
@@ -2934,6 +2956,10 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2934
2956
|
dropDown.fontSizeDropDown.dataBind();
|
|
2935
2957
|
break;
|
|
2936
2958
|
}
|
|
2959
|
+
case 'bulletFormatList':
|
|
2960
|
+
case 'numberFormatList': {
|
|
2961
|
+
removeClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
2962
|
+
}
|
|
2937
2963
|
}
|
|
2938
2964
|
}
|
|
2939
2965
|
}
|
|
@@ -3298,9 +3324,13 @@ class ToolbarRenderer {
|
|
|
3298
3324
|
* Constructor for toolbar renderer module
|
|
3299
3325
|
*
|
|
3300
3326
|
* @param {IRichTextEditor} parent - specifies the parent element.
|
|
3327
|
+
* @param {ServiceLocator} serviceLocator - specifies the serviceLocator
|
|
3301
3328
|
*/
|
|
3302
|
-
constructor(parent) {
|
|
3329
|
+
constructor(parent, serviceLocator) {
|
|
3303
3330
|
this.parent = parent;
|
|
3331
|
+
if (serviceLocator) {
|
|
3332
|
+
this.l10n = serviceLocator.getService('rteLocale');
|
|
3333
|
+
}
|
|
3304
3334
|
this.wireEvent();
|
|
3305
3335
|
}
|
|
3306
3336
|
wireEvent() {
|
|
@@ -3308,7 +3338,11 @@ class ToolbarRenderer {
|
|
|
3308
3338
|
this.parent.on(maximizeMinimizeClick, this.destroyTooltip, this);
|
|
3309
3339
|
}
|
|
3310
3340
|
destroyTooltip() {
|
|
3311
|
-
|
|
3341
|
+
if (!isNullOrUndefined(document.querySelector('.e-tooltip-wrap')) && !isNullOrUndefined(document.querySelector(' [data-tooltip-id]'))) {
|
|
3342
|
+
const tooltipTargetEle = document.querySelector('#' + (this.parent.element).id + ' [data-tooltip-id]');
|
|
3343
|
+
const event = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
3344
|
+
tooltipTargetEle.dispatchEvent(event);
|
|
3345
|
+
}
|
|
3312
3346
|
}
|
|
3313
3347
|
unWireEvent() {
|
|
3314
3348
|
this.parent.off(destroy, this.unWireEvent);
|
|
@@ -3344,6 +3378,22 @@ class ToolbarRenderer {
|
|
|
3344
3378
|
}
|
|
3345
3379
|
this.parent.notify(beforeDropDownItemRender, args);
|
|
3346
3380
|
}
|
|
3381
|
+
tooltipBeforeRender(args) {
|
|
3382
|
+
if (!isNullOrUndefined(args.target.getAttribute('title'))) {
|
|
3383
|
+
const tooltipTarget = args.target.getAttribute('title');
|
|
3384
|
+
let tooltipText;
|
|
3385
|
+
switch (tooltipTarget) {
|
|
3386
|
+
case 'Minimize':
|
|
3387
|
+
tooltipText = this.l10n.getConstant('minimize');
|
|
3388
|
+
args.target.setAttribute('title', tooltipText + ' (Esc)');
|
|
3389
|
+
break;
|
|
3390
|
+
case 'Maximize':
|
|
3391
|
+
tooltipText = this.l10n.getConstant('maximize');
|
|
3392
|
+
args.target.setAttribute('title', tooltipText + ' (Ctrl+Shift+F)');
|
|
3393
|
+
break;
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3347
3397
|
dropDownOpen(args) {
|
|
3348
3398
|
if (args.element.parentElement.getAttribute('id').indexOf('TableCell') > -1 && !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-merge')) &&
|
|
3349
3399
|
(!isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-horizontal-split')) || !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-vertical-split')))) {
|
|
@@ -3409,6 +3459,8 @@ class ToolbarRenderer {
|
|
|
3409
3459
|
target: '#' + this.parent.getID() + '_toolbar_wrapper [title]',
|
|
3410
3460
|
showTipPointer: true,
|
|
3411
3461
|
openDelay: 400,
|
|
3462
|
+
opensOn: 'Hover',
|
|
3463
|
+
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
3412
3464
|
cssClass: this.parent.cssClass,
|
|
3413
3465
|
windowCollision: true,
|
|
3414
3466
|
position: 'BottomCenter'
|
|
@@ -4754,7 +4806,7 @@ class Toolbar$2 {
|
|
|
4754
4806
|
this.renderFactory = this.locator.getService('rendererFactory');
|
|
4755
4807
|
updateDropDownLocale(this.parent);
|
|
4756
4808
|
updateDropDownFontFormatLocale(this.parent);
|
|
4757
|
-
this.renderFactory.addRenderer(RenderType.Toolbar, new ToolbarRenderer(this.parent));
|
|
4809
|
+
this.renderFactory.addRenderer(RenderType.Toolbar, new ToolbarRenderer(this.parent, this.locator));
|
|
4758
4810
|
this.toolbarRenderer = this.renderFactory.getRenderer(RenderType.Toolbar);
|
|
4759
4811
|
this.baseToolbar = new BaseToolbar(this.parent, this.locator);
|
|
4760
4812
|
this.addEventListener();
|
|
@@ -5228,6 +5280,9 @@ class Toolbar$2 {
|
|
|
5228
5280
|
* @deprecated
|
|
5229
5281
|
*/
|
|
5230
5282
|
destroy() {
|
|
5283
|
+
if (isNullOrUndefined(this.parent)) {
|
|
5284
|
+
return;
|
|
5285
|
+
}
|
|
5231
5286
|
if (this.isToolbarDestroyed()) {
|
|
5232
5287
|
this.destroyToolbar();
|
|
5233
5288
|
if (this.keyBoardModule) {
|
|
@@ -5926,6 +5981,9 @@ class BaseQuickToolbar {
|
|
|
5926
5981
|
else if (args.popupType === 'Inline') {
|
|
5927
5982
|
className = CLS_INLINE_POP;
|
|
5928
5983
|
}
|
|
5984
|
+
else if (args.popupType === 'Text') {
|
|
5985
|
+
className = CLS_TEXT_POP;
|
|
5986
|
+
}
|
|
5929
5987
|
else {
|
|
5930
5988
|
className = '';
|
|
5931
5989
|
}
|
|
@@ -6005,7 +6063,7 @@ class BaseQuickToolbar {
|
|
|
6005
6063
|
case 'bottom': {
|
|
6006
6064
|
let posY;
|
|
6007
6065
|
if (viewPort === 'document') {
|
|
6008
|
-
if (type === 'inline') {
|
|
6066
|
+
if (type === 'inline' || type === 'text') {
|
|
6009
6067
|
posY = (e.y - e.popHeight - 10);
|
|
6010
6068
|
}
|
|
6011
6069
|
else {
|
|
@@ -6034,7 +6092,7 @@ class BaseQuickToolbar {
|
|
|
6034
6092
|
break;
|
|
6035
6093
|
}
|
|
6036
6094
|
case 'right':
|
|
6037
|
-
if (type === 'inline') {
|
|
6095
|
+
if (type === 'inline' || type === 'text') {
|
|
6038
6096
|
x = window.pageXOffset + (e.windowWidth - (e.popWidth + e.bodyRightSpace + 10));
|
|
6039
6097
|
}
|
|
6040
6098
|
else {
|
|
@@ -6042,7 +6100,7 @@ class BaseQuickToolbar {
|
|
|
6042
6100
|
}
|
|
6043
6101
|
break;
|
|
6044
6102
|
case 'left':
|
|
6045
|
-
if (type === 'inline') {
|
|
6103
|
+
if (type === 'inline' || type === 'text') {
|
|
6046
6104
|
x = 0;
|
|
6047
6105
|
}
|
|
6048
6106
|
else {
|
|
@@ -6061,11 +6119,12 @@ class BaseQuickToolbar {
|
|
|
6061
6119
|
* @param {number} x - specifies the x value
|
|
6062
6120
|
* @param {number} y - specifies the y value
|
|
6063
6121
|
* @param {Element} target - specifies the element
|
|
6122
|
+
* @param {string} type - specifies the type
|
|
6064
6123
|
* @returns {void}
|
|
6065
6124
|
* @hidden
|
|
6066
6125
|
* @deprecated
|
|
6067
6126
|
*/
|
|
6068
|
-
showPopup(x, y, target) {
|
|
6127
|
+
showPopup(x, y, target, type) {
|
|
6069
6128
|
const eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
|
|
6070
6129
|
positionX: x, positionY: y };
|
|
6071
6130
|
this.parent.trigger(beforeQuickToolbarOpen, eventArgs, (beforeQuickToolbarArgs) => {
|
|
@@ -6095,7 +6154,7 @@ class BaseQuickToolbar {
|
|
|
6095
6154
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
6096
6155
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
6097
6156
|
}
|
|
6098
|
-
if (!this.parent.inlineMode.enable && !closest(target, 'table')) {
|
|
6157
|
+
if (!this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
6099
6158
|
this.parent.disableToolbarItem(this.parent.toolbarSettings.items);
|
|
6100
6159
|
this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
6101
6160
|
}
|
|
@@ -6148,7 +6207,7 @@ class BaseQuickToolbar {
|
|
|
6148
6207
|
if (!this.parent.inlineMode.enable) {
|
|
6149
6208
|
this.checkCollision(showPopupData, 'parent', '');
|
|
6150
6209
|
}
|
|
6151
|
-
this.checkCollision(showPopupData, 'document', ((this.parent.inlineMode.enable) ? 'inline' : ''));
|
|
6210
|
+
this.checkCollision(showPopupData, 'document', ((this.parent.inlineMode.enable) ? 'inline' : (type === 'text') ? 'text' : ''));
|
|
6152
6211
|
this.popupObj.element.classList.remove('e-popup-open');
|
|
6153
6212
|
removeClass([this.element], [CLS_HIDE]);
|
|
6154
6213
|
this.popupObj.show({ name: 'ZoomIn', duration: (Browser.isIE ? 250 : 400) });
|
|
@@ -6475,8 +6534,10 @@ class QuickToolbar {
|
|
|
6475
6534
|
}
|
|
6476
6535
|
this.linkQTBar = this.createQTBar('Link', 'Scrollable', this.parent.quickToolbarSettings.link, RenderType.LinkToolbar);
|
|
6477
6536
|
this.renderFactory.addRenderer(RenderType.LinkToolbar, this.linkQTBar);
|
|
6478
|
-
|
|
6479
|
-
|
|
6537
|
+
if (!isNullOrUndefined(this.parent.quickToolbarSettings.text) && !this.parent.inlineMode.enable) {
|
|
6538
|
+
this.textQTBar = this.createQTBar('Text', 'MultiRow', this.parent.quickToolbarSettings.text, RenderType.TextToolbar);
|
|
6539
|
+
this.renderFactory.addRenderer(RenderType.TextToolbar, this.textQTBar);
|
|
6540
|
+
}
|
|
6480
6541
|
this.imageQTBar = this.createQTBar('Image', 'MultiRow', this.parent.quickToolbarSettings.image, RenderType.ImageToolbar);
|
|
6481
6542
|
this.renderFactory.addRenderer(RenderType.ImageToolbar, this.imageQTBar);
|
|
6482
6543
|
this.audioQTBar = this.createQTBar('Audio', 'MultiRow', this.parent.quickToolbarSettings.audio, RenderType.AudioToolbar);
|
|
@@ -6617,6 +6678,24 @@ class QuickToolbar {
|
|
|
6617
6678
|
}
|
|
6618
6679
|
}
|
|
6619
6680
|
}
|
|
6681
|
+
if (!isNullOrUndefined(this.textQTBar) && !isNullOrUndefined(this.parent.quickToolbarSettings.text) && !this.parent.inlineMode.enable) {
|
|
6682
|
+
const args = e.args.touches ?
|
|
6683
|
+
e.args.changedTouches[0] : e.args;
|
|
6684
|
+
const target = e.args.target;
|
|
6685
|
+
this.hideQuickToolbars();
|
|
6686
|
+
const parentLeft = this.parent.element.getBoundingClientRect().left;
|
|
6687
|
+
this.offsetX = this.parent.iframeSettings.enable ? this.parent.element.ownerDocument.documentElement.scrollLeft
|
|
6688
|
+
+ parentLeft + args.clientX : args.pageX;
|
|
6689
|
+
this.offsetY = pageYOffset(args, this.parent.element, this.parent.iframeSettings.enable);
|
|
6690
|
+
const range = this.parent.getRange();
|
|
6691
|
+
if ((range.endContainer.parentElement.tagName === range.startContainer.parentElement.tagName && (range.startContainer.parentElement.tagName === 'A' && range.endContainer.parentElement.tagName === 'A')) ||
|
|
6692
|
+
(target.tagName === 'IMG') || (target.tagName === 'VIDEO') || (target.tagName === 'AUDIO') || (target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
|
|
6693
|
+
(this.parent.getRange().startOffset === this.parent.getRange().endOffset)) {
|
|
6694
|
+
return;
|
|
6695
|
+
}
|
|
6696
|
+
this.target = target;
|
|
6697
|
+
this.textQTBar.showPopup(this.offsetX, this.offsetY, target, 'text');
|
|
6698
|
+
}
|
|
6620
6699
|
}
|
|
6621
6700
|
keyDownHandler() {
|
|
6622
6701
|
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
@@ -6629,6 +6708,11 @@ class QuickToolbar {
|
|
|
6629
6708
|
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
6630
6709
|
this.hideInlineQTBar();
|
|
6631
6710
|
}
|
|
6711
|
+
if (!isNullOrUndefined(this.parent.quickToolbarSettings.text)) {
|
|
6712
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close') && document.body.contains(this.textQTBar.element)) {
|
|
6713
|
+
this.textQTBar.hidePopup();
|
|
6714
|
+
}
|
|
6715
|
+
}
|
|
6632
6716
|
}
|
|
6633
6717
|
keyUpHandler(e) {
|
|
6634
6718
|
if (this.parent.inlineMode.enable && !Browser.isDevice) {
|
|
@@ -6680,6 +6764,9 @@ class QuickToolbar {
|
|
|
6680
6764
|
* @deprecated
|
|
6681
6765
|
*/
|
|
6682
6766
|
destroy() {
|
|
6767
|
+
if (isNullOrUndefined(this.parent)) {
|
|
6768
|
+
return;
|
|
6769
|
+
}
|
|
6683
6770
|
if (this.linkQTBar) {
|
|
6684
6771
|
EventHandler.remove(this.linkQTBar.element, 'mousedown', this.onMouseDown);
|
|
6685
6772
|
EventHandler.remove(this.linkQTBar.element, 'keyup', this.keyUpQT);
|
|
@@ -6786,6 +6873,7 @@ class QuickToolbar {
|
|
|
6786
6873
|
this.parent.on(keyDown, this.onKeyDown, this);
|
|
6787
6874
|
this.parent.on(rtlMode, this.setRtl, this);
|
|
6788
6875
|
this.parent.on(bindCssClass, this.setCssClass, this);
|
|
6876
|
+
this.parent.on(hidePopup, this.hideQuickToolbars, this);
|
|
6789
6877
|
}
|
|
6790
6878
|
onKeyDown(e) {
|
|
6791
6879
|
const args = e.args;
|
|
@@ -6839,6 +6927,9 @@ class QuickToolbar {
|
|
|
6839
6927
|
if (this.linkQTBar) {
|
|
6840
6928
|
this.linkQTBar.quickTBarObj.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
6841
6929
|
}
|
|
6930
|
+
if (this.textQTBar) {
|
|
6931
|
+
this.textQTBar.quickTBarObj.toolbarObj.setProperties({ enableRtl: args.enableRtl });
|
|
6932
|
+
}
|
|
6842
6933
|
}
|
|
6843
6934
|
/**
|
|
6844
6935
|
* removeEventListener
|
|
@@ -6867,6 +6958,7 @@ class QuickToolbar {
|
|
|
6867
6958
|
this.parent.off(keyDown, this.onKeyDown);
|
|
6868
6959
|
this.parent.off(rtlMode, this.setRtl);
|
|
6869
6960
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
6961
|
+
this.parent.off(hidePopup, this.hideQuickToolbars);
|
|
6870
6962
|
}
|
|
6871
6963
|
/**
|
|
6872
6964
|
* Called internally if any of the property value changed.
|
|
@@ -10010,6 +10102,9 @@ class MarkdownEditor {
|
|
|
10010
10102
|
* @deprecated
|
|
10011
10103
|
*/
|
|
10012
10104
|
destroy() {
|
|
10105
|
+
if (isNullOrUndefined(this.parent)) {
|
|
10106
|
+
return;
|
|
10107
|
+
}
|
|
10013
10108
|
this.removeEventListener();
|
|
10014
10109
|
}
|
|
10015
10110
|
moduleDestroy() {
|
|
@@ -11150,11 +11245,12 @@ class DOMNode {
|
|
|
11150
11245
|
let startTextNode;
|
|
11151
11246
|
let endTextNode;
|
|
11152
11247
|
if (start.textContent === '' && isNullOrUndefined(end) && action !== 'tab') {
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11248
|
+
// To Do Apply Heading and Back space press in empty content.
|
|
11249
|
+
// if (isNOU(action) && save.range.startContainer.nodeType === 1 &&
|
|
11250
|
+
// (save.range.startContainer as HTMLElement).querySelectorAll('audio,video,image').length === 0) {
|
|
11251
|
+
// start.innerHTML = '<br>';
|
|
11252
|
+
// }
|
|
11253
|
+
if (start.childNodes.length === 1 && start.childNodes[0].nodeName === 'BR') {
|
|
11158
11254
|
start.innerHTML = '<br>';
|
|
11159
11255
|
}
|
|
11160
11256
|
else {
|
|
@@ -13027,7 +13123,7 @@ class InsertHtml {
|
|
|
13027
13123
|
let range = nodeSelection.getRange(docElement);
|
|
13028
13124
|
if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
|
|
13029
13125
|
range.startOffset === range.endOffset && editNode.textContent.length === 0 &&
|
|
13030
|
-
(editNode.children[0].tagName === 'P' || (editNode.children[0].tagName === 'BR'))) {
|
|
13126
|
+
(editNode.children[0].tagName === 'P' || editNode.children[0].tagName === 'DIV' || (editNode.children[0].tagName === 'BR'))) {
|
|
13031
13127
|
nodeSelection.setSelectionText(docElement, range.startContainer.children[0], range.startContainer.children[0], 0, 0);
|
|
13032
13128
|
range = nodeSelection.getRange(docElement);
|
|
13033
13129
|
}
|
|
@@ -14887,7 +14983,7 @@ class TableCommand {
|
|
|
14887
14983
|
calculateStyleValue(value) {
|
|
14888
14984
|
let styleValue;
|
|
14889
14985
|
if (typeof (value) === 'string') {
|
|
14890
|
-
if (value.indexOf('px') || value.indexOf('%') || value.indexOf('auto')) {
|
|
14986
|
+
if (value.indexOf('px') >= 0 || value.indexOf('%') >= 0 || value.indexOf('auto') >= 0) {
|
|
14891
14987
|
styleValue = value;
|
|
14892
14988
|
}
|
|
14893
14989
|
else {
|
|
@@ -16733,7 +16829,7 @@ class SelectionBasedExec {
|
|
|
16733
16829
|
keyDownHandler(e) {
|
|
16734
16830
|
const validFormats = ['bold', 'italic', 'underline', 'strikethrough', 'superscript',
|
|
16735
16831
|
'subscript', 'uppercase', 'lowercase'];
|
|
16736
|
-
if (e.event.ctrlKey && validFormats.indexOf(e.event.action) > -1) {
|
|
16832
|
+
if ((e.event.ctrlKey || e.event.metaKey) && validFormats.indexOf(e.event.action) > -1) {
|
|
16737
16833
|
e.event.preventDefault();
|
|
16738
16834
|
SelectionCommands.applyFormat(this.parent.currentDocument, e.event.action, this.parent.editableElement, e.enterAction);
|
|
16739
16835
|
this.callBack(e, e.event.action);
|
|
@@ -17371,6 +17467,7 @@ class MsWordPaste {
|
|
|
17371
17467
|
'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω'];
|
|
17372
17468
|
this.removableElements = ['o:p', 'style'];
|
|
17373
17469
|
this.listContents = [];
|
|
17470
|
+
this.cropImageDimensions = [];
|
|
17374
17471
|
this.parent = parent;
|
|
17375
17472
|
this.addEventListener();
|
|
17376
17473
|
}
|
|
@@ -17420,20 +17517,20 @@ class MsWordPaste {
|
|
|
17420
17517
|
}
|
|
17421
17518
|
}
|
|
17422
17519
|
}
|
|
17423
|
-
e.callBack(elm.innerHTML);
|
|
17520
|
+
e.callBack(elm.innerHTML, this.cropImageDimensions);
|
|
17424
17521
|
}
|
|
17425
17522
|
else {
|
|
17426
17523
|
e.callBack(elm.innerHTML);
|
|
17427
17524
|
}
|
|
17428
17525
|
}
|
|
17429
17526
|
cleanList(elm, listTag) {
|
|
17430
|
-
|
|
17527
|
+
const replacableElem = elm.querySelectorAll(listTag + ' div');
|
|
17431
17528
|
for (let j = replacableElem.length - 1; j >= 0; j--) {
|
|
17432
17529
|
const parentElem = replacableElem[j].parentNode;
|
|
17433
17530
|
while (replacableElem[j].firstChild) {
|
|
17434
17531
|
parentElem.insertBefore(replacableElem[j].firstChild, replacableElem[j]);
|
|
17435
17532
|
}
|
|
17436
|
-
|
|
17533
|
+
const closestListElem = this.findClosestListElem(replacableElem[j]);
|
|
17437
17534
|
if (closestListElem) {
|
|
17438
17535
|
this.insertAfter(replacableElem[j], closestListElem);
|
|
17439
17536
|
}
|
|
@@ -17488,7 +17585,8 @@ class MsWordPaste {
|
|
|
17488
17585
|
imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
|
|
17489
17586
|
imgElem[i].getAttribute('v:shapes').toLowerCase().indexOf('image') < 0 &&
|
|
17490
17587
|
imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
|
|
17491
|
-
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0
|
|
17588
|
+
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0 &&
|
|
17589
|
+
imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0) {
|
|
17492
17590
|
detach(imgElem[i]);
|
|
17493
17591
|
}
|
|
17494
17592
|
}
|
|
@@ -17505,14 +17603,36 @@ class MsWordPaste {
|
|
|
17505
17603
|
}
|
|
17506
17604
|
const hexValue = this.hexConversion(rtfData);
|
|
17507
17605
|
for (let i = 0; i < hexValue.length; i++) {
|
|
17508
|
-
base64Src.push(
|
|
17606
|
+
base64Src.push({
|
|
17607
|
+
base64Data: !isNullOrUndefined(hexValue[i].hex) ? this.convertToBase64(hexValue[i]) : null,
|
|
17608
|
+
isCroppedImage: hexValue[i].isCroppedImage
|
|
17609
|
+
});
|
|
17610
|
+
if (hexValue[i].isCroppedImage) {
|
|
17611
|
+
this.cropImageDimensions.push({
|
|
17612
|
+
goalWidth: hexValue[i].goalWidth,
|
|
17613
|
+
goalHeight: hexValue[i].goalHeight,
|
|
17614
|
+
cropLength: hexValue[i].cropLength,
|
|
17615
|
+
cropTop: hexValue[i].cropTop,
|
|
17616
|
+
cropR: hexValue[i].cropR,
|
|
17617
|
+
cropB: hexValue[i].cropB
|
|
17618
|
+
});
|
|
17619
|
+
}
|
|
17509
17620
|
}
|
|
17510
17621
|
for (let i = 0; i < imgElem.length; i++) {
|
|
17511
17622
|
if (imgSrc[i].match(linkRegex)) {
|
|
17512
17623
|
imgElem[i].setAttribute('src', imgSrc[i]);
|
|
17513
17624
|
}
|
|
17514
17625
|
else {
|
|
17515
|
-
|
|
17626
|
+
if (!isNullOrUndefined(base64Src[i]) && !isNullOrUndefined(base64Src[i].base64Data)) {
|
|
17627
|
+
imgElem[i].setAttribute('src', base64Src[i].base64Data);
|
|
17628
|
+
}
|
|
17629
|
+
else {
|
|
17630
|
+
imgElem[i].removeAttribute('src');
|
|
17631
|
+
imgElem[i].setAttribute('alt', 'Unsupported file format');
|
|
17632
|
+
}
|
|
17633
|
+
if (!isNullOrUndefined(base64Src[i]) && base64Src[i].isCroppedImage) {
|
|
17634
|
+
imgElem[i].classList.add('e-img-cropped');
|
|
17635
|
+
}
|
|
17516
17636
|
}
|
|
17517
17637
|
imgElem[i].setAttribute('id', 'msWordImg-' + imgName[i]);
|
|
17518
17638
|
}
|
|
@@ -17589,6 +17709,13 @@ class MsWordPaste {
|
|
|
17589
17709
|
const result = [];
|
|
17590
17710
|
if (!isNullOrUndefined(fullImg)) {
|
|
17591
17711
|
for (let i = 0; i < fullImg.length; i++) {
|
|
17712
|
+
let isCroppedImage = false;
|
|
17713
|
+
let goalWidth = 0;
|
|
17714
|
+
let goalHeight = 0;
|
|
17715
|
+
let cropLength = 0;
|
|
17716
|
+
let cropTop = 0;
|
|
17717
|
+
let cropR = 0;
|
|
17718
|
+
let cropB = 0;
|
|
17592
17719
|
if (picHead.test(fullImg[i])) {
|
|
17593
17720
|
if (fullImg[i].indexOf('\\pngblip') !== -1) {
|
|
17594
17721
|
imgType = 'image/png';
|
|
@@ -17596,20 +17723,45 @@ class MsWordPaste {
|
|
|
17596
17723
|
else if (fullImg[i].indexOf('\\jpegblip') !== -1) {
|
|
17597
17724
|
imgType = 'image/jpeg';
|
|
17598
17725
|
}
|
|
17726
|
+
else if (fullImg[i].indexOf('\\picprop') !== -1) {
|
|
17727
|
+
imgType = null;
|
|
17728
|
+
}
|
|
17599
17729
|
else {
|
|
17600
17730
|
continue;
|
|
17601
17731
|
}
|
|
17732
|
+
isCroppedImage = this.extractCropValue('cropl', fullImg[i]) > 0 &&
|
|
17733
|
+
this.extractCropValue('cropt', fullImg[i]) > 0 ? true : false;
|
|
17734
|
+
if (isCroppedImage) {
|
|
17735
|
+
goalWidth = this.extractCropValue('wgoal', fullImg[i]);
|
|
17736
|
+
goalHeight = this.extractCropValue('hgoal', fullImg[i]);
|
|
17737
|
+
cropLength = this.extractCropValue('cropl', fullImg[i]);
|
|
17738
|
+
cropTop = this.extractCropValue('cropt', fullImg[i]);
|
|
17739
|
+
cropR = this.extractCropValue('cropr', fullImg[i]);
|
|
17740
|
+
cropB = this.extractCropValue('cropb', fullImg[i]);
|
|
17741
|
+
}
|
|
17602
17742
|
result.push({
|
|
17603
17743
|
hex: imgType ? fullImg[i].replace(picHead, '').replace(/[^\da-fA-F]/g, '') : null,
|
|
17604
|
-
type: imgType
|
|
17744
|
+
type: imgType,
|
|
17745
|
+
isCroppedImage: isCroppedImage,
|
|
17746
|
+
goalWidth: goalWidth,
|
|
17747
|
+
goalHeight: goalHeight,
|
|
17748
|
+
cropLength: cropLength,
|
|
17749
|
+
cropTop: cropTop,
|
|
17750
|
+
cropR: cropR,
|
|
17751
|
+
cropB: cropB
|
|
17605
17752
|
});
|
|
17606
17753
|
}
|
|
17607
17754
|
}
|
|
17608
17755
|
}
|
|
17609
17756
|
return result;
|
|
17610
17757
|
}
|
|
17758
|
+
extractCropValue(crop, rtfData) {
|
|
17759
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
17760
|
+
const result = new RegExp('\\\\pic' + crop + '(\\-?\\d+)\\\\').exec(rtfData.replace('\r\n\\', '\\'))[1];
|
|
17761
|
+
return parseInt(result, 10);
|
|
17762
|
+
}
|
|
17611
17763
|
removeClassName(elm) {
|
|
17612
|
-
const elmWithClass = elm.querySelectorAll('*[class]');
|
|
17764
|
+
const elmWithClass = elm.querySelectorAll('*[class]:not(.e-img-cropped)');
|
|
17613
17765
|
for (let i = 0; i < elmWithClass.length; i++) {
|
|
17614
17766
|
elmWithClass[i].removeAttribute('class');
|
|
17615
17767
|
}
|
|
@@ -17946,8 +18098,10 @@ class MsWordPaste {
|
|
|
17946
18098
|
currentListStyle = listNodes[i].getAttribute('style');
|
|
17947
18099
|
}
|
|
17948
18100
|
}
|
|
17949
|
-
collection.push({
|
|
17950
|
-
|
|
18101
|
+
collection.push({
|
|
18102
|
+
listType: type, content: tempNode, nestedLevel: level, class: currentClassName,
|
|
18103
|
+
listStyle: currentListStyle, listStyleTypeName: listStyleType, start: startAttr, styleMarginLeft: styleMarginLeft
|
|
18104
|
+
});
|
|
17951
18105
|
}
|
|
17952
18106
|
}
|
|
17953
18107
|
stNode = listNodes.shift();
|
|
@@ -18044,10 +18198,20 @@ class MsWordPaste {
|
|
|
18044
18198
|
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
18045
18199
|
}
|
|
18046
18200
|
else if (collection[index].nestedLevel === pLevel) {
|
|
18047
|
-
if (prevList
|
|
18201
|
+
if (!isNullOrUndefined(prevList) && !isNullOrUndefined(prevList.parentElement)
|
|
18202
|
+
&& prevList.parentElement.tagName.toLowerCase() === collection[index].listType) {
|
|
18048
18203
|
prevList.parentElement.appendChild(prevList = createElement('li'));
|
|
18049
18204
|
prevList.appendChild(pElement);
|
|
18050
18205
|
}
|
|
18206
|
+
else if (isNullOrUndefined(prevList)) {
|
|
18207
|
+
temp = createElement(collection[index].listType);
|
|
18208
|
+
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
18209
|
+
prevList = createElement('li');
|
|
18210
|
+
prevList.appendChild(pElement);
|
|
18211
|
+
temp.appendChild(prevList);
|
|
18212
|
+
temp.setAttribute('level', collection[index].nestedLevel.toString());
|
|
18213
|
+
root.appendChild(temp);
|
|
18214
|
+
}
|
|
18051
18215
|
else {
|
|
18052
18216
|
temp = createElement(collection[index].listType);
|
|
18053
18217
|
temp.style.listStyleType = collection[index].listStyleTypeName;
|
|
@@ -18075,8 +18239,7 @@ class MsWordPaste {
|
|
|
18075
18239
|
}
|
|
18076
18240
|
else {
|
|
18077
18241
|
if (collection[index].nestedLevel > pLevel && isNormalList) {
|
|
18078
|
-
|
|
18079
|
-
initialNode = createElement(collection[index].listType);
|
|
18242
|
+
const initialNode = createElement(collection[index].listType);
|
|
18080
18243
|
prevList = createElement('li');
|
|
18081
18244
|
initialNode.appendChild(prevList);
|
|
18082
18245
|
initialNode.style.listStyleType = 'none';
|
|
@@ -18163,11 +18326,11 @@ class MsWordPaste {
|
|
|
18163
18326
|
else {
|
|
18164
18327
|
//Add to support separate list which looks like same list and also to add all tags as it is inside list
|
|
18165
18328
|
if (firstChild.childNodes.length > 0) {
|
|
18166
|
-
|
|
18329
|
+
const listIgnoreTag = firstChild.querySelectorAll('[style*="mso-list"]');
|
|
18167
18330
|
for (let i = 0; i < listIgnoreTag.length; i++) {
|
|
18168
|
-
listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g,
|
|
18331
|
+
listIgnoreTag[i].setAttribute('style', listIgnoreTag[i].getAttribute('style').replace(/\n/g, ''));
|
|
18169
18332
|
}
|
|
18170
|
-
|
|
18333
|
+
const listOrder = firstChild.querySelector('span[style="mso-list:Ignore"]');
|
|
18171
18334
|
if (!isNullOrUndefined(listOrder)) {
|
|
18172
18335
|
this.listContents.push(listOrder.textContent.trim());
|
|
18173
18336
|
detach(listOrder);
|
|
@@ -19829,7 +19992,7 @@ class XhtmlValidation {
|
|
|
19829
19992
|
*/
|
|
19830
19993
|
selfEncloseValidation(currentValue, valueLength) {
|
|
19831
19994
|
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0 &&
|
|
19832
|
-
currentValue
|
|
19995
|
+
currentValue.includes(' ')) {
|
|
19833
19996
|
const arrayValue = currentValue.split(' ');
|
|
19834
19997
|
arrayValue[arrayValue.length - 1] = '​' + arrayValue[arrayValue.length - 1];
|
|
19835
19998
|
currentValue = arrayValue.join('');
|
|
@@ -20070,11 +20233,24 @@ class HtmlEditor {
|
|
|
20070
20233
|
const currentLength = this.parent.inputElement.innerHTML.replace(regEx, '').length;
|
|
20071
20234
|
let focusNode = range.startContainer;
|
|
20072
20235
|
if (previousLength > currentLength && !isRootParent) {
|
|
20236
|
+
if (focusNode.textContent.trim().length !== 0 && focusNode.previousSibling) {
|
|
20237
|
+
const tempSpan = document.createElement('span');
|
|
20238
|
+
tempSpan.className = 'tempSpan';
|
|
20239
|
+
range.insertNode(tempSpan);
|
|
20240
|
+
}
|
|
20073
20241
|
let currentChild = this.parent.inputElement.firstChild;
|
|
20074
20242
|
while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
|
|
20075
20243
|
currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
|
|
20076
20244
|
currentChild = currentChild.nextElementSibling;
|
|
20077
20245
|
}
|
|
20246
|
+
let tempSpanToRemove = this.parent.inputElement.querySelector('.tempSpan');
|
|
20247
|
+
if (tempSpanToRemove && tempSpanToRemove.previousSibling && focusNode.textContent.trim().length !== 0) {
|
|
20248
|
+
focusNode = tempSpanToRemove.previousSibling;
|
|
20249
|
+
pointer = tempSpanToRemove.previousSibling.textContent.length;
|
|
20250
|
+
const parentElement = tempSpanToRemove.parentNode;
|
|
20251
|
+
parentElement.removeChild(tempSpanToRemove);
|
|
20252
|
+
tempSpanToRemove = null;
|
|
20253
|
+
}
|
|
20078
20254
|
const currentChildNode = this.parent.inputElement.querySelector('.currentStartMark').childNodes;
|
|
20079
20255
|
if (currentChildNode.length > 1) {
|
|
20080
20256
|
for (let i = 0; i < currentChildNode.length; i++) {
|
|
@@ -20527,7 +20703,7 @@ class HtmlEditor {
|
|
|
20527
20703
|
const item = args.item;
|
|
20528
20704
|
const closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
20529
20705
|
if (item.command !== 'FormatPainter') {
|
|
20530
|
-
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup')) {
|
|
20706
|
+
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
20531
20707
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
20532
20708
|
item.subCommand === 'FontColor' || item.subCommand === 'BackgroundColor')) {
|
|
20533
20709
|
if (isIDevice$1() && item.command === 'Images') {
|
|
@@ -20798,6 +20974,7 @@ class PasteCleanup {
|
|
|
20798
20974
|
'header', 'article', 'nav', 'footer', 'section', 'aside', 'main', 'figure', 'figcaption'];
|
|
20799
20975
|
this.isNotFromHtml = false;
|
|
20800
20976
|
this.containsHtml = false;
|
|
20977
|
+
this.cropImageData = [];
|
|
20801
20978
|
this.parent = parent;
|
|
20802
20979
|
this.locator = serviceLocator;
|
|
20803
20980
|
this.renderFactory = this.locator.getService('rendererFactory');
|
|
@@ -20877,8 +21054,9 @@ class PasteCleanup {
|
|
|
20877
21054
|
args: e.args,
|
|
20878
21055
|
text: e.text,
|
|
20879
21056
|
allowedStylePropertiesArray: this.parent.pasteCleanupSettings.allowedStyleProps,
|
|
20880
|
-
callBack: (a) => {
|
|
21057
|
+
callBack: (a, cropImageData) => {
|
|
20881
21058
|
value = a.trim();
|
|
21059
|
+
this.cropImageData = cropImageData;
|
|
20882
21060
|
}
|
|
20883
21061
|
});
|
|
20884
21062
|
}
|
|
@@ -20926,7 +21104,9 @@ class PasteCleanup {
|
|
|
20926
21104
|
currentFocusNode = currentFocusNode.childNodes[this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()).startOffset];
|
|
20927
21105
|
}
|
|
20928
21106
|
if (currentFocusNode.previousSibling.nodeName === 'IMG') {
|
|
20929
|
-
currentFocusNode.previousSibling.
|
|
21107
|
+
if (!isNullOrUndefined(currentFocusNode.previousSibling.getAttribute('src'))) {
|
|
21108
|
+
currentFocusNode.previousSibling.classList.add('pasteContent_Img');
|
|
21109
|
+
}
|
|
20930
21110
|
currentFocusNode.previousSibling.classList.add(CLS_RTE_IMAGE);
|
|
20931
21111
|
if (this.parent.insertImageSettings.display === 'inline') {
|
|
20932
21112
|
currentFocusNode.previousSibling.classList.add(CLS_IMGINLINE);
|
|
@@ -20958,6 +21138,7 @@ class PasteCleanup {
|
|
|
20958
21138
|
makeSpace(enterSplitText) {
|
|
20959
21139
|
let contentWithSpace = '';
|
|
20960
21140
|
let spaceBetweenContent = true;
|
|
21141
|
+
enterSplitText = enterSplitText.replace(/\t/g, ' ');
|
|
20961
21142
|
const spaceSplit = enterSplitText.split(' ');
|
|
20962
21143
|
for (let j = 0; j < spaceSplit.length; j++) {
|
|
20963
21144
|
if (spaceSplit[j].trim() === '') {
|
|
@@ -20977,7 +21158,8 @@ class PasteCleanup {
|
|
|
20977
21158
|
const imgName = [];
|
|
20978
21159
|
const uploadImg = [];
|
|
20979
21160
|
for (let i = 0; i < allImgElm.length; i++) {
|
|
20980
|
-
if (allImgElm[i].getAttribute('src')
|
|
21161
|
+
if (!isNullOrUndefined(allImgElm[i].getAttribute('src')) &&
|
|
21162
|
+
allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
|
|
20981
21163
|
base64Src.push(allImgElm[i].getAttribute('src'));
|
|
20982
21164
|
imgName.push(getUniqueID('rte_image'));
|
|
20983
21165
|
uploadImg.push(allImgElm[i]);
|
|
@@ -21057,8 +21239,6 @@ class PasteCleanup {
|
|
|
21057
21239
|
setTimeout(() => {
|
|
21058
21240
|
this.refreshPopup(imgElem, this.popupObj);
|
|
21059
21241
|
}, timeOut);
|
|
21060
|
-
let rawFile;
|
|
21061
|
-
let beforeUploadArgs;
|
|
21062
21242
|
this.uploadObj = new Uploader({
|
|
21063
21243
|
asyncSettings: {
|
|
21064
21244
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
@@ -21090,28 +21270,8 @@ class PasteCleanup {
|
|
|
21090
21270
|
}
|
|
21091
21271
|
},
|
|
21092
21272
|
beforeUpload: (args) => {
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
beforeUploadArgs.filesData = rawFile;
|
|
21096
|
-
args.cancel = true;
|
|
21097
|
-
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
21098
|
-
if (beforeUploadArgs.cancel) {
|
|
21099
|
-
return;
|
|
21100
|
-
}
|
|
21101
|
-
this.toolbarEnableDisable(true);
|
|
21102
|
-
/* eslint-disable */
|
|
21103
|
-
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
21104
|
-
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
21105
|
-
this.uploadObj.customFormDatas = beforeUploadArgs.customFormData && beforeUploadArgs.customFormData.length > 0 ?
|
|
21106
|
-
beforeUploadArgs.customFormData : this.uploadObj.customFormDatas;
|
|
21107
|
-
this.uploadObj.uploadFiles(rawFile, null);
|
|
21108
|
-
/* eslint-enable */
|
|
21109
|
-
});
|
|
21110
|
-
}
|
|
21111
|
-
else {
|
|
21112
|
-
this.parent.trigger(beforeImageUpload, args);
|
|
21113
|
-
this.toolbarEnableDisable(true);
|
|
21114
|
-
}
|
|
21273
|
+
this.parent.trigger(beforeImageUpload, args);
|
|
21274
|
+
this.toolbarEnableDisable(true);
|
|
21115
21275
|
},
|
|
21116
21276
|
// eslint-disable-next-line
|
|
21117
21277
|
failure: (e) => {
|
|
@@ -21129,9 +21289,6 @@ class PasteCleanup {
|
|
|
21129
21289
|
},
|
|
21130
21290
|
selected: (e) => {
|
|
21131
21291
|
e.cancel = true;
|
|
21132
|
-
if (this.parent.isServerRendered) {
|
|
21133
|
-
rawFile = e.filesData;
|
|
21134
|
-
}
|
|
21135
21292
|
},
|
|
21136
21293
|
removing: () => {
|
|
21137
21294
|
this.parent.inputElement.contentEditable = 'true';
|
|
@@ -21153,8 +21310,6 @@ class PasteCleanup {
|
|
|
21153
21310
|
statusCode: '1'
|
|
21154
21311
|
}];
|
|
21155
21312
|
this.uploadObj.createFileList(fileData);
|
|
21156
|
-
/* eslint-enable */
|
|
21157
|
-
rawFile = fileData;
|
|
21158
21313
|
this.uploadObj.upload(fileData);
|
|
21159
21314
|
this.popupObj.element.getElementsByClassName('e-file-select-wrap')[0].style.display = 'none';
|
|
21160
21315
|
detach(this.popupObj.element.querySelector('.e-rte-dialog-upload .e-file-select-wrap'));
|
|
@@ -21228,7 +21383,9 @@ class PasteCleanup {
|
|
|
21228
21383
|
* @deprecated
|
|
21229
21384
|
*/
|
|
21230
21385
|
imageFormatting(pasteArgs, imgElement) {
|
|
21231
|
-
imgElement.elements[0].
|
|
21386
|
+
if (!isNullOrUndefined(imgElement.elements[0].getAttribute('src'))) {
|
|
21387
|
+
imgElement.elements[0].classList.add('pasteContent_Img');
|
|
21388
|
+
}
|
|
21232
21389
|
const imageElement = this.parent.createElement('span');
|
|
21233
21390
|
imageElement.appendChild(imgElement.elements[0]);
|
|
21234
21391
|
const imageValue = imageElement.innerHTML;
|
|
@@ -21419,7 +21576,9 @@ class PasteCleanup {
|
|
|
21419
21576
|
clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
|
|
21420
21577
|
const allImg = clipBoardElem.querySelectorAll('img');
|
|
21421
21578
|
for (let i = 0; i < allImg.length; i++) {
|
|
21422
|
-
allImg[i].
|
|
21579
|
+
if (!isNullOrUndefined(allImg[i].getAttribute('src'))) {
|
|
21580
|
+
allImg[i].classList.add('pasteContent_Img');
|
|
21581
|
+
}
|
|
21423
21582
|
this.setImageProperties(allImg[i]);
|
|
21424
21583
|
}
|
|
21425
21584
|
this.addTempClass(clipBoardElem);
|
|
@@ -21462,6 +21621,47 @@ class PasteCleanup {
|
|
|
21462
21621
|
}, clipBoardElem, null, null, this.parent.enterKey);
|
|
21463
21622
|
this.removeTempClass();
|
|
21464
21623
|
this.parent.notify(toolbarRefresh, {});
|
|
21624
|
+
this.cropImageHandler(this.parent.inputElement);
|
|
21625
|
+
}
|
|
21626
|
+
}
|
|
21627
|
+
cropImageHandler(element) {
|
|
21628
|
+
const allImgElm = element.querySelectorAll('.e-img-cropped');
|
|
21629
|
+
if (allImgElm.length > 0) {
|
|
21630
|
+
for (let i = 0; i < allImgElm.length; i++) {
|
|
21631
|
+
if (allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
|
|
21632
|
+
const image = new Image();
|
|
21633
|
+
image.src = allImgElm[i].getAttribute('src');
|
|
21634
|
+
const canvas = document.createElement('canvas');
|
|
21635
|
+
const ctx = canvas.getContext('2d');
|
|
21636
|
+
image.onload = () => {
|
|
21637
|
+
const wGoalWidth = this.cropImageData[i].goalWidth / image.naturalWidth;
|
|
21638
|
+
const hGoalHeight = this.cropImageData[i].goalHeight / image.naturalHeight;
|
|
21639
|
+
const cropLength = this.cropImageData[i].cropLength / wGoalWidth;
|
|
21640
|
+
const cropTop = this.cropImageData[i].cropTop / hGoalHeight;
|
|
21641
|
+
const cropWidth = (this.cropImageData[i].goalWidth -
|
|
21642
|
+
this.cropImageData[i].cropLength -
|
|
21643
|
+
this.cropImageData[i].cropR) / wGoalWidth;
|
|
21644
|
+
const cropHeight = (this.cropImageData[i].goalHeight -
|
|
21645
|
+
this.cropImageData[i].cropTop -
|
|
21646
|
+
this.cropImageData[i].cropB) / hGoalHeight;
|
|
21647
|
+
canvas.width = cropWidth;
|
|
21648
|
+
canvas.height = cropHeight;
|
|
21649
|
+
// Draw the cropped portion of the image onto the canvas
|
|
21650
|
+
ctx.drawImage(image, cropLength, cropTop, cropWidth, cropHeight, 0, 0, cropWidth, cropHeight);
|
|
21651
|
+
// Convert the cropped canvas to a base64 encoded image
|
|
21652
|
+
const croppedBase64 = canvas.toDataURL('image/png');
|
|
21653
|
+
// Call the provided callback with the cropped base64 data
|
|
21654
|
+
allImgElm[i].setAttribute('src', croppedBase64);
|
|
21655
|
+
allImgElm[i].classList.remove('e-img-cropped');
|
|
21656
|
+
this.imgUploading(this.parent.inputElement);
|
|
21657
|
+
if (this.parent.iframeSettings.enable) {
|
|
21658
|
+
this.parent.updateValue();
|
|
21659
|
+
}
|
|
21660
|
+
};
|
|
21661
|
+
}
|
|
21662
|
+
}
|
|
21663
|
+
}
|
|
21664
|
+
else {
|
|
21465
21665
|
this.imgUploading(this.parent.inputElement);
|
|
21466
21666
|
if (this.parent.iframeSettings.enable) {
|
|
21467
21667
|
this.parent.updateValue();
|
|
@@ -22311,6 +22511,9 @@ class FullScreen {
|
|
|
22311
22511
|
* @deprecated
|
|
22312
22512
|
*/
|
|
22313
22513
|
destroy() {
|
|
22514
|
+
if (isNullOrUndefined(this.parent)) {
|
|
22515
|
+
return;
|
|
22516
|
+
}
|
|
22314
22517
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
22315
22518
|
this.toggleParentOverflow(false);
|
|
22316
22519
|
}
|
|
@@ -22403,6 +22606,10 @@ class FormatPainter {
|
|
|
22403
22606
|
clickargs.args.action = 'escape';
|
|
22404
22607
|
this.actionHandler(clickargs, 'keyBoard');
|
|
22405
22608
|
}
|
|
22609
|
+
if (this.parent.quickToolbarModule && !isNullOrUndefined(this.parent.quickToolbarSettings.text) &&
|
|
22610
|
+
this.parent.element.ownerDocument.contains(this.parent.quickToolbarModule.textQTBar.element)) {
|
|
22611
|
+
this.parent.quickToolbarModule.textQTBar.hidePopup();
|
|
22612
|
+
}
|
|
22406
22613
|
}
|
|
22407
22614
|
toolbarDoubleClick(args) {
|
|
22408
22615
|
this.isActive = true;
|
|
@@ -22481,12 +22688,14 @@ class FormatPainter {
|
|
|
22481
22688
|
}
|
|
22482
22689
|
}
|
|
22483
22690
|
updateToolbarBtn(enable) {
|
|
22484
|
-
|
|
22485
|
-
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
|
|
22691
|
+
if (!isNullOrUndefined(this.parent.element.querySelector('.e-rte-format-painter'))) {
|
|
22692
|
+
const toolbarBtn = this.parent.element.querySelector('.e-rte-format-painter').parentElement.parentElement;
|
|
22693
|
+
if (enable) {
|
|
22694
|
+
addClass([toolbarBtn], 'e-active');
|
|
22695
|
+
}
|
|
22696
|
+
else if (!this.isSticky) {
|
|
22697
|
+
removeClass([toolbarBtn], 'e-active');
|
|
22698
|
+
}
|
|
22490
22699
|
}
|
|
22491
22700
|
}
|
|
22492
22701
|
editAreaClick(args) {
|
|
@@ -22556,7 +22765,13 @@ class EmojiPicker {
|
|
|
22556
22765
|
}
|
|
22557
22766
|
// eslint-disable-next-line
|
|
22558
22767
|
toolbarClick(args) {
|
|
22559
|
-
|
|
22768
|
+
let spanElement;
|
|
22769
|
+
if (!isNullOrUndefined(this.parent.element.querySelector('.e-emoji'))) {
|
|
22770
|
+
spanElement = this.parent.element.querySelector('.e-emoji');
|
|
22771
|
+
}
|
|
22772
|
+
else if (this.parent.inlineMode.enable) {
|
|
22773
|
+
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
22774
|
+
}
|
|
22560
22775
|
this.divElement = spanElement.closest('div');
|
|
22561
22776
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
22562
22777
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
@@ -22571,7 +22786,12 @@ class EmojiPicker {
|
|
|
22571
22786
|
this.popupObj.hide();
|
|
22572
22787
|
}
|
|
22573
22788
|
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
22574
|
-
this.parent.getToolbar()
|
|
22789
|
+
if (!isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
22790
|
+
this.parent.getToolbar().appendChild(this.popDiv);
|
|
22791
|
+
}
|
|
22792
|
+
else if (this.parent.inlineMode.enable) {
|
|
22793
|
+
this.parent.inputElement.appendChild(this.popDiv);
|
|
22794
|
+
}
|
|
22575
22795
|
EventHandler.add(this.popDiv, 'keydown', this.onKeyDown, this);
|
|
22576
22796
|
EventHandler.add(this.popDiv, 'keyup', this.searchFilter, this);
|
|
22577
22797
|
const extendEle = this.parent.element.querySelector('.e-toolbar-extended');
|
|
@@ -22586,13 +22806,14 @@ class EmojiPicker {
|
|
|
22586
22806
|
let target;
|
|
22587
22807
|
let xValue;
|
|
22588
22808
|
let yValue;
|
|
22589
|
-
if (!isNullOrUndefined(args.args)
|
|
22809
|
+
if (!isNullOrUndefined(args.args) && !this.parent.inlineMode.enable &&
|
|
22810
|
+
isNullOrUndefined(this.parent.quickToolbarSettings.text)) {
|
|
22590
22811
|
target = args.args.originalEvent.target;
|
|
22591
22812
|
target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
|
|
22592
22813
|
xValue = 'left';
|
|
22593
22814
|
yValue = 'bottom';
|
|
22594
22815
|
}
|
|
22595
|
-
else if (isNullOrUndefined(args.x) && isNullOrUndefined(args.y)) {
|
|
22816
|
+
else if (isNullOrUndefined(args.x) && isNullOrUndefined(args.y) && !this.parent.inlineMode.enable && isNullOrUndefined(this.parent.quickToolbarSettings.text)) {
|
|
22596
22817
|
target = this.parent.inputElement;
|
|
22597
22818
|
if (window.getSelection().rangeCount > 0) {
|
|
22598
22819
|
const coordinates = this.getCoordinates();
|
|
@@ -22600,6 +22821,14 @@ class EmojiPicker {
|
|
|
22600
22821
|
yValue = coordinates.top;
|
|
22601
22822
|
}
|
|
22602
22823
|
}
|
|
22824
|
+
else if (isNullOrUndefined(args.x) && isNullOrUndefined(args.y) && (this.parent.inlineMode.enable || !isNullOrUndefined(this.parent.quickToolbarSettings.text))) {
|
|
22825
|
+
this.parent.notify(hidePopup, {});
|
|
22826
|
+
if (window.getSelection().rangeCount > 0) {
|
|
22827
|
+
const coordinates = this.getCoordinates();
|
|
22828
|
+
xValue = coordinates.left;
|
|
22829
|
+
yValue = coordinates.top;
|
|
22830
|
+
}
|
|
22831
|
+
}
|
|
22603
22832
|
else {
|
|
22604
22833
|
target = this.parent.inputElement;
|
|
22605
22834
|
xValue = args.x;
|
|
@@ -22626,7 +22855,8 @@ class EmojiPicker {
|
|
|
22626
22855
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
22627
22856
|
this.popupObj.refreshPosition(target);
|
|
22628
22857
|
// header search element
|
|
22629
|
-
if ((!isNullOrUndefined(args.args) || (isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) &&
|
|
22858
|
+
if ((!isNullOrUndefined(args.args) || (isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) &&
|
|
22859
|
+
this.parent.emojiPickerSettings.showSearchBox) {
|
|
22630
22860
|
const inputEle = createElement('input', { id: 'e-rte-emoji-search', className: 'e-rte-emoji-search' });
|
|
22631
22861
|
this.popDiv.append(inputEle);
|
|
22632
22862
|
const inputobj = new TextBox({
|
|
@@ -22662,7 +22892,8 @@ class EmojiPicker {
|
|
|
22662
22892
|
this.popDiv.appendChild(emojiBtnDiv);
|
|
22663
22893
|
let height;
|
|
22664
22894
|
const popupBorder = window.getComputedStyle(this.popDiv);
|
|
22665
|
-
if ((isNullOrUndefined(args.args) && !(isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) ||
|
|
22895
|
+
if ((isNullOrUndefined(args.args) && !(isNullOrUndefined(args.x) && isNullOrUndefined(args.y))) ||
|
|
22896
|
+
!this.parent.emojiPickerSettings.showSearchBox) {
|
|
22666
22897
|
height = (this.popDiv.getBoundingClientRect().height - emojiToolBar.getBoundingClientRect().height - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
22667
22898
|
emojiBtnDiv.style.setProperty('height', height, 'important');
|
|
22668
22899
|
}
|
|
@@ -22708,13 +22939,6 @@ class EmojiPicker {
|
|
|
22708
22939
|
if (!isNullOrUndefined(popup)) {
|
|
22709
22940
|
scrollTop = Math.round(popup.scrollTop);
|
|
22710
22941
|
}
|
|
22711
|
-
for (let i = 0; i < toolbarName.length; i++) {
|
|
22712
|
-
/* eslint-disable */
|
|
22713
|
-
if (toolbarName[i].classList.contains('e-selected')) {
|
|
22714
|
-
removeClass([toolbarName[i]], 'e-selected');
|
|
22715
|
-
}
|
|
22716
|
-
/* eslint-enable */
|
|
22717
|
-
}
|
|
22718
22942
|
if (scrollTop < toolbarName[0].offsetHeight) {
|
|
22719
22943
|
addClass([toolbarName[0]], 'e-selected');
|
|
22720
22944
|
}
|
|
@@ -23169,7 +23393,7 @@ class EmojiPicker {
|
|
|
23169
23393
|
const startOffset = this.save.startOffset;
|
|
23170
23394
|
const textContent = this.save.range.startContainer.textContent;
|
|
23171
23395
|
const previousText = textContent.substring(startOffset, startOffset + 1);
|
|
23172
|
-
// When toolbar action is clicked then only restore the range.
|
|
23396
|
+
// When toolbar action is clicked then only restore the range.
|
|
23173
23397
|
if (!isNullOrUndefined(this.clickEvent) || previousText !== ':') {
|
|
23174
23398
|
this.save.restore();
|
|
23175
23399
|
}
|
|
@@ -23355,6 +23579,9 @@ class Render {
|
|
|
23355
23579
|
* @returns {void}
|
|
23356
23580
|
*/
|
|
23357
23581
|
destroy() {
|
|
23582
|
+
if (isNullOrUndefined(this.parent)) {
|
|
23583
|
+
return;
|
|
23584
|
+
}
|
|
23358
23585
|
this.removeEventListener();
|
|
23359
23586
|
}
|
|
23360
23587
|
moduleDestroy() {
|
|
@@ -23747,6 +23974,9 @@ class Link {
|
|
|
23747
23974
|
if (this.quickToolObj.inlineQTBar && document.body.contains(this.quickToolObj.inlineQTBar.element)) {
|
|
23748
23975
|
this.quickToolObj.inlineQTBar.hidePopup();
|
|
23749
23976
|
}
|
|
23977
|
+
if (this.quickToolObj.textQTBar && this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)) {
|
|
23978
|
+
this.quickToolObj.textQTBar.hidePopup();
|
|
23979
|
+
}
|
|
23750
23980
|
}
|
|
23751
23981
|
}
|
|
23752
23982
|
// eslint-disable-next-line
|
|
@@ -23920,6 +24150,9 @@ class Link {
|
|
|
23920
24150
|
* @deprecated
|
|
23921
24151
|
*/
|
|
23922
24152
|
destroy() {
|
|
24153
|
+
if (isNullOrUndefined(this.parent)) {
|
|
24154
|
+
return;
|
|
24155
|
+
}
|
|
23923
24156
|
this.removeEventListener();
|
|
23924
24157
|
}
|
|
23925
24158
|
moduleDestroy() {
|
|
@@ -23938,7 +24171,7 @@ class Link {
|
|
|
23938
24171
|
/**
|
|
23939
24172
|
* `Image` module is used to handle image actions.
|
|
23940
24173
|
*/
|
|
23941
|
-
class Image {
|
|
24174
|
+
class Image$1 {
|
|
23942
24175
|
constructor(parent, serviceLocator) {
|
|
23943
24176
|
this.isImgUploaded = false;
|
|
23944
24177
|
this.isAllowedTypes = true;
|
|
@@ -25344,6 +25577,9 @@ class Image {
|
|
|
25344
25577
|
if (this.quickToolObj.inlineQTBar && document.body.contains(this.quickToolObj.inlineQTBar.element)) {
|
|
25345
25578
|
this.quickToolObj.inlineQTBar.hidePopup();
|
|
25346
25579
|
}
|
|
25580
|
+
if (this.quickToolObj.textQTBar && this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)) {
|
|
25581
|
+
this.quickToolObj.textQTBar.hidePopup();
|
|
25582
|
+
}
|
|
25347
25583
|
}
|
|
25348
25584
|
}
|
|
25349
25585
|
// eslint-disable-next-line
|
|
@@ -25399,6 +25635,14 @@ class Image {
|
|
|
25399
25635
|
this.prevSelectedImgEle.style.outline = '';
|
|
25400
25636
|
}
|
|
25401
25637
|
}
|
|
25638
|
+
if (target.tagName !== 'IMG') {
|
|
25639
|
+
let items = this.contentModule.getEditPanel().querySelectorAll('img');
|
|
25640
|
+
for (let i = 0; i < items.length; i++) {
|
|
25641
|
+
removeClass([items[i]], 'e-img-focus');
|
|
25642
|
+
removeClass([items[i]], 'e-resize');
|
|
25643
|
+
items[i].style.maxWidth = '';
|
|
25644
|
+
}
|
|
25645
|
+
}
|
|
25402
25646
|
}
|
|
25403
25647
|
removeResizeEle() {
|
|
25404
25648
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchMoveEvent, this.resizing);
|
|
@@ -25609,10 +25853,8 @@ class Image {
|
|
|
25609
25853
|
});
|
|
25610
25854
|
uploadParentEle.appendChild(uploadEle);
|
|
25611
25855
|
let altText;
|
|
25612
|
-
let rawFile;
|
|
25613
25856
|
let selectArgs;
|
|
25614
25857
|
let filesData;
|
|
25615
|
-
let beforeUploadArgs;
|
|
25616
25858
|
this.uploadObj = new Uploader({
|
|
25617
25859
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
25618
25860
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.cssClass,
|
|
@@ -25620,13 +25862,8 @@ class Image {
|
|
|
25620
25862
|
selected: (e) => {
|
|
25621
25863
|
proxy.isImgUploaded = true;
|
|
25622
25864
|
selectArgs = e;
|
|
25865
|
+
// eslint-disable-next-line
|
|
25623
25866
|
filesData = e.filesData;
|
|
25624
|
-
if (this.parent.isServerRendered) {
|
|
25625
|
-
selectArgs = JSON.parse(JSON.stringify(e));
|
|
25626
|
-
e.cancel = true;
|
|
25627
|
-
rawFile = e.filesData;
|
|
25628
|
-
selectArgs.filesData = rawFile;
|
|
25629
|
-
}
|
|
25630
25867
|
this.parent.trigger(imageSelected, selectArgs, (selectArgs) => {
|
|
25631
25868
|
if (!selectArgs.cancel) {
|
|
25632
25869
|
this.checkExtension(selectArgs.filesData[0]);
|
|
@@ -25657,35 +25894,11 @@ class Image {
|
|
|
25657
25894
|
});
|
|
25658
25895
|
reader.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
25659
25896
|
}
|
|
25660
|
-
if (this.parent.isServerRendered) {
|
|
25661
|
-
/* eslint-disable */
|
|
25662
|
-
this.uploadObj._internalRenderSelect(selectArgs, rawFile);
|
|
25663
|
-
/* eslint-enable */
|
|
25664
|
-
}
|
|
25665
25897
|
}
|
|
25666
25898
|
});
|
|
25667
25899
|
},
|
|
25668
25900
|
beforeUpload: (args) => {
|
|
25669
|
-
|
|
25670
|
-
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
25671
|
-
beforeUploadArgs.filesData = filesData;
|
|
25672
|
-
args.cancel = true;
|
|
25673
|
-
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
25674
|
-
if (beforeUploadArgs.cancel) {
|
|
25675
|
-
return;
|
|
25676
|
-
}
|
|
25677
|
-
/* eslint-disable */
|
|
25678
|
-
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
25679
|
-
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
25680
|
-
this.uploadObj.customFormDatas = beforeUploadArgs.customFormData && beforeUploadArgs.customFormData.length > 0 ?
|
|
25681
|
-
beforeUploadArgs.customFormData : this.uploadObj.customFormDatas;
|
|
25682
|
-
this.uploadObj.uploadFiles(rawFile, null);
|
|
25683
|
-
/* eslint-enable */
|
|
25684
|
-
});
|
|
25685
|
-
}
|
|
25686
|
-
else {
|
|
25687
|
-
this.parent.trigger(beforeImageUpload, args);
|
|
25688
|
-
}
|
|
25901
|
+
this.parent.trigger(beforeImageUpload, args);
|
|
25689
25902
|
},
|
|
25690
25903
|
uploading: (e) => {
|
|
25691
25904
|
if (!this.parent.isServerRendered) {
|
|
@@ -25999,8 +26212,6 @@ class Image {
|
|
|
25999
26212
|
setTimeout(() => {
|
|
26000
26213
|
proxy.refreshPopup(imageElement);
|
|
26001
26214
|
}, timeOut);
|
|
26002
|
-
let rawFile;
|
|
26003
|
-
let beforeUploadArgs;
|
|
26004
26215
|
this.uploadObj = new Uploader({
|
|
26005
26216
|
asyncSettings: {
|
|
26006
26217
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
@@ -26026,33 +26237,9 @@ class Image {
|
|
|
26026
26237
|
}, 900);
|
|
26027
26238
|
},
|
|
26028
26239
|
beforeUpload: (args) => {
|
|
26029
|
-
|
|
26030
|
-
|
|
26031
|
-
|
|
26032
|
-
isUploading = true;
|
|
26033
|
-
args.cancel = true;
|
|
26034
|
-
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
26035
|
-
if (beforeUploadArgs.cancel) {
|
|
26036
|
-
return;
|
|
26037
|
-
}
|
|
26038
|
-
if (!this.parent.inlineMode.enable) {
|
|
26039
|
-
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
26040
|
-
}
|
|
26041
|
-
/* eslint-disable */
|
|
26042
|
-
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
26043
|
-
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
26044
|
-
this.uploadObj.customFormDatas = beforeUploadArgs.customFormData && beforeUploadArgs.customFormData.length > 0 ?
|
|
26045
|
-
beforeUploadArgs.customFormData : this.uploadObj.customFormDatas;
|
|
26046
|
-
this.uploadObj.uploadFiles(rawFile, null);
|
|
26047
|
-
this.parent.inputElement.contentEditable = 'false';
|
|
26048
|
-
/* eslint-enable */
|
|
26049
|
-
});
|
|
26050
|
-
}
|
|
26051
|
-
else {
|
|
26052
|
-
this.parent.trigger(beforeImageUpload, args);
|
|
26053
|
-
if (!this.parent.inlineMode.enable) {
|
|
26054
|
-
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
26055
|
-
}
|
|
26240
|
+
this.parent.trigger(beforeImageUpload, args);
|
|
26241
|
+
if (!this.parent.inlineMode.enable) {
|
|
26242
|
+
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
26056
26243
|
}
|
|
26057
26244
|
},
|
|
26058
26245
|
uploading: (e) => {
|
|
@@ -26077,9 +26264,6 @@ class Image {
|
|
|
26077
26264
|
if (isUploading) {
|
|
26078
26265
|
e.cancel = true;
|
|
26079
26266
|
}
|
|
26080
|
-
if (this.parent.isServerRendered) {
|
|
26081
|
-
rawFile = e.filesData;
|
|
26082
|
-
}
|
|
26083
26267
|
},
|
|
26084
26268
|
failure: (e) => {
|
|
26085
26269
|
isUploading = false;
|
|
@@ -26237,6 +26421,9 @@ class Image {
|
|
|
26237
26421
|
/* eslint-enable */
|
|
26238
26422
|
destroy() {
|
|
26239
26423
|
this.prevSelectedImgEle = undefined;
|
|
26424
|
+
if (isNullOrUndefined(this.parent)) {
|
|
26425
|
+
return;
|
|
26426
|
+
}
|
|
26240
26427
|
this.removeEventListener();
|
|
26241
26428
|
}
|
|
26242
26429
|
moduleDestroy() {
|
|
@@ -26860,6 +27047,9 @@ class Audio {
|
|
|
26860
27047
|
if (this.quickToolObj.inlineQTBar && document.body.contains(this.quickToolObj.inlineQTBar.element)) {
|
|
26861
27048
|
this.quickToolObj.inlineQTBar.hidePopup();
|
|
26862
27049
|
}
|
|
27050
|
+
if (this.quickToolObj.textQTBar && this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)) {
|
|
27051
|
+
this.quickToolObj.textQTBar.hidePopup();
|
|
27052
|
+
}
|
|
26863
27053
|
}
|
|
26864
27054
|
}
|
|
26865
27055
|
// eslint-disable-next-line
|
|
@@ -26927,10 +27117,8 @@ class Audio {
|
|
|
26927
27117
|
});
|
|
26928
27118
|
uploadParentEle.appendChild(uploadEle);
|
|
26929
27119
|
let fileName;
|
|
26930
|
-
let rawFile;
|
|
26931
27120
|
let selectArgs;
|
|
26932
27121
|
let filesData;
|
|
26933
|
-
let beforeUploadArgs;
|
|
26934
27122
|
this.uploadObj = new Uploader({
|
|
26935
27123
|
asyncSettings: { saveUrl: this.parent.insertAudioSettings.saveUrl, removeUrl: this.parent.insertAudioSettings.removeUrl },
|
|
26936
27124
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl,
|
|
@@ -26938,13 +27126,8 @@ class Audio {
|
|
|
26938
27126
|
selected: (e) => {
|
|
26939
27127
|
proxy.isAudioUploaded = true;
|
|
26940
27128
|
selectArgs = e;
|
|
27129
|
+
// eslint-disable-next-line
|
|
26941
27130
|
filesData = e.filesData;
|
|
26942
|
-
if (this.parent.isServerRendered) {
|
|
26943
|
-
selectArgs = JSON.parse(JSON.stringify(e));
|
|
26944
|
-
e.cancel = true;
|
|
26945
|
-
rawFile = e.filesData;
|
|
26946
|
-
selectArgs.filesData = rawFile;
|
|
26947
|
-
}
|
|
26948
27131
|
this.parent.trigger(fileSelected, selectArgs, (selectArgs) => {
|
|
26949
27132
|
if (!selectArgs.cancel) {
|
|
26950
27133
|
this.checkExtension(selectArgs.filesData[0]);
|
|
@@ -26967,35 +27150,11 @@ class Audio {
|
|
|
26967
27150
|
});
|
|
26968
27151
|
reader.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
26969
27152
|
}
|
|
26970
|
-
if (this.parent.isServerRendered) {
|
|
26971
|
-
/* eslint-disable */
|
|
26972
|
-
this.uploadObj._internalRenderSelect(selectArgs, rawFile);
|
|
26973
|
-
/* eslint-enable */
|
|
26974
|
-
}
|
|
26975
27153
|
}
|
|
26976
27154
|
});
|
|
26977
27155
|
},
|
|
26978
27156
|
beforeUpload: (args) => {
|
|
26979
|
-
|
|
26980
|
-
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
26981
|
-
beforeUploadArgs.filesData = filesData;
|
|
26982
|
-
args.cancel = true;
|
|
26983
|
-
this.parent.trigger(fileUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
26984
|
-
if (beforeUploadArgs.cancel) {
|
|
26985
|
-
return;
|
|
26986
|
-
}
|
|
26987
|
-
/* eslint-disable */
|
|
26988
|
-
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
26989
|
-
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
26990
|
-
this.uploadObj.customFormDatas = beforeUploadArgs.customFormData && beforeUploadArgs.customFormData.length > 0 ?
|
|
26991
|
-
beforeUploadArgs.customFormData : this.uploadObj.customFormDatas;
|
|
26992
|
-
this.uploadObj.uploadFiles(rawFile, null);
|
|
26993
|
-
/* eslint-enable */
|
|
26994
|
-
});
|
|
26995
|
-
}
|
|
26996
|
-
else {
|
|
26997
|
-
this.parent.trigger(beforeFileUpload, args);
|
|
26998
|
-
}
|
|
27157
|
+
this.parent.trigger(beforeFileUpload, args);
|
|
26999
27158
|
},
|
|
27000
27159
|
uploading: (e) => {
|
|
27001
27160
|
if (!this.parent.isServerRendered) {
|
|
@@ -28223,6 +28382,9 @@ class Video {
|
|
|
28223
28382
|
if (this.quickToolObj.inlineQTBar && document.body.contains(this.quickToolObj.inlineQTBar.element)) {
|
|
28224
28383
|
this.quickToolObj.inlineQTBar.hidePopup();
|
|
28225
28384
|
}
|
|
28385
|
+
if (this.quickToolObj.textQTBar && this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)) {
|
|
28386
|
+
this.quickToolObj.textQTBar.hidePopup();
|
|
28387
|
+
}
|
|
28226
28388
|
}
|
|
28227
28389
|
}
|
|
28228
28390
|
// eslint-disable-next-line
|
|
@@ -28332,10 +28494,8 @@ class Video {
|
|
|
28332
28494
|
});
|
|
28333
28495
|
uploadParentEle.appendChild(uploadEle);
|
|
28334
28496
|
let fileName;
|
|
28335
|
-
let rawFile;
|
|
28336
28497
|
let selectArgs;
|
|
28337
28498
|
let filesData;
|
|
28338
|
-
let beforeUploadArgs;
|
|
28339
28499
|
this.uploadObj = new Uploader({
|
|
28340
28500
|
asyncSettings: { saveUrl: this.parent.insertVideoSettings.saveUrl, removeUrl: this.parent.insertVideoSettings.removeUrl },
|
|
28341
28501
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl,
|
|
@@ -28343,13 +28503,8 @@ class Video {
|
|
|
28343
28503
|
selected: (e) => {
|
|
28344
28504
|
proxy.isVideoUploaded = true;
|
|
28345
28505
|
selectArgs = e;
|
|
28506
|
+
// eslint-disable-next-line
|
|
28346
28507
|
filesData = e.filesData;
|
|
28347
|
-
if (this.parent.isServerRendered) {
|
|
28348
|
-
selectArgs = JSON.parse(JSON.stringify(e));
|
|
28349
|
-
e.cancel = true;
|
|
28350
|
-
rawFile = e.filesData;
|
|
28351
|
-
selectArgs.filesData = rawFile;
|
|
28352
|
-
}
|
|
28353
28508
|
this.parent.trigger(fileSelected, selectArgs, (selectArgs) => {
|
|
28354
28509
|
if (!selectArgs.cancel) {
|
|
28355
28510
|
this.checkExtension(selectArgs.filesData[0]);
|
|
@@ -28373,35 +28528,11 @@ class Video {
|
|
|
28373
28528
|
});
|
|
28374
28529
|
reader.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
28375
28530
|
}
|
|
28376
|
-
if (this.parent.isServerRendered) {
|
|
28377
|
-
/* eslint-disable */
|
|
28378
|
-
this.uploadObj._internalRenderSelect(selectArgs, rawFile);
|
|
28379
|
-
/* eslint-enable */
|
|
28380
|
-
}
|
|
28381
28531
|
}
|
|
28382
28532
|
});
|
|
28383
28533
|
},
|
|
28384
28534
|
beforeUpload: (args) => {
|
|
28385
|
-
|
|
28386
|
-
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
28387
|
-
beforeUploadArgs.filesData = filesData;
|
|
28388
|
-
args.cancel = true;
|
|
28389
|
-
this.parent.trigger(fileUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
28390
|
-
if (beforeUploadArgs.cancel) {
|
|
28391
|
-
return;
|
|
28392
|
-
}
|
|
28393
|
-
/* eslint-disable */
|
|
28394
|
-
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
28395
|
-
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
28396
|
-
this.uploadObj.customFormDatas = beforeUploadArgs.customFormData && beforeUploadArgs.customFormData.length > 0 ?
|
|
28397
|
-
beforeUploadArgs.customFormData : this.uploadObj.customFormDatas;
|
|
28398
|
-
this.uploadObj.uploadFiles(rawFile, null);
|
|
28399
|
-
/* eslint-enable */
|
|
28400
|
-
});
|
|
28401
|
-
}
|
|
28402
|
-
else {
|
|
28403
|
-
this.parent.trigger(beforeFileUpload, args);
|
|
28404
|
-
}
|
|
28535
|
+
this.parent.trigger(beforeFileUpload, args);
|
|
28405
28536
|
},
|
|
28406
28537
|
uploading: (e) => {
|
|
28407
28538
|
if (!this.parent.isServerRendered) {
|
|
@@ -28647,6 +28778,7 @@ class ViewSource {
|
|
|
28647
28778
|
* @deprecated
|
|
28648
28779
|
*/
|
|
28649
28780
|
sourceCode(args) {
|
|
28781
|
+
this.parent.notify(hidePopup, {});
|
|
28650
28782
|
this.parent.isBlur = false;
|
|
28651
28783
|
this.parent.trigger(actionBegin, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
|
|
28652
28784
|
const tbItems = selectAll('.' + CLS_TB_ITEM, this.parent.element);
|
|
@@ -28804,6 +28936,9 @@ class ViewSource {
|
|
|
28804
28936
|
* @deprecated
|
|
28805
28937
|
*/
|
|
28806
28938
|
destroy() {
|
|
28939
|
+
if (isNullOrUndefined(this.parent)) {
|
|
28940
|
+
return;
|
|
28941
|
+
}
|
|
28807
28942
|
this.removeEventListener();
|
|
28808
28943
|
}
|
|
28809
28944
|
moduleDestroy() {
|
|
@@ -28872,6 +29007,9 @@ class Table {
|
|
|
28872
29007
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
28873
29008
|
this.parent.off(destroy, this.destroy);
|
|
28874
29009
|
this.parent.off(moduleDestroy, this.moduleDestroy);
|
|
29010
|
+
if (!Browser.isDevice && this.parent.tableSettings.resize) {
|
|
29011
|
+
EventHandler.remove(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper);
|
|
29012
|
+
}
|
|
28875
29013
|
}
|
|
28876
29014
|
updateCss(currentObj, e) {
|
|
28877
29015
|
if (currentObj && e.cssClass) {
|
|
@@ -29278,14 +29416,17 @@ class Table {
|
|
|
29278
29416
|
let pageX;
|
|
29279
29417
|
let pageY;
|
|
29280
29418
|
if (Browser.isDevice && e.args.touches) {
|
|
29281
|
-
pageX =
|
|
29282
|
-
|
|
29419
|
+
pageX = (this.parent.iframeSettings.enable) ? window.pageXOffset + this.parent.element.getBoundingClientRect().left +
|
|
29420
|
+
e.args.changedTouches[0].clientX : e.args.changedTouches[0].pageX;
|
|
29421
|
+
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + this.parent.element.getBoundingClientRect().top +
|
|
29422
|
+
(!this.parent.inlineMode.enable ? this.parent.toolbarModule.getToolbarHeight() : 0)
|
|
29423
|
+
+ e.args.changedTouches[0].clientY : e.args.changedTouches[0].pageY;
|
|
29283
29424
|
}
|
|
29284
29425
|
else {
|
|
29285
29426
|
pageX = (this.parent.iframeSettings.enable) ? window.pageXOffset
|
|
29286
29427
|
+ this.parent.element.getBoundingClientRect().left + args.clientX : args.pageX;
|
|
29287
|
-
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset +
|
|
29288
|
-
this.parent.
|
|
29428
|
+
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + this.parent.element.getBoundingClientRect().top +
|
|
29429
|
+
this.parent.toolbarModule.getToolbarHeight() + args.clientY : args.pageY;
|
|
29289
29430
|
}
|
|
29290
29431
|
this.quickToolObj.tableQTBar.showPopup(pageX, pageY, target);
|
|
29291
29432
|
this.parent.formatter.editorManager.nodeSelection.restore();
|
|
@@ -29409,7 +29550,12 @@ class Table {
|
|
|
29409
29550
|
const columns = table.rows[this.calMaxCol(table)].cells;
|
|
29410
29551
|
const rows = [];
|
|
29411
29552
|
for (let i = 0; i < table.rows.length; i++) {
|
|
29412
|
-
|
|
29553
|
+
for (let j = 0; j < table.rows[i].cells.length; j++) {
|
|
29554
|
+
if (!table.rows[i].cells[j].hasAttribute('rowspan')) {
|
|
29555
|
+
rows.push(Array.prototype.slice.call(table.rows[i].cells, 0, table.rows[i].cells.length)[j]);
|
|
29556
|
+
break;
|
|
29557
|
+
}
|
|
29558
|
+
}
|
|
29413
29559
|
}
|
|
29414
29560
|
const height = parseInt(getComputedStyle(table).height, 10);
|
|
29415
29561
|
const width = parseInt(getComputedStyle(table).width, 10);
|
|
@@ -29655,6 +29801,7 @@ class Table {
|
|
|
29655
29801
|
const currentTdElement = this.curTable.closest('td');
|
|
29656
29802
|
const args = { event: e, requestType: 'table' };
|
|
29657
29803
|
let isRowCellsMerged = false;
|
|
29804
|
+
let isColCellsMerged = false;
|
|
29658
29805
|
let mergedCellIndex;
|
|
29659
29806
|
let mergedElement;
|
|
29660
29807
|
this.parent.trigger(onResize, args, (resizingArgs) => {
|
|
@@ -29684,7 +29831,7 @@ class Table {
|
|
|
29684
29831
|
const width = parseFloat(this.columnEle.offsetWidth.toString());
|
|
29685
29832
|
const cellRow = this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
|
|
29686
29833
|
let currentTableWidth;
|
|
29687
|
-
if (this.curTable.style.width
|
|
29834
|
+
if (this.curTable.style.width !== '' && this.curTable.style.width.includes('%')) {
|
|
29688
29835
|
currentTableWidth = parseFloat(this.curTable.style.width.split('%')[0]);
|
|
29689
29836
|
}
|
|
29690
29837
|
else {
|
|
@@ -29747,12 +29894,20 @@ class Table {
|
|
|
29747
29894
|
let isMergedEleResize = false;
|
|
29748
29895
|
let leftTableCell;
|
|
29749
29896
|
let rightTableCell;
|
|
29897
|
+
isColCellsMerged = false;
|
|
29898
|
+
isRowCellsMerged = false;
|
|
29899
|
+
/* eslint-disable */
|
|
29750
29900
|
for (let j = 0; j < currentRow.cells.length; j++) {
|
|
29751
29901
|
if (currentRow.cells[j].hasAttribute('rowspan') && j <= this.colIndex) {
|
|
29752
29902
|
isRowCellsMerged = true;
|
|
29753
29903
|
mergedCellIndex = i;
|
|
29754
29904
|
mergedElement = currentRow.cells[j];
|
|
29755
29905
|
}
|
|
29906
|
+
else if (currentRow.cells[j].hasAttribute('colspan') && j <= currentRow.cells.length) {
|
|
29907
|
+
isColCellsMerged = true;
|
|
29908
|
+
mergedCellIndex = i;
|
|
29909
|
+
mergedElement = currentRow.cells[j];
|
|
29910
|
+
}
|
|
29756
29911
|
}
|
|
29757
29912
|
if (!isNullOrUndefined(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
|
|
29758
29913
|
index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
|
|
@@ -29760,14 +29915,14 @@ class Table {
|
|
|
29760
29915
|
else {
|
|
29761
29916
|
index = this.colIndex;
|
|
29762
29917
|
}
|
|
29763
|
-
if (isRowCellsMerged) {
|
|
29918
|
+
if (isRowCellsMerged || isColCellsMerged) {
|
|
29764
29919
|
let currentResizeRow;
|
|
29765
29920
|
if (currentRow.cells.length < cellColl.length) {
|
|
29766
|
-
index = currentRow.cells.length === this.colIndex ?
|
|
29767
|
-
this.colIndex - 1 : this.colIndex
|
|
29921
|
+
index = currentRow.cells.length === this.colIndex || currentRow === this.curTable.rows[this.curTable.rows.length - 1] ?
|
|
29922
|
+
this.colIndex - 1 : this.colIndex;
|
|
29768
29923
|
currentResizeRow = this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
|
|
29769
29924
|
mergedCellIndex : this.colIndex - 1];
|
|
29770
|
-
if (currentResizeRow && (currentResizeRow.cells[this.colIndex - 1] === mergedElement ||
|
|
29925
|
+
if (currentResizeRow && currentResizeRow !== currentRow && (currentResizeRow.cells[this.colIndex - 1] === mergedElement ||
|
|
29771
29926
|
currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
|
|
29772
29927
|
isMergedEleResize = true;
|
|
29773
29928
|
}
|
|
@@ -29782,10 +29937,10 @@ class Table {
|
|
|
29782
29937
|
currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
|
|
29783
29938
|
currentResizeRow.cells[this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
|
|
29784
29939
|
rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
|
|
29785
|
-
|
|
29940
|
+
currentResizeRow.cells[this.colIndex] : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
|
|
29786
29941
|
currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
|
|
29787
29942
|
}
|
|
29788
|
-
if (!isNullOrUndefined(currentRow.cells[index - 1]) && !isRowCellsMerged) {
|
|
29943
|
+
if (!isNullOrUndefined(currentRow.cells[index - 1]) && !isRowCellsMerged && !isColCellsMerged) {
|
|
29789
29944
|
currentRow.cells[index - 1].style.width =
|
|
29790
29945
|
this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29791
29946
|
}
|
|
@@ -29795,7 +29950,7 @@ class Table {
|
|
|
29795
29950
|
this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
|
|
29796
29951
|
}
|
|
29797
29952
|
}
|
|
29798
|
-
if (!isNullOrUndefined(currentRow.cells[index]) && !isRowCellsMerged) {
|
|
29953
|
+
if (!isNullOrUndefined(currentRow.cells[index]) && !isRowCellsMerged && !isColCellsMerged) {
|
|
29799
29954
|
currentRow.cells[index].style.width =
|
|
29800
29955
|
this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29801
29956
|
}
|
|
@@ -29805,6 +29960,7 @@ class Table {
|
|
|
29805
29960
|
this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
|
|
29806
29961
|
}
|
|
29807
29962
|
}
|
|
29963
|
+
/* eslint-enable */
|
|
29808
29964
|
}
|
|
29809
29965
|
}
|
|
29810
29966
|
}
|
|
@@ -29824,9 +29980,6 @@ class Table {
|
|
|
29824
29980
|
this.updateHelper();
|
|
29825
29981
|
}
|
|
29826
29982
|
else if (this.resizeBtnStat.tableBox) {
|
|
29827
|
-
if (!Browser.isDevice) {
|
|
29828
|
-
EventHandler.remove(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper);
|
|
29829
|
-
}
|
|
29830
29983
|
if (currentTdElement) {
|
|
29831
29984
|
const tableBoxPosition = this.curTable.getBoundingClientRect().left
|
|
29832
29985
|
- currentTdElement.getBoundingClientRect().left;
|
|
@@ -29837,9 +29990,11 @@ class Table {
|
|
|
29837
29990
|
this.curTable.style.width = widthType ? this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
29838
29991
|
: tableWidth + mouseX + 'px';
|
|
29839
29992
|
this.curTable.style.height = tableHeight + mouseY + 'px';
|
|
29840
|
-
tableReBox
|
|
29841
|
-
|
|
29842
|
-
'
|
|
29993
|
+
if (!isNullOrUndefined(tableReBox)) {
|
|
29994
|
+
tableReBox.classList.add('e-rbox-select');
|
|
29995
|
+
tableReBox.style.cssText = 'top: ' + (this.calcPos(this.curTable).top + tableHeight - 4) +
|
|
29996
|
+
'px; left:' + (this.calcPos(this.curTable).left + tableWidth - 4) + 'px;';
|
|
29997
|
+
}
|
|
29843
29998
|
}
|
|
29844
29999
|
}
|
|
29845
30000
|
});
|
|
@@ -29874,9 +30029,6 @@ class Table {
|
|
|
29874
30029
|
EventHandler.remove(this.contentModule.getDocument(), Browser.touchEndEvent, this.resizeEnd);
|
|
29875
30030
|
if (this.contentModule.getEditPanel().querySelector('.e-table-box') &&
|
|
29876
30031
|
this.contentModule.getEditPanel().contains(this.contentModule.getEditPanel().querySelector('.e-table-box'))) {
|
|
29877
|
-
if (!Browser.isDevice) {
|
|
29878
|
-
EventHandler.add(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper, this);
|
|
29879
|
-
}
|
|
29880
30032
|
this.removeResizeElement();
|
|
29881
30033
|
}
|
|
29882
30034
|
if (this.helper && this.contentModule.getEditPanel().contains(this.helper)) {
|
|
@@ -29939,7 +30091,8 @@ class Table {
|
|
|
29939
30091
|
this.hideTableQuickToolbar();
|
|
29940
30092
|
}
|
|
29941
30093
|
renderDlgContent(args) {
|
|
29942
|
-
|
|
30094
|
+
const argsTarget = args.args.originalEvent.target;
|
|
30095
|
+
if (Browser.isDevice || this.parent.inlineMode.enable || !isNullOrUndefined(closest(argsTarget, '.e-rte-text-popup'))) {
|
|
29943
30096
|
this.insertTableDialog(args);
|
|
29944
30097
|
return;
|
|
29945
30098
|
}
|
|
@@ -30193,6 +30346,10 @@ class Table {
|
|
|
30193
30346
|
if (this.quickToolObj && this.quickToolObj.inlineQTBar && document.body.contains(this.quickToolObj.inlineQTBar.element)) {
|
|
30194
30347
|
this.quickToolObj.inlineQTBar.hidePopup();
|
|
30195
30348
|
}
|
|
30349
|
+
if (this.quickToolObj && this.quickToolObj.textQTBar &&
|
|
30350
|
+
this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)) {
|
|
30351
|
+
this.quickToolObj.textQTBar.hidePopup();
|
|
30352
|
+
}
|
|
30196
30353
|
}
|
|
30197
30354
|
customTable(args, e) {
|
|
30198
30355
|
const proxy = (this.self) ? this.self : this;
|
|
@@ -30200,7 +30357,8 @@ class Table {
|
|
|
30200
30357
|
const argument = ((Browser.isDevice || (!isNullOrUndefined(args.args)
|
|
30201
30358
|
&& !isNullOrUndefined(args.args.originalEvent) &&
|
|
30202
30359
|
args.args.originalEvent.action === 'insert-table')
|
|
30203
|
-
|| proxy.parent.inlineMode.enable) ? args :
|
|
30360
|
+
|| proxy.parent.inlineMode.enable || !isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) ? args :
|
|
30361
|
+
this);
|
|
30204
30362
|
proxy.tableInsert(proxy.rowTextBox.value, proxy.columnTextBox.value, e, argument);
|
|
30205
30363
|
}
|
|
30206
30364
|
}
|
|
@@ -30296,6 +30454,9 @@ class Table {
|
|
|
30296
30454
|
* @deprecated
|
|
30297
30455
|
*/
|
|
30298
30456
|
destroy() {
|
|
30457
|
+
if (isNullOrUndefined(this.parent)) {
|
|
30458
|
+
return;
|
|
30459
|
+
}
|
|
30299
30460
|
this.removeEventListener();
|
|
30300
30461
|
}
|
|
30301
30462
|
moduleDestroy() {
|
|
@@ -30365,7 +30526,7 @@ class DialogRenderer {
|
|
|
30365
30526
|
this.parent.trigger(beforeDialogOpen, args, this.beforeOpenCallback.bind(this, args));
|
|
30366
30527
|
}
|
|
30367
30528
|
handleEnterKeyDown(args) {
|
|
30368
|
-
if (args.code ===
|
|
30529
|
+
if (args.code === 'Enter') {
|
|
30369
30530
|
args.preventDefault();
|
|
30370
30531
|
}
|
|
30371
30532
|
}
|
|
@@ -30845,7 +31006,7 @@ __decorate$2([
|
|
|
30845
31006
|
Property(['VideoReplace', 'VideoAlign', 'VideoRemove', 'VideoLayoutOption', 'VideoDimension'])
|
|
30846
31007
|
], QuickToolbarSettings.prototype, "video", void 0);
|
|
30847
31008
|
__decorate$2([
|
|
30848
|
-
Property(
|
|
31009
|
+
Property(null)
|
|
30849
31010
|
], QuickToolbarSettings.prototype, "text", void 0);
|
|
30850
31011
|
__decorate$2([
|
|
30851
31012
|
Property(['TableHeader', 'TableRows', 'TableColumns', 'BackgroundColor', '-', 'TableRemove', 'Alignments', 'TableCellVerticalAlign', 'Styles'])
|
|
@@ -31058,6 +31219,9 @@ class EnterKeyAction {
|
|
|
31058
31219
|
this.parent.on(moduleDestroy, this.moduleDestroy, this);
|
|
31059
31220
|
}
|
|
31060
31221
|
destroy() {
|
|
31222
|
+
if (isNullOrUndefined(this.parent)) {
|
|
31223
|
+
return;
|
|
31224
|
+
}
|
|
31061
31225
|
this.removeEventListener();
|
|
31062
31226
|
}
|
|
31063
31227
|
moduleDestroy() {
|
|
@@ -31216,8 +31380,12 @@ class EnterKeyAction {
|
|
|
31216
31380
|
(this.range.startContainer.previousSibling.nodeName === 'IMG' || this.range.startContainer.previousSibling.nodeName === 'BR'))) {
|
|
31217
31381
|
let isNearBlockLengthZero;
|
|
31218
31382
|
let newElem;
|
|
31219
|
-
if (!isNullOrUndefined(this.range.startContainer.childNodes) &&
|
|
31220
|
-
|
|
31383
|
+
if (!isNullOrUndefined(this.range.startContainer.childNodes) &&
|
|
31384
|
+
(this.range.startContainer.textContent.length === 0 ||
|
|
31385
|
+
(this.range.startContainer.nodeName !== '#text' && !isNullOrUndefined(this.range.startContainer.querySelector('.e-video-clickelem')) &&
|
|
31386
|
+
this.range.startContainer.querySelector('.e-video-clickelem').textContent.length === 0)) &&
|
|
31387
|
+
(this.range.startContainer.querySelectorAll('img, audio, video').length > 0 ||
|
|
31388
|
+
!isNullOrUndefined(this.range.startContainer.querySelector('.e-video-clickelem')) ||
|
|
31221
31389
|
this.range.startContainer.nodeName === 'IMG' || this.range.startContainer.nodeName === 'TABLE')) {
|
|
31222
31390
|
newElem = this.createInsertElement(shiftKey);
|
|
31223
31391
|
isMediaNode = true;
|
|
@@ -32216,7 +32384,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32216
32384
|
}
|
|
32217
32385
|
if (e.action !== 'insert-link' &&
|
|
32218
32386
|
e.action !== 'format-copy' && e.action !== 'format-paste' &&
|
|
32219
|
-
(!e.target ||
|
|
32387
|
+
(!e.target || (e.target.classList.contains('e-mention') && e.code !== 'Tab')) &&
|
|
32220
32388
|
(e.action && e.action !== 'paste' && e.action !== 'space'
|
|
32221
32389
|
|| e.which === 9 || (e.code === 'Backspace' && e.which === 8))) {
|
|
32222
32390
|
let FormatPainterEscapeAction = false;
|
|
@@ -32521,6 +32689,8 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32521
32689
|
this.toolbarModule.destroy();
|
|
32522
32690
|
}
|
|
32523
32691
|
this.notify(moduleDestroy, {});
|
|
32692
|
+
super.destroy();
|
|
32693
|
+
this.isRendered = false;
|
|
32524
32694
|
return;
|
|
32525
32695
|
}
|
|
32526
32696
|
this.notify(destroy, {});
|
|
@@ -32574,9 +32744,6 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32574
32744
|
this.removeAttributes();
|
|
32575
32745
|
super.destroy();
|
|
32576
32746
|
this.isRendered = false;
|
|
32577
|
-
if (this.enablePersistence) {
|
|
32578
|
-
window.localStorage.removeItem(this.getModuleName() + this.element.id);
|
|
32579
|
-
}
|
|
32580
32747
|
}
|
|
32581
32748
|
removeHtmlAttributes() {
|
|
32582
32749
|
if (this.htmlAttributes) {
|
|
@@ -32705,9 +32872,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32705
32872
|
else {
|
|
32706
32873
|
nVal = newProp[prop];
|
|
32707
32874
|
}
|
|
32875
|
+
nVal = this.serializeValue(nVal);
|
|
32708
32876
|
const val = this.editorMode === 'HTML' ? getEditValue(nVal, this) : nVal;
|
|
32709
32877
|
if ((!isNullOrUndefined(nVal) && nVal !== '') || prop === 'enterKey') {
|
|
32710
|
-
this.value
|
|
32878
|
+
this.setProperties({ value: ((this.enableHtmlEncode) ? this.encode(decode(val)) : val) }, true);
|
|
32711
32879
|
}
|
|
32712
32880
|
this.updatePanelValue();
|
|
32713
32881
|
if (this.inputElement) {
|
|
@@ -33253,10 +33421,6 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33253
33421
|
// eslint-disable-next-line
|
|
33254
33422
|
const imgPadding = 12;
|
|
33255
33423
|
const imgResizeBorder = 2;
|
|
33256
|
-
if (isNullOrUndefined(this.contentModule) || isNullOrUndefined(this.contentModule.getEditPanel())) {
|
|
33257
|
-
EventHandler.remove(this.contentModule.getDocument(), Browser.touchMoveEvent, this.imageModule.resizing);
|
|
33258
|
-
return maxWidth;
|
|
33259
|
-
}
|
|
33260
33424
|
const editEle = this.contentModule.getEditPanel();
|
|
33261
33425
|
const eleStyle = window.getComputedStyle(editEle);
|
|
33262
33426
|
const editEleMaxWidth = editEle.offsetWidth - (imgPadding + imgResizeBorder +
|
|
@@ -33323,13 +33487,17 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33323
33487
|
heightValue = heightPercent && rteHeightPercent ? rteHeightPercent : rteHeight - (tbHeight + rzHeight) + 'px';
|
|
33324
33488
|
}
|
|
33325
33489
|
}
|
|
33326
|
-
if (target !== 'windowResize') {
|
|
33490
|
+
if (target !== 'windowResize' || heightPercent) {
|
|
33327
33491
|
if (this.iframeSettings.enable) {
|
|
33328
33492
|
if (heightValue !== 'auto') {
|
|
33329
33493
|
setStyleAttribute(cntEle, { height: heightValue, marginTop: topValue + 'px' });
|
|
33330
33494
|
}
|
|
33331
33495
|
}
|
|
33332
33496
|
else {
|
|
33497
|
+
if (target === 'windowResize' && heightPercent) {
|
|
33498
|
+
// cntEle hide the borderBottom of RichTextEditor. so removed the 2px of cntEle height.
|
|
33499
|
+
heightValue = parseInt(heightValue) - 2 + 'px';
|
|
33500
|
+
}
|
|
33333
33501
|
setStyleAttribute(cntEle, { height: heightValue, marginTop: topValue + 'px' });
|
|
33334
33502
|
}
|
|
33335
33503
|
}
|
|
@@ -33538,6 +33706,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33538
33706
|
this.toolbarModule.refreshToolbarOverflow();
|
|
33539
33707
|
isExpand = this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(CLS_EXPAND_OPEN);
|
|
33540
33708
|
}
|
|
33709
|
+
if (this.iframeSettings.enable !== true) {
|
|
33710
|
+
// When resize the window,border bottom of cntEle and this.element border visible separatly.so none the cntEle borderBottom.
|
|
33711
|
+
this.contentModule.getPanel().style.borderBottom = 'none';
|
|
33712
|
+
}
|
|
33541
33713
|
this.setContentHeight('windowResize', isExpand);
|
|
33542
33714
|
this.notify(windowResize, null);
|
|
33543
33715
|
}
|
|
@@ -34253,5 +34425,5 @@ RichTextEditor = __decorate$1([
|
|
|
34253
34425
|
* Rich Text Editor component exported items
|
|
34254
34426
|
*/
|
|
34255
34427
|
|
|
34256
|
-
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, 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, maximizeMinimizeClick, 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_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_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, 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 };
|
|
34428
|
+
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, maximizeMinimizeClick, hidePopup, 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_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, 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 };
|
|
34257
34429
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|