@syncfusion/ej2-richtexteditor 25.1.42 → 25.2.4-621927

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 (280) hide show
  1. package/.eslintrc.json +259 -259
  2. package/CHANGELOG.md +2067 -2001
  3. package/README.md +76 -76
  4. package/dist/ej2-richtexteditor.umd.min.js +1 -10
  5. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-richtexteditor.es2015.js +642 -305
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +742 -401
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/helpers/e2e/index.js +3 -3
  11. package/helpers/e2e/rte-helper.js +13 -13
  12. package/license +9 -9
  13. package/package.json +84 -84
  14. package/src/common/interface.d.ts +22 -8
  15. package/src/common/util.d.ts +8 -0
  16. package/src/common/util.js +56 -1
  17. package/src/editor-manager/base/classes.d.ts +1 -1
  18. package/src/editor-manager/base/classes.js +1 -1
  19. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  20. package/src/editor-manager/base/editor-manager.js +8 -6
  21. package/src/editor-manager/base/enum.d.ts +2 -2
  22. package/src/editor-manager/base/interface.d.ts +9 -9
  23. package/src/editor-manager/base/types.d.ts +1 -1
  24. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  25. package/src/editor-manager/plugin/alignments.js +5 -2
  26. package/src/editor-manager/plugin/audio.d.ts +3 -3
  27. package/src/editor-manager/plugin/audio.js +3 -3
  28. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  29. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  30. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  31. package/src/editor-manager/plugin/clearformat.js +1 -1
  32. package/src/editor-manager/plugin/dom-node.d.ts +54 -34
  33. package/src/editor-manager/plugin/dom-node.js +139 -36
  34. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  35. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  36. package/src/editor-manager/plugin/formats.d.ts +2 -2
  37. package/src/editor-manager/plugin/formats.js +3 -3
  38. package/src/editor-manager/plugin/image.d.ts +3 -3
  39. package/src/editor-manager/plugin/image.js +3 -3
  40. package/src/editor-manager/plugin/indents.d.ts +2 -2
  41. package/src/editor-manager/plugin/indents.js +5 -2
  42. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  43. package/src/editor-manager/plugin/insert-methods.js +4 -4
  44. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  45. package/src/editor-manager/plugin/insert-text.js +2 -2
  46. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  47. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  48. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  49. package/src/editor-manager/plugin/inserthtml.js +5 -2
  50. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  51. package/src/editor-manager/plugin/isformatted.js +8 -8
  52. package/src/editor-manager/plugin/link.d.ts +2 -2
  53. package/src/editor-manager/plugin/link.js +2 -2
  54. package/src/editor-manager/plugin/lists.d.ts +2 -3
  55. package/src/editor-manager/plugin/lists.js +57 -80
  56. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  57. package/src/editor-manager/plugin/ms-word-clean-up.js +4 -4
  58. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  59. package/src/editor-manager/plugin/nodecutter.js +6 -6
  60. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  61. package/src/editor-manager/plugin/selection-commands.js +1 -1
  62. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  63. package/src/editor-manager/plugin/selection-exec.js +2 -2
  64. package/src/editor-manager/plugin/table.d.ts +2 -2
  65. package/src/editor-manager/plugin/table.js +2 -2
  66. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  67. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  68. package/src/editor-manager/plugin/undo.d.ts +6 -6
  69. package/src/editor-manager/plugin/undo.js +9 -7
  70. package/src/editor-manager/plugin/video.d.ts +3 -3
  71. package/src/editor-manager/plugin/video.js +3 -3
  72. package/src/markdown-parser/base/interface.d.ts +10 -10
  73. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  74. package/src/markdown-parser/base/markdown-parser.js +3 -3
  75. package/src/markdown-parser/base/types.d.ts +1 -1
  76. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  77. package/src/markdown-parser/plugin/clearformat.js +2 -2
  78. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  79. package/src/markdown-parser/plugin/formats.js +2 -2
  80. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  81. package/src/markdown-parser/plugin/insert-text.js +2 -2
  82. package/src/markdown-parser/plugin/link.d.ts +2 -2
  83. package/src/markdown-parser/plugin/link.js +2 -2
  84. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  85. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  86. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  87. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  88. package/src/markdown-parser/plugin/table.d.ts +3 -3
  89. package/src/markdown-parser/plugin/table.js +3 -3
  90. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  91. package/src/markdown-parser/plugin/undo.js +6 -6
  92. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  93. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  94. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  95. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  96. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  97. package/src/rich-text-editor/actions/color-picker.js +2 -2
  98. package/src/rich-text-editor/actions/count.d.ts +3 -3
  99. package/src/rich-text-editor/actions/count.js +3 -3
  100. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  101. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  102. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  103. package/src/rich-text-editor/actions/emoji-picker.js +1 -1
  104. package/src/rich-text-editor/actions/enter-key.d.ts +5 -0
  105. package/src/rich-text-editor/actions/enter-key.js +98 -13
  106. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  107. package/src/rich-text-editor/actions/full-screen.js +3 -9
  108. package/src/rich-text-editor/actions/html-editor.d.ts +4 -3
  109. package/src/rich-text-editor/actions/html-editor.js +68 -23
  110. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  111. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  112. package/src/rich-text-editor/actions/keyboard.js +20 -20
  113. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  114. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  115. package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -1
  116. package/src/rich-text-editor/actions/paste-clean-up.js +55 -14
  117. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  118. package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
  119. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  120. package/src/rich-text-editor/actions/toolbar.js +13 -13
  121. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  122. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  123. package/src/rich-text-editor/base/classes.d.ts +121 -121
  124. package/src/rich-text-editor/base/classes.js +121 -121
  125. package/src/rich-text-editor/base/constant.d.ts +158 -158
  126. package/src/rich-text-editor/base/constant.js +158 -158
  127. package/src/rich-text-editor/base/enum.d.ts +1 -1
  128. package/src/rich-text-editor/base/enum.js +1 -1
  129. package/src/rich-text-editor/base/interface.d.ts +50 -50
  130. package/src/rich-text-editor/base/interface.js +1 -1
  131. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  132. package/src/rich-text-editor/base/rich-text-editor.d.ts +63 -61
  133. package/src/rich-text-editor/base/rich-text-editor.js +82 -67
  134. package/src/rich-text-editor/base/util.d.ts +1 -1
  135. package/src/rich-text-editor/base/util.js +1 -1
  136. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  137. package/src/rich-text-editor/formatter/formatter.js +8 -8
  138. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  139. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  140. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  141. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  142. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  143. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  144. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  145. package/src/rich-text-editor/models/inline-mode.js +19 -19
  146. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  147. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  148. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  149. package/src/rich-text-editor/renderer/audio-module.js +7 -2
  150. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  151. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  152. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  153. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  154. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  155. package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
  156. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  157. package/src/rich-text-editor/renderer/image-module.js +10 -5
  158. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  159. package/src/rich-text-editor/renderer/link-module.js +1 -1
  160. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  161. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  162. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  163. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  164. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  165. package/src/rich-text-editor/renderer/render.js +2 -2
  166. package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
  167. package/src/rich-text-editor/renderer/table-module.js +3 -2
  168. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
  169. package/src/rich-text-editor/renderer/toolbar-renderer.js +16 -18
  170. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  171. package/src/rich-text-editor/renderer/video-module.js +7 -2
  172. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  173. package/src/rich-text-editor/renderer/view-source.js +6 -6
  174. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  175. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  176. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  177. package/src/rich-text-editor/services/service-locator.js +3 -3
  178. package/src/selection/selection.d.ts +22 -22
  179. package/src/selection/selection.js +22 -22
  180. package/styles/_all.scss +1 -1
  181. package/styles/bootstrap-dark.css +705 -801
  182. package/styles/bootstrap-dark.scss +4 -1
  183. package/styles/bootstrap.css +689 -801
  184. package/styles/bootstrap.scss +4 -1
  185. package/styles/bootstrap4.css +692 -803
  186. package/styles/bootstrap4.scss +4 -1
  187. package/styles/bootstrap5-dark.css +716 -840
  188. package/styles/bootstrap5-dark.scss +4 -1
  189. package/styles/bootstrap5.css +715 -839
  190. package/styles/bootstrap5.scss +4 -1
  191. package/styles/fabric-dark.css +690 -797
  192. package/styles/fabric-dark.scss +4 -1
  193. package/styles/fabric.css +686 -797
  194. package/styles/fabric.scss +4 -1
  195. package/styles/fluent-dark.css +693 -820
  196. package/styles/fluent-dark.scss +4 -1
  197. package/styles/fluent.css +692 -819
  198. package/styles/fluent.scss +4 -1
  199. package/styles/fluent2.css +4219 -0
  200. package/styles/fluent2.scss +4 -0
  201. package/styles/highcontrast-light.css +661 -795
  202. package/styles/highcontrast-light.scss +4 -1
  203. package/styles/highcontrast.css +667 -793
  204. package/styles/highcontrast.scss +4 -1
  205. package/styles/material-dark.css +682 -798
  206. package/styles/material-dark.scss +4 -1
  207. package/styles/material.css +679 -800
  208. package/styles/material.scss +4 -1
  209. package/styles/material3-dark.css +717 -857
  210. package/styles/material3-dark.scss +4 -1
  211. package/styles/material3.css +717 -857
  212. package/styles/material3.scss +4 -1
  213. package/styles/rich-text-editor/_all.scss +2 -2
  214. package/styles/rich-text-editor/_bds-definition.scss +288 -285
  215. package/styles/rich-text-editor/_bigger.scss +610 -0
  216. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +289 -287
  217. package/styles/rich-text-editor/_bootstrap-definition.scss +347 -343
  218. package/styles/rich-text-editor/_bootstrap4-definition.scss +474 -470
  219. package/styles/rich-text-editor/_bootstrap5-definition.scss +276 -272
  220. package/styles/rich-text-editor/_bootstrap5.3-definition.scss +276 -0
  221. package/styles/rich-text-editor/_fabric-dark-definition.scss +273 -269
  222. package/styles/rich-text-editor/_fabric-definition.scss +271 -267
  223. package/styles/rich-text-editor/_fluent-definition.scss +277 -273
  224. package/styles/rich-text-editor/_fluent2-definition.scss +285 -0
  225. package/styles/rich-text-editor/_fusionnew-definition.scss +274 -271
  226. package/styles/rich-text-editor/_highcontrast-definition.scss +272 -267
  227. package/styles/rich-text-editor/_highcontrast-light-definition.scss +271 -267
  228. package/styles/rich-text-editor/_layout.scss +2148 -2272
  229. package/styles/rich-text-editor/_material-dark-definition.scss +276 -272
  230. package/styles/rich-text-editor/_material-definition.scss +274 -270
  231. package/styles/rich-text-editor/_material3-definition.scss +276 -272
  232. package/styles/rich-text-editor/_tailwind-definition.scss +271 -267
  233. package/styles/rich-text-editor/_theme.scss +802 -927
  234. package/styles/rich-text-editor/bootstrap-dark.css +705 -801
  235. package/styles/rich-text-editor/bootstrap.css +689 -801
  236. package/styles/rich-text-editor/bootstrap4.css +692 -803
  237. package/styles/rich-text-editor/bootstrap5-dark.css +716 -840
  238. package/styles/rich-text-editor/bootstrap5.css +715 -839
  239. package/styles/rich-text-editor/fabric-dark.css +690 -797
  240. package/styles/rich-text-editor/fabric.css +686 -797
  241. package/styles/rich-text-editor/fluent-dark.css +693 -820
  242. package/styles/rich-text-editor/fluent.css +692 -819
  243. package/styles/rich-text-editor/fluent2.css +4219 -0
  244. package/styles/rich-text-editor/fluent2.scss +4 -0
  245. package/styles/rich-text-editor/highcontrast-light.css +661 -795
  246. package/styles/rich-text-editor/highcontrast.css +667 -793
  247. package/styles/rich-text-editor/icons/_bds.scss +372 -351
  248. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -352
  249. package/styles/rich-text-editor/icons/_bootstrap.scss +373 -352
  250. package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -352
  251. package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -0
  252. package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -351
  253. package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -352
  254. package/styles/rich-text-editor/icons/_fabric.scss +373 -352
  255. package/styles/rich-text-editor/icons/_fluent.scss +372 -351
  256. package/styles/rich-text-editor/icons/_fluent2.scss +369 -0
  257. package/styles/rich-text-editor/icons/_fusionnew.scss +357 -348
  258. package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -352
  259. package/styles/rich-text-editor/icons/_highcontrast.scss +361 -352
  260. package/styles/rich-text-editor/icons/_material-dark.scss +373 -352
  261. package/styles/rich-text-editor/icons/_material.scss +373 -352
  262. package/styles/rich-text-editor/icons/_material3.scss +372 -351
  263. package/styles/rich-text-editor/icons/_tailwind.scss +372 -351
  264. package/styles/rich-text-editor/material-dark.css +682 -798
  265. package/styles/rich-text-editor/material.css +679 -800
  266. package/styles/rich-text-editor/material3-dark.css +717 -857
  267. package/styles/rich-text-editor/material3-dark.scss +1 -1
  268. package/styles/rich-text-editor/material3.css +717 -857
  269. package/styles/rich-text-editor/material3.scss +1 -1
  270. package/styles/rich-text-editor/tailwind-dark.css +705 -828
  271. package/styles/rich-text-editor/tailwind.css +705 -828
  272. package/styles/tailwind-dark.css +705 -828
  273. package/styles/tailwind-dark.scss +4 -1
  274. package/styles/tailwind.css +705 -828
  275. package/styles/tailwind.scss +4 -1
  276. package/dist/ej2-richtexteditor.min.js +0 -10
  277. package/dist/global/ej2-richtexteditor.min.js +0 -11
  278. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  279. package/dist/global/index.d.ts +0 -14
  280. package/tslint.json +0 -111
