@syncfusion/ej2-richtexteditor 24.2.4 → 24.2.8

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/ej2-richtexteditor.min.js +2 -2
  3. package/dist/ej2-richtexteditor.umd.min.js +2 -2
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +669 -272
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +662 -269
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-richtexteditor.min.js +2 -2
  10. package/dist/global/ej2-richtexteditor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +12 -12
  13. package/src/common/util.js +4 -1
  14. package/src/editor-manager/plugin/dom-node.js +3 -1
  15. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -0
  16. package/src/editor-manager/plugin/format-painter-actions.js +18 -0
  17. package/src/editor-manager/plugin/formats.d.ts +1 -0
  18. package/src/editor-manager/plugin/formats.js +37 -2
  19. package/src/editor-manager/plugin/inserthtml.js +15 -2
  20. package/src/editor-manager/plugin/lists.js +85 -63
  21. package/src/editor-manager/plugin/ms-word-clean-up.js +87 -18
  22. package/src/editor-manager/plugin/nodecutter.js +1 -1
  23. package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
  24. package/src/editor-manager/plugin/selection-commands.js +56 -1
  25. package/src/editor-manager/plugin/table.js +1 -1
  26. package/src/rich-text-editor/actions/base-quick-toolbar.js +4 -4
  27. package/src/rich-text-editor/actions/color-picker.d.ts +1 -0
  28. package/src/rich-text-editor/actions/color-picker.js +10 -0
  29. package/src/rich-text-editor/actions/enter-key.js +2 -2
  30. package/src/rich-text-editor/actions/html-editor.js +25 -12
  31. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
  32. package/src/rich-text-editor/actions/paste-clean-up.js +26 -5
  33. package/src/rich-text-editor/actions/toolbar-action.js +1 -1
  34. package/src/rich-text-editor/actions/toolbar.js +4 -1
  35. package/src/rich-text-editor/base/constant.d.ts +5 -0
  36. package/src/rich-text-editor/base/constant.js +5 -0
  37. package/src/rich-text-editor/base/interface.d.ts +0 -8
  38. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
  39. package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -1
  40. package/src/rich-text-editor/base/rich-text-editor.js +33 -7
  41. package/src/rich-text-editor/base/util.js +3 -0
  42. package/src/rich-text-editor/models/default-locale.js +3 -2
  43. package/src/rich-text-editor/renderer/dialog-renderer.js +5 -1
  44. package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
  45. package/src/rich-text-editor/renderer/image-module.js +31 -10
  46. package/src/rich-text-editor/renderer/table-module.d.ts +4 -1
  47. package/src/rich-text-editor/renderer/table-module.js +200 -131
  48. package/src/rich-text-editor/renderer/toolbar-renderer.js +13 -13
  49. package/styles/bootstrap-dark.css +57 -22
  50. package/styles/bootstrap.css +61 -29
  51. package/styles/bootstrap4.css +48 -17
  52. package/styles/bootstrap5-dark.css +47 -18
  53. package/styles/bootstrap5.css +47 -18
  54. package/styles/fabric-dark.css +43 -12
  55. package/styles/fabric.css +43 -12
  56. package/styles/fluent-dark.css +51 -14
  57. package/styles/fluent.css +51 -14
  58. package/styles/highcontrast-light.css +43 -12
  59. package/styles/highcontrast.css +46 -12
  60. package/styles/material-dark.css +47 -12
  61. package/styles/material.css +47 -12
  62. package/styles/material3-dark.css +45 -14
  63. package/styles/material3.css +45 -14
  64. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +12 -10
  65. package/styles/rich-text-editor/_bootstrap-definition.scss +18 -16
  66. package/styles/rich-text-editor/_bootstrap4-definition.scss +8 -6
  67. package/styles/rich-text-editor/_bootstrap5-definition.scss +4 -2
  68. package/styles/rich-text-editor/_fabric-dark-definition.scss +4 -2
  69. package/styles/rich-text-editor/_fabric-definition.scss +4 -2
  70. package/styles/rich-text-editor/_fluent-definition.scss +5 -3
  71. package/styles/rich-text-editor/_fusionnew-definition.scss +4 -2
  72. package/styles/rich-text-editor/_highcontrast-definition.scss +4 -2
  73. package/styles/rich-text-editor/_highcontrast-light-definition.scss +4 -2
  74. package/styles/rich-text-editor/_layout.scss +46 -6
  75. package/styles/rich-text-editor/_material-dark-definition.scss +4 -2
  76. package/styles/rich-text-editor/_material-definition.scss +4 -2
  77. package/styles/rich-text-editor/_material3-definition.scss +6 -4
  78. package/styles/rich-text-editor/_tailwind-definition.scss +21 -19
  79. package/styles/rich-text-editor/_theme.scss +65 -16
  80. package/styles/rich-text-editor/bootstrap-dark.css +57 -22
  81. package/styles/rich-text-editor/bootstrap.css +61 -29
  82. package/styles/rich-text-editor/bootstrap4.css +48 -17
  83. package/styles/rich-text-editor/bootstrap5-dark.css +47 -18
  84. package/styles/rich-text-editor/bootstrap5.css +47 -18
  85. package/styles/rich-text-editor/fabric-dark.css +43 -12
  86. package/styles/rich-text-editor/fabric.css +43 -12
  87. package/styles/rich-text-editor/fluent-dark.css +51 -14
  88. package/styles/rich-text-editor/fluent.css +51 -14
  89. package/styles/rich-text-editor/highcontrast-light.css +43 -12
  90. package/styles/rich-text-editor/highcontrast.css +46 -12
  91. package/styles/rich-text-editor/material-dark.css +47 -12
  92. package/styles/rich-text-editor/material.css +47 -12
  93. package/styles/rich-text-editor/material3-dark.css +45 -14
  94. package/styles/rich-text-editor/material3.css +45 -14
  95. package/styles/rich-text-editor/tailwind-dark.css +98 -35
  96. package/styles/rich-text-editor/tailwind.css +98 -35
  97. package/styles/tailwind-dark.css +98 -35
  98. package/styles/tailwind.css +98 -35
  99. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
  100. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
@@ -764,6 +764,11 @@ var updateValueOnIdle = 'updateValueOnIdle';
764
764
  * @deprecated
765
765
  */
766
766
  var documentClickClosedBy = 'documentClickClosedBy';
767
+ /**
768
+ * @hidden
769
+ * @deprecated
770
+ */
771
+ var showColorPicker = 'showColorPicker';
767
772
  /**
768
773
  * @hidden
769
774
  * @deprecated
@@ -2707,7 +2712,7 @@ var defaultLocale = {
2707
2712
  'browse': 'Browse',
2708
2713
  'imageUrl': 'http://example.com/image.png',
2709
2714
  'audioUrl': 'http://example.com/audio.mp3',
2710
- 'videoUrl': 'http://example.com/video.mp3',
2715
+ 'videoUrl': 'http://example.com/video.mp4',
2711
2716
  'webUrl': 'Web URL',
2712
2717
  'embedUrl': 'Embed Code',
2713
2718
  'imageCaption': 'Caption',
@@ -2812,6 +2817,7 @@ var defaultLocale = {
2812
2817
  'emojiPickerNoResultFound': 'No results found',
2813
2818
  'emojiPickerTrySomethingElse': 'Try something else',
2814
2819
  'linkAriaLabel': 'Open in new window',
2820
+ 'unsupportedImage': 'Unsupported file format'
2815
2821
  };
2816
2822
  var toolsLocale = {
2817
2823
  'alignments': 'alignments',
@@ -2907,7 +2913,7 @@ var toolsLocale = {
2907
2913
  'emojiPickerTypeToFind': 'Type to find',
2908
2914
  'emojiPickerNoResultFound': 'No results found',
2909
2915
  'emojiPickerTrySomethingElse': 'Try something else',
2910
- 'ImageLinkAriaLabel': 'Open in new window',
2916
+ 'imageLinkAriaLabel': 'Open in new window',
2911
2917
  };
2912
2918
  var fontNameLocale = [
2913
2919
  { locale: 'fontNameSegoeUI', value: 'Segoe UI' },
@@ -3438,6 +3444,9 @@ function updateTextNode(value, rteObj) {
3438
3444
  }
3439
3445
  var imageElm = resultElm.querySelectorAll('img');
3440
3446
  for (var i = 0; i < imageElm.length; i++) {
3447
+ if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
3448
+ continue; // Should not add the class if the image is Broken.
3449
+ }
3441
3450
  if (!imageElm[i].classList.contains(CLS_RTE_IMAGE)) {
3442
3451
  imageElm[i].classList.add(CLS_RTE_IMAGE);
3443
3452
  }
@@ -3668,6 +3677,19 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
3668
3677
  addClass([listEle[1], listEle[2]], 'e-disabled');
3669
3678
  }
3670
3679
  }
3680
+ if (this.parent.showTooltip) {
3681
+ this.dropdownTooltip = new Tooltip({
3682
+ target: '[aria-owns="' + this.parent.getID() + '"].e-rte-elements [title]',
3683
+ showTipPointer: true,
3684
+ openDelay: 400,
3685
+ opensOn: 'Hover',
3686
+ beforeRender: this.tooltipBeforeRender.bind(this),
3687
+ cssClass: this.parent.getCssClass(),
3688
+ windowCollision: true,
3689
+ position: 'BottomCenter'
3690
+ });
3691
+ this.dropdownTooltip.appendTo(args.element);
3692
+ }
3671
3693
  this.parent.notify(selectionSave, args);
3672
3694
  };
3673
3695
  ToolbarRenderer.prototype.dropDownClose = function (args) {
@@ -3712,19 +3734,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
3712
3734
  });
3713
3735
  this.tooltip.appendTo(args.target);
3714
3736
  }
3715
- if (this.parent.showTooltip) {
3716
- this.dropdownTooltip = new Tooltip({
3717
- target: '[aria-owns="' + this.parent.getID() + '"].e-rte-elements [title]',
3718
- showTipPointer: true,
3719
- openDelay: 400,
3720
- opensOn: 'Hover',
3721
- beforeRender: this.tooltipBeforeRender.bind(this),
3722
- cssClass: this.parent.getCssClass(),
3723
- windowCollision: true,
3724
- position: 'BottomCenter'
3725
- });
3726
- this.dropdownTooltip.appendTo(document.body);
3727
- }
3728
3737
  };
3729
3738
  /**
3730
3739
  * renderDropDownButton method
@@ -5074,7 +5083,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
5074
5083
  if (args.item.command === 'Lists') {
5075
5084
  if (args.originalEvent.target.classList.contains('e-caret') &&
5076
5085
  (args.originalEvent.target.parentElement.classList.contains('e-rte-bulletformatlist-dropdown') || args.originalEvent.target.parentElement.classList.contains('e-rte-numberformatlist-dropdown'))) {
5077
- args.item.command = args.item.subCommand = null;
5086
+ return;
5078
5087
  }
5079
5088
  }
5080
5089
  this.parent.notify(htmlToolbarClick, args);
@@ -5156,6 +5165,9 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
5156
5165
  if (e.target.classList.contains('e-hor-nav')) {
5157
5166
  this.adjustContentHeight(e.target, true);
5158
5167
  }
5168
+ if (!isNullOrUndefined(e.target) && (e.target.classList.contains("e-rte-fontcolor-dropdown") || e.target.classList.contains("e-rte-backgroundcolor-dropdown"))) {
5169
+ this.parent.notify(showColorPicker, { toolbarClick: e.target.classList.contains("e-rte-fontcolor-dropdown") ? "fontcolor" : "backgroundcolor" });
5170
+ }
5159
5171
  }
5160
5172
  };
5161
5173
  Toolbar$$1.prototype.createToolbarElement = function () {
@@ -5685,7 +5697,7 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
5685
5697
  else if (Browser.isDevice || this.parent.inlineMode.enable) {
5686
5698
  this.isToolbar = true;
5687
5699
  }
5688
- if (isNullOrUndefined(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand) {
5700
+ if (isNullOrUndefined(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand && this.parent.toolbarModule.getExpandTBarPopHeight() === 0) {
5689
5701
  removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
5690
5702
  }
5691
5703
  };
@@ -6216,6 +6228,15 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
6216
6228
  this.parent.on(destroyColorPicker, this.destroyColorPicker, this);
6217
6229
  this.parent.on(modelChanged, this.onPropertyChanged, this);
6218
6230
  this.parent.on(bindCssClass, this.setCssClass, this);
6231
+ this.parent.on(showColorPicker, this.showColorPicker, this);
6232
+ };
6233
+ ColorPickerInput.prototype.showColorPicker = function (e) {
6234
+ if (!isNullOrUndefined(this.fontColorPicker) && (e.toolbarClick === "fontcolor")) {
6235
+ this.fontColorDropDown.toggle();
6236
+ }
6237
+ else if (!isNullOrUndefined(this.backgroundColorPicker) && (e.toolbarClick === "backgroundcolor")) {
6238
+ this.backgroundColorDropDown.toggle();
6239
+ }
6219
6240
  };
6220
6241
  ColorPickerInput.prototype.onPropertyChanged = function (model) {
6221
6242
  var newProp = model.newProp;
@@ -6289,6 +6310,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
6289
6310
  this.parent.off(destroyColorPicker, this.destroyColorPicker);
6290
6311
  this.parent.off(modelChanged, this.onPropertyChanged);
6291
6312
  this.parent.off(bindCssClass, this.setCssClass);
6313
+ this.parent.off(showColorPicker, this.showColorPicker);
6292
6314
  };
6293
6315
  return ColorPickerInput;
6294
6316
  }());
@@ -6364,7 +6386,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
6364
6386
  e.target.classList.contains('e-imgbreak')) ? false : true;
6365
6387
  var target = !isNullOrUndefined(imgWrapper) ? imgWrapper : e.target;
6366
6388
  addClass([this.toolbarElement], [CLS_RM_WHITE_SPACE]);
6367
- var targetOffsetTop = target.offsetTop;
6389
+ var targetOffsetTop = (target.classList.contains("e-rte-audio")) ? target.parentElement.offsetTop : target.offsetTop;
6368
6390
  var parentOffsetTop = window.pageYOffset + e.parentData.top;
6369
6391
  if ((targetOffsetTop - e.editTop) > e.popHeight) {
6370
6392
  y = parentOffsetTop + e.tBarElementHeight + (targetOffsetTop - e.editTop) - e.popHeight - 5;
@@ -6377,7 +6399,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
6377
6399
  }
6378
6400
  target = isAligned ? e.target : target;
6379
6401
  if (target.offsetWidth > e.popWidth) {
6380
- x = (target.offsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + target.offsetLeft;
6402
+ x = (target.offsetWidth / 2) - (e.popWidth / 2) + e.parentData.left + ((target.classList.contains("e-rte-audio")) ? target.parentElement.offsetLeft : target.offsetLeft);
6381
6403
  }
6382
6404
  else {
6383
6405
  x = e.parentData.left + target.offsetLeft;
@@ -6549,9 +6571,9 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
6549
6571
  parentData: parent_1.getBoundingClientRect(),
6550
6572
  tBarElementHeight: tBarHeight
6551
6573
  };
6552
- if (target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
6574
+ if ((target.tagName === 'IMG' || target.tagName === 'AUDIO' || target.tagName === 'VIDEO' || target.tagName === 'IFRAME' || (target.classList &&
6553
6575
  (target.classList.contains(CLS_AUDIOWRAP) || target.classList.contains(CLS_CLICKELEM) ||
6554
- target.classList.contains(CLS_VID_CLICK_ELEM)))) {
6576
+ target.classList.contains(CLS_VID_CLICK_ELEM)))) && (x == beforeQuickToolbarArgs.positionX || y == beforeQuickToolbarArgs.positionY)) {
6555
6577
  _this.setPosition(showPopupData);
6556
6578
  }
6557
6579
  if (!_this.parent.inlineMode.enable) {
@@ -7833,7 +7855,7 @@ function updateTextNode$1(value, enterAction) {
7833
7855
  tableElm[i].classList.add('e-rte-paste-table');
7834
7856
  if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
7835
7857
  tableElm[i].classList.remove('e-rte-paste-word-table');
7836
- continue; // Sking the removal of the border if the source is from word.
7858
+ continue; // Skiping the removal of the border if the source is from word.
7837
7859
  }
7838
7860
  else if (tableElm[i].classList.contains('e-rte-paste-excel-table')) {
7839
7861
  tableElm[i].classList.remove('e-rte-paste-excel-table');
@@ -7867,6 +7889,9 @@ function updateTextNode$1(value, enterAction) {
7867
7889
  }
7868
7890
  var imageElm = resultElm.querySelectorAll('img');
7869
7891
  for (var i = 0; i < imageElm.length; i++) {
7892
+ if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
7893
+ continue; // Should not add the class if the image is Broken.
7894
+ }
7870
7895
  if (!imageElm[i].classList.contains('e-rte-image')) {
7871
7896
  imageElm[i].classList.add('e-rte-image');
7872
7897
  }
@@ -11782,9 +11807,11 @@ var DOMNode = /** @__PURE__ @class */ (function () {
11782
11807
  var range = save.range;
11783
11808
  var startChildNodes = range.startContainer.childNodes;
11784
11809
  var isTableStart = startChildNodes.length > 1 && startChildNodes[0].nodeName === 'TABLE';
11810
+ var isImgOnlySelected = startChildNodes.length > 1 && startChildNodes[0].nodeName === 'IMAGE' &&
11811
+ range.endOffset === 1 && range.endContainer.nodeName === '#text' && range.endContainer.textContent.length === 0;
11785
11812
  var start = ((isTableStart ? getLastTextNode(startChildNodes[range.startOffset + 1]) :
11786
11813
  startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) : range.startOffset]) || range.startContainer);
