@syncfusion/ej2-richtexteditor 24.2.8 → 25.1.35

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 (134) 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 +955 -495
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +939 -484
  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 +13 -13
  13. package/src/common/config.d.ts +7 -0
  14. package/src/common/config.js +11 -0
  15. package/src/common/interface.d.ts +12 -0
  16. package/src/common/types.d.ts +6 -0
  17. package/src/editor-manager/plugin/dom-node.d.ts +5 -1
  18. package/src/editor-manager/plugin/dom-node.js +161 -12
  19. package/src/editor-manager/plugin/formats.js +1 -1
  20. package/src/editor-manager/plugin/image.js +12 -16
  21. package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
  22. package/src/editor-manager/plugin/inserthtml.js +40 -1
  23. package/src/editor-manager/plugin/link.js +1 -1
  24. package/src/editor-manager/plugin/lists.js +24 -2
  25. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -0
  26. package/src/editor-manager/plugin/ms-word-clean-up.js +87 -58
  27. package/src/editor-manager/plugin/selection-commands.js +52 -3
  28. package/src/editor-manager/plugin/table.js +18 -3
  29. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  30. package/src/editor-manager/plugin/toolbar-status.js +17 -9
  31. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -3
  32. package/src/rich-text-editor/actions/base-quick-toolbar.js +44 -10
  33. package/src/rich-text-editor/actions/base-toolbar.js +24 -30
  34. package/src/rich-text-editor/actions/dropdown-buttons.js +4 -4
  35. package/src/rich-text-editor/actions/emoji-picker.js +2 -2
  36. package/src/rich-text-editor/actions/enter-key.js +4 -3
  37. package/src/rich-text-editor/actions/full-screen.js +2 -2
  38. package/src/rich-text-editor/actions/html-editor.d.ts +0 -2
  39. package/src/rich-text-editor/actions/html-editor.js +18 -31
  40. package/src/rich-text-editor/actions/markdown-editor.js +3 -1
  41. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
  42. package/src/rich-text-editor/actions/paste-clean-up.js +23 -0
  43. package/src/rich-text-editor/actions/quick-toolbar.d.ts +7 -0
  44. package/src/rich-text-editor/actions/quick-toolbar.js +24 -9
  45. package/src/rich-text-editor/actions/resize.js +2 -1
  46. package/src/rich-text-editor/actions/toolbar.d.ts +0 -2
  47. package/src/rich-text-editor/actions/toolbar.js +13 -85
  48. package/src/rich-text-editor/base/classes.d.ts +0 -5
  49. package/src/rich-text-editor/base/classes.js +0 -5
  50. package/src/rich-text-editor/base/constant.d.ts +5 -0
  51. package/src/rich-text-editor/base/constant.js +5 -0
  52. package/src/rich-text-editor/base/interface.d.ts +36 -2
  53. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +2 -2
  54. package/src/rich-text-editor/base/rich-text-editor.d.ts +4 -3
  55. package/src/rich-text-editor/base/rich-text-editor.js +81 -58
  56. package/src/rich-text-editor/base/util.js +8 -2
  57. package/src/rich-text-editor/models/default-locale.js +15 -12
  58. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
  59. package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
  60. package/src/rich-text-editor/models/toolbar-settings.js +1 -1
  61. package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
  62. package/src/rich-text-editor/renderer/image-module.d.ts +8 -1
  63. package/src/rich-text-editor/renderer/image-module.js +148 -155
  64. package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
  65. package/src/rich-text-editor/renderer/table-module.js +71 -8
  66. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +3 -0
  67. package/src/rich-text-editor/renderer/toolbar-renderer.js +61 -2
  68. package/src/rich-text-editor/renderer/video-module.js +7 -4
  69. package/src/rich-text-editor/renderer/view-source.js +7 -4
  70. package/styles/bootstrap-dark.css +57 -17
  71. package/styles/bootstrap.css +58 -18
  72. package/styles/bootstrap4.css +58 -18
  73. package/styles/bootstrap5-dark.css +64 -17
  74. package/styles/bootstrap5.css +64 -17
  75. package/styles/fabric-dark.css +57 -17
  76. package/styles/fabric.css +58 -18
  77. package/styles/fluent-dark.css +57 -17
  78. package/styles/fluent.css +57 -17
  79. package/styles/highcontrast-light.css +57 -17
  80. package/styles/highcontrast.css +58 -18
  81. package/styles/material-dark.css +57 -17
  82. package/styles/material.css +57 -17
  83. package/styles/material3-dark.css +59 -19
  84. package/styles/material3.css +59 -19
  85. package/styles/rich-text-editor/_bds-definition.scss +279 -0
  86. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +1 -0
  87. package/styles/rich-text-editor/_bootstrap-definition.scss +1 -1
  88. package/styles/rich-text-editor/_bootstrap4-definition.scss +3 -2
  89. package/styles/rich-text-editor/_bootstrap5-definition.scss +1 -0
  90. package/styles/rich-text-editor/_fabric-dark-definition.scss +1 -0
  91. package/styles/rich-text-editor/_fabric-definition.scss +2 -1
  92. package/styles/rich-text-editor/_fluent-definition.scss +1 -0
  93. package/styles/rich-text-editor/_fusionnew-definition.scss +1 -0
  94. package/styles/rich-text-editor/_highcontrast-definition.scss +2 -1
  95. package/styles/rich-text-editor/_highcontrast-light-definition.scss +1 -0
  96. package/styles/rich-text-editor/_layout.scss +47 -13
  97. package/styles/rich-text-editor/_material-dark-definition.scss +1 -0
  98. package/styles/rich-text-editor/_material-definition.scss +1 -0
  99. package/styles/rich-text-editor/_material3-definition.scss +1 -0
  100. package/styles/rich-text-editor/_tailwind-definition.scss +4 -3
  101. package/styles/rich-text-editor/_theme.scss +18 -5
  102. package/styles/rich-text-editor/bootstrap-dark.css +57 -17
  103. package/styles/rich-text-editor/bootstrap.css +58 -18
  104. package/styles/rich-text-editor/bootstrap4.css +58 -18
  105. package/styles/rich-text-editor/bootstrap5-dark.css +64 -17
  106. package/styles/rich-text-editor/bootstrap5.css +64 -17
  107. package/styles/rich-text-editor/fabric-dark.css +57 -17
  108. package/styles/rich-text-editor/fabric.css +58 -18
  109. package/styles/rich-text-editor/fluent-dark.css +57 -17
  110. package/styles/rich-text-editor/fluent.css +57 -17
  111. package/styles/rich-text-editor/highcontrast-light.css +57 -17
  112. package/styles/rich-text-editor/highcontrast.css +58 -18
  113. package/styles/rich-text-editor/icons/_bds.scss +351 -0
  114. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +7 -4
  115. package/styles/rich-text-editor/icons/_bootstrap.scss +7 -4
  116. package/styles/rich-text-editor/icons/_bootstrap4.scss +7 -4
  117. package/styles/rich-text-editor/icons/_bootstrap5.scss +7 -4
  118. package/styles/rich-text-editor/icons/_fabric-dark.scss +7 -4
  119. package/styles/rich-text-editor/icons/_fabric.scss +7 -4
  120. package/styles/rich-text-editor/icons/_fluent.scss +7 -4
  121. package/styles/rich-text-editor/icons/_highcontrast-light.scss +7 -4
  122. package/styles/rich-text-editor/icons/_highcontrast.scss +7 -4
  123. package/styles/rich-text-editor/icons/_material-dark.scss +7 -4
  124. package/styles/rich-text-editor/icons/_material.scss +7 -4
  125. package/styles/rich-text-editor/icons/_material3.scss +7 -4
  126. package/styles/rich-text-editor/icons/_tailwind.scss +7 -4
  127. package/styles/rich-text-editor/material-dark.css +57 -17
  128. package/styles/rich-text-editor/material.css +57 -17
  129. package/styles/rich-text-editor/material3-dark.css +59 -19
  130. package/styles/rich-text-editor/material3.css +59 -19
  131. package/styles/rich-text-editor/tailwind-dark.css +61 -21
  132. package/styles/rich-text-editor/tailwind.css +61 -21
  133. package/styles/tailwind-dark.css +61 -21
  134. package/styles/tailwind.css +61 -21