@@ -3570,7 +3570,7 @@ function updateDropDownFontFormatLocale(self) {
3570
3570
  * @hidden
3571
3571
  * @deprecated
3572
3572
  */
3573
- var IsFormatted = /** @__PURE__ @class */ (function () {
3573
+ var IsFormatted = /** @class */ (function () {
3574
3574
  function IsFormatted() {
3575
3575
  }
3576
3576
  /**
@@ -3916,7 +3916,7 @@ var PASTE_SOURCE = ['word', 'excel', 'onenote'];
3916
3916
  /**
3917
3917
  * `Selection` module is used to handle RTE Selections.
3918
3918
  */
3919
- var NodeSelection = /** @__PURE__ @class */ (function () {
3919
+ var NodeSelection = /** @class */ (function () {
3920
3920
  function NodeSelection() {
3921
3921
  this.startNodeName = [];
3922
3922
  this.endNodeName = [];
@@ -4476,6 +4476,10 @@ function updateTextNode$1(value, enterAction) {
4476
4476
  tableElm[i].classList.remove('e-rte-paste-onenote-table');
4477
4477
  continue;
4478
4478
  }
4479
+ else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
4480
+ tableElm[i].classList.remove('e-rte-paste-html-table');
4481
+ continue;
4482
+ }
4479
4483
  }
4480
4484
  }
4481
4485
  var imageElm = resultElm.querySelectorAll('img');
@@ -4569,17 +4573,68 @@ function nestedListCleanUp(range) {
4569
4573
  item.remove();
4570
4574
  });
4571
4575
  }
4576
+ else {
4577
+ break;
4578
+ }
4572
4579
  }
4573
4580
  var liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
4574
4581
  if (liElem.length > 0) {
4575
4582
  liElem.forEach(function (item) {
4576
- if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
4583
+ if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL")) {
4577
4584
  item.style.listStyleType = "none";
4578
4585
  }
4579
4586
  });
4580
4587
  }
4581
4588
  }
4582
4589
  }
4590
+ /**
4591
+ * Method to scroll the content to the cursor position
4592
+ *
4593
+ * @param {Document} document - specifies the document.
4594
+ * @param {HTMLElement | HTMLBodyElement} inputElement - specifies the input element.
4595
+ * @returns {void}
4596
+ */
4597
+ function scrollToCursor(document, inputElement) {
4598
+ var rootElement = inputElement.nodeName === 'BODY' ?
4599
+ inputElement.ownerDocument.defaultView.frameElement.closest('.e-richtexteditor') :
4600
+ inputElement.closest('.e-richtexteditor');
4601
+ var height = rootElement.style.height;
4602
+ if (document.getSelection().rangeCount === 0) {
4603
+ return;
4604
+ }
4605
+ var range = document.getSelection().getRangeAt(0);
4606
+ var finalFocusElement = range.startContainer.nodeName === '#text' ? range.startContainer.parentElement :
4607
+ range.startContainer;
4608
+ var rect = finalFocusElement.getBoundingClientRect();
4609
+ var cursorTop = rect.top;
4610
+ var cursorBottom = rect.bottom;
4611
+ var rootRect = rootElement.getBoundingClientRect();
4612
+ var hasMargin = rootElement.querySelectorAll('.e-count-enabled, .e-resize-enabled').length > 0;
4613
+ if (inputElement.nodeName === 'BODY') {
4614
+ if (height === 'auto') {
4615
+ if (window.innerHeight < cursorTop) {
4616
+ finalFocusElement.scrollIntoView(false);
4617
+ }
4618
+ }
4619
+ else {
4620
+ if (cursorTop > inputElement.getBoundingClientRect().height) {
4621
+ finalFocusElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
4622
+ }
4623
+ }
4624
+ }
4625
+ else {
4626
+ if (height === 'auto') {
4627
+ if (window.innerHeight < cursorTop) {
4628
+ finalFocusElement.scrollIntoView({ block: 'end', inline: 'nearest' });
4629
+ }
4630
+ }
4631
+ else {
4632
+ if (cursorBottom > rootRect.bottom) {
4633
+ rootElement.querySelector('.e-rte-content').scrollTop += (cursorBottom - rootRect.bottom) + (hasMargin ? 20 : 0);
4634
+ }
4635
+ }
4636
+ }
4637
+ }
4583
4638
 
4584
4639
  /**
4585
4640
  * Update Toolbar Status
@@ -4588,7 +4643,7 @@ function nestedListCleanUp(range) {
4588
4643
  * @deprecated
4589
4644
  */
4590
4645
  var statusCollection = getDefaultHtmlTbStatus();
4591
- var ToolbarStatus = /** @__PURE__ @class */ (function () {
4646
+ var ToolbarStatus = /** @class */ (function () {
4592
4647
  function ToolbarStatus() {
4593
4648
  }
4594
4649
  /**
@@ -4957,7 +5012,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
4957
5012
  * @hidden
4958
5013
  * @deprecated
4959
5014
  */
4960
- var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5015
+ var ToolbarRenderer = /** @class */ (function () {
4961
5016
  /**
4962
5017
  * Constructor for toolbar renderer module
4963
5018
  *
@@ -5404,8 +5459,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5404
5459
  target: colorPicker.element.parentElement, cssClass: css,
5405
5460
  enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
5406
5461
  beforeOpen: function (dropDownArgs) {
5407
- colorPicker.inline = true;
5408
- colorPicker.dataBind();
5409
5462
  if (proxy.parent.readonly || !proxy.parent.enabled) {
5410
5463
  dropDownArgs.cancel = true;
5411
5464
  return;
@@ -5544,14 +5597,18 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5544
5597
  var colorPicker = new ColorPicker({
5545
5598
  enablePersistence: this.parent.enablePersistence,
5546
5599
  enableRtl: this.parent.enableRtl,
5547
- inline: false,
5548
- value: '#fff',
5600
+ inline: true,
5601
+ value: null,
5602
+ cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
5549
5603
  created: function () {
5550
5604
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5551
- colorPicker.setProperties({ value: value });
5605
+ colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5606
+ colorPicker.value = value;
5552
5607
  },
5553
5608
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5554
5609
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
5610
+ presetColors: (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode : this.parent.fontColor.colorCode,
5611
+ columns: (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns,
5555
5612
  beforeTileRender: function (args) {
5556
5613
  args.element.classList.add(CLS_COLOR_PALETTE);
5557
5614
  args.element.classList.add(CLS_CUSTOM_TILE);
@@ -5596,10 +5653,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5596
5653
  }
5597
5654
  });
5598
5655
  colorPicker.isStringTemplate = true;
5599
- colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
5600
- colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
5601
- this.parent.fontColor.colorCode;
5602
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5603
5656
  colorPicker.createElement = this.parent.createElement;
5604
5657
  colorPicker.appendTo(document.getElementById(args.target));
5605
5658
  return colorPicker;
@@ -5646,7 +5699,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5646
5699
  /**
5647
5700
  * `Toolbar` module is used to handle Toolbar actions.
5648
5701
  */
5649
- var BaseToolbar = /** @__PURE__ @class */ (function () {
5702
+ var BaseToolbar = /** @class */ (function () {
5650
5703
  function BaseToolbar(parent, serviceLocator) {
5651
5704
  this.tools = {};
5652
5705
  this.parent = parent;
@@ -5854,7 +5907,7 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
5854
5907
  /**
5855
5908
  * `Toolbar` module is used to handle Toolbar actions.
5856
5909
  */
5857
- var DropDownButtons = /** @__PURE__ @class */ (function () {
5910
+ var DropDownButtons = /** @class */ (function () {
5858
5911
  function DropDownButtons(parent, serviceLocator) {
5859
5912
  this.parent = parent;
5860
5913
  this.locator = serviceLocator;
@@ -6385,7 +6438,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
6385
6438
  * @hidden
6386
6439
  * @deprecated
6387
6440
  */
6388
- var ServiceLocator = /** @__PURE__ @class */ (function () {
6441
+ var ServiceLocator = /** @class */ (function () {
6389
6442
  function ServiceLocator() {
6390
6443
  this.services = {};
6391
6444
  }
@@ -6429,7 +6482,7 @@ var ServiceLocator = /** @__PURE__ @class */ (function () {
6429
6482
  * @hidden
6430
6483
  * @deprecated
6431
6484
  */
6432
- var RendererFactory = /** @__PURE__ @class */ (function () {
6485
+ var RendererFactory = /** @class */ (function () {
6433
6486
  function RendererFactory() {
6434
6487
  this.rendererMap = {};
6435
6488
  }
@@ -6472,7 +6525,7 @@ var RendererFactory = /** @__PURE__ @class */ (function () {
6472
6525
  /**
6473
6526
  * `ToolbarAction` module is used to toolbar click action
6474
6527
  */
6475
- var ToolbarAction = /** @__PURE__ @class */ (function () {
6528
+ var ToolbarAction = /** @class */ (function () {
6476
6529
  function ToolbarAction(parent) {
6477
6530
  this.parent = parent;
6478
6531
  this.addEventListener();
@@ -6546,7 +6599,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
6546
6599
  /**
6547
6600
  * `Toolbar` module is used to handle Toolbar actions.
6548
6601
  */
6549
- var Toolbar$2 = /** @__PURE__ @class */ (function () {
6602
+ var Toolbar$2 = /** @class */ (function () {
6550
6603
  function Toolbar$$1(parent, serviceLocator) {
6551
6604
  this.tools = {};
6552
6605
  this.parent = parent;
@@ -7185,25 +7238,25 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
7185
7238
  return Toolbar$$1;
7186
7239
  }());
7187
7240
 
7188
- var __extends = (undefined && undefined.__extends) || (function () {
7189
- var extendStatics = function (d, b) {
7190
- extendStatics = Object.setPrototypeOf ||
7191
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7192
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7193
- return extendStatics(d, b);
7194
- };
7195
- return function (d, b) {
7196
- extendStatics(d, b);
7197
- function __() { this.constructor = d; }
7198
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7199
- };
7200
- })();
7201
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7202
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7203
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7204
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7205
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7206
- };
7241
+ var __extends = (undefined && undefined.__extends) || (function () {
7242
+ var extendStatics = function (d, b) {
7243
+ extendStatics = Object.setPrototypeOf ||
7244
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7245
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7246
+ return extendStatics(d, b);
7247
+ };
7248
+ return function (d, b) {
7249
+ extendStatics(d, b);
7250
+ function __() { this.constructor = d; }
7251
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7252
+ };
7253
+ })();
7254
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7255
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7256
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7257
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7258
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7259
+ };
7207
7260
  var keyCode = {
7208
7261
  'backspace': 8,
7209
7262
  'tab': 9,
@@ -7273,7 +7326,7 @@ var keyCode = {
7273
7326
  * @hidden
7274
7327
  * @deprecated
7275
7328
  */
7276
- var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7329
+ var KeyboardEvents$1 = /** @class */ (function (_super) {
7277
7330
  __extends(KeyboardEvents$$1, _super);
7278
7331
  /**
7279
7332
  * Initializes the KeyboardEvents
@@ -7416,7 +7469,7 @@ var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7416
7469
  /**
7417
7470
  * `Color Picker` module is used to handle ColorPicker actions.
7418
7471
  */
7419
- var ColorPickerInput = /** @__PURE__ @class */ (function () {
7472
+ var ColorPickerInput = /** @class */ (function () {
7420
7473
  function ColorPickerInput(parent, serviceLocator) {
7421
7474
  this.tools = {};
7422
7475
  this.parent = parent;
@@ -7669,7 +7722,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
7669
7722
  /**
7670
7723
  * `Quick toolbar` module is used to handle Quick toolbar actions.
7671
7724
  */
7672
- var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
7725
+ var BaseQuickToolbar = /** @class */ (function () {
7673
7726
  function BaseQuickToolbar(parent, locator) {
7674
7727
  this.parent = parent;
7675
7728
  this.locator = locator;
@@ -8151,7 +8204,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
8151
8204
  * @hidden
8152
8205
  * @deprecated
8153
8206
  */
8154
- var PopupRenderer = /** @__PURE__ @class */ (function () {
8207
+ var PopupRenderer = /** @class */ (function () {
8155
8208
  /**
8156
8209
  * Constructor for popup renderer module
8157
8210
  *
@@ -8220,7 +8273,7 @@ var PopupRenderer = /** @__PURE__ @class */ (function () {
8220
8273
  /**
8221
8274
  * `Quick toolbar` module is used to handle Quick toolbar actions.
8222
8275
  */
8223
- var QuickToolbar = /** @__PURE__ @class */ (function () {
8276
+ var QuickToolbar = /** @class */ (function () {
8224
8277
  function QuickToolbar(parent, locator) {
8225
8278
  this.debounceTimeout = 1000;
8226
8279
  this.parent = parent;
@@ -8837,7 +8890,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
8837
8890
  /**
8838
8891
  * `Count` module is used to handle Count actions.
8839
8892
  */
8840
- var Count = /** @__PURE__ @class */ (function () {
8893
+ var Count = /** @class */ (function () {
8841
8894
  function Count(parent, serviceLocator) {
8842
8895
  this.parent = parent;
8843
8896
  this.locator = serviceLocator;
@@ -8965,7 +9018,7 @@ var Count = /** @__PURE__ @class */ (function () {
8965
9018
  * @hidden
8966
9019
  * @deprecated
8967
9020
  */
8968
- var MarkdownSelection = /** @__PURE__ @class */ (function () {
9021
+ var MarkdownSelection = /** @class */ (function () {
8969
9022
  function MarkdownSelection() {
8970
9023
  }
8971
9024
  /**
@@ -9181,7 +9234,7 @@ var MarkdownSelection = /** @__PURE__ @class */ (function () {
9181
9234
  /**
9182
9235
  * MarkdownToolbarStatus module for refresh the toolbar status
9183
9236
  */
9184
- var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9237
+ var MarkdownToolbarStatus = /** @class */ (function () {
9185
9238
  function MarkdownToolbarStatus(parent) {
9186
9239
  this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
9187
9240
  this.selection = new MarkdownSelection();
@@ -9304,7 +9357,7 @@ var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9304
9357
  /**
9305
9358
  * `ExecCommandCallBack` module is used to run the editor manager command
9306
9359
  */
9307
- var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
9360
+ var ExecCommandCallBack = /** @class */ (function () {
9308
9361
  function ExecCommandCallBack(parent) {
9309
9362
  this.parent = parent;
9310
9363
  this.addEventListener();
@@ -9434,7 +9487,7 @@ var MOUSE_DOWN = 'mouseDown';
9434
9487
  * @hidden
9435
9488
  * @deprecated
9436
9489
  */
9437
- var Formatter = /** @__PURE__ @class */ (function () {
9490
+ var Formatter = /** @class */ (function () {
9438
9491
  function Formatter() {
9439
9492
  }
9440
9493
  /**
@@ -9743,7 +9796,7 @@ var INSERT_TEXT_COMMAND = 'insert-text';
9743
9796
  *
9744
9797
  * @hidden
9745
9798
  */
9746
- var MDLists = /** @__PURE__ @class */ (function () {
9799
+ var MDLists = /** @class */ (function () {
9747
9800
  /**
9748
9801
  * Constructor for creating the Lists plugin
9749
9802
  *
@@ -10214,7 +10267,7 @@ var MDLists = /** @__PURE__ @class */ (function () {
10214
10267
  * @hidden
10215
10268
  * @deprecated
10216
10269
  */
10217
- var MDFormats = /** @__PURE__ @class */ (function () {
10270
+ var MDFormats = /** @class */ (function () {
10218
10271
  /**
10219
10272
  * Constructor for creating the Formats plugin
10220
10273
  *
@@ -10442,7 +10495,7 @@ var MDFormats = /** @__PURE__ @class */ (function () {
10442
10495
  * @hidden
10443
10496
  * @deprecated
10444
10497
  */
10445
- var MDSelectionFormats = /** @__PURE__ @class */ (function () {
10498
+ var MDSelectionFormats = /** @class */ (function () {
10446
10499
  function MDSelectionFormats(parent) {
10447
10500
  extend(this, this, parent, true);
10448
10501
  this.selection = this.parent.markdownSelection;
@@ -10912,7 +10965,7 @@ var imageResizeFactor = {
10912
10965
  /**
10913
10966
  * `Undo` module is used to handle undo actions.
10914
10967
  */
10915
- var UndoRedoCommands = /** @__PURE__ @class */ (function () {
10968
+ var UndoRedoCommands = /** @class */ (function () {
10916
10969
  function UndoRedoCommands(parent, options) {
10917
10970
  this.undoRedoStack = [];
10918
10971
  this.parent = parent;
@@ -11107,7 +11160,7 @@ var UndoRedoCommands = /** @__PURE__ @class */ (function () {
11107
11160
  * @hidden
11108
11161
  * @deprecated
11109
11162
  */
11110
- var MDLink = /** @__PURE__ @class */ (function () {
11163
+ var MDLink = /** @class */ (function () {
11111
11164
  /**
11112
11165
  * Constructor for creating the Formats plugin
11113
11166
  *
@@ -11158,7 +11211,7 @@ var MDLink = /** @__PURE__ @class */ (function () {
11158
11211
  * @hidden
11159
11212
  * @deprecated
11160
11213
  */
11161
- var MDTable = /** @__PURE__ @class */ (function () {
11214
+ var MDTable = /** @class */ (function () {
11162
11215
  /**
11163
11216
  * Constructor for creating the Formats plugin
11164
11217
  *
@@ -11387,7 +11440,7 @@ var MDTable = /** @__PURE__ @class */ (function () {
11387
11440
  * @hidden
11388
11441
  * @deprecated
11389
11442
  */
11390
- var ClearFormat = /** @__PURE__ @class */ (function () {
11443
+ var ClearFormat = /** @class */ (function () {
11391
11444
  /**
11392
11445
  * Constructor for creating the clear format plugin
11393
11446
  *
@@ -11505,7 +11558,7 @@ var ClearFormat = /** @__PURE__ @class */ (function () {
11505
11558
  * @hidden
11506
11559
  * @deprecated
11507
11560
  */
11508
- var MDInsertText = /** @__PURE__ @class */ (function () {
11561
+ var MDInsertText = /** @class */ (function () {
11509
11562
  /**
11510
11563
  * Constructor for creating the insert text plugin
11511
11564
  *
@@ -11555,7 +11608,7 @@ var MDInsertText = /** @__PURE__ @class */ (function () {
11555
11608
  * @hidden
11556
11609
  * @deprecated
11557
11610
  */
11558
- var MarkdownParser = /** @__PURE__ @class */ (function () {
11611
+ var MarkdownParser = /** @class */ (function () {
11559
11612
  /**
11560
11613
  * Constructor for creating the component
11561
11614
  *
@@ -11651,26 +11704,26 @@ var MarkdownParser = /** @__PURE__ @class */ (function () {
11651
11704
  return MarkdownParser;
11652
11705
  }());
11653
11706
 
11654
- var __extends$1 = (undefined && undefined.__extends) || (function () {
11655
- var extendStatics = function (d, b) {
11656
- extendStatics = Object.setPrototypeOf ||
11657
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11658
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11659
- return extendStatics(d, b);
11660
- };
11661
- return function (d, b) {
11662
- extendStatics(d, b);
11663
- function __() { this.constructor = d; }
11664
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11665
- };
11666
- })();
11707
+ var __extends$1 = (undefined && undefined.__extends) || (function () {
11708
+ var extendStatics = function (d, b) {
11709
+ extendStatics = Object.setPrototypeOf ||
11710
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11711
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11712
+ return extendStatics(d, b);
11713
+ };
11714
+ return function (d, b) {
11715
+ extendStatics(d, b);
11716
+ function __() { this.constructor = d; }
11717
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11718
+ };
11719
+ })();
11667
11720
  /**
11668
11721
  * Markdown adapter
11669
11722
  *
11670
11723
  * @hidden
11671
11724
  * @deprecated
11672
11725
  */
11673
- var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11726
+ var MarkdownFormatter = /** @class */ (function (_super) {
11674
11727
  __extends$1(MarkdownFormatter, _super);
11675
11728
  function MarkdownFormatter(options) {
11676
11729
  var _this = _super.call(this) || this;
@@ -11717,7 +11770,7 @@ var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11717
11770
  * @hidden
11718
11771
  * @deprecated
11719
11772
  */
11720
- var MarkdownRender = /** @__PURE__ @class */ (function () {
11773
+ var MarkdownRender = /** @class */ (function () {
11721
11774
  /**
11722
11775
  * Constructor for content renderer module
11723
11776
  *
@@ -11800,7 +11853,7 @@ var MarkdownRender = /** @__PURE__ @class */ (function () {
11800
11853
  /**
11801
11854
  * `MarkdownEditor` module is used to markdown editor
11802
11855
  */
11803
- var MarkdownEditor = /** @__PURE__ @class */ (function () {
11856
+ var MarkdownEditor = /** @class */ (function () {
11804
11857
  function MarkdownEditor(parent, serviceLocator) {
11805
11858
  this.parent = parent;
11806
11859
  this.locator = serviceLocator;
@@ -11991,7 +12044,7 @@ var markerClassName = {
11991
12044
  * @hidden
11992
12045
  * @deprecated
11993
12046
  */
11994
- var DOMNode = /** @__PURE__ @class */ (function () {
12047
+ var DOMNode = /** @class */ (function () {
11995
12048
  /**
11996
12049
  * Constructor for creating the DOMNode plugin
11997
12050
  *
@@ -12296,7 +12349,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12296
12349
  DOMNode.prototype.unWrap = function (element) {
12297
12350
  var parent = element.parentNode;
12298
12351
  var unWrapNode = [];
12299
- while (element.firstChild) {
12352
+ while (element.firstChild && (element.previousSibling !== this.parent.querySelector('.e-mention-chip') || element.textContent !== ' ')) {
12300
12353
  unWrapNode.push(element.firstChild);
12301
12354
  parent.insertBefore(element.firstChild, element);
12302
12355
  }
@@ -12646,6 +12699,109 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12646
12699
  }
12647
12700
  return null;
12648
12701
  };
12702
+ /**
12703
+ * Method to wrap the inline and text node with block node.
12704
+ *
12705
+ * @param {HTMLElement} node - specifies the element sent to wrap the node around it with block nodes.
12706
+ * @param {string} wrapperElement - specifies which block nodes to wrap around.
12707
+ * @returns {HTMLElement} - returns the wrapped element.
12708
+ * @hidden
12709
+ * @deprecated
12710
+ */
12711
+ DOMNode.prototype.gatherElementsAround = function (node, wrapperElement) {
12712
+ var newWrapElem = createElement(wrapperElement);
12713
+ // Insert the new div element before the current node.
12714
+ var currentNode = node.previousSibling;
12715
+ var currentNodeParent = node.parentElement;
12716
+ if (currentNodeParent.className === 'e-editor-select-start') {
12717
+ currentNodeParent.parentNode.insertBefore(newWrapElem, currentNodeParent);
12718
+ }
12719
+ else if (currentNodeParent) {
12720
+ currentNodeParent.insertBefore(newWrapElem, node);
12721
+ }
12722
+ var i = 0;
12723
+ while (currentNode !== null && currentNode.nodeName !== 'BR' &&
12724
+ !this.isBlockNode(currentNode)) {
12725
+ var prevSibling = currentNode.previousSibling;
12726
+ if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
12727
+ if (i === 0) {
12728
+ newWrapElem.appendChild(currentNode);
12729
+ }
12730
+ else {
12731
+ newWrapElem.insertBefore(currentNode, newWrapElem.firstChild);
12732
+ }
12733
+ }
12734
+ currentNode = prevSibling;
12735
+ i++;
12736
+ }
12737
+ // Add the current node to the new div
12738
+ newWrapElem.appendChild(node);
12739
+ // Gather text and inline elements after the currentNode
12740
+ currentNode = newWrapElem.nextSibling ? newWrapElem.nextSibling :
12741
+ newWrapElem.parentElement.nextSibling;
12742
+ while (currentNode !== null && currentNode.nodeName !== 'BR' &&
12743
+ !this.isBlockNode(currentNode)) {
12744
+ var nextSibling = currentNode.nextSibling ?
12745
+ currentNode.nextSibling : currentNode.parentElement.nextSibling;
12746
+ if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
12747
+ newWrapElem.appendChild(currentNode);
12748
+ }
12749
+ currentNode = nextSibling;
12750
+ }
12751
+ return newWrapElem;
12752
+ };
12753
+ /**
12754
+ * Method to convert all the inline nodes between the selection to block nodes.
12755
+ *
12756
+ * @param {Node[]} selectedNodes - specifies the nodes of the start and end selection.
12757
+ * @param {boolean} fromList - specifies if the method is called from list module.
12758
+ * @returns {Node[]} - returns the selected list of elements as block nodes.
12759
+ * @hidden
12760
+ * @deprecated
12761
+ */
12762
+ DOMNode.prototype.convertToBlockNodes = function (selectedNodes, fromList) {
12763
+ if (selectedNodes.length > 1) {
12764
+ var i = 0;
12765
+ var currentSelectedNode = selectedNodes[0];
12766
+ while (!isNullOrUndefined(currentSelectedNode)) {
12767
+ if (currentSelectedNode.nodeName === 'BR') {
12768
+ var nextNode = currentSelectedNode.nextSibling;
12769
+ detach(currentSelectedNode);
12770
+ currentSelectedNode = nextNode;
12771
+ }
12772
+ if (!isNullOrUndefined(currentSelectedNode)) {
12773
+ if (fromList) {
12774
+ selectedNodes[i] = currentSelectedNode.nodeName === 'LI' || this.isBlockNode(currentSelectedNode) ?
12775
+ currentSelectedNode :
12776
+ this.gatherElementsAround(currentSelectedNode, (fromList ? 'p' : 'div'));
12777
+ }
12778
+ else {
12779
+ selectedNodes[i] = !this.isBlockNode(selectedNodes[i]) ?
12780
+ this.gatherElementsAround(currentSelectedNode, (fromList ? 'p' : 'div')) :
12781
+ selectedNodes[i];
12782
+ }
12783
+ var currentProcessNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
12784
+ var currentElementCheckNode = currentProcessNode.nodeName === '#text' ? currentProcessNode.parentElement : currentProcessNode;
12785
+ currentSelectedNode = !isNullOrUndefined(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
12786
+ !isNullOrUndefined(closest(currentSelectedNode, '.e-editor-select-end')) ?
12787
+ null : currentProcessNode.nextSibling;
12788
+ if (currentSelectedNode === null && !isNullOrUndefined(currentProcessNode.nextSibling) && currentProcessNode.nextSibling.nodeName === 'BR') {
12789
+ detach(currentProcessNode.nextSibling);
12790
+ }
12791
+ }
12792
+ i++;
12793
+ }
12794
+ }
12795
+ else {
12796
+ if (!this.isBlockNode(selectedNodes[0])) {
12797
+ selectedNodes[0] = this.gatherElementsAround(selectedNodes[0], (fromList ? 'p' : 'div'));
12798
+ if (!isNullOrUndefined(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
12799
+ detach(selectedNodes[0].nextSibling);
12800
+ }
12801
+ }
12802
+ }
12803
+ return selectedNodes;
12804
+ };
12649
12805
  /**
12650
12806
  * blockNodes method
12651
12807
  *
@@ -12910,7 +13066,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12910
13066
  * @hidden
12911
13067
  * @deprecated
12912
13068
  */
12913
- var Lists = /** @__PURE__ @class */ (function () {
13069
+ var Lists = /** @class */ (function () {
12914
13070
  /**
12915
13071
  * Constructor for creating the Lists plugin
12916
13072
  *
@@ -13154,7 +13310,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13154
13310
  e.event.preventDefault();
13155
13311
  }
13156
13312
  };
13157
- Lists.prototype.onKeyUp = function () {
13313
+ Lists.prototype.onKeyUp = function (e) {
13158
13314
  if (!isNullOrUndefined(this.commonLIParent) && !isNullOrUndefined(this.commonLIParent.querySelector('.removeList'))) {
13159
13315
  var currentLIElem = this.commonLIParent.querySelector('.removeList');
13160
13316
  while (!isNullOrUndefined(currentLIElem.firstChild)) {
@@ -13162,6 +13318,14 @@ var Lists = /** @__PURE__ @class */ (function () {
13162
13318
  }
13163
13319
  detach(currentLIElem);
13164
13320
  }
13321
+ if (e.event.keyCode === 13) {
13322
+ var listElements = this.parent.editableElement.querySelectorAll('UL, OL');
13323
+ for (var i = 0; i < listElements.length; i++) {
13324
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
13325
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
13326
+ }
13327
+ }
13328
+ }
13165
13329
  };
13166
13330
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13167
13331
  Lists.prototype.firstListBackSpace = function (range, _e) {
@@ -13403,6 +13567,8 @@ var Lists = /** @__PURE__ @class */ (function () {
13403
13567
  else {
13404
13568
  if (prevSibling.tagName === 'LI') {
13405
13569
  var nestedElement = createElement(elements[i].parentNode.tagName);
13570
+ nestedElement.style.listStyleType =
13571
+ elements[i].parentNode.style.listStyleType;
13406
13572
  append([nestedElement], prevSibling);
13407
13573
  append([elements[i]], nestedElement);
13408
13574
  }
@@ -13452,39 +13618,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13452
13618
  var listsNodes = this.domNode.blockNodes(true);
13453
13619
  if (e.enterAction === 'BR') {
13454
13620
  this.setSelectionBRConfig();
13455
- var selectedNodes = this.parent.domNode.blockNodes();
13456
- if (selectedNodes.length > 1) {
13457
- var i = 0;
13458
- var currentAlignmentNode = selectedNodes[0];
13459
- while (!isNullOrUndefined(currentAlignmentNode)) {
13460
- if (currentAlignmentNode.nodeName === 'BR') {
13461
- var nextNode = currentAlignmentNode.nextSibling;
13462
- detach(currentAlignmentNode);
13463
- currentAlignmentNode = nextNode;
13464
- }
13465
- if (!isNullOrUndefined(currentAlignmentNode)) {
13466
- selectedNodes[i] = currentAlignmentNode.nodeName === 'LI' || this.parent.domNode.isBlockNode(currentAlignmentNode) ?
13467
- currentAlignmentNode : this.gatherElementsAround(currentAlignmentNode);
13468
- var currentSelectNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
13469
- var currentElementCheckNode = currentAlignmentNode.nodeName === '#text' ? currentAlignmentNode.parentElement : currentAlignmentNode;
13470
- currentAlignmentNode = !isNullOrUndefined(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
13471
- !isNullOrUndefined(closest(currentAlignmentNode, '.e-editor-select-end')) ?
13472
- null : currentSelectNode.nextSibling;
13473
- if (currentAlignmentNode === null && !isNullOrUndefined(currentSelectNode.nextSibling) && currentSelectNode.nextSibling.nodeName === 'BR') {
13474
- detach(currentSelectNode.nextSibling);
13475
- }
13476
- }
13477
- i++;
13478
- }
13479
- }
13480
- else {
13481
- if (!this.parent.domNode.isBlockNode(selectedNodes[0])) {
13482
- selectedNodes[0] = this.gatherElementsAround(selectedNodes[0]);
13483
- if (!isNullOrUndefined(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
13484
- detach(selectedNodes[0].nextSibling);
13485
- }
13486
- }
13487
- }
13621
+ this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(), true);
13488
13622
  this.setSelectionBRConfig();
13489
13623
  listsNodes = this.parent.domNode.blockNodes();
13490
13624
  }
@@ -13541,7 +13675,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13541
13675
  }
13542
13676
  var elemAtt = void 0;
13543
13677
  elements[i].style.removeProperty('margin-left');
13544
- elemAtt = elements[i].tagName === 'IMG' ? '' : this.domNode.attributes(elements[i]);
13678
+ elemAtt = elements[i].tagName === 'IMG' || elements[i].classList.contains('e-editor-select-start') ? '' : this.domNode.attributes(elements[i]);
13545
13679
  if (elements[i].getAttribute('contenteditable') === 'true'
13546
13680
  && elements[i].childNodes.length === 1 && elements[i].childNodes[0].nodeName === 'TABLE') {
13547
13681
  var listEle = document.createElement(type);
@@ -13662,6 +13796,13 @@ var Lists = /** @__PURE__ @class */ (function () {
13662
13796
  for (var c = 0; c < liParents.length; c++) {
13663
13797
  var node = liParents[c];
13664
13798
  var toFindtopOlUl = true;
13799
+ var containsListElements = node;
13800
+ while (containsListElements.parentElement) {
13801
+ if (containsListElements.parentElement && containsListElements.parentElement.tagName !== 'LI' && containsListElements.parentElement.tagName !== 'OL' && containsListElements.parentElement.tagName !== 'UL') {
13802
+ break;
13803
+ }
13804
+ containsListElements = containsListElements.parentElement;
13805
+ }
13665
13806
  if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
13666
13807
  toFindtopOlUl = false;
13667
13808
  var preElement = liParents[c].parentElement.parentElement;
@@ -13681,9 +13822,43 @@ var Lists = /** @__PURE__ @class */ (function () {
13681
13822
  node.previousElementSibling.lastChild.append(node);
13682
13823
  }
13683
13824
  }
13825
+ else if (this.domNode.isList(node.previousElementSibling) && containsListElements.contains(node.previousElementSibling) && ((node.tagName === 'OL' || node.tagName === 'UL') && (node.previousElementSibling.nodeName === 'OL' || node.previousElementSibling.nodeName === 'UL'))) {
13826
+ var contentNodes = this.domNode.contents(node);
13827
+ for (var f = 0; f < contentNodes.length; f++) {
13828
+ node.previousElementSibling.appendChild(contentNodes[f]);
13829
+ }
13830
+ node.parentNode.removeChild(node);
13831
+ }
13684
13832
  }
13685
13833
  if (firstNodeOL) {
13686
13834
  firstNodeOL.style.listStyleType = listStyleType;
13835
+ var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
13836
+ var listOlUlElements = [];
13837
+ if (range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'OL') {
13838
+ if (range.commonAncestorContainer instanceof Element) {
13839
+ listOlUlElements.push(range.commonAncestorContainer);
13840
+ }
13841
+ listOlUlElements = listOlUlElements.concat(Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul')));
13842
+ }
13843
+ else {
13844
+ listOlUlElements = Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul'));
13845
+ }
13846
+ for (var k = 0; k < listOlUlElements.length; k++) {
13847
+ var listStyle = void 0;
13848
+ var listElements = listOlUlElements[k];
13849
+ while (listElements) {
13850
+ if (listElements.nodeName === 'OL' || listElements.nodeName === 'OL') {
13851
+ if (listElements.style.listStyleType !== '' && listElements.style.listStyleType !== 'none' && listElements.nodeName !== 'LI') {
13852
+ listStyle = listElements.style.listStyleType;
13853
+ }
13854
+ else if (!isNullOrUndefined(listStyle) && (listElements.style.listStyleType === '' || listElements.style.listStyleType === 'none') &&
13855
+ listElements.nodeName !== 'LI' && (listElements.nodeName === 'UL' || listElements.nodeName === 'OL')) {
13856
+ listElements.style.listStyleType = listStyle;
13857
+ }
13858
+ }
13859
+ listElements = listElements.querySelector('UL,OL');
13860
+ }
13861
+ }
13687
13862
  }
13688
13863
  };
13689
13864
  Lists.prototype.findUnSelected = function (temp, elements) {
@@ -13786,7 +13961,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13786
13961
  parentNode.removeAttribute("style");
13787
13962
  }
13788
13963
  }
13789
- var wrapper = '<' + DEFAULT_TAG + wrapperclass + this.domNode.attributes(element) + '></' + DEFAULT_TAG + '>';
13964
+ var wrapper = '<' + e.enterAction + wrapperclass + this.domNode.attributes(element) + '></' + e.enterAction + '>';
13790
13965
  if (e.enterAction !== 'BR') {
13791
13966
  this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
13792
13967
  }
@@ -13860,48 +14035,6 @@ var Lists = /** @__PURE__ @class */ (function () {
13860
14035
  Lists.prototype.closeTag = function (type) {
13861
14036
  return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-' + type.toLowerCase() + '"></span>');
13862
14037
  };
13863
- Lists.prototype.gatherElementsAround = function (node) {
13864
- var pWrap = document.createElement('p');
13865
- // Insert the new div before the current node
13866
- var currentNode = node.previousSibling;
13867
- var classNode = node.parentNode;
13868
- if (classNode.className === 'e-editor-select-start') {
13869
- node.parentNode.parentNode.insertBefore(pWrap, node.parentNode);
13870
- }
13871
- else if (node.parentNode) {
13872
- node.parentNode.insertBefore(pWrap, node);
13873
- }
13874
- // Gather text and inline elements before the currentNode
13875
- var i = 0;
13876
- while (currentNode !== null && currentNode.nodeName !== 'BR' &&
13877
- !this.parent.domNode.isBlockNode(currentNode)) {
13878
- var prevSibling = currentNode.previousSibling;
13879
- if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
13880
- if (i === 0) {
13881
- pWrap.appendChild(currentNode);
13882
- }
13883
- else {
13884
- pWrap.insertBefore(currentNode, pWrap.firstChild);
13885
- }
13886
- }
13887
- currentNode = prevSibling;
13888
- i++;
13889
- }
13890
- // Add the current node to the new p
13891
- pWrap.appendChild(node);
13892
- // Gather text and inline elements after the currentNode
13893
- currentNode = pWrap.nextSibling ? pWrap.nextSibling : pWrap.parentElement.nextSibling;
13894
- while (currentNode !== null && currentNode.nodeName !== 'BR' &&
13895
- !this.parent.domNode.isBlockNode(currentNode)) {
13896
- var nextSibling = currentNode.nextSibling ?
13897
- currentNode.nextSibling : currentNode.parentElement.nextSibling;
13898
- if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
13899
- pWrap.appendChild(currentNode);
13900
- }
13901
- currentNode = nextSibling;
13902
- }
13903
- return pWrap;
13904
- };
13905
14038
  return Lists;
13906
14039
  }());
13907
14040
 
@@ -13910,7 +14043,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13910
14043
  *
13911
14044
  * @hidden
13912
14045
  */
13913
- var InsertMethods = /** @__PURE__ @class */ (function () {
14046
+ var InsertMethods = /** @class */ (function () {
13914
14047
  function InsertMethods() {
13915
14048
  }
13916
14049
  /**
@@ -13987,7 +14120,7 @@ var InsertMethods = /** @__PURE__ @class */ (function () {
13987
14120
  * @hidden
13988
14121
  * @deprecated
13989
14122
  */
13990
- var NodeCutter = /** @__PURE__ @class */ (function () {
14123
+ var NodeCutter = /** @class */ (function () {
13991
14124
  function NodeCutter() {
13992
14125
  this.enterAction = 'P';
13993
14126
  this.position = -1;
@@ -14199,7 +14332,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
14199
14332
  * @hidden
14200
14333
  * @deprecated
14201
14334
  */
14202
- var Formats = /** @__PURE__ @class */ (function () {
14335
+ var Formats = /** @class */ (function () {
14203
14336
  /**
14204
14337
  * Constructor for creating the Formats plugin
14205
14338
  *
@@ -14241,7 +14374,7 @@ var Formats = /** @__PURE__ @class */ (function () {
14241
14374
  }
14242
14375
  }
14243
14376
  }
14244
- if (e.enterAction !== 'BR' && !isNullOrUndefined(range.startContainer) && !isNullOrUndefined(range.startContainer.parentElement) && range.startContainer === range.endContainer && range.startContainer.nodeName === '#text' && range.startContainer.parentElement.classList.contains("e-content") && range.startContainer.parentElement.isContentEditable) {
14377
+ if (e.enterAction !== 'BR' && !isNullOrUndefined(range.startContainer) && !isNullOrUndefined(range.startContainer.parentElement) && range.startContainer === range.endContainer && range.startContainer.nodeName === '#text' && range.startContainer.parentElement.classList.contains('e-content') && range.startContainer.parentElement.isContentEditable) {
14245
14378
  var pTag = createElement(e.enterAction);
14246
14379
  range.startContainer.parentElement.insertBefore(pTag, range.startContainer);
14247
14380
  pTag.appendChild(range.startContainer);
@@ -14609,7 +14742,7 @@ var Formats = /** @__PURE__ @class */ (function () {
14609
14742
  * @hidden
14610
14743
  * @deprecated
14611
14744
  */
14612
- var InsertHtml = /** @__PURE__ @class */ (function () {
14745
+ var InsertHtml = /** @class */ (function () {
14613
14746
  function InsertHtml() {
14614
14747
  }
14615
14748
  InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
@@ -14662,6 +14795,9 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14662
14795
  this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
14663
14796
  return;
14664
14797
  }
14798
+ if (isCursor && range.startContainer.textContent === '' && range.startContainer.nodeName !== 'BR' && enterAction !== 'BR' && node.nodeName !== '#text' && !isNullOrUndefined(node.children[0]) && !isNullOrUndefined(node.children[0].tagName) && node.children[0].tagName === 'IMG' && node.children.length === 1) {
14799
+ range.startContainer.innerHTML = '';
14800
+ }
14665
14801
  if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
14666
14802
  node.classList.contains('pasteContent'))) {
14667
14803
  this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
@@ -15224,7 +15360,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
15224
15360
  * @hidden
15225
15361
  * @deprecated
15226
15362
  */
15227
- var LinkCommand = /** @__PURE__ @class */ (function () {
15363
+ var LinkCommand = /** @class */ (function () {
15228
15364
  /**
15229
15365
  * Constructor for creating the Formats plugin
15230
15366
  *
@@ -15532,7 +15668,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
15532
15668
  * @hidden
15533
15669
  * @deprecated
15534
15670
  */
15535
- var Alignments = /** @__PURE__ @class */ (function () {
15671
+ var Alignments = /** @class */ (function () {
15536
15672
  /**
15537
15673
  * Constructor for creating the Formats plugin
15538
15674
  *
@@ -15588,6 +15724,9 @@ var Alignments = /** @__PURE__ @class */ (function () {
15588
15724
  if (!isTableAlign) {
15589
15725
  this.parent.domNode.setMarker(save);
15590
15726
  var alignmentNodes = this.parent.domNode.blockNodes();
15727
+ if (e.enterAction === 'BR') {
15728
+ alignmentNodes = this.parent.domNode.convertToBlockNodes(alignmentNodes, false);
15729
+ }
15591
15730
  for (var i = 0; i < alignmentNodes.length; i++) {
15592
15731
  var parentNode = alignmentNodes[i];
15593
15732
  setStyleAttribute(parentNode, { 'text-align': this.alignments[e.subCommand] });
@@ -15635,7 +15774,7 @@ var Alignments = /** @__PURE__ @class */ (function () {
15635
15774
  * @hidden
15636
15775
  * @deprecated
15637
15776
  */
15638
- var Indents = /** @__PURE__ @class */ (function () {
15777
+ var Indents = /** @class */ (function () {
15639
15778
  /**
15640
15779
  * Constructor for creating the Formats plugin
15641
15780
  *
@@ -15671,6 +15810,9 @@ var Indents = /** @__PURE__ @class */ (function () {
15671
15810
  var save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
15672
15811
  this.parent.domNode.setMarker(save);
15673
15812
  var indentsNodes = this.parent.domNode.blockNodes();
15813
+ if (e.enterAction === 'BR') {
15814
+ indentsNodes = this.parent.domNode.convertToBlockNodes(indentsNodes, false);
15815
+ }
15674
15816
  var parentNodes = indentsNodes.slice();
15675
15817
  var listsNodes = [];
15676
15818
  for (var i = 0; i < parentNodes.length; i++) {
@@ -15771,7 +15913,7 @@ var CLASS_VIDEO_INLINE = 'e-video-inline';
15771
15913
  * @hidden
15772
15914
  * @deprecated
15773
15915
  */
15774
- var ImageCommand = /** @__PURE__ @class */ (function () {
15916
+ var ImageCommand = /** @class */ (function () {
15775
15917
  /**
15776
15918
  * Constructor for creating the Formats plugin
15777
15919
  *
@@ -16158,7 +16300,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
16158
16300
  * @hidden
16159
16301
  * @deprecated
16160
16302
  */
16161
- var AudioCommand = /** @__PURE__ @class */ (function () {
16303
+ var AudioCommand = /** @class */ (function () {
16162
16304
  /**
16163
16305
  * Constructor for creating the Audio plugin
16164
16306
  *
@@ -16297,7 +16439,7 @@ var AudioCommand = /** @__PURE__ @class */ (function () {
16297
16439
  * @hidden
16298
16440
  * @deprecated
16299
16441
  */
16300
- var VideoCommand = /** @__PURE__ @class */ (function () {
16442
+ var VideoCommand = /** @class */ (function () {
16301
16443
  /**
16302
16444
  * Constructor for creating the Video plugin
16303
16445
  *
@@ -16545,7 +16687,7 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
16545
16687
  * @hidden
16546
16688
  * @deprecated
16547
16689
  */
16548
- var TableCommand = /** @__PURE__ @class */ (function () {
16690
+ var TableCommand = /** @class */ (function () {
16549
16691
  /**
16550
16692
  * Constructor for creating the Formats plugin
16551
16693
  *
@@ -17526,7 +17668,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
17526
17668
 
17527
17669
  return TableCommand;
17528
17670
  }());
17529
- var MinMax = /** @__PURE__ @class */ (function () {
17671
+ var MinMax = /** @class */ (function () {
17530
17672
  function MinMax() {
17531
17673
  }
17532
17674
  return MinMax;
@@ -17535,7 +17677,7 @@ var MinMax = /** @__PURE__ @class */ (function () {
17535
17677
  /**
17536
17678
  * `Selection` module is used to handle RTE Selections.
17537
17679
  */
17538
- var SelectionCommands = /** @__PURE__ @class */ (function () {
17680
+ var SelectionCommands = /** @class */ (function () {
17539
17681
  function SelectionCommands() {
17540
17682
  }
17541
17683
  /**
@@ -18511,7 +18653,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
18511
18653
  * @hidden
18512
18654
  * @deprecated
18513
18655
  */
18514
- var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18656
+ var SelectionBasedExec = /** @class */ (function () {
18515
18657
  /**
18516
18658
  * Constructor for creating the Formats plugin
18517
18659
  *
@@ -18560,7 +18702,7 @@ var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18560
18702
  * @hidden
18561
18703
  * @deprecated
18562
18704
  */
18563
- var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18705
+ var InsertHtmlExec = /** @class */ (function () {
18564
18706
  /**
18565
18707
  * Constructor for creating the Formats plugin
18566
18708
  *
@@ -18607,7 +18749,7 @@ var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18607
18749
  /**
18608
18750
  * `Clear Format` module is used to handle Clear Format.
18609
18751
  */
18610
- var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18752
+ var ClearFormat$1 = /** @class */ (function () {
18611
18753
  function ClearFormat() {
18612
18754
  }
18613
18755
  /**
@@ -18860,7 +19002,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18860
19002
  * @hidden
18861
19003
  * @deprecated
18862
19004
  */
18863
- var ClearFormatExec = /** @__PURE__ @class */ (function () {
19005
+ var ClearFormatExec = /** @class */ (function () {
18864
19006
  /**
18865
19007
  * Constructor for creating the Formats plugin
18866
19008
  *
@@ -18905,7 +19047,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
18905
19047
  /**
18906
19048
  * `Undo` module is used to handle undo actions.
18907
19049
  */
18908
- var UndoRedoManager = /** @__PURE__ @class */ (function () {
19050
+ var UndoRedoManager = /** @class */ (function () {
18909
19051
  function UndoRedoManager(parent, options) {
18910
19052
  this.undoRedoStack = [];
18911
19053
  this.parent = parent;
@@ -19083,6 +19225,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19083
19225
  this.parent.editableElement.innerHTML = '';
19084
19226
  this.parent.editableElement.appendChild(removedContent.cloneNode(true));
19085
19227
  this.parent.editableElement.focus();
19228
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
19086
19229
  if (isIDevice$1()) {
19087
19230
  setEditFrameFocus(this.parent.editableElement, e.selector);
19088
19231
  }
@@ -19115,6 +19258,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19115
19258
  this.parent.editableElement.innerHTML = '';
19116
19259
  this.parent.editableElement.appendChild(addedContent.cloneNode(true));
19117
19260
  this.parent.editableElement.focus();
19261
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
19118
19262
  if (isIDevice$1()) {
19119
19263
  setEditFrameFocus(this.parent.editableElement, e.selector);
19120
19264
  }
@@ -19157,7 +19301,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19157
19301
  * @hidden
19158
19302
  * @deprecated
19159
19303
  */
19160
- var MsWordPaste = /** @__PURE__ @class */ (function () {
19304
+ var MsWordPaste = /** @class */ (function () {
19161
19305
  function MsWordPaste(parent) {
19162
19306
  this.olData = [
19163
19307
  'decimal',
@@ -19216,9 +19360,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19216
19360
  var patern2 = /class="?Mso|style="[^ ]*\bmso-/i;
19217
19361
  var patern3 = /(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi;
19218
19362
  var pattern4 = /style='mso-width-source:/i;
19363
+ var source = this.findSource(elm);
19219
19364
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
19220
19365
  pattern4.test(tempHTMLContent)) {
19221
- var source = this.findSource(elm);
19222
19366
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
19223
19367
  this.addListClass(elm);
19224
19368
  listNodes = this.cleanUp(elm, listNodes);
@@ -19243,7 +19387,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19243
19387
  e.callBack(elm.innerHTML, this.cropImageDimensions, source);
19244
19388
  }
19245
19389
  else {
19246
- e.callBack(elm.innerHTML);
19390
+ e.callBack(elm.innerHTML, null, source);
19247
19391
  }
19248
19392
  };
19249
19393
  MsWordPaste.prototype.addDoubleBr = function (elm) {
@@ -19971,7 +20115,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19971
20115
  !isNormalList) {
19972
20116
  prevList = null;
19973
20117
  }
19974
- var pElement = createElement('p', { className: 'MsoNormal' });
20118
+ var pElement = createElement('p', { className: 'MsoNoSpacing' });
19975
20119
  pElement.innerHTML = collection[index].content.join(' ');
19976
20120
  if ((collection[index].nestedLevel === 1) &&
19977
20121
  (listCount === 0 || lfo !== collection[index].listFormatOverride) &&
@@ -20225,7 +20369,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
20225
20369
  * @hidden
20226
20370
  * @deprecated
20227
20371
  */
20228
- var InsertTextExec = /** @__PURE__ @class */ (function () {
20372
+ var InsertTextExec = /** @class */ (function () {
20229
20373
  /**
20230
20374
  * Constructor for creating the InsertText plugin
20231
20375
  *
@@ -20256,7 +20400,7 @@ var InsertTextExec = /** @__PURE__ @class */ (function () {
20256
20400
  return InsertTextExec;
20257
20401
  }());
20258
20402
 
20259
- var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20403
+ var EmojiPickerAction = /** @class */ (function () {
20260
20404
  function EmojiPickerAction(parent) {
20261
20405
  this.parent = parent;
20262
20406
  this.addEventListener();
@@ -20320,7 +20464,7 @@ var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20320
20464
  * Base export
20321
20465
  */
20322
20466
 
20323
- var FormatPainterActions = /** @__PURE__ @class */ (function () {
20467
+ var FormatPainterActions = /** @class */ (function () {
20324
20468
  function FormatPainterActions(parent, options) {
20325
20469
  this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
20326
20470
  this.parent = parent;
@@ -20963,7 +21107,7 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
20963
21107
  * @hidden
20964
21108
  * @deprecated
20965
21109
  */
20966
- var EditorManager = /** @__PURE__ @class */ (function () {
21110
+ var EditorManager = /** @class */ (function () {
20967
21111
  /**
20968
21112
  * Constructor for creating the component
20969
21113
  *
@@ -21051,12 +21195,14 @@ var EditorManager = /** @__PURE__ @class */ (function () {
21051
21195
  case 'alignments':
21052
21196
  this.observer.notify(ALIGNMENT_TYPE, {
21053
21197
  subCommand: value, event: event, callBack: callBack,
21054
- selector: selector,
21055
- value: exeValue
21198
+ selector: selector, value: exeValue, enterAction: enterAction
21056
21199
  });
21057
21200
  break;
21058
21201
  case 'indents':
21059
- this.observer.notify(INDENT_TYPE, { subCommand: value, event: event, callBack: callBack, selector: selector });
21202
+ this.observer.notify(INDENT_TYPE, {
21203
+ subCommand: value, event: event, callBack: callBack,
21204
+ selector: selector, enterAction: enterAction
21205
+ });
21060
21206
  break;
21061
21207
  case 'links':
21062
21208
  this.observer.notify(LINK, { command: command, value: value, item: exeValue, event: event, callBack: callBack });
@@ -21209,26 +21355,26 @@ var EditorManager = /** @__PURE__ @class */ (function () {
21209
21355
  return EditorManager;
21210
21356
  }());
21211
21357
 
21212
- var __extends$2 = (undefined && undefined.__extends) || (function () {
21213
- var extendStatics = function (d, b) {
21214
- extendStatics = Object.setPrototypeOf ||
21215
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21216
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21217
- return extendStatics(d, b);
21218
- };
21219
- return function (d, b) {
21220
- extendStatics(d, b);
21221
- function __() { this.constructor = d; }
21222
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21223
- };
21224
- })();
21358
+ var __extends$2 = (undefined && undefined.__extends) || (function () {
21359
+ var extendStatics = function (d, b) {
21360
+ extendStatics = Object.setPrototypeOf ||
21361
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21362
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21363
+ return extendStatics(d, b);
21364
+ };
21365
+ return function (d, b) {
21366
+ extendStatics(d, b);
21367
+ function __() { this.constructor = d; }
21368
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21369
+ };
21370
+ })();
21225
21371
  /**
21226
21372
  * HTML adapter
21227
21373
  *
21228
21374
  * @hidden
21229
21375
  * @deprecated
21230
21376
  */
21231
- var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21377
+ var HTMLFormatter = /** @class */ (function (_super) {
21232
21378
  __extends$2(HTMLFormatter, _super);
21233
21379
  function HTMLFormatter(options) {
21234
21380
  var _this = _super.call(this) || this;
@@ -21269,7 +21415,7 @@ var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21269
21415
  /**
21270
21416
  * HtmlToolbarStatus module for refresh the toolbar status
21271
21417
  */
21272
- var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21418
+ var HtmlToolbarStatus = /** @class */ (function () {
21273
21419
  function HtmlToolbarStatus(parent) {
21274
21420
  this.parent = parent;
21275
21421
  this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
@@ -21316,7 +21462,7 @@ var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21316
21462
  * @hidden
21317
21463
  * @deprecated
21318
21464
  */
21319
- var ContentRender = /** @__PURE__ @class */ (function () {
21465
+ var ContentRender = /** @class */ (function () {
21320
21466
  /**
21321
21467
  * Constructor for content renderer module
21322
21468
  *
@@ -21404,19 +21550,19 @@ var ContentRender = /** @__PURE__ @class */ (function () {
21404
21550
  return ContentRender;
21405
21551
  }());
21406
21552
 
21407
- var __extends$3 = (undefined && undefined.__extends) || (function () {
21408
- var extendStatics = function (d, b) {
21409
- extendStatics = Object.setPrototypeOf ||
21410
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21411
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21412
- return extendStatics(d, b);
21413
- };
21414
- return function (d, b) {
21415
- extendStatics(d, b);
21416
- function __() { this.constructor = d; }
21417
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21418
- };
21419
- })();
21553
+ var __extends$3 = (undefined && undefined.__extends) || (function () {
21554
+ var extendStatics = function (d, b) {
21555
+ extendStatics = Object.setPrototypeOf ||
21556
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21557
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21558
+ return extendStatics(d, b);
21559
+ };
21560
+ return function (d, b) {
21561
+ extendStatics(d, b);
21562
+ function __() { this.constructor = d; }
21563
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21564
+ };
21565
+ })();
21420
21566
  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-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }\n .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }\n .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }\n .e-rte-img-caption .e-rte-image.e-imgleft { 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 table{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 li ol, li ul { margin-block-start: 10px;}\n </style>\n </head>";
21421
21567
  /**
21422
21568
  * Content module is used to render Rich Text Editor content
@@ -21424,7 +21570,7 @@ var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n
21424
21570
  * @hidden
21425
21571
  * @deprecated
21426
21572
  */
21427
- var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21573
+ var IframeContentRender = /** @class */ (function (_super) {
21428
21574
  __extends$3(IframeContentRender, _super);
21429
21575
  function IframeContentRender() {
21430
21576
  return _super !== null && _super.apply(this, arguments) || this;
@@ -21497,7 +21643,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21497
21643
  /**
21498
21644
  * XhtmlValidation module called when set enableXhtml as true
21499
21645
  */
21500
- var XhtmlValidation = /** @__PURE__ @class */ (function () {
21646
+ var XhtmlValidation = /** @class */ (function () {
21501
21647
  function XhtmlValidation(parent) {
21502
21648
  this.parent = parent;
21503
21649
  this.addEventListener();
@@ -21668,7 +21814,7 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
21668
21814
  /**
21669
21815
  * `HtmlEditor` module is used to HTML editor
21670
21816
  */
21671
- var HtmlEditor = /** @__PURE__ @class */ (function () {
21817
+ var HtmlEditor = /** @class */ (function () {
21672
21818
  function HtmlEditor(parent, serviceLocator) {
21673
21819
  this.rangeCollection = [];
21674
21820
  this.isImageDelete = false;
@@ -21937,25 +22083,54 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21937
22083
  this.deleteCleanup(e, currentRange);
21938
22084
  }
21939
22085
  if (args.keyCode === 9 && this.parent.enableTabKey) {
22086
+ this.parent.formatter.saveData(e);
21940
22087
  if (!isNullOrUndefined(args.target) && isNullOrUndefined(closest(args.target, '.e-rte-toolbar'))) {
21941
22088
  var range = this.nodeSelectionObj.getRange(this.contentRenderer.getDocument());
21942
22089
  var parentNode = this.nodeSelectionObj.getParentNodeCollection(range);
21943
22090
  if (!((parentNode[0].nodeName === 'LI' || closest(parentNode[0], 'li') ||
21944
- closest(parentNode[0], 'table')) && range.startOffset === 0)) {
22091
+ closest(parentNode[0], 'table')))) {
21945
22092
  args.preventDefault();
21946
- if (!args.shiftKey) {
21947
- InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
21948
- this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22093
+ var selection = this.contentRenderer.getDocument().getSelection().getRangeAt(0);
22094
+ var alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
22095
+ if (this.parent.enterKey === 'BR') {
22096
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
22097
+ var save = this.nodeSelectionObj.save(range, this.contentRenderer.getDocument());
22098
+ this.parent.formatter.editorManager.domNode.setMarker(save);
22099
+ alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
22100
+ this.parent.formatter.editorManager.domNode.convertToBlockNodes(alignmentNodes, false);
22101
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22102
+ save = this.parent.formatter.editorManager.domNode.saveMarker(save);
22103
+ save.restore();
22104
+ }
22105
+ else {
22106
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
22107
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22108
+ }
21949
22109
  }
21950
- else if (this.rangeCollection.length > 0 &&
21951
- this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
21952
- var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
21953
- this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
21954
- InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
21955
- this.rangeCollection.pop();
22110
+ else {
22111
+ if (!args.shiftKey) {
22112
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
22113
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22114
+ }
22115
+ else {
22116
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
22117
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22118
+ }
22119
+ }
22120
+ else if (this.rangeCollection.length > 0 &&
22121
+ this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
22122
+ var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
22123
+ this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
22124
+ InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
22125
+ this.rangeCollection.pop();
22126
+ }
22127
+ else {
22128
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22129
+ }
21956
22130
  }
21957
22131
  }
21958
22132
  }
22133
+ this.parent.formatter.saveData(e);
21959
22134
  }
21960
22135
  if (e.args.action === 'space' ||
21961
22136
  e.args.action === 'enter' ||
@@ -21972,15 +22147,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21972
22147
  }
21973
22148
  else {
21974
22149
  this.parent.notify(enterHandler, { args: e.args });
21975
- var newRange = this.parent.getRange();
21976
- if (!isNullOrUndefined(newRange.startContainer) && this.parent.height !== 'auto' && newRange.startContainer.nodeName !== '#text'
21977
- && !this.parent.iframeSettings.enable && newRange.startContainer.getBoundingClientRect().bottom > this.parent.element.getBoundingClientRect().bottom) {
21978
- this.parent.element.querySelector('.e-rte-content').scrollTop += newRange.startContainer.getBoundingClientRect().bottom - this.parent.element.getBoundingClientRect().bottom;
21979
- }
21980
- else if (!isNullOrUndefined(newRange.startContainer) && this.parent.height === 'auto' && newRange.startContainer.nodeName !== '#text'
21981
- && !this.parent.iframeSettings.enable && window.innerHeight < newRange.startContainer.getBoundingClientRect().top) {
21982
- newRange.startContainer.scrollIntoView({ block: 'end', inline: 'nearest' });
21983
- }
22150
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
21984
22151
  }
21985
22152
  }
21986
22153
  }
@@ -22626,13 +22793,37 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
22626
22793
  HtmlEditor.prototype.getSelectedHtml = function (e) {
22627
22794
  e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString());
22628
22795
  };
22796
+ HtmlEditor.prototype.marginTabAdd = function (val, alignmentNodes) {
22797
+ for (var index = 0; index < alignmentNodes.length; index++) {
22798
+ var element = alignmentNodes[index];
22799
+ if (element.closest('li')) {
22800
+ continue;
22801
+ }
22802
+ if (element.style.marginLeft) {
22803
+ var count$$1 = parseInt(element.style.marginLeft, 10);
22804
+ if (val) {
22805
+ count$$1 -= 20;
22806
+ }
22807
+ else {
22808
+ count$$1 += 20;
22809
+ }
22810
+ element.style.marginLeft = count$$1.toString() + 'px';
22811
+ if (element.style.marginLeft === '0px') {
22812
+ element.removeAttribute('style');
22813
+ }
22814
+ }
22815
+ else if (!val) {
22816
+ element.style.marginLeft = '20px';
22817
+ }
22818
+ }
22819
+ };
22629
22820
  return HtmlEditor;
22630
22821
  }());
22631
22822
 
22632
22823
  /**
22633
22824
  * PasteCleanup module called when pasting content in RichTextEditor
22634
22825
  */
22635
- var PasteCleanup = /** @__PURE__ @class */ (function () {
22826
+ var PasteCleanup = /** @class */ (function () {
22636
22827
  function PasteCleanup(parent, serviceLocator) {
22637
22828
  this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
22638
22829
  'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
@@ -23017,7 +23208,9 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23017
23208
  popupObj.close();
23018
23209
  }
23019
23210
  this.parent.trigger(imageUploadFailed, e);
23020
- uploadObj.destroy();
23211
+ if (uploadObj && document.body.contains(uploadObj.element)) {
23212
+ uploadObj.destroy();
23213
+ }
23021
23214
  };
23022
23215
  PasteCleanup.prototype.popupClose = function (popupObj, uploadObj, imgElem, e) {
23023
23216
  var _this = this;
@@ -23033,7 +23226,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23033
23226
  });
23034
23227
  popupObj.close();
23035
23228
  imgElem.style.opacity = '1';
23036
- if (!uploadObj.isDestroyed) {
23229
+ if (uploadObj && document.body.contains(uploadObj.element)) {
23037
23230
  uploadObj.destroy();
23038
23231
  }
23039
23232
  this.toolbarEnableDisable(false);
@@ -23284,7 +23477,8 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23284
23477
  clipBoardElem = this.allowedStyle(clipBoardElem);
23285
23478
  }
23286
23479
  this.saveSelection.restore();
23287
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
23480
+ var newText = clipBoardElem.innerHTML.split("&").join("&amp;");
23481
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
23288
23482
  var allImg = clipBoardElem.querySelectorAll('img');
23289
23483
  for (var i = 0; i < allImg.length; i++) {
23290
23484
  if (!isNullOrUndefined(allImg[i].getAttribute('src'))) {
@@ -23333,16 +23527,42 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23333
23527
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
23334
23528
  _this.parent.formatter.onSuccess(_this.parent, args);
23335
23529
  }, clipBoardElem, null, null, this.parent.enterKey);
23530
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
23336
23531
  this.removeTempClass();
23337
23532
  this.parent.notify(toolbarRefresh, {});
23338
23533
  this.cropImageHandler(this.parent.inputElement);
23339
23534
  }
23340
23535
  };
23536
+ PasteCleanup.prototype.convertBlobToBase64 = function (element) {
23537
+ var imgElem = element.querySelectorAll('img');
23538
+ var _loop_1 = function (i) {
23539
+ if (imgElem[i].getAttribute('src') &&
23540
+ imgElem[i].getAttribute('src').startsWith("blob")) {
23541
+ var blobImageUrl = imgElem[i].getAttribute('src');
23542
+ var img_1 = new Image();
23543
+ var onImageLoadEvent_1 = function () {
23544
+ var canvas = document.createElement('canvas');
23545
+ var ctx = canvas.getContext('2d');
23546
+ canvas.width = img_1.width;
23547
+ canvas.height = img_1.height;
23548
+ ctx.drawImage(img_1, 0, 0);
23549
+ var base64String = canvas.toDataURL('image/png');
23550
+ imgElem[i].src = base64String;
23551
+ img_1.removeEventListener('load', onImageLoadEvent_1);
23552
+ };
23553
+ img_1.src = blobImageUrl;
23554
+ img_1.addEventListener('load', onImageLoadEvent_1);
23555
+ }
23556
+ };
23557
+ for (var i = 0; i < imgElem.length; i++) {
23558
+ _loop_1(i);
23559
+ }
23560
+ };
23341
23561
  PasteCleanup.prototype.cropImageHandler = function (element) {
23342
23562
  var _this = this;
23343
23563
  var allImgElm = element.querySelectorAll('.e-img-cropped');
23344
23564
  if (allImgElm.length > 0) {
23345
- var _loop_1 = function (i) {
23565
+ var _loop_2 = function (i) {
23346
23566
  if (allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
23347
23567
  var image_1 = new Image();
23348
23568
  image_1.src = allImgElm[i].getAttribute('src');
@@ -23376,26 +23596,37 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23376
23596
  }
23377
23597
  };
23378
23598
  for (var i = 0; i < allImgElm.length; i++) {
23379
- _loop_1(i);
23599
+ _loop_2(i);
23380
23600
  }
23381
23601
  }
23382
23602
  else {
23383
- this.imgUploading(this.parent.inputElement);
23384
- if (this.parent.iframeSettings.enable) {
23385
- this.parent.updateValue();
23603
+ if (!isNullOrUndefined(this.parent.insertImageSettings.saveUrl) && !isNullOrUndefined(this.parent.insertImageSettings.path) && !isNullOrUndefined(this.parent.inputElement.querySelectorAll("img")) && this.parent.inputElement.querySelectorAll("img")[0].src.startsWith("blob")) {
23604
+ this.convertBlobToBase64(this.parent.inputElement);
23605
+ setTimeout(function () {
23606
+ _this.imgUploading(_this.parent.inputElement);
23607
+ if (_this.parent.iframeSettings.enable) {
23608
+ _this.parent.updateValue();
23609
+ }
23610
+ }, 20);
23611
+ }
23612
+ else {
23613
+ this.imgUploading(this.parent.inputElement);
23614
+ if (this.parent.iframeSettings.enable) {
23615
+ this.parent.updateValue();
23616
+ }
23386
23617
  }
23387
23618
  }
23388
23619
  };
23389
23620
  PasteCleanup.prototype.addTableClass = function (element, source) {
23390
- source = isNullOrUndefined(source) ? '' : source;
23391
23621
  var tableElement = element.querySelectorAll('table');
23392
23622
  for (var i = 0; i < tableElement.length; i++) {
23393
- if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
23394
- tableElement[i].classList.add('e-rte-table');
23395
- }
23396
- else if (source && source !== 'html') {
23623
+ var isMSTeamsTable = tableElement[i].parentElement.nodeName === 'FIGURE';
23624
+ if (this.parent.pasteCleanupSettings.keepFormat && source && !isMSTeamsTable) {
23397
23625
  tableElement[i].classList.add('e-rte-paste-' + source + '-table');
23398
23626
  }
23627
+ else if (!tableElement[i].classList.contains('e-rte-table')) {
23628
+ tableElement[i].classList.add('e-rte-table');
23629
+ }
23399
23630
  }
23400
23631
  return element;
23401
23632
  };
@@ -23765,7 +23996,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23765
23996
  /**
23766
23997
  * `Resize` module is used to resize the editor
23767
23998
  */
23768
- var Resize = /** @__PURE__ @class */ (function () {
23999
+ var Resize = /** @class */ (function () {
23769
24000
  function Resize(parent) {
23770
24001
  this.parent = parent;
23771
24002
  this.addEventListener();
@@ -23899,7 +24130,7 @@ var Resize = /** @__PURE__ @class */ (function () {
23899
24130
  /**
23900
24131
  * `FileManager` module is used to display the directories and images inside the editor.
23901
24132
  */
23902
- var FileManager$1 = /** @__PURE__ @class */ (function () {
24133
+ var FileManager$1 = /** @class */ (function () {
23903
24134
  function FileManager$$1(parent, locator) {
23904
24135
  FileManager.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$1);
23905
24136
  this.parent = parent;
@@ -24149,7 +24380,7 @@ var FileManager$1 = /** @__PURE__ @class */ (function () {
24149
24380
  /**
24150
24381
  * `FullScreen` module is used to maximize and minimize screen
24151
24382
  */
24152
- var FullScreen = /** @__PURE__ @class */ (function () {
24383
+ var FullScreen = /** @class */ (function () {
24153
24384
  function FullScreen(parent) {
24154
24385
  this.parent = parent;
24155
24386
  this.addEventListener();
@@ -24168,9 +24399,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24168
24399
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24169
24400
  this.parent.quickToolbarModule.hideQuickToolbars();
24170
24401
  }
24171
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24172
- this.parent.notify(destroyTooltip, { args: event });
24173
- }
24174
24402
  this.scrollableParent = getScrollableParent(this.parent.element);
24175
24403
  if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24176
24404
  var evenArgs = {
@@ -24223,9 +24451,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24223
24451
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24224
24452
  this.parent.quickToolbarModule.hideQuickToolbars();
24225
24453
  }
24226
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24227
- this.parent.notify(destroyTooltip, { args: event });
24228
- }
24229
24454
  if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24230
24455
  var evenArgs = {
24231
24456
  cancel: false,
@@ -24380,7 +24605,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
24380
24605
  }
24381
24606
  }
24382
24607
 
24383
- var FormatPainter = /** @__PURE__ @class */ (function () {
24608
+ var FormatPainter = /** @class */ (function () {
24384
24609
  function FormatPainter(parent) {
24385
24610
  this.isSticky = false;
24386
24611
  this.isActive = false;
@@ -24538,7 +24763,7 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
24538
24763
  return FormatPainter;
24539
24764
  }());
24540
24765
 
24541
- var EmojiPicker = /** @__PURE__ @class */ (function () {
24766
+ var EmojiPicker = /** @class */ (function () {
24542
24767
  function EmojiPicker(parent, serviceLocator) {
24543
24768
  this.parent = parent;
24544
24769
  this.locator = serviceLocator;
@@ -25355,7 +25580,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
25355
25580
  * @hidden
25356
25581
  * @deprecated
25357
25582
  */
25358
- var Render = /** @__PURE__ @class */ (function () {
25583
+ var Render = /** @class */ (function () {
25359
25584
  /**
25360
25585
  * Constructor for render module
25361
25586
  *
@@ -25454,7 +25679,7 @@ var Render = /** @__PURE__ @class */ (function () {
25454
25679
  /**
25455
25680
  * `Link` module is used to handle undo actions.
25456
25681
  */
25457
- var Link = /** @__PURE__ @class */ (function () {
25682
+ var Link = /** @class */ (function () {
25458
25683
  function Link(parent, serviceLocator) {
25459
25684
  this.parent = parent;
25460
25685
  this.rteID = parent.element.id;
@@ -26026,7 +26251,7 @@ var Link = /** @__PURE__ @class */ (function () {
26026
26251
  /**
26027
26252
  * `Image` module is used to handle image actions.
26028
26253
  */
26029
- var Image$1 = /** @__PURE__ @class */ (function () {
26254
+ var Image$1 = /** @class */ (function () {
26030
26255
  function Image(parent, serviceLocator) {
26031
26256
  this.isImgUploaded = false;
26032
26257
  this.isAllowedTypes = true;
@@ -26638,13 +26863,13 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26638
26863
  selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
26639
26864
  if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
26640
26865
  (!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
26641
- var prev = selectParentEle[0].parentElement.childNodes[0];
26642
26866
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
26643
26867
  this.removeResizeEle();
26644
26868
  }
26645
- this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), prev, prev, prev.textContent.length, prev.textContent.length);
26646
26869
  removeClass([selectParentEle[0]], 'e-img-focus');
26647
- this.quickToolObj.imageQTBar.hidePopup();
26870
+ if (this.quickToolObj && this.quickToolObj.imageQTBar) {
26871
+ this.quickToolObj.imageQTBar.hidePopup();
26872
+ }
26648
26873
  }
26649
26874
  }
26650
26875
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
@@ -27410,7 +27635,12 @@ var Image$1 = /** @__PURE__ @class */ (function () {
27410
27635
  animationSettings: { effect: 'None' },
27411
27636
  close: function (event) {
27412
27637
  if (_this.isImgUploaded) {
27413
- _this.uploadObj.remove();
27638
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
27639
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
27640
+ }
27641
+ else {
27642
+ _this.uploadObj.remove();
27643
+ }
27414
27644
  }
27415
27645
  _this.parent.isBlur = false;
27416
27646
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -28357,7 +28587,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
28357
28587
  /**
28358
28588
  * `Audio` module is used to handle audio actions.
28359
28589
  */
28360
- var Audio = /** @__PURE__ @class */ (function () {
28590
+ var Audio = /** @class */ (function () {
28361
28591
  function Audio(parent, serviceLocator) {
28362
28592
  this.isAudioUploaded = false;
28363
28593
  this.isAllowedTypes = true;
@@ -28930,7 +29160,12 @@ var Audio = /** @__PURE__ @class */ (function () {
28930
29160
  animationSettings: { effect: 'None' },
28931
29161
  close: function (event) {
28932
29162
  if (_this.isAudioUploaded) {
28933
- _this.uploadObj.removing();
29163
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
29164
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
29165
+ }
29166
+ else {
29167
+ _this.uploadObj.remove();
29168
+ }
28934
29169
  }
28935
29170
  _this.parent.isBlur = false;
28936
29171
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -29216,7 +29451,7 @@ var Audio = /** @__PURE__ @class */ (function () {
29216
29451
  return Audio;
29217
29452
  }());
29218
29453
 
29219
- var Video = /** @__PURE__ @class */ (function () {
29454
+ var Video = /** @class */ (function () {
29220
29455
  function Video(parent, serviceLocator) {
29221
29456
  this.isVideoUploaded = false;
29222
29457
  this.isAllowedTypes = true;
@@ -30290,7 +30525,12 @@ var Video = /** @__PURE__ @class */ (function () {
30290
30525
  animationSettings: { effect: 'None' },
30291
30526
  close: function (event) {
30292
30527
  if (_this.isVideoUploaded) {
30293
- _this.uploadObj.removing();
30528
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
30529
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
30530
+ }
30531
+ else {
30532
+ _this.uploadObj.remove();
30533
+ }
30294
30534
  }
30295
30535
  _this.parent.isBlur = false;
30296
30536
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -30667,7 +30907,7 @@ var Video = /** @__PURE__ @class */ (function () {
30667
30907
  * @hidden
30668
30908
  * @deprecated
30669
30909
  */
30670
- var ViewSource = /** @__PURE__ @class */ (function () {
30910
+ var ViewSource = /** @class */ (function () {
30671
30911
  /**
30672
30912
  * Constructor for view source module
30673
30913
  *
@@ -30947,7 +31187,7 @@ var ViewSource = /** @__PURE__ @class */ (function () {
30947
31187
  /**
30948
31188
  * `Table` module is used to handle table actions.
30949
31189
  */
30950
- var Table = /** @__PURE__ @class */ (function () {
31190
+ var Table = /** @class */ (function () {
30951
31191
  function Table(parent, serviceLocator) {
30952
31192
  this.ensureInsideTableList = true;
30953
31193
  this.pageX = null;
@@ -32530,7 +32770,8 @@ var Table = /** @__PURE__ @class */ (function () {
32530
32770
  var argument = ((Browser.isDevice || (!isNullOrUndefined(args.args)
32531
32771
  && !isNullOrUndefined(args.args.originalEvent) &&
32532
32772
  args.args.originalEvent.action === 'insert-table')
32533
- || proxy.parent.inlineMode.enable || !isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) ? args :
32773
+ || proxy.parent.inlineMode.enable || ((!isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) &&
32774
+ !(args instanceof PointerEvent))) ? args :
32534
32775
  this);
32535
32776
  proxy.tableInsert(proxy.rowTextBox.value, proxy.columnTextBox.value, e, argument);
32536
32777
  }
@@ -32665,7 +32906,7 @@ var Table = /** @__PURE__ @class */ (function () {
32665
32906
  /**
32666
32907
  * Dialog Renderer
32667
32908
  */
32668
- var DialogRenderer = /** @__PURE__ @class */ (function () {
32909
+ var DialogRenderer = /** @class */ (function () {
32669
32910
  function DialogRenderer(parent) {
32670
32911
  this.parent = parent;
32671
32912
  this.addEventListener();
@@ -32982,29 +33223,29 @@ var executeGroup = {
32982
33223
  }
32983
33224
  };
32984
33225
 
32985
- var __extends$5 = (undefined && undefined.__extends) || (function () {
32986
- var extendStatics = function (d, b) {
32987
- extendStatics = Object.setPrototypeOf ||
32988
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32989
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32990
- return extendStatics(d, b);
32991
- };
32992
- return function (d, b) {
32993
- extendStatics(d, b);
32994
- function __() { this.constructor = d; }
32995
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32996
- };
32997
- })();
32998
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32999
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33000
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33001
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33002
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33003
- };
33226
+ var __extends$5 = (undefined && undefined.__extends) || (function () {
33227
+ var extendStatics = function (d, b) {
33228
+ extendStatics = Object.setPrototypeOf ||
33229
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33230
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33231
+ return extendStatics(d, b);
33232
+ };
33233
+ return function (d, b) {
33234
+ extendStatics(d, b);
33235
+ function __() { this.constructor = d; }
33236
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33237
+ };
33238
+ })();
33239
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33240
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33241
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33242
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33243
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33244
+ };
33004
33245
  /**
33005
33246
  * Configures the toolbar settings of the RichTextEditor.
33006
33247
  */
33007
- var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
33248
+ var ToolbarSettings$1 = /** @class */ (function (_super) {
33008
33249
  __extends$5(ToolbarSettings$$1, _super);
33009
33250
  function ToolbarSettings$$1() {
33010
33251
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33029,7 +33270,7 @@ var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
33029
33270
  /**
33030
33271
  * Configures the image settings of the RichTextEditor.
33031
33272
  */
33032
- var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33273
+ var ImageSettings = /** @class */ (function (_super) {
33033
33274
  __extends$5(ImageSettings, _super);
33034
33275
  function ImageSettings() {
33035
33276
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33081,7 +33322,7 @@ var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33081
33322
  /**
33082
33323
  * Configures the audio settings of the RichTextEditor.
33083
33324
  */
33084
- var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33325
+ var AudioSettings = /** @class */ (function (_super) {
33085
33326
  __extends$5(AudioSettings, _super);
33086
33327
  function AudioSettings() {
33087
33328
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33109,7 +33350,7 @@ var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33109
33350
  /**
33110
33351
  * Configures the video settings of the RichTextEditor.
33111
33352
  */
33112
- var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33353
+ var VideoSettings = /** @class */ (function (_super) {
33113
33354
  __extends$5(VideoSettings, _super);
33114
33355
  function VideoSettings() {
33115
33356
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33161,7 +33402,7 @@ var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33161
33402
  /**
33162
33403
  * Configures the file manager settings of the RichTextEditor.
33163
33404
  */
33164
- var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33405
+ var FileManagerSettings = /** @class */ (function (_super) {
33165
33406
  __extends$5(FileManagerSettings, _super);
33166
33407
  function FileManagerSettings() {
33167
33408
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33222,7 +33463,7 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33222
33463
  ], FileManagerSettings.prototype, "view", void 0);
33223
33464
  return FileManagerSettings;
33224
33465
  }(ChildProperty));
33225
- var TableSettings = /** @__PURE__ @class */ (function (_super) {
33466
+ var TableSettings = /** @class */ (function (_super) {
33226
33467
  __extends$5(TableSettings, _super);
33227
33468
  function TableSettings() {
33228
33469
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33247,7 +33488,7 @@ var TableSettings = /** @__PURE__ @class */ (function (_super) {
33247
33488
  /**
33248
33489
  * Configures the quick toolbar settings of the RichTextEditor.
33249
33490
  */
33250
- var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33491
+ var QuickToolbarSettings = /** @class */ (function (_super) {
33251
33492
  __extends$5(QuickToolbarSettings, _super);
33252
33493
  function QuickToolbarSettings() {
33253
33494
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33284,7 +33525,7 @@ var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33284
33525
  /**
33285
33526
  * Configure the format painter settings of the Rich Text Editor.
33286
33527
  */
33287
- var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33528
+ var FormatPainterSettings = /** @class */ (function (_super) {
33288
33529
  __extends$5(FormatPainterSettings, _super);
33289
33530
  function FormatPainterSettings() {
33290
33531
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33300,7 +33541,7 @@ var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33300
33541
  /**
33301
33542
  * Specifies the emoji picker options in Rich Text Editor with the following properties.
33302
33543
  */
33303
- var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33544
+ var EmojiSettings = /** @class */ (function (_super) {
33304
33545
  __extends$5(EmojiSettings, _super);
33305
33546
  function EmojiSettings() {
33306
33547
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33316,7 +33557,7 @@ var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33316
33557
  /**
33317
33558
  * Configures the Paste Cleanup settings of the RichTextEditor.
33318
33559
  */
33319
- var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33560
+ var PasteCleanupSettings = /** @class */ (function (_super) {
33320
33561
  __extends$5(PasteCleanupSettings, _super);
33321
33562
  function PasteCleanupSettings() {
33322
33563
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33344,7 +33585,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33344
33585
  /**
33345
33586
  * Configures the font family settings of the RichTextEditor.
33346
33587
  */
33347
- var FontFamily = /** @__PURE__ @class */ (function (_super) {
33588
+ var FontFamily = /** @class */ (function (_super) {
33348
33589
  __extends$5(FontFamily, _super);
33349
33590
  function FontFamily() {
33350
33591
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33363,7 +33604,7 @@ var FontFamily = /** @__PURE__ @class */ (function (_super) {
33363
33604
  /**
33364
33605
  * Configures the font size settings of the RichTextEditor.
33365
33606
  */
33366
- var FontSize = /** @__PURE__ @class */ (function (_super) {
33607
+ var FontSize = /** @class */ (function (_super) {
33367
33608
  __extends$5(FontSize, _super);
33368
33609
  function FontSize() {
33369
33610
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33382,7 +33623,7 @@ var FontSize = /** @__PURE__ @class */ (function (_super) {
33382
33623
  /**
33383
33624
  * Configures the format settings of the RichTextEditor.
33384
33625
  */
33385
- var Format = /** @__PURE__ @class */ (function (_super) {
33626
+ var Format = /** @class */ (function (_super) {
33386
33627
  __extends$5(Format, _super);
33387
33628
  function Format() {
33388
33629
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33401,7 +33642,7 @@ var Format = /** @__PURE__ @class */ (function (_super) {
33401
33642
  /**
33402
33643
  * Configures the font Color settings of the RichTextEditor.
33403
33644
  */
33404
- var FontColor = /** @__PURE__ @class */ (function (_super) {
33645
+ var FontColor = /** @class */ (function (_super) {
33405
33646
  __extends$5(FontColor, _super);
33406
33647
  function FontColor() {
33407
33648
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33426,7 +33667,7 @@ var FontColor = /** @__PURE__ @class */ (function (_super) {
33426
33667
  /**
33427
33668
  * Configures the background Color settings of the RichTextEditor.
33428
33669
  */
33429
- var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33670
+ var BackgroundColor = /** @class */ (function (_super) {
33430
33671
  __extends$5(BackgroundColor, _super);
33431
33672
  function BackgroundColor() {
33432
33673
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33451,7 +33692,7 @@ var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33451
33692
  /**
33452
33693
  * Configures the numberFormatList settings of the RichTextEditor.
33453
33694
  */
33454
- var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33695
+ var NumberFormatList = /** @class */ (function (_super) {
33455
33696
  __extends$5(NumberFormatList, _super);
33456
33697
  function NumberFormatList() {
33457
33698
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33464,7 +33705,7 @@ var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33464
33705
  /**
33465
33706
  * Configures the bulletFormatList settings of the RichTextEditor.
33466
33707
  */
33467
- var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33708
+ var BulletFormatList = /** @class */ (function (_super) {
33468
33709
  __extends$5(BulletFormatList, _super);
33469
33710
  function BulletFormatList() {
33470
33711
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33475,29 +33716,29 @@ var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33475
33716
  return BulletFormatList;
33476
33717
  }(ChildProperty));
33477
33718
 
33478
- var __extends$6 = (undefined && undefined.__extends) || (function () {
33479
- var extendStatics = function (d, b) {
33480
- extendStatics = Object.setPrototypeOf ||
33481
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33482
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33483
- return extendStatics(d, b);
33484
- };
33485
- return function (d, b) {
33486
- extendStatics(d, b);
33487
- function __() { this.constructor = d; }
33488
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33489
- };
33490
- })();
33491
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33492
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33493
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33494
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33495
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33496
- };
33719
+ var __extends$6 = (undefined && undefined.__extends) || (function () {
33720
+ var extendStatics = function (d, b) {
33721
+ extendStatics = Object.setPrototypeOf ||
33722
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33723
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33724
+ return extendStatics(d, b);
33725
+ };
33726
+ return function (d, b) {
33727
+ extendStatics(d, b);
33728
+ function __() { this.constructor = d; }
33729
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33730
+ };
33731
+ })();
33732
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33733
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33734
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33735
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33736
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33737
+ };
33497
33738
  /**
33498
33739
  * Objects used for configuring the iframe resources properties.
33499
33740
  */
33500
- var Resources = /** @__PURE__ @class */ (function (_super) {
33741
+ var Resources = /** @class */ (function (_super) {
33501
33742
  __extends$6(Resources, _super);
33502
33743
  function Resources() {
33503
33744
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33513,7 +33754,7 @@ var Resources = /** @__PURE__ @class */ (function (_super) {
33513
33754
  /**
33514
33755
  * Configures the iframe settings of the RTE.
33515
33756
  */
33516
- var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33757
+ var IFrameSettings = /** @class */ (function (_super) {
33517
33758
  __extends$6(IFrameSettings, _super);
33518
33759
  function IFrameSettings() {
33519
33760
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33530,29 +33771,29 @@ var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33530
33771
  return IFrameSettings;
33531
33772
  }(ChildProperty));
33532
33773
 
33533
- var __extends$7 = (undefined && undefined.__extends) || (function () {
33534
- var extendStatics = function (d, b) {
33535
- extendStatics = Object.setPrototypeOf ||
33536
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33537
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33538
- return extendStatics(d, b);
33539
- };
33540
- return function (d, b) {
33541
- extendStatics(d, b);
33542
- function __() { this.constructor = d; }
33543
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33544
- };
33545
- })();
33546
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33547
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33548
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33549
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33550
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33551
- };
33774
+ var __extends$7 = (undefined && undefined.__extends) || (function () {
33775
+ var extendStatics = function (d, b) {
33776
+ extendStatics = Object.setPrototypeOf ||
33777
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33778
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33779
+ return extendStatics(d, b);
33780
+ };
33781
+ return function (d, b) {
33782
+ extendStatics(d, b);
33783
+ function __() { this.constructor = d; }
33784
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33785
+ };
33786
+ })();
33787
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33788
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33789
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33790
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33791
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33792
+ };
33552
33793
  /**
33553
33794
  * Configures the inlineMode property of the RTE.
33554
33795
  */
33555
- var InlineMode = /** @__PURE__ @class */ (function (_super) {
33796
+ var InlineMode = /** @class */ (function (_super) {
33556
33797
  __extends$7(InlineMode, _super);
33557
33798
  function InlineMode() {
33558
33799
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33569,7 +33810,7 @@ var InlineMode = /** @__PURE__ @class */ (function (_super) {
33569
33810
  /**
33570
33811
  * `EnterKey` module is used to handle enter key press actions.
33571
33812
  */
33572
- var EnterKeyAction = /** @__PURE__ @class */ (function () {
33813
+ var EnterKeyAction = /** @class */ (function () {
33573
33814
  function EnterKeyAction(parent) {
33574
33815
  this.parent = parent;
33575
33816
  this.addEventListener();
@@ -33605,16 +33846,18 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33605
33846
  this.getRangeNode();
33606
33847
  var isTableEnter = true;
33607
33848
  this.formatTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'];
33608
- var isCursorAtTableEnd = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
33609
- this.range.startContainer.isContentEditable &&
33610
- this.range.startContainer.childNodes[this.range.startOffset - 1] &&
33611
- this.range.startContainer.childNodes[this.range.startOffset - 1].nodeName === 'TABLE';
33612
- var isCursorAtTableStart = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
33613
- this.range.startContainer.isContentEditable && this.range.startContainer.childNodes[this.range.startOffset] &&
33614
- this.range.startContainer.childNodes[this.range.startOffset].nodeName === 'TABLE';
33615
- if (isCursorAtTableEnd || isCursorAtTableStart) {
33616
- this.handleCursorAtTableSide(e, isCursorAtTableStart, isCursorAtTableEnd);
33617
- return;
33849
+ var tableImagCursor = this.processedTableImageCursor();
33850
+ if (tableImagCursor.start || tableImagCursor.end) {
33851
+ if (tableImagCursor.startName === 'TABLE' || tableImagCursor.endName === 'TABLE') { // Default browser action prevented and hanled manually.
33852
+ this.handleCursorAtTableSide(e, tableImagCursor.start, tableImagCursor.end);
33853
+ return;
33854
+ }
33855
+ }
33856
+ if (tableImagCursor.start || tableImagCursor.end || this.range.startContainer.nodeName === 'IMG') {
33857
+ if (this.parent.enterKey === 'BR' && (tableImagCursor.startName === 'IMG' || tableImagCursor.endName === 'IMG' || this.range.startContainer.nodeName === 'IMG')) { // Default browser action prevented and hanled manually.
33858
+ this.handleEnterKeyAtImageSide(e, tableImagCursor.start, tableImagCursor.end);
33859
+ return;
33860
+ }
33618
33861
  }
33619
33862
  if (!isNullOrUndefined(this.startNode.closest('TABLE')) && !isNullOrUndefined(this.endNode.closest('TABLE'))) {
33620
33863
  isTableEnter = false;
@@ -33982,7 +34225,6 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33982
34225
  var outerBRElem = _this.parent.createElement('br');
33983
34226
  if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
33984
34227
  !isNullOrUndefined(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR' && currentParent.nodeName !== 'P' && currentParent.nodeName !== 'DIV') {
33985
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
33986
34228
  newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, false).cloneNode(true);
33987
34229
  _this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
33988
34230
  _this.insertFocusContent();
@@ -34012,7 +34254,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34012
34254
  }
34013
34255
  e.args.preventDefault();
34014
34256
  }
34015
- _this.parent.trigger(actionComplete, { requestType: shiftKey_1 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34257
+ _this.triggerActionComplete(e, shiftKey_1);
34016
34258
  }
34017
34259
  });
34018
34260
  }
@@ -34082,6 +34324,9 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34082
34324
  }
34083
34325
  return insertElem;
34084
34326
  };
34327
+ EnterKeyAction.prototype.triggerActionComplete = function (e, shiftKey) {
34328
+ this.parent.trigger(actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34329
+ };
34085
34330
  EnterKeyAction.prototype.handleCursorAtTableSide = function (e, isStart, isEnd) {
34086
34331
  var _this = this;
34087
34332
  if (this.parent.enterKey !== 'BR') {
@@ -34112,44 +34357,125 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34112
34357
  }
34113
34358
  _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement, 0);
34114
34359
  e.args.preventDefault();
34115
- _this.parent.trigger(actionComplete, { requestType: shiftKey_2 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34360
+ _this.triggerActionComplete(e, shiftKey_2);
34116
34361
  }
34117
34362
  });
34118
34363
  }
34119
34364
  };
34365
+ EnterKeyAction.prototype.handleEnterKeyAtImageSide = function (e, isStart, isEnd) {
34366
+ var _this = this;
34367
+ var actionBeginArgs = {
34368
+ cancel: false,
34369
+ name: actionBegin,
34370
+ requestType: e.args.shiftKey ? 'ShiftEnterAction' : 'EnterAction',
34371
+ originalEvent: e.args
34372
+ };
34373
+ var directRange = false;
34374
+ if (this.range.startContainer.nodeName === 'IMG' && this.range.startOffset === 0) {
34375
+ directRange = true;
34376
+ }
34377
+ this.parent.trigger(actionBegin, actionBeginArgs, function (actionBeginArgs) {
34378
+ if (!actionBeginArgs.cancel) {
34379
+ if (_this.parent.enterKey === 'BR') {
34380
+ var newElement = _this.parent.createElement('BR');
34381
+ var imageElement = void 0;
34382
+ if (directRange) {
34383
+ imageElement = _this.range.startContainer;
34384
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34385
+ _this.parent.formatter.editorManager.nodeSelection.
34386
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34387
+ }
34388
+ if (isStart) {
34389
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset];
34390
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34391
+ _this.parent.formatter.editorManager.nodeSelection.
34392
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34393
+ }
34394
+ if (isEnd) {
34395
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
34396
+ if (!isNullOrUndefined(imageElement.nextSibling)) {
34397
+ imageElement.parentElement.insertBefore(newElement, imageElement.nextSibling);
34398
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement.nextSibling, 0);
34399
+ }
34400
+ else if (isNullOrUndefined(imageElement.nextSibling)) {
34401
+ imageElement.parentElement.appendChild(newElement);
34402
+ var brElement = _this.parent.createElement('BR');
34403
+ imageElement.parentElement.appendChild(brElement);
34404
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), brElement, 0);
34405
+ }
34406
+ }
34407
+ e.args.preventDefault();
34408
+ _this.triggerActionComplete(e, e.args.shiftKey);
34409
+ }
34410
+ }
34411
+ });
34412
+ };
34413
+ EnterKeyAction.prototype.isTableOrImageStart = function () {
34414
+ var customHandlerElements = ['IMG', 'TABLE'];
34415
+ var startContainer = this.range.startContainer;
34416
+ var startOffset = this.range.startOffset;
34417
+ var isCursorAtStart = this.range.collapsed && (startContainer.nodeType === 1) &&
34418
+ startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
34419
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
34420
+ if (isCursorAtStart) {
34421
+ return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
34422
+ }
34423
+ else {
34424
+ return { start: false, startNodeName: '' };
34425
+ }
34426
+ };
34427
+ EnterKeyAction.prototype.isTableOrImageEnd = function () {
34428
+ var customHandlerElements = ['IMG', 'TABLE'];
34429
+ var startContainer = this.range.startContainer;
34430
+ var startOffset = this.range.startOffset;
34431
+ var isCursorAtEnd = this.range.collapsed && (startContainer.nodeType === 1) &&
34432
+ startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
34433
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
34434
+ if (isCursorAtEnd) {
34435
+ return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
34436
+ }
34437
+ else {
34438
+ return { end: false, endNodeName: '' };
34439
+ }
34440
+ };
34441
+ EnterKeyAction.prototype.processedTableImageCursor = function () {
34442
+ var _a = this.isTableOrImageStart(), start = _a.start, startNodeName = _a.startNodeName;
34443
+ var _b = this.isTableOrImageEnd(), end = _b.end, endNodeName = _b.endNodeName;
34444
+ return { start: start, startName: startNodeName, end: end, endName: endNodeName };
34445
+ };
34120
34446
  return EnterKeyAction;
34121
34447
  }());
34122
34448
 
34123
- var __extends$4 = (undefined && undefined.__extends) || (function () {
34124
- var extendStatics = function (d, b) {
34125
- extendStatics = Object.setPrototypeOf ||
34126
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34127
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34128
- return extendStatics(d, b);
34129
- };
34130
- return function (d, b) {
34131
- extendStatics(d, b);
34132
- function __() { this.constructor = d; }
34133
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34134
- };
34135
- })();
34136
- var __assign = (undefined && undefined.__assign) || function () {
34137
- __assign = Object.assign || function(t) {
34138
- for (var s, i = 1, n = arguments.length; i < n; i++) {
34139
- s = arguments[i];
34140
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34141
- t[p] = s[p];
34142
- }
34143
- return t;
34144
- };
34145
- return __assign.apply(this, arguments);
34146
- };
34147
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34148
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34149
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34150
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34151
- return c > 3 && r && Object.defineProperty(target, key, r), r;
34152
- };
34449
+ var __extends$4 = (undefined && undefined.__extends) || (function () {
34450
+ var extendStatics = function (d, b) {
34451
+ extendStatics = Object.setPrototypeOf ||
34452
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34453
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34454
+ return extendStatics(d, b);
34455
+ };
34456
+ return function (d, b) {
34457
+ extendStatics(d, b);
34458
+ function __() { this.constructor = d; }
34459
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34460
+ };
34461
+ })();
34462
+ var __assign = (undefined && undefined.__assign) || function () {
34463
+ __assign = Object.assign || function(t) {
34464
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
34465
+ s = arguments[i];
34466
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34467
+ t[p] = s[p];
34468
+ }
34469
+ return t;
34470
+ };
34471
+ return __assign.apply(this, arguments);
34472
+ };
34473
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34474
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34475
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34476
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34477
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
34478
+ };
34153
34479
  /**
34154
34480
  * Represents the Rich Text Editor component.
34155
34481
  * ```html
@@ -34160,7 +34486,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
34160
34486
  * </script>
34161
34487
  * ```
34162
34488
  */
34163
- var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34489
+ var RichTextEditor = /** @class */ (function (_super) {
34164
34490
  __extends$4(RichTextEditor, _super);
34165
34491
  function RichTextEditor(options, element) {
34166
34492
  var _this = _super.call(this, options, element) || this;
@@ -34289,6 +34615,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34289
34615
  this.persistData();
34290
34616
  setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
34291
34617
  attributes(this.element, { role: 'application', 'aria-label': 'Rich Text Editor' });
34618
+ this.beforeRenderClassValue = this.element.getAttribute('class');
34292
34619
  };
34293
34620
  RichTextEditor.prototype.persistData = function () {
34294
34621
  if (this.enablePersistence && this.originalElement.tagName === 'TEXTAREA') {
@@ -35161,6 +35488,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35161
35488
  if (this.isDestroyed || !this.isRendered) {
35162
35489
  return;
35163
35490
  }
35491
+ this.element.className = this.beforeRenderClassValue;
35492
+ this.removeHtmlAttributes();
35493
+ this.removeAttributes();
35494
+ this.beforeRenderClassValue = null;
35164
35495
  if (!isNullOrUndefined(this.timeInterval)) {
35165
35496
  clearInterval(this.timeInterval);
35166
35497
  this.timeInterval = null;
@@ -35228,8 +35559,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35228
35559
  }
35229
35560
  }
35230
35561
  }
35231
- this.removeHtmlAttributes();
35232
- this.removeAttributes();
35233
35562
  _super.prototype.destroy.call(this);
35234
35563
  this.isRendered = false;
35235
35564
  };
@@ -35260,6 +35589,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35260
35589
  this.element.removeAttribute('aria-disabled');
35261
35590
  this.element.removeAttribute('role');
35262
35591
  this.element.removeAttribute('tabindex');
35592
+ this.element.removeAttribute('aria-label');
35263
35593
  };
35264
35594
  RichTextEditor.prototype.destroyDependentModules = function () {
35265
35595
  /* destroy dependent modules */
@@ -35514,7 +35844,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35514
35844
  }
35515
35845
  };
35516
35846
  RichTextEditor.prototype.updatePanelValue = function () {
35517
- var value = this.value;
35847
+ var value = this.listOrderCorrection(this.value);
35518
35848
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
35519
35849
  var getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
35520
35850
  if (value) {
@@ -35558,6 +35888,17 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35558
35888
  this.countModule.refresh();
35559
35889
  }
35560
35890
  };
35891
+ RichTextEditor.prototype.listOrderCorrection = function (value) {
35892
+ var valueElementWrapper = this.createElement('div');
35893
+ valueElementWrapper.innerHTML = value;
35894
+ var listElements = valueElementWrapper.querySelectorAll('UL, OL');
35895
+ for (var i = 0; i < listElements.length; i++) {
35896
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
35897
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
35898
+ }
35899
+ }
35900
+ return valueElementWrapper.innerHTML;
35901
+ };
35561
35902
  RichTextEditor.prototype.setHeight = function (height) {
35562
35903
  if (height !== 'auto') {
35563
35904
  this.element.style.height = formatUnit(height);