11787
- var end = (range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset]
11814
+ var end = (range.endContainer.childNodes[(range.endOffset > 0) ? (isImgOnlySelected ? range.endOffset : (range.endOffset - 1)) : range.endOffset]
11788
11815
  || range.endContainer);
11789
11816
  if ((start.nodeType === Node.ELEMENT_NODE && end.nodeType === Node.ELEMENT_NODE) && (start.contains(end) || end.contains(start))) {
11790
11817
  var existNode = start.contains(end) ? start : end;
@@ -12133,14 +12160,21 @@ var Lists = /** @__PURE__ @class */ (function () {
12133
12160
  var preElementOLTest = this.testList(preElement);
12134
12161
  var nextElementOLTest = this.testList(nextElement);
12135
12162
  if (!preElementOLTest && !nextElementOLTest && preElemULStart !== '*' && nextElemULStart !== '*') {
12163
+ var brElement = createElement('br');
12136
12164
  if (startElementOLTest) {
12137
12165
  range.startContainer.textContent = range.startContainer.textContent.slice(range.startOffset, range.startContainer.textContent.length);
12166
+ if (range.startContainer.nodeName === '#text' && range.startContainer.textContent.length === 0) {
12167
+ this.parent.domNode.insertAfter(brElement, range.startContainer);
12168
+ }
12138
12169
  this.applyListsHandler({ subCommand: 'OL', callBack: e.callBack });
12139
12170
  e.event.preventDefault();
12140
12171
  }
12141
12172
  else if (range.startContainer.textContent.replace(/\u200B/g, '').slice(0, range.startOffset).trim() === '*' ||
12142
12173
  range.startContainer.textContent.replace(/\u200B/g, '').slice(0, range.startOffset).trim() === '-') {
12143
12174
  range.startContainer.textContent = range.startContainer.textContent.slice(range.startOffset, range.startContainer.textContent.length);
12175
+ if (range.startContainer.nodeName === '#text' && range.startContainer.textContent.length === 0) {
12176
+ this.parent.domNode.insertAfter(brElement, range.startContainer);
12177
+ }
12144
12178
  this.applyListsHandler({ subCommand: 'UL', callBack: e.callBack });
12145
12179
  e.event.preventDefault();
12146
12180
  }
@@ -12251,11 +12285,11 @@ var Lists = /** @__PURE__ @class */ (function () {
12251
12285
  };
12252
12286
  Lists.prototype.removeList = function (range, e) {
12253
12287
  var startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
12254
- var endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
12288
+ var endNode = (!isNullOrUndefined(range.endContainer.parentElement.closest('li')) && range.endContainer.parentElement.closest('li').childElementCount > 1 && range.endContainer.nodeName === '#text') ? range.endContainer : this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
12255
12289
  startNode = startNode.nodeName === 'BR' ? startNode.parentElement : startNode;
12256
12290
  endNode = endNode.nodeName === 'BR' ? endNode.parentElement : endNode;
12257
12291
  startNode = startNode.nodeName !== 'LI' && !isNullOrUndefined(startNode.closest('LI')) ? startNode.closest('LI') : startNode;
12258
- endNode = endNode.nodeName !== 'LI' && !isNullOrUndefined(endNode.closest('LI')) ? endNode.closest('LI') : endNode;
12292
+ endNode = endNode.nodeName !== 'LI' && endNode.nodeName !== '#text' && !isNullOrUndefined(endNode.closest('LI')) ? endNode.closest('LI') : endNode;
12259
12293
  if (((range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'LI') &&
12260
12294
  isNullOrUndefined(endNode.nextElementSibling) && endNode.textContent.length === range.endOffset &&
12261
12295
  isNullOrUndefined(startNode.previousElementSibling) && range.startOffset === 0) ||
@@ -12660,7 +12694,7 @@ var Lists = /** @__PURE__ @class */ (function () {
12660
12694
  }
12661
12695
  };
12662
12696
  Lists.prototype.applyLists = function (elements, type, selector, item, e) {
12663
- if (this.isRevert(elements, type, item) && isNullOrUndefined(item)) {
12697
+ if (this.isRevert(elements, type, item) && isNullOrUndefined(item) || (!isNullOrUndefined(item) && item.listStyle === 'none')) {
12664
12698
  this.revertList(elements, e);
12665
12699
  this.removeEmptyListElements();
12666
12700
  }
@@ -12733,6 +12767,9 @@ var Lists = /** @__PURE__ @class */ (function () {
12733
12767
  isNullOrUndefined(item) && nodes[i].parentNode.style.listStyleType !== '') {
12734
12768
  isRevert = false;
12735
12769
  }
12770
+ if (nodes[i].parentNode.tagName === tagName && nodes[i].parentNode.style.listStyleType !== '') {
12771
+ isRevert = true;
12772
+ }
12736
12773
  }
12737
12774
  return isRevert;
12738
12775
  };
@@ -12845,66 +12882,78 @@ var Lists = /** @__PURE__ @class */ (function () {
12845
12882
  var viewNode = [];
12846
12883
  for (var i = 0; i < elements.length; i++) {
12847
12884
  var element = elements[i];
12848
- if (this.domNode.contents(element)[0].nodeType === 3 && this.domNode.contents(element)[0].textContent.trim().length === 0) {
12849
- detach(this.domNode.contents(element)[0]);
12850
- }
12851
- var parentNode = elements[i].parentNode;
12852
- var className = element.getAttribute('class');
12853
- if (temp.length === 0) {
12854
- var siblingList = elements[i].querySelectorAll('ul, ol');
12855
- var firstNode = siblingList[0];
12856
- if (firstNode) {
12857
- var child = firstNode
12858
- .querySelectorAll('li');
12859
- if (child) {
12860
- var nestedElement = createElement(firstNode.tagName);
12861
- append([nestedElement], firstNode.parentNode);
12862
- var nestedElementLI = createElement('li', { styles: 'list-style-type: none;' });
12863
- append([nestedElementLI], nestedElement);
12864
- append([firstNode], nestedElementLI);
12865
- }
12866
- }
12867
- }
12868
- if (element.parentNode.insertBefore(this.closeTag(parentNode.tagName), element), 'LI' === parentNode.parentNode.tagName || 'OL' === parentNode.parentNode.tagName ||
12869
- 'UL' === parentNode.parentNode.tagName) {
12870
- element.parentNode.insertBefore(this.closeTag('LI'), element);
12871
- }
12872
- else {
12873
- if (DEFAULT_TAG && 0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
12874
- var wrapperclass = isNullOrUndefined(className) ? ' class="e-rte-wrap-inner"' :
12875
- ' class="' + className + ' e-rte-wrap-inner"';
12876
- var wrapper = '<' + DEFAULT_TAG + wrapperclass +
12877
- this.domNode.attributes(parentNode) + '></' + DEFAULT_TAG + '>';
12878
- if (e.enterAction !== 'BR') {
12879
- this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
12885
+ if ((isNullOrUndefined(e.item)) || ((element.nodeName === 'LI' && e.item.listStyle === 'none'))) {
12886
+ if (this.domNode.contents(element)[0].nodeType === 3 && this.domNode.contents(element)[0].textContent.trim().length === 0) {
12887
+ detach(this.domNode.contents(element)[0]);
12888
+ }
12889
+ var parentNode = elements[i].parentNode;
12890
+ var className = element.getAttribute('class');
12891
+ if (temp.length === 0) {
12892
+ var siblingList = elements[i].querySelectorAll('ul, ol');
12893
+ var firstNode = siblingList[0];
12894
+ if (firstNode) {
12895
+ var child = firstNode
12896
+ .querySelectorAll('li');
12897
+ if (child) {
12898
+ var nestedElement = createElement(firstNode.tagName);
12899
+ append([nestedElement], firstNode.parentNode);
12900
+ var nestedElementLI = createElement('li', { styles: 'list-style-type: none;' });
12901
+ append([nestedElementLI], nestedElement);
12902
+ append([firstNode], nestedElementLI);
12903
+ }
12880
12904
  }
12881
12905
  }
12882
- else if (this.domNode.contents(element)[0].nodeType === 3) {
12883
- var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
12884
- this.domNode.replaceWith(this.domNode.contents(element)[0], replace);
12885
- }
12886
- else if (this.domNode.contents(element)[0].classList.contains(markerClassName.startSelection) ||
12887
- this.domNode.contents(element)[0].classList.contains(markerClassName.endSelection)) {
12888
- var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.domNode.contents(element)[0].outerHTML);
12889
- this.domNode.replaceWith(this.domNode.contents(element)[0], replace);
12906
+ if (element.parentNode.insertBefore(this.closeTag(parentNode.tagName), element), 'LI' === parentNode.parentNode.tagName || 'OL' === parentNode.parentNode.tagName ||
12907
+ 'UL' === parentNode.parentNode.tagName) {
12908
+ element.parentNode.insertBefore(this.closeTag('LI'), element);
12890
12909
  }
12891
12910
  else {
12892
- var childNode = element.firstChild;
12893
- className = childNode.getAttribute('class');
12894
- attributes(childNode, this.domNode.rawAttributes(parentNode));
12895
- if (className && childNode.getAttribute('class')) {
12896
- attributes(childNode, { 'class': className + ' ' + childNode.getAttribute('class') });
12911
+ if (DEFAULT_TAG && 0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
12912
+ var wrapperclass = isNullOrUndefined(className) ? ' class="e-rte-wrap-inner"' :
12913
+ ' class="' + className + ' e-rte-wrap-inner"';
12914
+ var parentElement = parentNode;
12915
+ if (!isNullOrUndefined(parentElement.style.listStyleType)) {
12916
+ parentNode.style.removeProperty("list-style-type");
12917
+ }
12918
+ if (!isNullOrUndefined(parentElement.style.listStyleImage)) {
12919
+ parentNode.style.removeProperty("list-style-image");
12920
+ }
12921
+ if (parentElement.style.length === 0) {
12922
+ parentNode.removeAttribute("style");
12923
+ }
12924
+ var wrapper = '<' + DEFAULT_TAG + wrapperclass +
12925
+ this.domNode.attributes(parentElement) + '></' + DEFAULT_TAG + '>';
12926
+ if (e.enterAction !== 'BR') {
12927
+ this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
12928
+ }
12929
+ }
12930
+ else if (this.domNode.contents(element)[0].nodeType === 3) {
12931
+ var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
12932
+ this.domNode.replaceWith(this.domNode.contents(element)[0], replace);
12897
12933
  }
12934
+ else if (this.domNode.contents(element)[0].classList.contains(markerClassName.startSelection) ||
12935
+ this.domNode.contents(element)[0].classList.contains(markerClassName.endSelection)) {
12936
+ var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.domNode.contents(element)[0].outerHTML);
12937
+ this.domNode.replaceWith(this.domNode.contents(element)[0], replace);
12938
+ }
12939
+ else {
12940
+ var childNode = element.firstChild;
12941
+ className = childNode.getAttribute('class');
12942
+ attributes(childNode, this.domNode.rawAttributes(parentNode));
12943
+ if (className && childNode.getAttribute('class')) {
12944
+ attributes(childNode, { 'class': className + ' ' + childNode.getAttribute('class') });
12945
+ }
12946
+ }
12947
+ append([this.openTag('LI')], element);
12948
+ prepend([this.closeTag('LI')], element);
12949
+ }
12950
+ this.domNode.insertAfter(this.openTag(parentNode.tagName), element);
12951
+ if (parentNode.parentNode.tagName === 'LI') {
12952
+ parentNode = parentNode.parentNode.parentNode;
12953
+ }
12954
+ if (viewNode.indexOf(parentNode) < 0) {
12955
+ viewNode.push(parentNode);
12898
12956
  }
12899
- append([this.openTag('LI')], element);
12900
- prepend([this.closeTag('LI')], element);
12901
- }
12902
- this.domNode.insertAfter(this.openTag(parentNode.tagName), element);
12903
- if (parentNode.parentNode.tagName === 'LI') {
12904
- parentNode = parentNode.parentNode.parentNode;
12905
- }
12906
- if (viewNode.indexOf(parentNode) < 0) {
12907
- viewNode.push(parentNode);
12908
12957
  }
12909
12958
  }
12910
12959
  for (var i = 0; i < viewNode.length; i++) {
@@ -13134,7 +13183,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
13134
13183
  else if (len > -1) {
13135
13184
  this.spliceEmptyNode(fragment.childNodes[0], isStart);
13136
13185
  }
13137
- else if (fragment.nodeType !== 3 && fragment.nodeType !== 11 && fragment.nodeName !== 'IMG' && !(fragment.classList.contains('e-video-wrap')) && !(fragment.classList.contains('e-audio-wrap'))) {
13186
+ else if (fragment.nodeType !== 3 && fragment.nodeType !== 11 && fragment.nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0) && !(fragment.classList.contains('e-video-wrap')) && !(fragment.classList.contains('e-audio-wrap'))) {
13138
13187
  fragment.parentNode.removeChild(fragment);
13139
13188
  }
13140
13189
  return fragment;
@@ -13268,6 +13317,14 @@ var Formats = /** @__PURE__ @class */ (function () {
13268
13317
  }
13269
13318
  }
13270
13319
  };
13320
+ Formats.prototype.getBlockParent = function (node, endNode) {
13321
+ var currentParent;
13322
+ while (node != endNode) {
13323
+ currentParent = node;
13324
+ node = node.parentElement;
13325
+ }
13326
+ return currentParent;
13327
+ };
13271
13328
  Formats.prototype.onKeyDown = function (e) {
13272
13329
  if (e.event.which === 13) {
13273
13330
  var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
@@ -13277,6 +13334,8 @@ var Formats = /** @__PURE__ @class */ (function () {
13277
13334
  ? range.endContainer : range.endContainer.parentElement;
13278
13335
  var preElem = closest(startCon, 'pre');
13279
13336
  var endPreElem = closest(endCon, 'pre');
13337
+ var blockquoteEle = closest(startCon, 'blockquote');
13338
+ var endBlockquoteEle = closest(endCon, 'blockquote');
13280
13339
  var liParent = !isNullOrUndefined(preElem) && !isNullOrUndefined(preElem.parentElement) && preElem.parentElement.tagName === 'LI';
13281
13340
  if (liParent) {
13282
13341
  return;
@@ -13288,6 +13347,17 @@ var Formats = /** @__PURE__ @class */ (function () {
13288
13347
  range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
13289
13348
  this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument, endCon, 0);
13290
13349
  }
13350
+ if (e.event.which === 13 && ((!isNullOrUndefined(blockquoteEle) && !isNullOrUndefined(endBlockquoteEle)) || (!isNullOrUndefined(blockquoteEle) && isNullOrUndefined(endBlockquoteEle)))) {
13351
+ var startParent = this.getBlockParent(range.startContainer, blockquoteEle);
13352
+ if ((startParent.textContent.charCodeAt(0) === 8203 &&
13353
+ startParent.textContent.length === 1) || startParent.textContent.length === 0) {
13354
+ if (isNullOrUndefined(startParent.nextSibling) && ((startParent.previousSibling.textContent.charCodeAt(0) === 8203 &&
13355
+ startParent.previousSibling.textContent.length === 1) || startParent.previousSibling.textContent.length === 0)) {
13356
+ e.event.preventDefault();
13357
+ this.paraFocus(startParent.parentElement); //Revert from blockquotes while pressing enter key
13358
+ }
13359
+ }
13360
+ }
13291
13361
  if (e.event.which === 13 && !isNullOrUndefined(preElem) && !isNullOrUndefined(endPreElem)) {
13292
13362
  e.event.preventDefault();
13293
13363
  this.deleteContent(range);
@@ -13511,7 +13581,7 @@ var Formats = /** @__PURE__ @class */ (function () {
13511
13581
  replaceHTML = parentNode.innerHTML;
13512
13582
  }
13513
13583
  if ((e.subCommand.toLowerCase() === parentNode.tagName.toLowerCase() &&
13514
- (e.subCommand.toLowerCase() !== 'pre' ||
13584
+ (e.subCommand.toLowerCase() !== 'pre' && e.subCommand.toLowerCase() !== 'blockquote' ||
13515
13585
  (!isNullOrUndefined(e.exeValue) && e.exeValue.name === 'dropDownSelect'))) ||
13516
13586
  isNullOrUndefined(parentNode.parentNode) ||
13517
13587
  (parentNode.tagName === 'TABLE' && e.subCommand.toLowerCase() === 'pre')) {
@@ -13520,7 +13590,21 @@ var Formats = /** @__PURE__ @class */ (function () {
13520
13590
  this.cleanFormats(parentNode, e.subCommand);
13521
13591
  var replaceNode = (e.subCommand.toLowerCase() === 'pre' && parentNode.tagName.toLowerCase() === 'pre') ?
13522
13592
  'p' : e.subCommand;
13523
- var replaceTag = this.parent.domNode.createTagString(replaceNode, parentNode, replaceHTML.replace(/>\s+</g, '><'));
13593
+ var isToggleBlockquoteList = e.subCommand.toLowerCase() === parentNode.tagName.toLowerCase() &&
13594
+ e.subCommand.toLowerCase() === 'blockquote' && this.parent.domNode.isList(parentNode.firstElementChild);
13595
+ var isToggleBlockquote = e.subCommand.toLowerCase() === parentNode.tagName.toLowerCase()
13596
+ && e.subCommand.toLowerCase() === 'blockquote';
13597
+ var replaceTag = void 0;
13598
+ if (isToggleBlockquoteList) {
13599
+ replaceTag = replaceHTML.replace(/>\s+</g, '><');
13600
+ }
13601
+ else if (isToggleBlockquote) {
13602
+ var tagWrap = (e.enterAction == 'BR' || e.enterAction == 'P') ? 'P' : e.enterAction;
13603
+ replaceTag = this.parent.domNode.createTagString(tagWrap, parentNode, replaceHTML.replace(/>\s+</g, '><'));
13604
+ }
13605
+ else {
13606
+ replaceTag = this.parent.domNode.createTagString(replaceNode, parentNode, replaceHTML.replace(/>\s+</g, '><'));
13607
+ }
13524
13608
  if (parentNode.tagName === 'LI') {
13525
13609
  parentNode.innerHTML = '';
13526
13610
  parentNode.insertAdjacentHTML('beforeend', replaceTag);
@@ -13832,12 +13916,17 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
13832
13916
  preNode.parentNode.replaceChild(fragment, preNode);
13833
13917
  }
13834
13918
  else {
13919
+ var startContainerParent = range.startContainer.parentNode;
13920
+ // Get the index of the start container among its siblings
13921
+ var startIndex = Array.prototype.indexOf.call(startContainerParent.childNodes, range.startContainer);
13835
13922
  range.deleteContents();
13923
+ range.setStart(startContainerParent, startIndex);
13924
+ range.setEnd(startContainerParent, startIndex);
13836
13925
  if (!isNullOrUndefined(lasNode)) {
13837
13926
  detach(lasNode);
13838
13927
  }
13839
13928
  // eslint-disable-next-line
13840
- !isNullOrUndefined(sibNode) ? sibNode.parentNode.appendChild(fragment) : editNode.appendChild(fragment);
13929
+ !isNullOrUndefined(sibNode) ? (sibNode.parentNode === editNode ? sibNode.appendChild(fragment) : sibNode.parentNode.appendChild(fragment)) : range.insertNode(fragment);
13841
13930
  }
13842
13931
  }
13843
13932
  else {
@@ -14062,7 +14151,15 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14062
14151
  };
14063
14152
  InsertHtml.imageFocus = function (node, nodeSelection, docElement) {
14064
14153
  var focusNode = document.createTextNode(' ');
14065
- node.parentNode.insertBefore(focusNode, node.nextSibling);
14154
+ if (node.parentNode && node.parentNode.nodeName === 'A') {
14155
+ var anchorTag = node.parentNode;
14156
+ var parentNode = anchorTag.parentNode;
14157
+ parentNode.insertBefore(focusNode, anchorTag.nextSibling);
14158
+ parentNode.insertBefore(node, focusNode);
14159
+ }
14160
+ else {
14161
+ node.parentNode.insertBefore(focusNode, node.nextSibling);
14162
+ }
14066
14163
  nodeSelection.setSelectionText(docElement, node.nextSibling, node.nextSibling, 0, 0);
14067
14164
  };
14068
14165
  // eslint-disable-next-line
@@ -15999,7 +16096,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
15999
16096
  var eleArray = elements;
16000
16097
  //eslint-disable-next-line
16001
16098
  if (min < (max = Math.min(max, eleArray[0].length - 1))) {
16002
- for (colIndex === min; colIndex <= max; colIndex++) {
16099
+ for (colIndex = min; colIndex <= max; colIndex++) {
16003
16100
  // eslint-disable-next-line
16004
16101
  if (!(min < colIndex && eleArray[0][colIndex] === eleArray[0][colIndex - 1]) && 1 < (index =
16005
16102
  Math.min(parseInt(eleArray[0][colIndex].getAttribute('colspan'), 10) || 1, max - min + 1)) &&
@@ -16686,6 +16783,29 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
16686
16783
  var nodeCutter = new NodeCutter();
16687
16784
  var isFormatted = new IsFormatted();
16688
16785
  var range = domSelection.getRange(docElement);
16786
+ var currentAnchorNode = range.startContainer.parentElement;
16787
+ if (range.collapsed && !isNullOrUndefined(currentAnchorNode) &&
16788
+ currentAnchorNode.tagName === 'A' &&
16789
+ (range.startOffset === currentAnchorNode.textContent.length || range.startOffset === 0)) {
16790
+ var emptyTextNode = document.createTextNode('');
16791
+ if (range.startOffset === 0) {
16792
+ currentAnchorNode.parentNode.insertBefore(emptyTextNode, currentAnchorNode);
16793
+ }
16794
+ else {
16795
+ if (!isNullOrUndefined(currentAnchorNode.nextSibling)) {
16796
+ currentAnchorNode.parentElement.insertBefore(emptyTextNode, currentAnchorNode.nextSibling);
16797
+ }
16798
+ else {
16799
+ currentAnchorNode.parentNode.appendChild(emptyTextNode);
16800
+ }
16801
+ }
16802
+ // Set the range to the empty text node
16803
+ var newRange = docElement.createRange();
16804
+ range.setStart(emptyTextNode, 0);
16805
+ range.setEnd(emptyTextNode, 0);
16806
+ range.collapse(true);
16807
+ domSelection.setRange(docElement, newRange);
16808
+ }
16689
16809
  if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer === range.endContainer && !isNullOrUndefined(endNode) && range.startContainer === endNode) {
16690
16810
  var startChildNodes = range.startContainer.childNodes;
16691
16811
  var startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) :
@@ -17061,7 +17181,10 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
17061
17181
  }
17062
17182
  var num = index;
17063
17183
  var liChildContent = '';
17064
- while (num >= 0 && !isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' && liElement.textContent.replace('/\u200B/g', '').trim().includes(nodes[num].textContent.trim())) {
17184
+ /* eslint-disable security/detect-object-injection */
17185
+ while (num >= 0 && !isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' && liElement.contains(nodes[num]) &&
17186
+ liElement.textContent.replace('/\u200B/g', '').trim().includes(nodes[num].textContent.trim())) {
17187
+ /* eslint-enable security/detect-object-injection */
17065
17188
  liChildContent = ' ' + nodes[num].textContent.trim() + liChildContent;
17066
17189
  num--;
17067
17190
  }
@@ -17133,6 +17256,23 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
17133
17256
  parentElement = parentElement.parentElement;
17134
17257
  liElement = parentElement;
17135
17258
  }
17259
+ if (format === 'fontcolor') {
17260
+ var parentElem = nodes[index].parentElement;
17261
+ if (!isNullOrUndefined(parentElem) && parentElem.childNodes) {
17262
+ for (var i = 0; i < parentElem.childNodes.length; i++) {
17263
+ if (this.concatenateTextExcludingList(nodes, index) === nodes[index].textContent) {
17264
+ if (parentElem.tagName === 'LI') {
17265
+ parentElem.style.color = value;
17266
+ }
17267
+ }
17268
+ // eslint-disable-next-line
17269
+ var childElement = parentElem.childNodes[i];
17270
+ if (childElement.tagName === 'OL' || childElement.tagName === 'UL') {
17271
+ childElement.style.color = 'initial';
17272
+ }
17273
+ }
17274
+ }
17275
+ }
17136
17276
  if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
17137
17277
  liElement.textContent.trim() === nodes[index].textContent.trim()) {
17138
17278
  if (format === 'fontsize') {
@@ -17432,6 +17572,18 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
17432
17572
  }
17433
17573
  }
17434
17574
  };
17575
+ SelectionCommands.concatenateTextExcludingList = function (nodes, index) {
17576
+ var result = '';
17577
+ var parentNode = nodes[index].parentElement;
17578
+ for (var i = 0; i < parentNode.childNodes.length; i++) {
17579
+ // eslint-disable-next-line
17580
+ var childNode = parentNode.childNodes[i];
17581
+ if ((childNode.nodeType === 3) || (childNode.nodeType === 1 && (childNode.tagName !== 'OL' && childNode.tagName !== 'UL'))) {
17582
+ result += childNode.textContent;
17583
+ }
17584
+ }
17585
+ return result;
17586
+ };
17435
17587
  SelectionCommands.enterAction = 'P';
17436
17588
  return SelectionCommands;
17437
17589
  }());
@@ -18149,7 +18301,6 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18149
18301
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
18150
18302
  pattern4.test(tempHTMLContent)) {
18151
18303
  var source = this.findSource(elm);
18152
- this.imageConversion(elm, rtfData);
18153
18304
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
18154
18305
  this.addListClass(elm);
18155
18306
  listNodes = this.cleanUp(elm, listNodes);
@@ -18157,6 +18308,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18157
18308
  listNodes[0].parentElement.tagName !== 'OL') {
18158
18309
  this.listConverter(listNodes);
18159
18310
  }
18311
+ this.imageConversion(elm, rtfData);
18160
18312
  this.cleanList(elm, 'UL');
18161
18313
  this.cleanList(elm, 'OL');
18162
18314
  this.styleCorrection(elm, wordPasteStyleConfig);
@@ -18165,11 +18317,11 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18165
18317
  this.removeEmptyElements(elm);
18166
18318
  this.removeEmptyAnchorTag(elm);
18167
18319
  this.breakLineAddition(elm);
18320
+ this.processMargin(elm);
18168
18321
  this.removeClassName(elm);
18169
18322
  if (pattern4.test(tempHTMLContent)) {
18170
18323
  this.addTableBorderClass(elm);
18171
18324
  }
18172
- this.processMargin(elm);
18173
18325
  e.callBack(elm.innerHTML, this.cropImageDimensions, source);
18174
18326
  }
18175
18327
  else {
@@ -18240,8 +18392,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18240
18392
  imgElem[i].getAttribute('v:shapes').indexOf('Graphic') < 0 &&
18241
18393
  imgElem[i].getAttribute('v:shapes').indexOf('_x0000_s') < 0 &&
18242
18394
  imgElem[i].getAttribute('v:shapes').indexOf('_x0000_i') < 0) {
18243
- detach(imgElem[i]);
18395
+ imgElem[i].classList.add('e-rte-image-unsupported');
18244
18396
  }
18397
+ imgElem[i].removeAttribute('v:shapes');
18245
18398
  }
18246
18399
  imgElem = elm.querySelectorAll('img');
18247
18400
  var imgSrc = [];
@@ -18271,6 +18424,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18271
18424
  });
18272
18425
  }
18273
18426
  }
18427
+ imgElem = elm.querySelectorAll('img:not(.e-rte-image-unsupported');
18274
18428
  for (var i = 0; i < imgElem.length; i++) {
18275
18429
  if (imgSrc[i].match(linkRegex)) {
18276
18430
  imgElem[i].setAttribute('src', imgSrc[i]);
@@ -18281,7 +18435,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18281
18435
  }
18282
18436
  else {
18283
18437
  imgElem[i].removeAttribute('src');
18284
- imgElem[i].setAttribute('alt', 'Unsupported file format');
18438
+ imgElem[i].classList.add('e-rte-image-unsupported');
18285
18439
  }
18286
18440
  if (!isNullOrUndefined(base64Src[i]) && base64Src[i].isCroppedImage) {
18287
18441
  imgElem[i].classList.add('e-img-cropped');
@@ -18289,6 +18443,10 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18289
18443
  }
18290
18444
  imgElem[i].setAttribute('id', 'msWordImg-' + imgName[i]);
18291
18445
  }
18446
+ imgElem = elm.querySelectorAll('.e-rte-image-unsupported');
18447
+ for (var i = 0; i < imgElem.length; i++) {
18448
+ imgElem[i].removeAttribute('src');
18449
+ }
18292
18450
  }
18293
18451
  };
18294
18452
  MsWordPaste.prototype.checkVShape = function (elm) {
@@ -18362,6 +18520,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18362
18520
  var result = [];
18363
18521
  if (!isNullOrUndefined(fullImg)) {
18364
18522
  for (var i = 0; i < fullImg.length; i++) {
18523
+ if (fullImg[i].indexOf('fIsBullet') !== -1 && fullImg[i].indexOf('wzName') === -1) {
18524
+ continue;
18525
+ }
18365
18526
  var isCroppedImage = false;
18366
18527
  var goalWidth = 0;
18367
18528
  var goalHeight = 0;
@@ -18376,7 +18537,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18376
18537
  else if (fullImg[i].indexOf('\\jpegblip') !== -1) {
18377
18538
  imgType = 'image/jpeg';
18378
18539
  }
18379
- else if (fullImg[i].indexOf('\\picprop') !== -1) {
18540
+ else if (fullImg[i].indexOf('\\emfblip') !== -1) {
18380
18541
  imgType = null;
18381
18542
  }
18382
18543
  else {
@@ -18416,7 +18577,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18416
18577
  return parseInt(result, 10);
18417
18578
  };
18418
18579
  MsWordPaste.prototype.removeClassName = function (elm) {
18419
- var elmWithClass = elm.querySelectorAll('*[class]:not(.e-img-cropped)');
18580
+ var elmWithClass = elm.querySelectorAll('*[class]:not(.e-img-cropped):not(.e-rte-image-unsupported)');
18420
18581
  for (var i = 0; i < elmWithClass.length; i++) {
18421
18582
  elmWithClass[i].removeAttribute('class');
18422
18583
  }
@@ -18689,6 +18850,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18689
18850
  MsWordPaste.prototype.listConverter = function (listNodes) {
18690
18851
  var level;
18691
18852
  var data = [];
18853
+ var listFormatOverride;
18692
18854
  var collection = [];
18693
18855
  var content = '';
18694
18856
  var stNode;
@@ -18710,6 +18872,17 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18710
18872
  else {
18711
18873
  level = 1;
18712
18874
  }
18875
+ if (content && content.indexOf('mso-list:') !== -1) {
18876
+ var msoListValue = void 0;
18877
+ if (content.match(/mso-list:[^;]+;?/)) {
18878
+ var changedContent = content.replace('\n', '').split(' ').join('');
18879
+ msoListValue = changedContent.match(/mso-list:[^;]+;?/)[0].split(':l');
18880
+ listFormatOverride = isNullOrUndefined(msoListValue) ? null : parseInt(msoListValue[1].split('level')[0], 10);
18881
+ }
18882
+ else {
18883
+ listFormatOverride = null;
18884
+ }
18885
+ }
18713
18886
  this.listContents = [];
18714
18887
  this.getListContent(listNodes[i]);
18715
18888
  var type = void 0;
@@ -18745,9 +18918,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18745
18918
  startAttr = this.lowerGreekNumber.indexOf(this.listContents[0].split('.')[0]) + 1;
18746
18919
  }
18747
18920
  }
18748
- if (listNodes[i].style.marginLeft !== '') {
18749
- styleMarginLeft = listNodes[i].style.marginLeft;
18750
- }
18921
+ }
18922
+ if (listNodes[i].style.marginLeft !== '') {
18923
+ styleMarginLeft = listNodes[i].style.marginLeft;
18751
18924
  }
18752
18925
  var tempNode = [];
18753
18926
  for (var j = 1; j < this.listContents.length; j++) {
@@ -18763,7 +18936,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18763
18936
  currentListStyle = listNodes[i].getAttribute('style');
18764
18937
  }
18765
18938
  collection.push({
18766
- listType: type, content: tempNode, nestedLevel: level, class: currentClassName,
18939
+ listType: type, content: tempNode, nestedLevel: level,
18940
+ listFormatOverride: listFormatOverride, class: currentClassName,
18767
18941
  listStyle: currentListStyle, listStyleTypeName: listStyleType, start: startAttr, styleMarginLeft: styleMarginLeft
18768
18942
  });
18769
18943
  }
@@ -18836,6 +19010,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18836
19010
  var prevList;
18837
19011
  var listCount = 0;
18838
19012
  var elem;
19013
+ var lfo = collection[0].listFormatOverride;
18839
19014
  for (var index = 0; index < collection.length; index++) {
18840
19015
  var listClass = ['MsoListParagraphCxSpFirst', 'MsoListParagraphCxSpMiddle', 'MsoListParagraphCxSpLast'];
18841
19016
  var isNormalList = false;
@@ -18852,16 +19027,24 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18852
19027
  }
18853
19028
  var pElement = createElement('p', { className: 'MsoNormal' });
18854
19029
  pElement.innerHTML = collection[index].content.join(' ');
18855
- if ((collection[index].nestedLevel === 1) && listCount === 0 && collection[index].content) {
19030
+ if ((collection[index].nestedLevel === 1) &&
19031
+ (listCount === 0 || lfo !== collection[index].listFormatOverride) &&
19032
+ collection[index].content) {
18856
19033
  root.appendChild(temp = createElement(collection[index].listType, { className: collection[index].class }));
18857
19034
  prevList = createElement('li');
18858
19035
  prevList.appendChild(pElement);
18859
19036
  temp.appendChild(prevList);
18860
19037
  temp.setAttribute('level', collection[index].nestedLevel.toString());
18861
- temp.style.marginLeft = collection[index].styleMarginLeft;
19038
+ if (collection[index].class !== 'msolistparagraph') {
19039
+ temp.style.marginLeft = collection[index].styleMarginLeft;
19040
+ }
19041
+ else {
19042
+ addClass([temp], 'marginLeftIgnore');
19043
+ }
18862
19044
  temp.style.listStyleType = collection[index].listStyleTypeName;
18863
19045
  }
18864
- else if (collection[index].nestedLevel === pLevel) {
19046
+ else if (collection[index].nestedLevel === pLevel &&
19047
+ lfo === collection[index].listFormatOverride) {
18865
19048
  if (!isNullOrUndefined(prevList) && !isNullOrUndefined(prevList.parentElement)
18866
19049
  && prevList.parentElement.tagName.toLowerCase() === collection[index].listType) {
18867
19050
  prevList.parentElement.appendChild(prevList = createElement('li'));
@@ -18924,6 +19107,12 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18924
19107
  prevList.appendChild(pElement);
18925
19108
  temp.appendChild(prevList);
18926
19109
  temp.setAttribute('level', collection[index].nestedLevel.toString());
19110
+ if (collection[index].class !== 'msolistparagraph') {
19111
+ temp.style.marginLeft = collection[index].styleMarginLeft;
19112
+ }
19113
+ else {
19114
+ addClass([temp], 'marginLeftIgnore');
19115
+ }
18927
19116
  temp.style.listStyleType = collection[index].listStyleTypeName;
18928
19117
  }
18929
19118
  }
@@ -18947,14 +19136,34 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18947
19136
  elem = elem.parentElement;
18948
19137
  if (elem.attributes.getNamedItem('level')) {
18949
19138
  // eslint-disable-next-line
18950
- if (parseInt(elem.attributes.getNamedItem('level').textContent, null) === collection[index].nestedLevel) {
19139
+ if (parseInt(elem.attributes.getNamedItem('level').textContent, null) === collection[index].nestedLevel &&
19140
+ lfo === collection[index].listFormatOverride) {
18951
19141
  prevList = createElement('li');
18952
19142
  prevList.appendChild(pElement);
18953
19143
  elem.appendChild(prevList);
18954
19144
  break;
18955
19145
  // eslint-disable-next-line
18956
19146
  }
18957
- else if (collection[index].nestedLevel > parseInt(elem.attributes.getNamedItem('level').textContent, null)) {
19147
+ else if (parseInt(elem.attributes.getNamedItem('level').textContent, null) === collection[index].nestedLevel &&
19148
+ lfo !== collection[index].listFormatOverride) {
19149
+ temp = createElement(collection[index].listType);
19150
+ prevList = createElement('li');
19151
+ temp.appendChild(prevList);
19152
+ if (collection[index].nestedLevel > 1) {
19153
+ for (var k = 0; k < collection[index].nestedLevel - 1; k++) {
19154
+ prevList.appendChild(temp = createElement(collection[index].listType));
19155
+ prevList = createElement('li');
19156
+ temp.appendChild(prevList);
19157
+ temp.style.listStyleType = 'none';
19158
+ }
19159
+ }
19160
+ prevList.appendChild(pElement);
19161
+ elem.appendChild(temp);
19162
+ temp.setAttribute('level', collection[index].nestedLevel.toString());
19163
+ temp.style.listStyleType = collection[index].listStyleTypeName;
19164
+ break;
19165
+ }
19166
+ else if (collection[index].nestedLevel > parseInt(elem.attributes.getNamedItem('level').textContent, 10)) {
18958
19167
  elem.appendChild(temp = createElement(collection[index].listType));
18959
19168
  prevList = createElement('li');
18960
19169
  prevList.appendChild(pElement);
@@ -18970,8 +19179,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
18970
19179
  prevList.setAttribute('class', collection[index].class);
18971
19180
  prevList.setAttribute('style', (!isNullOrUndefined(collection[index].listStyle) ? collection[index].listStyle : ''));
18972
19181
  pLevel = collection[index].nestedLevel;
19182
+ lfo = collection[index].listFormatOverride;
18973
19183
  listCount++;
18974
- if (!isNullOrUndefined(collection[index].start)) {
19184
+ if (!isNullOrUndefined(collection[index].start && collection[index].start !== 1 && collection[index].listType === 'ol')) {
18975
19185
  temp.setAttribute('start', collection[index].start.toString());
18976
19186
  }
18977
19187
  }
@@ -19008,7 +19218,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19008
19218
  var liChildren = element.querySelectorAll('li');
19009
19219
  if (liChildren.length > 0) {
19010
19220
  for (var i = 0; i < liChildren.length; i++) {
19011
- if (!isNullOrUndefined((liChildren[i]).style.marginLeft)) {
19221
+ if (!isNullOrUndefined((liChildren[i]).style.marginLeft) && !liChildren[i].parentElement.classList.contains('marginLeftIgnore')) {
19012
19222
  (liChildren[i]).style.marginLeft = '';
19013
19223
  }
19014
19224
  }
@@ -19022,6 +19232,17 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19022
19232
  }
19023
19233
  }
19024
19234
  }
19235
+ var ignoredNode = element.querySelectorAll('.marginLeftIgnore li');
19236
+ if (ignoredNode.length > 0) {
19237
+ for (var i = 0; i < ignoredNode.length; i++) {
19238
+ if (!isNullOrUndefined((ignoredNode[i]).style.marginLeft) && (ignoredNode[i]).style.marginLeft !== '') {
19239
+ var marginLeft = (ignoredNode[i]).style.marginLeft;
19240
+ var marginLeftValue = parseFloat(marginLeft.split('in')[0]);
19241
+ var result = marginLeftValue - 0.5;
19242
+ (ignoredNode[i]).style.marginLeft = result.toString() + 'in';
19243
+ }
19244
+ }
19245
+ }
19025
19246
  };
19026
19247
  MsWordPaste.prototype.removeEmptyAnchorTag = function (element) {
19027
19248
  var removableElement = element.querySelectorAll('a:not([href])');
@@ -19877,6 +20098,14 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
19877
20098
  var range = this.parent.nodeSelection.getRange(docElement);
19878
20099
  var isCollapsed = range.collapsed;
19879
20100
  var blockNodes = this.parent.domNode.blockNodes();
20101
+ var isListCopied = this.isListCopied();
20102
+ if (isListCopied) {
20103
+ for (var i = 0; i < blockNodes.length; i++) {
20104
+ if (closest(blockNodes[i], 'li')) {
20105
+ blockNodes[i] = closest(blockNodes[i], 'li');
20106
+ }
20107
+ }
20108
+ }
19880
20109
  var isFullNodeSelected = false;
19881
20110
  if (blockNodes.length === 1) {
19882
20111
  isFullNodeSelected = blockNodes[0].textContent.trim() === range.toString().trim();
@@ -19885,6 +20114,16 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
19885
20114
  this.insertBlockNode(clonedElem, range, docElement, blockNodes);
19886
20115
  }
19887
20116
  };
20117
+ FormatPainterActions.prototype.isListCopied = function () {
20118
+ var isListCopied = false;
20119
+ for (var i = 0; i < this.copyCollection.length; i++) {
20120
+ if (this.copyCollection[i].tagName === 'OL' || this.copyCollection[i].tagName === 'UL') {
20121
+ isListCopied = true;
20122
+ break;
20123
+ }
20124
+ }
20125
+ return isListCopied;
20126
+ };
19888
20127
  FormatPainterActions.prototype.insertBlockNode = function (element, range, docElement, nodes) {
19889
20128
  var domSelection = this.parent.nodeSelection;
19890
20129
  var saveSelection = domSelection.save(range, docElement);
@@ -20594,7 +20833,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
20594
20833
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20595
20834
  };
20596
20835
  })();
20597
- var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
20836
+ var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>";
20598
20837
  /**
20599
20838
  * Content module is used to render Rich Text Editor content
20600
20839
  *
@@ -21018,9 +21257,12 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21018
21257
  var range = this.parent.getRange();
21019
21258
  // eslint-disable-next-line
21020
21259
  var regEx = new RegExp(String.fromCharCode(8203), 'g');
21260
+ var isEmptyNode = range.startContainer === range.endContainer && range.startOffset === range.endOffset &&
21261
+ range.startOffset === 1 && range.startContainer.textContent.length === 1 && range.startContainer.textContent.charCodeAt(0) == 8203 &&
21262
+ range.startContainer.textContent.replace(regEx, '').length === 0;
21021
21263
  var pointer;
21022
21264
  var isRootParent = false;
21023
- if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey) {
21265
+ if (restrictKeys.indexOf(args.keyCode) < 0 && !args.shiftKey && !args.ctrlKey && !args.altKey && !isEmptyNode) {
21024
21266
  pointer = range.startOffset;
21025
21267
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
21026
21268
  range.startContainer.nodeName === '#text' ? range.startContainer.parentElement !== this.parent.inputElement ? range.startContainer.parentElement.classList.add('currentStartMark')
@@ -21143,8 +21385,13 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21143
21385
  else {
21144
21386
  this.parent.notify(enterHandler, { args: e.args });
21145
21387
  var newRange = this.parent.getRange();
21146
- if (!isNullOrUndefined(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text' && this.parent.height !== 'auto') {
21147
- newRange.startContainer.scrollIntoView({ block: "end", inline: "nearest" });
21388
+ if (!isNullOrUndefined(newRange.startContainer) && this.parent.height !== 'auto' && newRange.startContainer.nodeName !== '#text'
21389
+ && !this.parent.iframeSettings.enable && newRange.startContainer.getBoundingClientRect().bottom > this.parent.element.getBoundingClientRect().bottom) {
21390
+ this.parent.element.querySelector('.e-rte-content').scrollTop += newRange.startContainer.getBoundingClientRect().bottom - this.parent.element.getBoundingClientRect().bottom;
21391
+ }
21392
+ else if (!isNullOrUndefined(newRange.startContainer) && this.parent.height === 'auto' && newRange.startContainer.nodeName !== '#text'
21393
+ && !this.parent.iframeSettings.enable && window.innerHeight < newRange.startContainer.getBoundingClientRect().top) {
21394
+ newRange.startContainer.scrollIntoView({ block: 'end', inline: 'nearest' });
21148
21395
  }
21149
21396
  }
21150
21397
  }
@@ -21226,11 +21473,13 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21226
21473
  currentRange.startContainer.previousSibling.nodeName === 'SPAN') {
21227
21474
  isPreviousNotContentEditable = currentRange.startContainer.previousSibling.contentEditable === 'false' ? false : true;
21228
21475
  }
21476
+ var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
21477
+ var isSelectedPositionNotStart = closest(currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer, 'li') ?
21478
+ checkNode.nodeName !== 'li' && isNullOrUndefined(checkNode.previousSibling) : true;
21229
21479
  if (e.args.code === 'Backspace' && e.args.keyCode === 8 && currentRange.startOffset === 0 &&
21230
21480
  currentRange.endOffset === 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.textContent.length > 0 &&
21231
21481
  currentRange.startContainer.parentElement.tagName !== 'TD' && currentRange.startContainer.parentElement.tagName !== 'TH' &&
21232
- isPreviousNotContentEditable) {
21233
- var checkNode = currentRange.startContainer.nodeName === '#text' ? currentRange.startContainer.parentElement : currentRange.startContainer;
21482
+ isPreviousNotContentEditable && isSelectedPositionNotStart) {
21234
21483
  if ((!this.parent.formatter.editorManager.domNode.isBlockNode(checkNode) &&
21235
21484
  !isNullOrUndefined(checkNode.previousSibling) && checkNode.previousSibling.nodeName === 'BR') ||
21236
21485
  (!isNullOrUndefined(currentRange.startContainer.previousSibling) && currentRange.startContainer.previousSibling.nodeName === 'BR')) {
@@ -21242,7 +21491,8 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21242
21491
  if (liElement.previousElementSibling && liElement.previousElementSibling.childElementCount > 0) {
21243
21492
  this.oldRangeElement = liElement.previousElementSibling.lastElementChild.nodeName === 'BR' ?
21244
21493
  liElement.previousElementSibling : liElement.previousElementSibling.lastElementChild;
21245
- if (!isNullOrUndefined(liElement.lastElementChild) && liElement.lastElementChild.nodeName !== 'BR') {
21494
+ if (!isNullOrUndefined(liElement.lastElementChild) && liElement.lastElementChild.nodeName !== 'BR' &&
21495
+ isNullOrUndefined(liElement.lastElementChild.previousSibling)) {
21246
21496
  this.rangeElement = liElement.lastElementChild;
21247
21497
  isLiElement = true;
21248
21498
  }
@@ -21534,9 +21784,11 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21534
21784
  this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
21535
21785
  if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
21536
21786
  this.parent.notify(destroyTooltip, { args: event });
21537
- this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
21538
- this.tooltipTargetEle.removeAttribute('title');
21539
- EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
21787
+ if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
21788
+ this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
21789
+ this.tooltipTargetEle.removeAttribute('title');
21790
+ EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
21791
+ }
21540
21792
  }
21541
21793
  if (item.command !== 'FormatPainter') {
21542
21794
  if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
@@ -21830,6 +22082,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21830
22082
  this.parent.on(pasteClean, this.pasteClean, this);
21831
22083
  this.parent.on(bindCssClass, this.setCssClass, this);
21832
22084
  this.parent.on(destroy, this.destroy, this);
22085
+ this.parent.on(docClick, this.docClick, this);
21833
22086
  };
21834
22087
  PasteCleanup.prototype.destroy = function () {
21835
22088
  this.removeEventListener();
@@ -21841,6 +22094,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21841
22094
  this.parent.off(pasteClean, this.pasteClean);
21842
22095
  this.parent.off(bindCssClass, this.setCssClass);
21843
22096
  this.parent.off(destroy, this.destroy);
22097
+ this.parent.off(docClick, this.docClick);
21844
22098
  };
21845
22099
  PasteCleanup.prototype.pasteClean = function (e) {
21846
22100
  var _this = this;
@@ -21910,6 +22164,12 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
21910
22164
  this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
21911
22165
  var tempDivElem = this.parent.createElement('div');
21912
22166
  tempDivElem.innerHTML = value;
22167
+ var unsupportedImg = tempDivElem.querySelectorAll('.e-rte-image-unsupported');
22168
+ for (var index = 0; index < unsupportedImg.length; index++) {
22169
+ unsupportedImg[index].setAttribute('alt', this.i10n.getConstant('unsupportedImage'));
22170
+ unsupportedImg[index].classList.remove('e-rte-image-unsupported');
22171
+ }
22172
+ value = tempDivElem.innerHTML;
21913
22173
  var isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
21914
22174
  !isNullOrUndefined(tempDivElem.querySelector('table'));
21915
22175
  this.parent.notify(cleanupResizeElements, {
@@ -22192,7 +22452,9 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22192
22452
  });
22193
22453
  popupObj.close();
22194
22454
  imgElem.style.opacity = '1';
22195
- uploadObj.destroy();
22455
+ if (!uploadObj.isDestroyed) {
22456
+ uploadObj.destroy();
22457
+ }
22196
22458
  this.toolbarEnableDisable(false);
22197
22459
  };
22198
22460
  PasteCleanup.prototype.refreshPopup = function (imageElement, popupObj) {
@@ -22343,7 +22605,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22343
22605
  width: '300px',
22344
22606
  height: '265px',
22345
22607
  cssClass: CLS_RTE_DIALOG_MIN_HEIGHT,
22346
- isModal: true,
22608
+ isModal: Browser.isDevice,
22347
22609
  visible: false
22348
22610
  };
22349
22611
  this.dialogObj = this.dialogRenderObj.render(dialogModel);
@@ -22397,13 +22659,22 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22397
22659
  this.updateCss(this.keepRadioButton, e);
22398
22660
  };
22399
22661
  PasteCleanup.prototype.destroyDialog = function (rteDialogWrapper) {
22400
- var rteDialogContainer = this.parent.element.querySelector('.e-dlg-container');
22662
+ var rteDialogContainer = this.parent.element.querySelector('.e-rte-dialog-minheight');
22401
22663
  detach(rteDialogContainer);
22402
22664
  var rteDialogWrapperChildLength = rteDialogWrapper.children.length;
22403
22665
  for (var i = 0; i < rteDialogWrapperChildLength; i++) {
22404
22666
  detach(rteDialogWrapper.children[0]);
22405
22667
  }
22406
22668
  };
22669
+ PasteCleanup.prototype.docClick = function (e) {
22670
+ var target = e.args.target;
22671
+ if (target && target.classList && ((this.dialogObj && !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']')))
22672
+ && (!target.classList.contains('e-toolbar-item'))) {
22673
+ if (this.dialogObj) {
22674
+ this.dialogObj.hide();
22675
+ }
22676
+ }
22677
+ };
22407
22678
  PasteCleanup.prototype.cleanAppleClass = function (elem) {
22408
22679
  var appleClassElem = elem.querySelectorAll('br.Apple-interchange-newline');
22409
22680
  for (var i = 0; i < appleClassElem.length; i++) {
@@ -22477,7 +22748,8 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22477
22748
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
22478
22749
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
22479
22750
  _this.parent.formatter.onSuccess(_this.parent, args);
22480
- if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem)) {
22751
+ if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem) &&
22752
+ returnArgs.imgElem.length > 0) {
22481
22753
  var pasteContent = returnArgs.elements;
22482
22754
  var imageContent = returnArgs.imgElem;
22483
22755
  var lastElementChild = _this.findLastElement(pasteContent[pasteContent.length - 1]);
@@ -22546,6 +22818,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22546
22818
  }
22547
22819
  };
22548
22820
  PasteCleanup.prototype.addTableClass = function (element, source) {
22821
+ source = isNullOrUndefined(source) ? '' : source;
22549
22822
  var tableElement = element.querySelectorAll('table');
22550
22823
  for (var i = 0; i < tableElement.length; i++) {
22551
22824
  if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
@@ -25390,6 +25663,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
25390
25663
  }
25391
25664
  });
25392
25665
  }
25666
+ EventHandler.add(this.contentModule.getDocument(), Browser.touchMoveEvent, this.resizing, this);
25393
25667
  EventHandler.add(this.contentModule.getDocument(), Browser.touchEndEvent, this.resizeEnd, this);
25394
25668
  }
25395
25669
  };
@@ -25441,7 +25715,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
25441
25715
  this.imgResizePos(e, this.imgResizeDiv);
25442
25716
  this.resizeImgDupPos(e);
25443
25717
  this.contentModule.getEditPanel().appendChild(this.imgResizeDiv);
25444
- EventHandler.add(this.contentModule.getDocument(), Browser.touchMoveEvent, this.resizing, this);
25445
25718
  };
25446
25719
  Image.prototype.getPointX = function (e) {
25447
25720
  if (e.touches && e.touches.length) {
@@ -25800,7 +26073,9 @@ var Image$1 = /** @__PURE__ @class */ (function () {
25800
26073
  }
25801
26074
  }
25802
26075
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
25803
- this.undoStack({ subCommand: (originalEvent.keyCode === 90 ? 'undo' : 'redo') });
26076
+ if (this.parent.editorMode !== 'Markdown') {
26077
+ this.undoStack({ subCommand: (originalEvent.keyCode === 90 ? 'undo' : 'redo') });
26078
+ }
25804
26079
  }
25805
26080
  if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
25806
26081
  if (selectNodeEle && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
@@ -26170,7 +26445,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26170
26445
  this.checkBoxObj.createElement = this.parent.createElement;
26171
26446
  this.checkBoxObj.appendTo(linkTarget);
26172
26447
  var target_1 = this.checkBoxObj.checked ? '_blank' : null;
26173
- var imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
26448
+ var imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('imageLinkAriaLabel') : null;
26174
26449
  var linkUpdate = this.i10n.getConstant('dialogUpdate');
26175
26450
  var linkargs_1 = {
26176
26451
  args: e.args,
@@ -26290,14 +26565,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26290
26565
  }
26291
26566
  if (e.selectNode[0].parentElement.nodeName === 'A') {
26292
26567
  proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
26293
- url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
26568
+ url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('imageLinkAriaLabel') : null, selectNode: e.selectNode,
26294
26569
  subCommand: e.args.item.subCommand
26295
26570
  });
26296
26571
  proxy.dialogObj.hide({ returnValue: true });
26297
26572
  return;
26298
26573
  }
26299
26574
  proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
26300
- url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
26575
+ url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('imageLinkAriaLabel') : null, selectNode: e.selectNode,
26301
26576
  subCommand: e.args.item.subCommand, selection: e.selection
26302
26577
  });
26303
26578
  var captionEle = closest(e.selectNode[0], '.e-img-caption');
@@ -26325,7 +26600,29 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26325
26600
  if (this.parent.formatter.getUndoRedoStack().length === 0) {
26326
26601
  this.parent.formatter.saveData();
26327
26602
  }
26328
- e.selection.restore();
26603
+ var restoreStartElement = e.selection.range.startContainer;
26604
+ if (e.selection.range.startContainer.nodeName === 'SPAN' &&
26605
+ restoreStartElement.classList.contains('e-img-wrap') &&
26606
+ restoreStartElement.parentElement.classList.contains('e-img-caption')) {
26607
+ restoreStartElement = restoreStartElement.parentElement;
26608
+ if (!isNullOrUndefined(restoreStartElement.previousSibling)) {
26609
+ var lastNode = restoreStartElement.previousSibling;
26610
+ while (lastNode.nodeName !== '#text' && lastNode.nodeName !== 'BR') {
26611
+ lastNode = lastNode.lastChild;
26612
+ }
26613
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), lastNode, lastNode.nodeName !== 'BR' ? lastNode.textContent.length : 0);
26614
+ }
26615
+ else if (!isNullOrUndefined(restoreStartElement.nextSibling)) {
26616
+ var firstNode = restoreStartElement.nextSibling;
26617
+ while (firstNode.nodeName !== '#text' && firstNode.nodeName !== 'BR') {
26618
+ firstNode = firstNode.firstChild;
26619
+ }
26620
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), firstNode, 0);
26621
+ }
26622
+ }
26623
+ else {
26624
+ e.selection.restore();
26625
+ }
26329
26626
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
26330
26627
  this.removeResizeEle();
26331
26628
  }
@@ -26539,7 +26836,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26539
26836
  animationSettings: { effect: 'None' },
26540
26837
  close: function (event) {
26541
26838
  if (_this.isImgUploaded) {
26542
- _this.uploadObj.removing();
26839
+ _this.uploadObj.remove();
26543
26840
  }
26544
26841
  _this.parent.isBlur = false;
26545
26842
  if (event && event.event.returnValue) {
@@ -26607,9 +26904,6 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26607
26904
  Image.prototype.cancelDialog = function (e) {
26608
26905
  this.parent.isBlur = false;
26609
26906
  this.dialogObj.hide({ returnValue: true });
26610
- if (this.isImgUploaded) {
26611
- this.uploadObj.removing();
26612
- }
26613
26907
  };
26614
26908
  Image.prototype.onDocumentClick = function (e) {
26615
26909
  var target = e.target;
@@ -30052,7 +30346,6 @@ var Table = /** @__PURE__ @class */ (function () {
30052
30346
  this.pageY = null;
30053
30347
  this.moveEle = null;
30054
30348
  this.currentColumnResize = '';
30055
- this.currentMarginLeft = 0;
30056
30349
  this.parent = parent;
30057
30350
  this.rteID = parent.element.id;
30058
30351
  this.l10n = serviceLocator.getService('rteLocale');
@@ -30668,7 +30961,7 @@ var Table = /** @__PURE__ @class */ (function () {
30668
30961
  };
30669
30962
  Table.prototype.tableResizeEleCreation = function (table, e) {
30670
30963
  this.parent.preventDefaultResize(e);
30671
- var columns = table.rows[this.calMaxCol(table)].cells;
30964
+ var columns = this.calMaxCol(this.curTable);
30672
30965
  var rows = [];
30673
30966
  for (var i = 0; i < table.rows.length; i++) {
30674
30967
  for (var j = 0; j < table.rows[i].cells.length; j++) {
@@ -30690,11 +30983,11 @@ var Table = /** @__PURE__ @class */ (function () {
30690
30983
  colReEle.classList.add(CLS_RTE_TABLE_RESIZE, CLS_TB_COL_RES);
30691
30984
  if (columns.length === i) {
30692
30985
  colReEle.style.cssText = 'height: ' + height + 'px; width: 4px; top: ' + pos.top +
30693
- 'px; left:' + (pos.left + this.calcPos(columns[i - 1]).left + columns[i - 1].offsetWidth) + 'px;';
30986
+ 'px; left:' + (pos.left + this.calcPos(columns[i - 1]).left + columns[i - 1].offsetWidth - 2) + 'px;';
30694
30987
  }
30695
30988
  else {
30696
30989
  colReEle.style.cssText = 'height: ' + height + 'px; width: 4px; top: ' + pos.top +
30697
- 'px; left:' + (pos.left + this.calcPos(columns[i]).left) + 'px;';
30990
+ 'px; left:' + (pos.left + this.calcPos(columns[i]).left - 2) + 'px;';
30698
30991
  }
30699
30992
  this.contentModule.getEditPanel().appendChild(colReEle);
30700
30993
  }
@@ -30726,7 +31019,7 @@ var Table = /** @__PURE__ @class */ (function () {
30726
31019
  };
30727
31020
  Table.prototype.removeResizeElement = function () {
30728
31021
  var item = this.parent.contentModule.getEditPanel().
30729
- querySelectorAll('.e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper');
31022
+ querySelectorAll('.e-column-resize, .e-row-resize, .e-table-box');
30730
31023
  if (item.length > 0) {
30731
31024
  for (var i = 0; i < item.length; i++) {
30732
31025
  detach(item[i]);
@@ -30800,6 +31093,7 @@ var Table = /** @__PURE__ @class */ (function () {
30800
31093
  if (target.classList.contains(CLS_TB_COL_RES) ||
30801
31094
  target.classList.contains(CLS_TB_ROW_RES) ||
30802
31095
  target.classList.contains(CLS_TB_BOX_RES)) {
31096
+ this.resetResizeHelper(this.curTable);
30803
31097
  e.preventDefault();
30804
31098
  this.parent.preventDefaultResize(e);
30805
31099
  removeClass(this.curTable.querySelectorAll('td,th'), CLS_TABLE_SEL);
@@ -30810,9 +31104,10 @@ var Table = /** @__PURE__ @class */ (function () {
30810
31104
  this.hideTableQuickToolbar();
30811
31105
  if (target.classList.contains(CLS_TB_COL_RES)) {
30812
31106
  this.resizeBtnStat.column = true;
30813
- if (parseInt(target.getAttribute('data-col'), 10) === this.curTable.rows[this.calMaxCol(this.curTable)].cells.length) {
31107
+ if (parseInt(target.getAttribute('data-col'), 10) === this.calMaxCol(this.curTable).length) {
30814
31108
  this.currentColumnResize = 'last';
30815
- this.columnEle = this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(target.getAttribute('data-col'), 10) - 1];
31109
+ this.colIndex = parseInt(target.getAttribute('data-col'), 10) - 1;
31110
+ this.columnEle = this.calMaxCol(this.curTable)[this.colIndex];
30816
31111
  }
30817
31112
  else {
30818
31113
  if (parseInt(target.getAttribute('data-col'), 10) === 0) {
@@ -30820,10 +31115,48 @@ var Table = /** @__PURE__ @class */ (function () {
30820
31115
  }
30821
31116
  else {
30822
31117
  this.currentColumnResize = 'middle';
31118
+ var cellColl = this.curTable.rows[0].cells;
31119
+ var cellCount = 0;
31120
+ for (var cell = 0; cell < cellColl.length; cell++) {
31121
+ cellCount = cellCount + cellColl[cell].colSpan;
31122
+ }
31123
+ var sizes = new Array(cellCount);
31124
+ var colGroupEle = createElement('colgroup');
31125
+ var rowSpanCells = new Map();
31126
+ for (var i = 0; i < this.curTable.rows.length; i++) {
31127
+ var currentColIndex = 0;
31128
+ for (var k = 0; k < this.curTable.rows[i].cells.length; k++) {
31129
+ for (var l = 1; l < this.curTable.rows[i].cells[k].rowSpan; l++) {
31130
+ var key = "" + (i + l) + currentColIndex;
31131
+ rowSpanCells.set(key, this.curTable.rows[i].cells[k]);
31132
+ }
31133
+ var cellIndex = this.getCellIndex(rowSpanCells, i, k);
31134
+ if (cellIndex > currentColIndex) {
31135
+ currentColIndex = cellIndex;
31136
+ }
31137
+ var width = this.curTable.rows[i].cells[k].offsetWidth;
31138
+ if (!sizes[currentColIndex] || width < sizes[currentColIndex]) {
31139
+ sizes[currentColIndex] = width;
31140
+ }
31141
+ currentColIndex += 1 + this.curTable.rows[i].cells[k].colSpan - 1;
31142
+ }
31143
+ }
31144
+ for (var size = 0; size < sizes.length; size++) {
31145
+ var cell = createElement('col');
31146
+ cell.appendChild(createElement('br'));
31147
+ cell.style.width = this.convertPixelToPercentage(sizes[size], parseInt(getComputedStyle(this.curTable).width, 10)) + '%';
31148
+ colGroupEle.appendChild(cell);
31149
+ }
31150
+ this.curTable.insertBefore(colGroupEle, this.curTable.firstChild);
31151
+ for (var i = 0; i < this.curTable.rows.length; i++) {
31152
+ for (var k = 0; k < this.curTable.rows[i].cells.length; k++) {
31153
+ this.curTable.rows[i].cells[k].style.width = '';
31154
+ }
31155
+ }
30823
31156
  }
30824
- this.columnEle = this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(target.getAttribute('data-col'), 10)];
31157
+ this.colIndex = parseInt(target.getAttribute('data-col'), 10);
31158
+ this.columnEle = this.calMaxCol(this.curTable)[this.colIndex];
30825
31159
  }
30826
- this.colIndex = this.columnEle.cellIndex;
30827
31160
  this.moveEle = e.target;
30828
31161
  this.appendHelper();
30829
31162
  }
@@ -30852,6 +31185,16 @@ var Table = /** @__PURE__ @class */ (function () {
30852
31185
  EventHandler.add(this.contentModule.getDocument(), Browser.touchEndEvent, this.resizeEnd, this);
30853
31186
  }
30854
31187
  };
31188
+ Table.prototype.getCellIndex = function (rowSpanCells, rowIndex, colIndex) {
31189
+ var cellKey = "" + rowIndex + colIndex;
31190
+ var spannedCell = rowSpanCells.get(cellKey);
31191
+ if (spannedCell) {
31192
+ return this.getCellIndex(rowSpanCells, rowIndex, colIndex + spannedCell.colSpan);
31193
+ }
31194
+ else {
31195
+ return colIndex;
31196
+ }
31197
+ };
30855
31198
  Table.prototype.removeHelper = function (e) {
30856
31199
  var cls = e.target.classList;
30857
31200
  if (!(cls.contains('e-reicon')) && this.helper) {
@@ -30880,12 +31223,12 @@ var Table = /** @__PURE__ @class */ (function () {
30880
31223
  this.helper.classList.add('e-column-helper');
30881
31224
  this.helper.style.cssText = 'height: ' + getComputedStyle(this.curTable).height + '; top: ' +
30882
31225
  pos.top + 'px; left:' + ((pos.left + this.calcPos(this.columnEle).left) +
30883
- (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth + 2 : 0) - 1) + 'px;';
31226
+ (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1) + 'px;';
30884
31227
  }
30885
31228
  else {
30886
31229
  this.helper.classList.add('e-row-helper');
30887
31230
  this.helper.style.cssText = 'width: ' + getComputedStyle(this.curTable).width + '; top: ' +
30888
- (this.calcPos(this.rowEle).top + pos.top + this.rowEle.offsetHeight) +
31231
+ (this.calcPos(this.rowEle).top + pos.top + this.rowEle.offsetHeight - 1) +
30889
31232
  'px; left:' + (this.calcPos(this.rowEle).left + pos.left) + 'px;';
30890
31233
  }
30891
31234
  };
@@ -30893,24 +31236,42 @@ var Table = /** @__PURE__ @class */ (function () {
30893
31236
  var pos = this.calcPos(this.curTable);
30894
31237
  if (this.resizeBtnStat.column) {
30895
31238
  var left = (pos.left + this.calcPos(this.columnEle).left) +
30896
- (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth + 2 : 0) - 1;
31239
+ (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1;
30897
31240
  this.helper.style.left = left + 'px';
31241
+ this.helper.style.height = this.curTable.offsetHeight + 'px';
30898
31242
  }
30899
31243
  else {
30900
- var top_1 = this.calcPos(this.rowEle).top + pos.top + this.rowEle.offsetHeight;
31244
+ var top_1 = this.calcPos(this.rowEle).top + pos.top + this.rowEle.offsetHeight - 1;
30901
31245
  this.helper.style.top = top_1 + 'px';
30902
31246
  }
30903
31247
  };
30904
- Table.prototype.calMaxCol = function (element) {
30905
- var max = 0;
30906
- var maxRowIndex;
30907
- for (var i = 0; i < element.rows.length; i++) {
30908
- if (max < element.rows[i].cells.length) {
30909
- maxRowIndex = i;
30910
- max = element.rows[i].cells.length;
31248
+ Table.prototype.calMaxCol = function (curTable) {
31249
+ var cellColl = curTable.rows[0].cells;
31250
+ var cellCount = 0;
31251
+ for (var cell = 0; cell < cellColl.length; cell++) {
31252
+ cellCount = cellCount + cellColl[cell].colSpan;
31253
+ }
31254
+ var cells = new Array(cellCount);
31255
+ var rowSpanCells = new Map();
31256
+ for (var i = 0; i < curTable.rows.length; i++) {
31257
+ var currentColIndex = 0;
31258
+ for (var k = 0; k < curTable.rows[i].cells.length; k++) {
31259
+ for (var l = 1; l < curTable.rows[i].cells[k].rowSpan; l++) {
31260
+ var key = "" + (i + l) + currentColIndex;
31261
+ rowSpanCells.set(key, curTable.rows[i].cells[k]);
31262
+ }
31263
+ var cellIndex = this.getCellIndex(rowSpanCells, i, k);
31264
+ if (cellIndex > currentColIndex) {
31265
+ currentColIndex = cellIndex;
31266
+ }
31267
+ var width = curTable.rows[i].cells[k].offsetWidth;
31268
+ if (!cells[currentColIndex] || width < cells[currentColIndex].offsetWidth) {
31269
+ cells[currentColIndex] = curTable.rows[i].cells[k];
31270
+ }
31271
+ currentColIndex += 1 + curTable.rows[i].cells[k].colSpan - 1;
30911
31272
  }
30912
31273
  }
30913
- return maxRowIndex;
31274
+ return cells;
30914
31275
  };
30915
31276
  Table.prototype.resizing = function (e) {
30916
31277
  var _this = this;
@@ -30923,10 +31284,6 @@ var Table = /** @__PURE__ @class */ (function () {
30923
31284
  var maxiumWidth;
30924
31285
  var currentTdElement = this.curTable.closest('td');
30925
31286
  var args = { event: e, requestType: 'table' };
30926
- var isRowCellsMerged = false;
30927
- var isColCellsMerged = false;
30928
- var mergedCellIndex;
30929
- var mergedElement;
30930
31287
  this.parent.trigger(onResize, args, function (resizingArgs) {
30931
31288
  if (resizingArgs.cancel) {
30932
31289
  _this.cancelResizeAction();
@@ -30951,8 +31308,7 @@ var Table = /** @__PURE__ @class */ (function () {
30951
31308
  widthCompare = rteWidth;
30952
31309
  }
30953
31310
  if (_this.resizeBtnStat.column) {
30954
- var width = parseFloat(_this.columnEle.offsetWidth.toString());
30955
- var cellRow = _this.curTable.rows[0].cells[0].nodeName === 'TH' ? 1 : 0;
31311
+ var colGroup = _this.curTable.querySelectorAll('colgroup > col');
30956
31312
  var currentTableWidth = void 0;
30957
31313
  if (_this.curTable.style.width !== '' && _this.curTable.style.width.includes('%')) {
30958
31314
  currentTableWidth = parseFloat(_this.curTable.style.width.split('%')[0]);
@@ -30960,7 +31316,8 @@ var Table = /** @__PURE__ @class */ (function () {
30960
31316
  else {
30961
31317
  currentTableWidth = _this.getCurrentTableWidth(_this.curTable.offsetWidth, _this.parent.inputElement.offsetWidth);
30962
31318
  }
30963
- var currentColumnCellWidth = parseFloat(_this.curTable.rows[cellRow].cells[_this.colIndex >= _this.curTable.rows[cellRow].cells.length ? _this.curTable.rows[cellRow].cells.length - 1 : _this.colIndex].style.width.split('%')[0]);
31319
+ var currentCol = _this.calMaxCol(_this.curTable)[_this.colIndex];
31320
+ var currentColResizableWidth = _this.getCurrentColWidth(currentCol, tableWidth);
30964
31321
  if (_this.currentColumnResize === 'first') {
30965
31322
  mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
30966
31323
  _this.removeResizeElement();
@@ -30969,16 +31326,25 @@ var Table = /** @__PURE__ @class */ (function () {
30969
31326
  _this.curTable.style.maxWidth = maxiumWidth + 'px';
30970
31327
  }
30971
31328
  // Below the value '100' is the 100% width of the parent element.
30972
- if (((mouseX !== 0 && 5 < currentColumnCellWidth) || mouseX < 0) && currentTableWidth <= 100 &&
31329
+ if (((mouseX !== 0 && 5 < currentColResizableWidth) || mouseX < 0) && currentTableWidth <= 100 &&
30973
31330
  _this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) <= 100) {
30974
31331
  var firstColumnsCell = _this.findFirstLastColCells(_this.curTable, true);
30975
31332
  _this.curTable.style.width = _this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) > 100 ? (100 + '%') :
30976
31333
  (_this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) + '%');
30977
31334
  var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth - mouseX, widthCompare);
30978
- _this.currentMarginLeft = _this.currentMarginLeft + differenceWidth;
30979
- _this.curTable.style.marginLeft = 'calc(' + (_this.curTable.style.width === '100%' ? 0 : _this.currentMarginLeft) + '%)';
31335
+ var preMarginLeft = 0;
31336
+ if (!isNullOrUndefined(_this.curTable.style.marginLeft) && _this.curTable.style.marginLeft !== '') {
31337
+ var regex = /[-+]?\d*\.\d+|\d+/;
31338
+ var value = _this.curTable.style.marginLeft.match(regex);
31339
+ if (!isNullOrUndefined(value)) {
31340
+ preMarginLeft = parseFloat(value[0]);
31341
+ }
31342
+ }
31343
+ var currentMarginLeft = preMarginLeft + differenceWidth;
31344
+ _this.curTable.style.marginLeft = 'calc(' + (_this.curTable.style.width === '100%' ? 0 : currentMarginLeft) + '%)';
30980
31345
  for (var i = 0; i < firstColumnsCell.length; i++) {
30981
- _this.curTable.rows[i].cells[_this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
31346
+ var currentColumnCellWidth = _this.getCurrentColWidth(firstColumnsCell[i], tableWidth);
31347
+ firstColumnsCell[i].style.width = (currentColumnCellWidth - differenceWidth) + '%';
30982
31348
  }
30983
31349
  }
30984
31350
  }
@@ -30990,112 +31356,48 @@ var Table = /** @__PURE__ @class */ (function () {
30990
31356
  _this.curTable.style.maxWidth = maxiumWidth + 'px';
30991
31357
  }
30992
31358
  // Below the value '100' is the 100% width of the parent element.
30993
- if (((mouseX !== 0 && 5 < currentColumnCellWidth) || mouseX > 0) &&
31359
+ if (((mouseX !== 0 && 5 < currentColResizableWidth) || mouseX > 0) &&
30994
31360
  currentTableWidth <= 100 && _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) <= 100) {
30995
31361
  var lastColumnsCell = _this.findFirstLastColCells(_this.curTable, false);
30996
31362
  _this.curTable.style.width = _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) > 100 ? (100 + '%') : (_this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%');
30997
31363
  var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare);
30998
31364
  for (var i = 0; i < lastColumnsCell.length; i++) {
30999
- if (_this.curTable.rows[i].cells[_this.colIndex]) {
31000
- _this.curTable.rows[i].cells[_this.curTable.rows[i].cells.length === _this.colIndex ?
31001
- _this.colIndex - 1 : _this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
31002
- }
31365
+ var currentColumnCellWidth = _this.getCurrentColWidth(lastColumnsCell[i], tableWidth);
31366
+ lastColumnsCell[i].style.width = (currentColumnCellWidth - differenceWidth) + '%';
31003
31367
  }
31004
31368
  }
31005
31369
  }
31006
31370
  else {
31007
- var cellColl = _this.curTable.rows[_this.calMaxCol(_this.curTable)].cells;
31008
- var actualwid = width - mouseX;
31009
- var totalwid = parseFloat(_this.columnEle.offsetWidth.toString()) +
31010
- parseFloat(cellColl[_this.colIndex - 1].offsetWidth.toString());
31011
- for (var i = 0; i < _this.curTable.rows.length; i++) {
31012
- var currentRow = _this.curTable.rows[i];
31013
- if ((totalwid - actualwid) > 20 && actualwid > 20) {
31014
- var leftColumnWidth = totalwid - actualwid;
31015
- var rightColWidth = actualwid;
31016
- var index = void 0;
31017
- var isMergedEleResize = false;
31018
- var leftTableCell = void 0;
31019
- var rightTableCell = void 0;
31020
- isColCellsMerged = false;
31021
- isRowCellsMerged = false;
31022
- /* eslint-disable */
31023
- for (var j = 0; j < currentRow.cells.length; j++) {
31024
- if (currentRow.cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
31025
- isRowCellsMerged = true;
31026
- mergedCellIndex = i;
31027
- mergedElement = currentRow.cells[j];
31028
- }
31029
- else if (currentRow.cells[j].hasAttribute('colspan') && j <= currentRow.cells.length) {
31030
- isColCellsMerged = true;
31031
- mergedCellIndex = i;
31032
- mergedElement = currentRow.cells[j];
31033
- }
31034
- }
31035
- if (!isNullOrUndefined(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
31036
- index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
31037
- }
31038
- else {
31039
- index = _this.colIndex;
31040
- }
31041
- if (isRowCellsMerged || isColCellsMerged) {
31042
- var currentResizeRow = void 0;
31043
- if (currentRow.cells.length < cellColl.length) {
31044
- index = currentRow.cells.length === _this.colIndex || currentRow === _this.curTable.rows[_this.curTable.rows.length - 1] ?
31045
- _this.colIndex - 1 : _this.colIndex;
31046
- currentResizeRow = _this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
31047
- mergedCellIndex : _this.colIndex - 1];
31048
- if (currentResizeRow && currentResizeRow !== currentRow && (currentResizeRow.cells[_this.colIndex - 1] === mergedElement ||
31049
- currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
31050
- isMergedEleResize = true;
31051
- }
31052
- else {
31053
- isMergedEleResize = false;
31054
- }
31055
- }
31056
- else {
31057
- index = _this.colIndex;
31058
- }
31059
- leftTableCell = !isMergedEleResize ? currentRow.cells[index - 1] : (currentResizeRow &&
31060
- currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
31061
- currentResizeRow.cells[_this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
31062
- rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
31063
- currentResizeRow.cells[_this.colIndex] : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
31064
- currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
31065
- }
31066
- if (!isNullOrUndefined(currentRow.cells[index - 1]) && !isRowCellsMerged && !isColCellsMerged) {
31067
- currentRow.cells[index - 1].style.width =
31068
- _this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
31069
- }
31070
- else {
31071
- if (leftTableCell) {
31072
- leftTableCell.style.width =
31073
- _this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
31074
- }
31075
- }
31076
- if (!isNullOrUndefined(currentRow.cells[index]) && !isRowCellsMerged && !isColCellsMerged) {
31077
- currentRow.cells[index].style.width =
31078
- _this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
31079
- }
31080
- else {
31081
- if (rightTableCell) {
31082
- rightTableCell.style.width =
31083
- _this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
31084
- }
31085
- }
31086
- /* eslint-enable */
31087
- }
31371
+ var actualwid = colGroup[_this.colIndex].offsetWidth - mouseX;
31372
+ // eslint-disable-next-line
31373
+ var totalwid = colGroup[_this.colIndex].offsetWidth + colGroup[_this.colIndex - 1].offsetWidth;
31374
+ if ((totalwid - actualwid) > 20 && actualwid > 20) {
31375
+ var leftColumnWidth = totalwid - actualwid;
31376
+ var rightColWidth = actualwid;
31377
+ colGroup[_this.colIndex - 1].style.width = _this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
31378
+ colGroup[_this.colIndex].style.width = _this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
31088
31379
  }
31089
31380
  }
31090
31381
  _this.updateHelper();
31091
31382
  }
31092
31383
  else if (_this.resizeBtnStat.row) {
31093
31384
  _this.parent.preventDefaultResize(e);
31094
- var height = parseFloat(_this.rowEle.clientHeight.toString()) + mouseY;
31095
- if (height > 20) {
31096
- _this.rowEle.style.height = height + 'px';
31385
+ var tableTrElementPixel = [];
31386
+ var currentTableTrElement = _this.curTable.querySelectorAll('tr');
31387
+ for (var i = 0; i < currentTableTrElement.length; i++) {
31388
+ if (_this.rowEle !== currentTableTrElement[i]) {
31389
+ tableTrElementPixel[i] = (parseFloat(currentTableTrElement[i].clientHeight.toString()));
31390
+ }
31391
+ }
31392
+ _this.curTable.style.height = (parseFloat(_this.curTable.clientHeight.toString()) + ((mouseY > 0) ? 0 : mouseY)) + 'px';
31393
+ for (var i = 0; i < currentTableTrElement.length; i++) {
31394
+ if (_this.rowEle === currentTableTrElement[i]) {
31395
+ currentTableTrElement[i].style.height = (parseFloat(currentTableTrElement[i].clientHeight.toString()) + mouseY) + 'px';
31396
+ }
31397
+ else {
31398
+ currentTableTrElement[i].style.height = tableTrElementPixel[i] + 'px';
31399
+ }
31097
31400
  }
31098
- _this.curTable.style.height = '';
31099
31401
  if (!isNullOrUndefined(tableReBox)) {
31100
31402
  tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top + tableHeight - 4) +
31101
31403
  'px; left:' + (_this.calcPos(_this.curTable).left + tableWidth - 4) + 'px;';
@@ -31122,6 +31424,16 @@ var Table = /** @__PURE__ @class */ (function () {
31122
31424
  }
31123
31425
  });
31124
31426
  };
31427
+ Table.prototype.getCurrentColWidth = function (col, tableWidth) {
31428
+ var currentColWidth = 0;
31429
+ if (col.style.width !== '' && col.style.width.includes('%')) {
31430
+ currentColWidth = parseFloat(col.style.width.split('%')[0]);
31431
+ }
31432
+ else {
31433
+ currentColWidth = this.convertPixelToPercentage(col.offsetWidth, tableWidth);
31434
+ }
31435
+ return currentColWidth;
31436
+ };
31125
31437
  Table.prototype.getCurrentTableWidth = function (tableWidth, parentWidth) {
31126
31438
  var currentTableWidth = 0;
31127
31439
  currentTableWidth = tableWidth / parentWidth * 100;
@@ -31129,12 +31441,22 @@ var Table = /** @__PURE__ @class */ (function () {
31129
31441
  };
31130
31442
  Table.prototype.findFirstLastColCells = function (table, isFirst) {
31131
31443
  var resultColumns = [];
31132
- var rows = table.querySelectorAll('tr');
31133
- for (var i = 0; i < rows.length; i++) {
31134
- if (rows[i].closest('table') === table) {
31135
- var columns = rows[i].querySelectorAll('th, td');
31136
- resultColumns.push(isFirst ? columns[0] : columns[columns.length - 1]);
31444
+ var rows = table.rows;
31445
+ var rowSpanCellIndexs = new Array();
31446
+ var _loop_1 = function (i) {
31447
+ var cellIndex = isFirst ? 0 : rows[i].cells.length - 1;
31448
+ var column = rows[i].cells[cellIndex];
31449
+ for (var rowSpan = 1; rowSpan < column.rowSpan; rowSpan++) {
31450
+ var key = i + rowSpan + "-" + cellIndex;
31451
+ rowSpanCellIndexs.push(key);
31452
+ }
31453
+ var spannedCellKey = i + "-" + cellIndex;
31454
+ if (rowSpanCellIndexs.length === 0 || (isFirst && rowSpanCellIndexs.indexOf(spannedCellKey) === -1) || (!isFirst && rowSpanCellIndexs.indexOf(spannedCellKey) === -1 && rowSpanCellIndexs.every(function (key) { return key.split('-')[0] !== i.toString(); }))) {
31455
+ resultColumns.push(column);
31137
31456
  }
31457
+ };
31458
+ for (var i = 0; i < rows.length; i++) {
31459
+ _loop_1(i);
31138
31460
  }
31139
31461
  return resultColumns;
31140
31462
  };
@@ -31158,13 +31480,47 @@ var Table = /** @__PURE__ @class */ (function () {
31158
31480
  detach(this.helper);
31159
31481
  this.helper = null;
31160
31482
  }
31483
+ this.resetResizeHelper(this.curTable);
31161
31484
  this.pageX = null;
31162
31485
  this.pageY = null;
31163
31486
  this.moveEle = null;
31487
+ var currentTableTrElement = this.curTable.querySelectorAll("tr");
31488
+ var tableTrPercentage = [];
31489
+ for (var i = 0; i < currentTableTrElement.length; i++) {
31490
+ var percentage = (parseFloat(currentTableTrElement[i].clientHeight.toString()) / parseFloat(this.curTable.clientHeight.toString())) * 100;
31491
+ tableTrPercentage[i] = percentage;
31492
+ }
31493
+ for (var i = 0; i < currentTableTrElement.length; i++) {
31494
+ currentTableTrElement[i].style.height = tableTrPercentage[i] + '%';
31495
+ }
31164
31496
  var args = { event: e, requestType: 'table' };
31165
31497
  this.parent.trigger(resizeStop, args);
31166
31498
  this.parent.formatter.saveData();
31167
31499
  };
31500
+ Table.prototype.resetResizeHelper = function (curTable) {
31501
+ var colHelper = this.parent.element.querySelectorAll('.e-table-rhelper.e-column-helper');
31502
+ Array.from(colHelper).forEach(function (element) {
31503
+ if (element.parentNode) {
31504
+ element.parentNode.removeChild(element);
31505
+ }
31506
+ });
31507
+ var rowHelper = this.parent.element.querySelectorAll('.e-table-rhelper.e-row-helper');
31508
+ Array.from(rowHelper).forEach(function (element) {
31509
+ if (element.parentNode) {
31510
+ element.parentNode.removeChild(element);
31511
+ }
31512
+ });
31513
+ var colGroup = curTable.querySelector('colgroup');
31514
+ if (colGroup) {
31515
+ for (var i = 0; i < curTable.rows.length; i++) {
31516
+ for (var k = 0; k < curTable.rows[i].cells.length; k++) {
31517
+ var width = this.convertPixelToPercentage(curTable.rows[i].cells[k].offsetWidth, parseInt(getComputedStyle(curTable).width, 10)) + '%';
31518
+ curTable.rows[i].cells[k].style.width = width;
31519
+ }
31520
+ }
31521
+ curTable.removeChild(colGroup);
31522
+ }
31523
+ };
31168
31524
  Table.prototype.resizeBtnInit = function () {
31169
31525
  return this.resizeBtnStat = { column: false, row: false, tableBox: false };
31170
31526
  };
@@ -31274,6 +31630,7 @@ var Table = /** @__PURE__ @class */ (function () {
31274
31630
  if (!isNullOrUndefined(this.parent.cssClass)) {
31275
31631
  addClass([this.popupObj.element], this.parent.getCssClass());
31276
31632
  }
31633
+ btnEle.focus();
31277
31634
  this.popupObj.refreshPosition(target);
31278
31635
  };
31279
31636
  Table.prototype.onIframeMouseDown = function () {
@@ -31606,12 +31963,18 @@ var Table = /** @__PURE__ @class */ (function () {
31606
31963
  var _this = this;
31607
31964
  if (this.curTable) {
31608
31965
  setTimeout(function () {
31609
- var mouseOverEvent = document.createEvent('MouseEvents');
31610
- mouseOverEvent.initEvent('mouseover', true, true);
31611
- _this.curTable.dispatchEvent(mouseOverEvent);
31966
+ _this.updateResizeIconPosition();
31612
31967
  }, 1);
31613
31968
  }
31614
31969
  };
31970
+ Table.prototype.updateResizeIconPosition = function () {
31971
+ var tableReBox = this.parent.contentModule.getEditPanel().querySelector('.e-table-box');
31972
+ if (!isNullOrUndefined(tableReBox)) {
31973
+ var tablePosition = this.calcPos(this.curTable);
31974
+ tableReBox.style.cssText = 'top: ' + (tablePosition.top + parseInt(getComputedStyle(this.curTable).height, 10) - 4) +
31975
+ 'px; left:' + (tablePosition.left + parseInt(getComputedStyle(this.curTable).width, 10) - 4) + 'px;';
31976
+ }
31977
+ };
31615
31978
  return Table;
31616
31979
  }());
31617
31980
 
@@ -31651,7 +32014,11 @@ var DialogRenderer = /** @__PURE__ @class */ (function () {
31651
32014
  var dlgObj;
31652
32015
  e.beforeOpen = this.beforeOpen.bind(this);
31653
32016
  e.open = this.open.bind(this);
31654
- e.position = { X: 'center', Y: this.getDialogPosition() };
32017
+ e.position = {
32018
+ X: 'center',
32019
+ Y: (e.target !== 'string' && e.target.nodeName === 'BODY' &&
32020
+ !isNullOrUndefined(e.position)) ? e.position.Y : this.getDialogPosition()
32021
+ };
31655
32022
  if (isNullOrUndefined(e.close)) {
31656
32023
  e.close = this.close.bind(this);
31657
32024
  }
@@ -32999,10 +33366,10 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
32999
33366
  }
33000
33367
  var previousBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling;
33001
33368
  var nextBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;
33002
- if (!isNullOrUndefined(previousBlockNode) && previousBlockNode.hasAttribute('style')) {
33369
+ if (!isNullOrUndefined(previousBlockNode) && previousBlockNode.hasAttribute('style') && previousBlockNode.nodeName !== 'TABLE') {
33003
33370
  insertElem.setAttribute('style', previousBlockNode.getAttribute('style'));
33004
33371
  }
33005
- if (isNullOrUndefined(previousBlockNode) && !isNullOrUndefined(nextBlockNode) && nextBlockNode.hasAttribute('style')) {
33372
+ if (isNullOrUndefined(previousBlockNode) && !isNullOrUndefined(nextBlockNode) && nextBlockNode.hasAttribute('style') && nextBlockNode.nodeName !== 'TABLE') {
33006
33373
  insertElem.setAttribute('style', nextBlockNode.getAttribute('style'));
33007
33374
  }
33008
33375
  return insertElem;
@@ -33785,6 +34152,16 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
33785
34152
  RichTextEditor.prototype.keyUp = function (e) {
33786
34153
  if (this.editorMode === 'HTML') {
33787
34154
  var range = this.getRange();
34155
+ if (!isNullOrUndefined(e) && !isNullOrUndefined(e.code) && (e.code === 'Backspace' || e.code === 'Delete')) {
34156
+ // To prevent the reformatting the content removed browser behavior.
34157
+ var currentRange = this.getRange();
34158
+ var selection = this.iframeSettings.enable ? this.contentModule.getPanel().ownerDocument.getSelection() :
34159
+ this.contentModule.getDocument().getSelection();
34160
+ if (selection.rangeCount > 0) {
34161
+ selection.removeAllRanges();
34162
+ selection.addRange(currentRange);
34163
+ }
34164
+ }
33788
34165
  if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer.nodeName === '#text' &&
33789
34166
  range.startContainer.parentElement === this.inputElement && this.enterKey !== 'BR') {
33790
34167
  var range_1 = this.getRange();
@@ -33884,11 +34261,14 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
33884
34261
  clientX: touch.clientX, clientY: touch.clientY }
33885
34262
  });
33886
34263
  if (this.inputElement && ((this.editorMode === 'HTML' && this.inputElement.textContent.length !== 0) ||
33887
- (this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) || (e.target && (e.target.nodeName === 'VIDEO'
33888
- || e.target.querySelectorAll('.' + CLS_VIDEOWRAP).length > 0) || (e.target && e.target.nodeName !== 'BR' &&
33889
- (e.target.classList.contains(CLS_AUDIOWRAP) ||
33890
- e.target.classList.contains(CLS_CLICKELEM) ||
33891
- e.target.classList.contains(CLS_VID_CLICK_ELEM))))) {
34264
+ (this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) ||
34265
+ (e.target && !isNullOrUndefined(closest(e.target, 'table'))) ||
34266
+ (e.target && (e.target.nodeName === 'VIDEO' ||
34267
+ e.target.querySelectorAll('.' + CLS_VIDEOWRAP).length > 0) ||
34268
+ (e.target && e.target.nodeName !== 'BR' &&
34269
+ (e.target.classList.contains(CLS_AUDIOWRAP) ||
34270
+ e.target.classList.contains(CLS_CLICKELEM) ||
34271
+ e.target.classList.contains(CLS_VID_CLICK_ELEM))))) {
33892
34272
  this.notify(toolbarRefresh, { args: e });
33893
34273
  }
33894
34274
  this.triggerEditArea(e);
@@ -34655,10 +35035,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34655
35035
  if (this.iframeSettings.resources) {
34656
35036
  var styleSrc = this.iframeSettings.resources.styles;
34657
35037
  var scriptSrc = this.iframeSettings.resources.scripts;
34658
- if (this.iframeSettings.resources.scripts.length > 0) {
35038
+ if (!isNullOrUndefined(this.iframeSettings.resources.scripts) && this.iframeSettings.resources.scripts.length > 0) {
34659
35039
  this.InjectSheet(true, scriptSrc);
34660
35040
  }
34661
- if (this.iframeSettings.resources.styles.length > 0) {
35041
+ if (!isNullOrUndefined(this.iframeSettings.resources.styles) && this.iframeSettings.resources.styles.length > 0) {
34662
35042
  this.InjectSheet(false, styleSrc);
34663
35043
  }
34664
35044
  }
@@ -34772,6 +35152,13 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34772
35152
  var imgPadding = 12;
34773
35153
  var imgResizeBorder = 2;
34774
35154
  var editEle = this.contentModule.getEditPanel();
35155
+ if (this.editorMode === "HTML" && !isNullOrUndefined(this.formatter.editorManager.nodeSelection) && !isNullOrUndefined(this.formatter.editorManager.nodeSelection.range)) {
35156
+ var currentRange = this.formatter.editorManager.nodeSelection.range;
35157
+ if (currentRange.startContainer.nodeType !== 3 && currentRange.startContainer.closest &&
35158
+ !isNullOrUndefined(currentRange.startContainer.closest('TD'))) {
35159
+ editEle = currentRange.startContainer;
35160
+ }
35161
+ }
34775
35162
  var eleStyle = window.getComputedStyle(editEle);
34776
35163
  var editEleMaxWidth = editEle.offsetWidth - (imgPadding + imgResizeBorder +
34777
35164
  parseFloat(eleStyle.paddingLeft.split('px')[0]) + parseFloat(eleStyle.paddingRight.split('px')[0]) +
@@ -35215,6 +35602,12 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35215
35602
  var trg = e.relatedTarget;
35216
35603
  if (trg) {
35217
35604
  var rteElement = closest(trg, '.' + CLS_RTE);
35605
+ if (!rteElement && this.iframeSettings.enable) {
35606
+ var iframeElement = this.element.querySelector('#' + this.getID() + '_rte-view');
35607
+ if (iframeElement && iframeElement.contentWindow.document.body.contains(trg)) {
35608
+ rteElement = closest(iframeElement, '.' + CLS_RTE);
35609
+ }
35610
+ }
35218
35611
  if (rteElement && rteElement === this.element) {
35219
35612
  this.isBlur = false;
35220
35613
  if (trg === this.getToolbarElement()) {
@@ -35879,5 +36272,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35879
36272
  * Rich Text Editor component exported items
35880
36273
  */
35881
36274
 
35882
- export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, getTooltipTextDropdownItems, getQuickToolbarTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
36275
+ export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, getTooltipTextDropdownItems, getQuickToolbarTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
35883
36276
  //# sourceMappingURL=ej2-richtexteditor.es5.js.map