@@ -34,6 +34,7 @@ export declare class Table {
34
34
  private dialogRenderObj;
35
35
  private currentColumnResize;
36
36
  private previousTableElement;
37
+ private resizeEndTime;
37
38
  private constructor();
38
39
  protected addEventListener(): void;
39
40
  protected removeEventListener(): void;
@@ -54,6 +55,7 @@ export declare class Table {
54
55
  private verticalAlign;
55
56
  private tableStyles;
56
57
  private insideList;
58
+ private removeEmptyTextNodes;
57
59
  private tabSelection;
58
60
  private tableArrowNavigation;
59
61
  private setBGColor;
@@ -17,6 +17,7 @@ var Table = /** @class */ (function () {
17
17
  this.pageY = null;
18
18
  this.moveEle = null;
19
19
  this.currentColumnResize = '';
20
+ this.resizeEndTime = 0;
20
21
  this.parent = parent;
21
22
  this.rteID = parent.element.id;
22
23
  this.l10n = serviceLocator.getService('rteLocale');
@@ -174,7 +175,15 @@ var Table = /** @class */ (function () {
174
175
  Table.prototype.keyUp = function (e) {
175
176
  var target = e.args.target;
176
177
  if (e.args.key.toLocaleLowerCase() === 'escape' && target && target.classList && (this.popupObj && !closest(target, '[id=' + "'" + this.popupObj.element.id + "'" + ']')) && this.popupObj) {
178
+ var createTableToolbarBtn = this.popupObj.relateTo;
179
+ if (createTableToolbarBtn.nodeName !== 'BUTTON') {
180
+ createTableToolbarBtn = createTableToolbarBtn.querySelector('span.e-create-table');
181
+ createTableToolbarBtn = createTableToolbarBtn.parentElement;
182
+ }
177
183
  this.popupObj.hide();
184
+ if (createTableToolbarBtn) {
185
+ createTableToolbarBtn.focus();
186
+ }
178
187
  }
179
188
  };
180
189
  Table.prototype.keyDown = function (e) {
@@ -354,7 +363,20 @@ var Table = /** @class */ (function () {
354
363
  return false;
355
364
  }
356
365
  };
366
+ Table.prototype.removeEmptyTextNodes = function (element) {
367
+ var children = element.childNodes;
368
+ for (var i = children.length - 1; i >= 0; i--) {
369
+ var node = children[i];
370
+ if (node.nodeType === Node.TEXT_NODE && node.nodeValue.trim() === '') {
371
+ element.removeChild(node);
372
+ }
373
+ }
374
+ };
357
375
  Table.prototype.tabSelection = function (event, selection, ele) {
376
+ var allHeadBodyTRElements = ele.closest('table').querySelectorAll('thead, tbody, tr');
377
+ for (var i = 0; i < allHeadBodyTRElements.length; i++) {
378
+ this.removeEmptyTextNodes(allHeadBodyTRElements[i]);
379
+ }
358
380
  this.previousTableElement = ele;
359
381
  var insideList = this.insideList(selection.range);
360
382
  if ((event.keyCode === 37 || event.keyCode === 39) && selection.range.startContainer.nodeType === 3 ||
@@ -491,10 +513,12 @@ var Table = /** @class */ (function () {
491
513
  var startNode = this.parent.getRange().startContainer.parentElement;
492
514
  var endNode = this.parent.getRange().endContainer.parentElement;
493
515
  var isAnchorEle = this.getAnchorNode(target);
516
+ var currentTime = new Date().getTime();
494
517
  if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(classes.CLS_CLICKELEM) &&
495
518
  target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
496
519
  target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
497
- && !(range.startContainer.nodeType === 3 && !range.collapsed)) {
520
+ && !(range.startContainer.nodeType === 3 && !range.collapsed) &&
521
+ currentTime - this.resizeEndTime > 100) {
498
522
  var range_1 = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
499
523
  this.parent.formatter.editorManager.nodeSelection.save(range_1, this.contentModule.getDocument());
500
524
  this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());
@@ -590,7 +614,10 @@ var Table = /** @class */ (function () {
590
614
  var tdNode = closest(target, 'td,th');
591
615
  target = (target.nodeName !== 'TD' && tdNode && this.parent.contentModule.getEditPanel().contains(tdNode)) ?
592
616
  tdNode : target;
593
- removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), classes.CLS_TABLE_SEL);
617
+ if (!(this.parent.quickToolbarSettings.showOnRightClick && e.args.which === 3 &&
618
+ target.classList.contains(classes.CLS_TABLE_SEL))) {
619
+ removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), classes.CLS_TABLE_SEL);
620
+ }
594
621
  if (target && (target.tagName === 'TD' || target.tagName === 'TH')) {
595
622
  addClass([target], classes.CLS_TABLE_SEL);
596
623
  this.activeCell = target;
@@ -979,6 +1006,9 @@ var Table = /** @class */ (function () {
979
1006
  widthCompare = rteWidth;
980
1007
  }
981
1008
  if (_this.resizeBtnStat.column) {
1009
+ if (_this.curTable.closest('li')) {
1010
+ widthCompare = _this.curTable.closest('li').offsetWidth;
1011
+ }
982
1012
  var colGroup = _this.curTable.querySelectorAll('colgroup > col');
983
1013
  var currentTableWidth = void 0;
984
1014
  if (_this.curTable.style.width !== '' && _this.curTable.style.width.includes('%')) {
@@ -1004,14 +1034,32 @@ var Table = /** @class */ (function () {
1004
1034
  (_this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) + '%');
1005
1035
  var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth - mouseX, widthCompare);
1006
1036
  var preMarginLeft = 0;
1007
- if (!isNullOrUndefined(_this.curTable.style.marginLeft) && _this.curTable.style.marginLeft !== '') {
1037
+ var widthType = _this.curTable.style.width.indexOf('%') > -1;
1038
+ if (!widthType && _this.curTable.offsetWidth > _this.contentModule.getEditPanel().offsetWidth) {
1039
+ _this.curTable.style.width = rteWidth + 'px';
1040
+ return;
1041
+ }
1042
+ if (widthType && parseFloat(_this.curTable.style.width.split('%')[0]) > 100) {
1043
+ _this.curTable.style.width = '100%';
1044
+ return;
1045
+ }
1046
+ if (!isNOU(_this.curTable.style.marginLeft) && _this.curTable.style.marginLeft !== '') {
1008
1047
  var regex = /[-+]?\d*\.\d+|\d+/;
1009
1048
  var value = _this.curTable.style.marginLeft.match(regex);
1010
- if (!isNullOrUndefined(value)) {
1049
+ if (!isNOU(value)) {
1011
1050
  preMarginLeft = parseFloat(value[0]);
1012
1051
  }
1013
1052
  }
1014
1053
  var currentMarginLeft = preMarginLeft + differenceWidth;
1054
+ if (currentMarginLeft && currentMarginLeft > 100) {
1055
+ var width = parseFloat(_this.curTable.style.width);
1056
+ currentMarginLeft = 100 - width;
1057
+ }
1058
+ if (currentMarginLeft && currentMarginLeft < 1) {
1059
+ _this.curTable.style.marginLeft = null;
1060
+ _this.curTable.style.width = '100%';
1061
+ return;
1062
+ }
1015
1063
  _this.curTable.style.marginLeft = 'calc(' + (_this.curTable.style.width === '100%' ? 0 : currentMarginLeft) + '%)';
1016
1064
  for (var i = 0; i < firstColumnsCell.length; i++) {
1017
1065
  var currentColumnCellWidth = _this.getCurrentColWidth(firstColumnsCell[i], tableWidth);
@@ -1082,15 +1130,26 @@ var Table = /** @class */ (function () {
1082
1130
  maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
1083
1131
  _this.curTable.style.maxWidth = maxiumWidth + 'px';
1084
1132
  }
1085
- var widthType = _this.curTable.style.width.indexOf('%') > -1;
1086
- _this.curTable.style.width = widthType ? _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
1087
- : tableWidth + mouseX + 'px';
1088
1133
  _this.curTable.style.height = tableHeight + mouseY + 'px';
1089
1134
  if (!isNOU(tableReBox)) {
1090
1135
  tableReBox.classList.add('e-rbox-select');
1091
1136
  tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top + tableHeight - 4) +
1092
1137
  'px; left:' + (_this.calcPos(_this.curTable).left + tableWidth - 4) + 'px;';
1093
1138
  }
1139
+ if (_this.curTable.closest('li')) {
1140
+ widthCompare = _this.curTable.closest('li').offsetWidth;
1141
+ }
1142
+ var widthType = _this.curTable.style.width.indexOf('%') > -1;
1143
+ if (widthType && parseFloat(_this.curTable.style.width.split('%')[0]) > 100) {
1144
+ _this.curTable.style.width = '100%';
1145
+ return;
1146
+ }
1147
+ if (!widthType && _this.curTable.offsetWidth > _this.contentModule.getEditPanel().offsetWidth) {
1148
+ _this.curTable.style.width = rteWidth + 'px';
1149
+ return;
1150
+ }
1151
+ _this.curTable.style.width = widthType ? _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
1152
+ : tableWidth + mouseX + 'px';
1094
1153
  }
1095
1154
  }
1096
1155
  });
@@ -1167,6 +1226,7 @@ var Table = /** @class */ (function () {
1167
1226
  var args = { event: e, requestType: 'table' };
1168
1227
  this.parent.trigger(events.resizeStop, args);
1169
1228
  this.parent.formatter.saveData();
1229
+ this.resizeEndTime = new Date().getTime();
1170
1230
  };
1171
1231
  Table.prototype.resetResizeHelper = function (curTable) {
1172
1232
  var colHelper = this.parent.element.querySelectorAll('.e-table-rhelper.e-column-helper');
@@ -1181,6 +1241,9 @@ var Table = /** @class */ (function () {
1181
1241
  element.parentNode.removeChild(element);
1182
1242
  }
1183
1243
  });
1244
+ if (!curTable.style.width) {
1245
+ curTable.style.width = curTable.offsetWidth + 'px';
1246
+ }
1184
1247
  var colGroup = curTable.querySelector('colgroup');
1185
1248
  if (colGroup) {
1186
1249
  for (var i = 0; i < curTable.rows.length; i++) {
@@ -1277,7 +1340,7 @@ var Table = /** @class */ (function () {
1277
1340
  this.createTableButton.isStringTemplate = true;
1278
1341
  this.createTableButton.appendTo(btnEle);
1279
1342
  EventHandler.add(btnEle, 'click', this.insertTableDialog, { self: this, args: args.args, selection: args.selection });
1280
- this.parent.getToolbar().appendChild(this.dlgDiv);
1343
+ this.parent.getToolbar().parentElement.appendChild(this.dlgDiv);
1281
1344
  var target = args.args.originalEvent.target;
1282
1345
  target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
1283
1346
  this.popupObj = new Popup(this.dlgDiv, {
@@ -22,6 +22,7 @@ export declare class ToolbarRenderer implements IRenderer {
22
22
  private tooltip;
23
23
  private l10n;
24
24
  private dropdownTooltip;
25
+ private tooltipTargetEle;
25
26
  /**
26
27
  * Constructor for toolbar renderer module
27
28
  *
@@ -58,6 +59,8 @@ export declare class ToolbarRenderer implements IRenderer {
58
59
 
59
60
  */
60
61
  renderDropDownButton(args: IDropDownModel): DropDownButton;
62
+ private mouseOutHandler;
63
+ private closeTooltip;
61
64
  /**
62
65
  * renderListDropDown method
63
66
  *
@@ -1,4 +1,4 @@
1
- import { addClass, Browser, removeClass, formatUnit, isNullOrUndefined, isNullOrUndefined as isNOU } from '@syncfusion/ej2-base';
1
+ import { addClass, Browser, removeClass, formatUnit, isNullOrUndefined, isNullOrUndefined as isNOU, EventHandler } from '@syncfusion/ej2-base';
2
2
  import { getInstance, closest, selectAll } from '@syncfusion/ej2-base';
3
3
  import { Toolbar } from '@syncfusion/ej2-navigations';
4
4
  import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
@@ -31,6 +31,7 @@ var ToolbarRenderer = /** @class */ (function () {
31
31
  ToolbarRenderer.prototype.wireEvent = function () {
32
32
  this.parent.on(events.destroy, this.unWireEvent, this);
33
33
  this.parent.on(events.destroyTooltip, this.destroyTooltip, this);
34
+ this.parent.on(events.closeTooltip, this.closeTooltip, this);
34
35
  };
35
36
  ToolbarRenderer.prototype.destroyTooltip = function () {
36
37
  var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
@@ -43,6 +44,8 @@ var ToolbarRenderer = /** @class */ (function () {
43
44
  };
44
45
  ToolbarRenderer.prototype.unWireEvent = function () {
45
46
  this.parent.off(events.destroy, this.unWireEvent);
47
+ this.parent.off(events.destroyTooltip, this.destroyTooltip);
48
+ this.parent.off(events.closeTooltip, this.closeTooltip);
46
49
  };
47
50
  ToolbarRenderer.prototype.toolbarBeforeCreate = function (e) {
48
51
  if (this.mode === 'Extended') {
@@ -163,7 +166,7 @@ var ToolbarRenderer = /** @class */ (function () {
163
166
  windowCollision: true,
164
167
  position: 'BottomCenter'
165
168
  });
166
- this.tooltip.appendTo(args.target);
169
+ this.tooltip.appendTo(args.target.parentElement);
167
170
  }
168
171
  };
169
172
  /**
@@ -295,6 +298,32 @@ var ToolbarRenderer = /** @class */ (function () {
295
298
  popupElement.setAttribute('aria-owns', this.parent.getID());
296
299
  return dropDown;
297
300
  };
301
+ ToolbarRenderer.prototype.mouseOutHandler = function () {
302
+ if (!isNOU(this.tooltipTargetEle)) {
303
+ this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
304
+ }
305
+ else {
306
+ var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
307
+ this.parent.contentModule.getDocument();
308
+ this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
309
+ this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
310
+ }
311
+ this.tooltipTargetEle.removeAttribute('data-title');
312
+ EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
313
+ };
314
+ ToolbarRenderer.prototype.closeTooltip = function (args) {
315
+ var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
316
+ this.parent.contentModule.getDocument();
317
+ this.tooltipTargetEle = closest(args.target, '[data-tooltip-id]');
318
+ if (!isNOU(this.tooltipTargetEle) && this.parent.showTooltip && !isNOU(currentDocument.querySelector('.e-tooltip-wrap'))) {
319
+ this.destroyTooltip();
320
+ if (!this.tooltipTargetEle.closest('.e-rte-quick-popup')) {
321
+ this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
322
+ this.tooltipTargetEle.removeAttribute('title');
323
+ EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
324
+ }
325
+ }
326
+ };
298
327
  /**
299
328
  * renderListDropDown method
300
329
  *
@@ -304,6 +333,7 @@ var ToolbarRenderer = /** @class */ (function () {
304
333
 
305
334
  */
306
335
  ToolbarRenderer.prototype.renderListDropDown = function (args) {
336
+ var _this = this;
307
337
  // eslint-disable-next-line
308
338
  var proxy = this;
309
339
  var css = CLS_RTE_ELEMENTS + ' ' + CLS_TB_BTN + ((this.parent.inlineMode) ? (' ' + CLS_INLINE_DROPDOWN) : '');
@@ -319,6 +349,35 @@ var ToolbarRenderer = /** @class */ (function () {
319
349
  enableRtl: this.parent.enableRtl,
320
350
  select: this.dropDownSelected.bind(this),
321
351
  beforeOpen: function (args) {
352
+ if (proxy.parent.editorMode !== 'Markdown') {
353
+ var startNode = proxy.parent.getRange().startContainer.parentElement;
354
+ var listElem = startNode.closest('LI');
355
+ var currentLiElem = !isNOU(listElem) ? listElem.parentElement : null;
356
+ if (!isNOU(currentLiElem) && (currentLiElem.nodeName === 'OL' || currentLiElem.nodeName === 'UL')) {
357
+ if (currentLiElem.nodeName === 'UL' && args.items[0].subCommand === 'NumberFormatList') {
358
+ addClass([args.element.childNodes[0]], 'e-active');
359
+ }
360
+ else if (currentLiElem.nodeName === 'OL' && args.items[0].subCommand === 'BulletFormatList') {
361
+ addClass([args.element.childNodes[0]], 'e-active');
362
+ }
363
+ else {
364
+ var currentListStyle = currentLiElem.style.listStyleType.split('-').join('').toLocaleLowerCase();
365
+ currentListStyle = currentListStyle === 'decimal' ? 'number' : currentListStyle;
366
+ for (var index = 0; index < args.element.childNodes.length; index++) {
367
+ if (currentListStyle === args.element.childNodes[index].innerHTML.split(' ').join('').toLocaleLowerCase()) {
368
+ addClass([args.element.childNodes[index]], 'e-active');
369
+ }
370
+ else if (currentListStyle === '') {
371
+ addClass([args.element.childNodes[index]], 'e-active');
372
+ }
373
+ }
374
+ }
375
+ }
376
+ else {
377
+ addClass([args.element.childNodes[0]], 'e-active');
378
+ }
379
+ }
380
+ _this.closeTooltip({ target: args.event.target });
322
381
  if (proxy.parent.readonly || !proxy.parent.enabled) {
323
382
  args.cancel = true;
324
383
  return;
@@ -144,7 +144,7 @@ var Video = /** @class */ (function () {
144
144
  var dialogContent = this.vidsizeInput(e);
145
145
  var selectObj_1 = { args: e.args, selfVideo: this, selection: e.selection, selectNode: e.selectNode };
146
146
  this.dialogObj.setProperties({
147
- height: 'inherit', width: '290px', header: vidSizeHeader, content: dialogContent,
147
+ width: '290px', header: vidSizeHeader, content: dialogContent,
148
148
  buttons: [{
149
149
  // eslint-disable-next-line
150
150
  click: function (e) {
@@ -516,7 +516,6 @@ var Video = /** @class */ (function () {
516
516
  _this.setAspectRatio(_this.videoEle, parseInt(width, 10), parseInt(height, 10), args);
517
517
  _this.resizeVidDupPos(_this.videoEle);
518
518
  _this.vidResizePos(_this.videoEle, _this.vidResizeDiv);
519
- _this.parent.setContentHeight('', false);
520
519
  }
521
520
  });
522
521
  };
@@ -1330,8 +1329,12 @@ var Video = /** @class */ (function () {
1330
1329
  _this.parent.trigger(events.fileRemoving, e, function (e) {
1331
1330
  proxy.isVideoUploaded = false;
1332
1331
  _this.dialogObj.getButtons(0).element.disabled = true;
1333
- //proxy.inputUrl.removeAttribute('disabled');
1334
- proxy.embedInputUrl.removeAttribute('disabled');
1332
+ if (proxy.inputUrl.getAttribute('disabled')) {
1333
+ proxy.inputUrl.removeAttribute('disabled');
1334
+ }
1335
+ if (proxy.embedInputUrl.getAttribute('disabled')) {
1336
+ proxy.embedInputUrl.removeAttribute('disabled');
1337
+ }
1335
1338
  if (proxy.uploadUrl) {
1336
1339
  proxy.uploadUrl.url = '';
1337
1340
  }
@@ -135,7 +135,6 @@ var ViewSource = /** @class */ (function () {
135
135
  rteContent.appendChild(this.previewElement);
136
136
  this.parent.element.appendChild(rteContent);
137
137
  rteContent.style.height = this.contentModule.getPanel().style.height;
138
- rteContent.style.marginTop = this.contentModule.getPanel().style.marginTop;
139
138
  this.getPanel().value = this.getTextAreaValue();
140
139
  this.contentModule.getPanel().style.display = 'none';
141
140
  rteContent.style.display = 'block';
@@ -156,14 +155,17 @@ var ViewSource = /** @class */ (function () {
156
155
  removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
157
156
  }
158
157
  removeClass(tbItems, [CLS_ACTIVE]);
159
- this.parent.setContentHeight('sourceCode', true);
158
+ var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
159
+ this.parent.setContentHeight('SourceCode', isExpand);
160
160
  this.wireEvent(this.previewElement);
161
161
  this.unWireBaseKeyDown();
162
162
  this.previewElement.focus();
163
163
  this.parent.updateValue();
164
164
  if (!isNullOrUndefined(this.parent.placeholder) && !this.parent.iframeSettings.enable) {
165
165
  var placeHolderWrapper = this.parent.element.querySelector('.rte-placeholder.e-rte-placeholder');
166
- placeHolderWrapper.style.display = 'none';
166
+ if (placeHolderWrapper) {
167
+ placeHolderWrapper.style.display = 'none';
168
+ }
167
169
  }
168
170
  this.parent.trigger(events.actionComplete, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
169
171
  this.parent.invokeChangeEvent();
@@ -219,7 +221,8 @@ var ViewSource = /** @class */ (function () {
219
221
  if (this.parent.getToolbar()) {
220
222
  removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
221
223
  }
222
- this.parent.setContentHeight('preview', true);
224
+ var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
225
+ this.parent.setContentHeight('Preview', isExpand);
223
226
  this.unWireEvent();
224
227
  this.wireBaseKeyDown();
225
228
  this.contentModule.getEditPanel().focus();
@@ -140,12 +140,14 @@
140
140
  content: "\e948";
141
141
  }
142
142
  .e-rte-toolbar .e-replace::before,
143
+ .e-rte-dropdown-popup .e-replace::before {
144
+ content: "\e359";
145
+ }
143
146
  .e-rte-toolbar .e-audio-replace::before,
144
147
  .e-rte-toolbar .e-video-replace::before,
145
- .e-rte-dropdown-popup .e-replace::before,
146
148
  .e-rte-dropdown-popup .e-audio-replace::before,
147
149
  .e-rte-dropdown-popup .e-video-replace::before {
148
- content: "\e359";
150
+ content: "\e606";
149
151
  }
150
152
  .e-rte-toolbar .e-align::before,
151
153
  .e-rte-dropdown-popup .e-align::before {
@@ -235,11 +237,11 @@
235
237
  }
236
238
  .e-rte-toolbar .e-table-header::before,
237
239
  .e-rte-dropdown-popup .e-table-header::before {
238
- content: "\e705";
240
+ content: "\e148";
239
241
  }
240
242
  .e-rte-toolbar .e-table-remove::before,
241
243
  .e-rte-dropdown-popup .e-table-remove::before {
242
- content: "\eb00";
244
+ content: "\e292";
243
245
  }
244
246
  .e-rte-toolbar .e-table-rows::before,
245
247
  .e-rte-dropdown-popup .e-table-rows::before {
@@ -541,6 +543,14 @@
541
543
  .e-richtexteditor.e-bigger .e-dialog .e-vid-uploadwrap.e-droparea .e-browsebtn {
542
544
  top: -120px;
543
545
  }
546
+ .e-bigger .e-richtexteditor .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control,
547
+ .e-richtexteditor.e-bigger .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control {
548
+ padding: 0 6px;
549
+ }
550
+ .e-bigger .e-richtexteditor .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control:hover,
551
+ .e-richtexteditor.e-bigger .e-toolbar.e-extended-toolbar .e-toolbar-extended .e-toolbar-item .e-tbar-btn.e-btn.e-control:hover {
552
+ padding: 0 6px;
553
+ }
544
554
 
545
555
  .e-richtexteditor {
546
556
  color: #f0f0f0;
@@ -783,15 +793,6 @@
783
793
  display: block;
784
794
  z-index: 101;
785
795
  }
786
- .e-richtexteditor .e-rte-toolbar.e-rte-tb-float,
787
- .e-richtexteditor .e-rte-toolbar.e-toolbar.e-extended-toolbar.e-rte-tb-float {
788
- position: fixed;
789
- top: 0;
790
- }
791
- .e-richtexteditor .e-rte-toolbar.e-rte-tb-float.e-rte-tb-abs-float,
792
- .e-richtexteditor .e-rte-toolbar.e-toolbar.e-extended-toolbar.e-rte-tb-float.e-rte-tb-abs-float {
793
- position: absolute;
794
- }
795
796
  .e-richtexteditor .rte-placeholder {
796
797
  color: #f0f0f0;
797
798
  line-height: 18px;
@@ -817,6 +818,8 @@
817
818
  }
818
819
  .e-richtexteditor .e-rte-content .e-content,
819
820
  .e-richtexteditor .e-source-content .e-content {
821
+ width: 100%;
822
+ float: left;
820
823
  background: unset;
821
824
  box-sizing: border-box;
822
825
  height: 100%;
@@ -837,6 +840,12 @@
837
840
  .e-richtexteditor .e-source-content .e-content li {
838
841
  margin-bottom: 10px;
839
842
  }
843
+ .e-richtexteditor .e-rte-content .e-content li ol,
844
+ .e-richtexteditor .e-rte-content .e-content li ul,
845
+ .e-richtexteditor .e-source-content .e-content li ol,
846
+ .e-richtexteditor .e-source-content .e-content li ul {
847
+ margin-block-start: 10px;
848
+ }
840
849
  .e-richtexteditor .e-rte-content .e-content h1,
841
850
  .e-richtexteditor .e-source-content .e-content h1 {
842
851
  font-size: 2.17em;
@@ -943,6 +952,7 @@
943
952
  position: absolute;
944
953
  right: 0;
945
954
  z-index: 100;
955
+ pointer-events: none;
946
956
  }
947
957
  .e-richtexteditor .e-rte-character-count.e-warning {
948
958
  color: #ffb74d;
@@ -1257,13 +1267,11 @@
1257
1267
  }
1258
1268
 
1259
1269
  .e-rte-img-caption .e-rte-image.e-imgright {
1260
- float: none;
1261
1270
  margin-left: auto;
1262
1271
  margin-right: 0;
1263
1272
  }
1264
1273
 
1265
1274
  .e-rte-img-caption .e-rte-image.e-imgleft {
1266
- float: none;
1267
1275
  margin: 0;
1268
1276
  }
1269
1277
 
@@ -1282,6 +1290,7 @@
1282
1290
  height: 20px;
1283
1291
  min-width: 20px;
1284
1292
  padding: 2px 5px;
1293
+ box-sizing: border-box;
1285
1294
  }
1286
1295
 
1287
1296
  .e-rte-table.e-dashed-border td,
@@ -1302,13 +1311,20 @@
1302
1311
  }
1303
1312
 
1304
1313
  .e-rte-img-caption.e-imgleft .e-img-inner {
1314
+ float: left;
1305
1315
  text-align: left;
1306
1316
  }
1307
1317
 
1308
1318
  .e-rte-img-caption.e-imgright .e-img-inner {
1319
+ float: right;
1309
1320
  text-align: right;
1310
1321
  }
1311
1322
 
1323
+ .e-rte-img-caption.e-imgleft .e-img-wrap,
1324
+ .e-rte-img-caption.e-imgright .e-img-wrap {
1325
+ display: contents;
1326
+ }
1327
+
1312
1328
  .e-rte-img-caption .e-img-wrap {
1313
1329
  display: inline-block;
1314
1330
  margin: auto;
@@ -1563,7 +1579,7 @@
1563
1579
  .e-rte-elements .e-rte-content .e-content table td.e-cell-select,
1564
1580
  .e-rte-elements .e-rte-content .e-content table th.e-cell-select {
1565
1581
  border: 1px double #0478d7;
1566
- height: 24.67px;
1582
+ height: inherit;
1567
1583
  }
1568
1584
  .e-richtexteditor span.e-table-box,
1569
1585
  .e-rte-elements span.e-table-box {
@@ -2636,6 +2652,27 @@
2636
2652
  visibility: hidden;
2637
2653
  }
2638
2654
 
2655
+ .e-richtexteditor .e-toolbar-wrapper.e-rte-tb-float,
2656
+ .e-richtexteditor .e-toolbar-container.e-rte-tb-float {
2657
+ position: sticky;
2658
+ top: 0;
2659
+ overflow: visible;
2660
+ }
2661
+ .e-richtexteditor .e-toolbar-wrapper,
2662
+ .e-richtexteditor .e-toolbar-container {
2663
+ height: auto;
2664
+ z-index: 10;
2665
+ }
2666
+ .e-richtexteditor .e-toolbar .e-toolbar-pop.e-toolbar-extended {
2667
+ position: relative;
2668
+ width: 100%;
2669
+ top: 0 !important; /* stylelint-disable-line declaration-no-important */
2670
+ left: 0 !important; /* stylelint-disable-line declaration-no-important */
2671
+ }
2672
+ .e-richtexteditor .e-toolbar .e-toolbar-pop.e-toolbar-extended.e-popup-open {
2673
+ display: block;
2674
+ }
2675
+
2639
2676
  /*! tab layout */
2640
2677
  .e-richtexteditor .e-rte-toolbar {
2641
2678
  border: 1px solid #505050;
@@ -2752,6 +2789,9 @@
2752
2789
  .e-richtexteditor .e-toolbar-wrapper .e-rte-toolbar:not(.e-rte-tb-float) {
2753
2790
  border-bottom: 1px solid #505050;
2754
2791
  }
2792
+ .e-richtexteditor .e-toolbar-wrapper.e-rte-tb-float .e-rte-toolbar {
2793
+ border-top: 1px solid #505050;
2794
+ }
2755
2795
  .e-richtexteditor .e-toolbar-wrapper + .e-rte-toolbar:not(.e-rte-tb-float) {
2756
2796
  border: 0;
2757
2797
  }
@@ -3072,7 +3112,7 @@ span.e-rte-videoboxmark {
3072
3112
  }
3073
3113
 
3074
3114
  .e-dropdown-popup ul .e-item.e-active {
3075
- background-color: #0070f0;
3115
+ background: #0070f0;
3076
3116
  color: #fff;
3077
3117
  }
3078
3118