@syncfusion/ej2-richtexteditor 25.1.39 → 25.1.41-85815

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 (283) hide show
  1. package/.eslintrc.json +259 -259
  2. package/CHANGELOG.md +2067 -1961
  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 +806 -311
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +909 -410
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/ej2-richtexteditor-component.sln +30 -0
  11. package/helpers/e2e/index.js +3 -3
  12. package/helpers/e2e/rte-helper.js +13 -13
  13. package/license +9 -9
  14. package/package.json +74 -74
  15. package/src/common/interface.d.ts +22 -8
  16. package/src/common/util.d.ts +8 -0
  17. package/src/common/util.js +56 -1
  18. package/src/editor-manager/base/classes.d.ts +1 -1
  19. package/src/editor-manager/base/classes.js +1 -1
  20. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  21. package/src/editor-manager/base/editor-manager.js +8 -6
  22. package/src/editor-manager/base/enum.d.ts +2 -2
  23. package/src/editor-manager/base/interface.d.ts +9 -9
  24. package/src/editor-manager/base/types.d.ts +1 -1
  25. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  26. package/src/editor-manager/plugin/alignments.js +5 -2
  27. package/src/editor-manager/plugin/audio.d.ts +3 -3
  28. package/src/editor-manager/plugin/audio.js +4 -4
  29. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  30. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  31. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  32. package/src/editor-manager/plugin/clearformat.js +1 -1
  33. package/src/editor-manager/plugin/dom-node.d.ts +54 -34
  34. package/src/editor-manager/plugin/dom-node.js +139 -36
  35. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  36. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  37. package/src/editor-manager/plugin/formats.d.ts +2 -2
  38. package/src/editor-manager/plugin/formats.js +8 -2
  39. package/src/editor-manager/plugin/image.d.ts +3 -3
  40. package/src/editor-manager/plugin/image.js +3 -3
  41. package/src/editor-manager/plugin/indents.d.ts +2 -2
  42. package/src/editor-manager/plugin/indents.js +5 -2
  43. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  44. package/src/editor-manager/plugin/insert-methods.js +4 -4
  45. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  46. package/src/editor-manager/plugin/insert-text.js +2 -2
  47. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  48. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  49. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  50. package/src/editor-manager/plugin/inserthtml.js +14 -5
  51. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  52. package/src/editor-manager/plugin/isformatted.js +8 -8
  53. package/src/editor-manager/plugin/link.d.ts +2 -2
  54. package/src/editor-manager/plugin/link.js +2 -2
  55. package/src/editor-manager/plugin/lists.d.ts +2 -2
  56. package/src/editor-manager/plugin/lists.js +84 -61
  57. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  58. package/src/editor-manager/plugin/ms-word-clean-up.js +4 -4
  59. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  60. package/src/editor-manager/plugin/nodecutter.js +8 -8
  61. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  62. package/src/editor-manager/plugin/selection-commands.js +1 -1
  63. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  64. package/src/editor-manager/plugin/selection-exec.js +2 -2
  65. package/src/editor-manager/plugin/table.d.ts +2 -2
  66. package/src/editor-manager/plugin/table.js +2 -2
  67. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  68. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  69. package/src/editor-manager/plugin/undo.d.ts +6 -6
  70. package/src/editor-manager/plugin/undo.js +9 -7
  71. package/src/editor-manager/plugin/video.d.ts +3 -3
  72. package/src/editor-manager/plugin/video.js +4 -4
  73. package/src/markdown-parser/base/interface.d.ts +10 -10
  74. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  75. package/src/markdown-parser/base/markdown-parser.js +3 -3
  76. package/src/markdown-parser/base/types.d.ts +1 -1
  77. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  78. package/src/markdown-parser/plugin/clearformat.js +2 -2
  79. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  80. package/src/markdown-parser/plugin/formats.js +2 -2
  81. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  82. package/src/markdown-parser/plugin/insert-text.js +2 -2
  83. package/src/markdown-parser/plugin/link.d.ts +2 -2
  84. package/src/markdown-parser/plugin/link.js +2 -2
  85. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  86. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  87. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  88. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  89. package/src/markdown-parser/plugin/table.d.ts +3 -3
  90. package/src/markdown-parser/plugin/table.js +3 -3
  91. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  92. package/src/markdown-parser/plugin/undo.js +6 -6
  93. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  94. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  95. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  96. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  97. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  98. package/src/rich-text-editor/actions/color-picker.js +2 -2
  99. package/src/rich-text-editor/actions/count.d.ts +3 -3
  100. package/src/rich-text-editor/actions/count.js +3 -3
  101. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  102. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  103. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  104. package/src/rich-text-editor/actions/emoji-picker.js +2 -2
  105. package/src/rich-text-editor/actions/enter-key.d.ts +6 -0
  106. package/src/rich-text-editor/actions/enter-key.js +142 -2
  107. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  108. package/src/rich-text-editor/actions/full-screen.js +3 -9
  109. package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
  110. package/src/rich-text-editor/actions/html-editor.js +106 -26
  111. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  112. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  113. package/src/rich-text-editor/actions/keyboard.js +20 -20
  114. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  115. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  116. package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -2
  117. package/src/rich-text-editor/actions/paste-clean-up.js +57 -40
  118. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  119. package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
  120. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  121. package/src/rich-text-editor/actions/toolbar.js +13 -13
  122. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  123. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  124. package/src/rich-text-editor/base/classes.d.ts +121 -121
  125. package/src/rich-text-editor/base/classes.js +121 -121
  126. package/src/rich-text-editor/base/constant.d.ts +158 -158
  127. package/src/rich-text-editor/base/constant.js +158 -158
  128. package/src/rich-text-editor/base/enum.d.ts +12 -1
  129. package/src/rich-text-editor/base/enum.js +13 -1
  130. package/src/rich-text-editor/base/interface.d.ts +59 -51
  131. package/src/rich-text-editor/base/interface.js +1 -1
  132. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  133. package/src/rich-text-editor/base/rich-text-editor.d.ts +65 -63
  134. package/src/rich-text-editor/base/rich-text-editor.js +89 -67
  135. package/src/rich-text-editor/base/util.d.ts +1 -1
  136. package/src/rich-text-editor/base/util.js +1 -1
  137. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  138. package/src/rich-text-editor/formatter/formatter.js +10 -9
  139. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  140. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  141. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  142. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  143. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  144. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  145. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  146. package/src/rich-text-editor/models/inline-mode.js +19 -19
  147. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  148. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  149. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  150. package/src/rich-text-editor/renderer/audio-module.js +7 -2
  151. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  152. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  153. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  154. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  155. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  156. package/src/rich-text-editor/renderer/iframe-content-renderer.js +18 -18
  157. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  158. package/src/rich-text-editor/renderer/image-module.js +13 -6
  159. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  160. package/src/rich-text-editor/renderer/link-module.js +4 -1
  161. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  162. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  163. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  164. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  165. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  166. package/src/rich-text-editor/renderer/render.js +2 -2
  167. package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
  168. package/src/rich-text-editor/renderer/table-module.js +6 -2
  169. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +11 -9
  170. package/src/rich-text-editor/renderer/toolbar-renderer.js +23 -19
  171. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  172. package/src/rich-text-editor/renderer/video-module.js +7 -2
  173. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  174. package/src/rich-text-editor/renderer/view-source.js +6 -6
  175. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  176. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  177. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  178. package/src/rich-text-editor/services/service-locator.js +3 -3
  179. package/src/selection/selection.d.ts +22 -22
  180. package/src/selection/selection.js +22 -22
  181. package/styles/_all.scss +1 -1
  182. package/styles/bootstrap-dark.css +739 -801
  183. package/styles/bootstrap-dark.scss +4 -1
  184. package/styles/bootstrap.css +723 -801
  185. package/styles/bootstrap.scss +4 -1
  186. package/styles/bootstrap4.css +726 -803
  187. package/styles/bootstrap4.scss +4 -1
  188. package/styles/bootstrap5-dark.css +750 -840
  189. package/styles/bootstrap5-dark.scss +4 -1
  190. package/styles/bootstrap5.css +749 -839
  191. package/styles/bootstrap5.scss +4 -1
  192. package/styles/fabric-dark.css +724 -797
  193. package/styles/fabric-dark.scss +4 -1
  194. package/styles/fabric.css +720 -797
  195. package/styles/fabric.scss +4 -1
  196. package/styles/fluent-dark.css +727 -820
  197. package/styles/fluent-dark.scss +4 -1
  198. package/styles/fluent.css +726 -819
  199. package/styles/fluent.scss +4 -1
  200. package/styles/fluent2.css +4255 -0
  201. package/styles/fluent2.scss +4 -0
  202. package/styles/highcontrast-light.css +695 -795
  203. package/styles/highcontrast-light.scss +4 -1
  204. package/styles/highcontrast.css +717 -797
  205. package/styles/highcontrast.scss +4 -1
  206. package/styles/material-dark.css +716 -798
  207. package/styles/material-dark.scss +4 -1
  208. package/styles/material.css +713 -800
  209. package/styles/material.scss +4 -1
  210. package/styles/material3-dark.css +751 -857
  211. package/styles/material3-dark.scss +4 -1
  212. package/styles/material3.css +751 -857
  213. package/styles/material3.scss +4 -1
  214. package/styles/rich-text-editor/_all.scss +2 -2
  215. package/styles/rich-text-editor/_bds-definition.scss +290 -285
  216. package/styles/rich-text-editor/_bigger.scss +610 -0
  217. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +291 -287
  218. package/styles/rich-text-editor/_bootstrap-definition.scss +349 -343
  219. package/styles/rich-text-editor/_bootstrap4-definition.scss +476 -470
  220. package/styles/rich-text-editor/_bootstrap5-definition.scss +278 -272
  221. package/styles/rich-text-editor/_bootstrap5.3-definition.scss +278 -0
  222. package/styles/rich-text-editor/_fabric-dark-definition.scss +275 -269
  223. package/styles/rich-text-editor/_fabric-definition.scss +273 -267
  224. package/styles/rich-text-editor/_fluent-definition.scss +279 -273
  225. package/styles/rich-text-editor/_fluent2-definition.scss +287 -0
  226. package/styles/rich-text-editor/_fusionnew-definition.scss +276 -271
  227. package/styles/rich-text-editor/_highcontrast-definition.scss +274 -267
  228. package/styles/rich-text-editor/_highcontrast-light-definition.scss +273 -267
  229. package/styles/rich-text-editor/_layout.scss +2175 -2268
  230. package/styles/rich-text-editor/_material-dark-definition.scss +278 -272
  231. package/styles/rich-text-editor/_material-definition.scss +276 -270
  232. package/styles/rich-text-editor/_material3-definition.scss +278 -272
  233. package/styles/rich-text-editor/_tailwind-definition.scss +273 -267
  234. package/styles/rich-text-editor/_tailwind4-definition.scss +278 -0
  235. package/styles/rich-text-editor/_theme.scss +844 -927
  236. package/styles/rich-text-editor/bootstrap-dark.css +739 -801
  237. package/styles/rich-text-editor/bootstrap.css +723 -801
  238. package/styles/rich-text-editor/bootstrap4.css +726 -803
  239. package/styles/rich-text-editor/bootstrap5-dark.css +750 -840
  240. package/styles/rich-text-editor/bootstrap5.css +749 -839
  241. package/styles/rich-text-editor/fabric-dark.css +724 -797
  242. package/styles/rich-text-editor/fabric.css +720 -797
  243. package/styles/rich-text-editor/fluent-dark.css +727 -820
  244. package/styles/rich-text-editor/fluent.css +726 -819
  245. package/styles/rich-text-editor/fluent2.css +4255 -0
  246. package/styles/rich-text-editor/fluent2.scss +4 -0
  247. package/styles/rich-text-editor/highcontrast-light.css +695 -795
  248. package/styles/rich-text-editor/highcontrast.css +717 -797
  249. package/styles/rich-text-editor/icons/_bds.scss +372 -351
  250. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -352
  251. package/styles/rich-text-editor/icons/_bootstrap.scss +373 -352
  252. package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -352
  253. package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -0
  254. package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -351
  255. package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -352
  256. package/styles/rich-text-editor/icons/_fabric.scss +373 -352
  257. package/styles/rich-text-editor/icons/_fluent.scss +372 -351
  258. package/styles/rich-text-editor/icons/_fluent2.scss +369 -0
  259. package/styles/rich-text-editor/icons/_fusionnew.scss +357 -348
  260. package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -352
  261. package/styles/rich-text-editor/icons/_highcontrast.scss +373 -352
  262. package/styles/rich-text-editor/icons/_material-dark.scss +373 -352
  263. package/styles/rich-text-editor/icons/_material.scss +373 -352
  264. package/styles/rich-text-editor/icons/_material3.scss +372 -351
  265. package/styles/rich-text-editor/icons/_tailwind.scss +372 -351
  266. package/styles/rich-text-editor/icons/_tailwind4.scss +372 -0
  267. package/styles/rich-text-editor/material-dark.css +716 -798
  268. package/styles/rich-text-editor/material.css +713 -800
  269. package/styles/rich-text-editor/material3-dark.css +751 -857
  270. package/styles/rich-text-editor/material3-dark.scss +1 -1
  271. package/styles/rich-text-editor/material3.css +751 -857
  272. package/styles/rich-text-editor/material3.scss +1 -1
  273. package/styles/rich-text-editor/tailwind-dark.css +740 -829
  274. package/styles/rich-text-editor/tailwind.css +740 -829
  275. package/styles/tailwind-dark.css +740 -829
  276. package/styles/tailwind-dark.scss +4 -1
  277. package/styles/tailwind.css +740 -829
  278. package/styles/tailwind.scss +4 -1
  279. package/dist/ej2-richtexteditor.min.js +0 -10
  280. package/dist/global/ej2-richtexteditor.min.js +0 -11
  281. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  282. package/dist/global/index.d.ts +0 -14
  283. package/tslint.json +0 -111
@@ -1641,6 +1641,18 @@ var DialogType;
1641
1641
  DialogType["InsertTable"] = "InsertTable";
1642
1642
  /* eslint-enable */
1643
1643
  })(DialogType || (DialogType = {}));
1644
+ /**
1645
+ * Defines types to be used as inserted image.
1646
+ */
1647
+ var ImageInputSource;
1648
+ (function (ImageInputSource) {
1649
+ /** Defines ImageInputSource as Uploaded */
1650
+ ImageInputSource["Uploaded"] = "Uploaded";
1651
+ /** Defines ImageInputSource as Dropped */
1652
+ ImageInputSource["Dropped"] = "Dropped";
1653
+ /** Defines ImageInputSource as Pasted */
1654
+ ImageInputSource["Pasted"] = "Pasted";
1655
+ })(ImageInputSource || (ImageInputSource = {}));
1644
1656
 
1645
1657
  /* eslint-disable */
1646
1658
  /**
@@ -3558,7 +3570,7 @@ function updateDropDownFontFormatLocale(self) {
3558
3570
  * @hidden
3559
3571
  * @deprecated
3560
3572
  */
3561
- var IsFormatted = /** @__PURE__ @class */ (function () {
3573
+ var IsFormatted = /** @class */ (function () {
3562
3574
  function IsFormatted() {
3563
3575
  }
3564
3576
  /**
@@ -3904,7 +3916,7 @@ var PASTE_SOURCE = ['word', 'excel', 'onenote'];
3904
3916
  /**
3905
3917
  * `Selection` module is used to handle RTE Selections.
3906
3918
  */
3907
- var NodeSelection = /** @__PURE__ @class */ (function () {
3919
+ var NodeSelection = /** @class */ (function () {
3908
3920
  function NodeSelection() {
3909
3921
  this.startNodeName = [];
3910
3922
  this.endNodeName = [];
@@ -4464,6 +4476,10 @@ function updateTextNode$1(value, enterAction) {
4464
4476
  tableElm[i].classList.remove('e-rte-paste-onenote-table');
4465
4477
  continue;
4466
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
+ }
4467
4483
  }
4468
4484
  }
4469
4485
  var imageElm = resultElm.querySelectorAll('img');
@@ -4557,17 +4573,68 @@ function nestedListCleanUp(range) {
4557
4573
  item.remove();
4558
4574
  });
4559
4575
  }
4576
+ else {
4577
+ break;
4578
+ }
4560
4579
  }
4561
4580
  var liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
4562
4581
  if (liElem.length > 0) {
4563
4582
  liElem.forEach(function (item) {
4564
- if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
4583
+ if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL")) {
4565
4584
  item.style.listStyleType = "none";
4566
4585
  }
4567
4586
  });
4568
4587
  }
4569
4588
  }
4570
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
+ }
4571
4638
 
4572
4639
  /**
4573
4640
  * Update Toolbar Status
@@ -4576,7 +4643,7 @@ function nestedListCleanUp(range) {
4576
4643
  * @deprecated
4577
4644
  */
4578
4645
  var statusCollection = getDefaultHtmlTbStatus();
4579
- var ToolbarStatus = /** @__PURE__ @class */ (function () {
4646
+ var ToolbarStatus = /** @class */ (function () {
4580
4647
  function ToolbarStatus() {
4581
4648
  }
4582
4649
  /**
@@ -4945,7 +5012,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
4945
5012
  * @hidden
4946
5013
  * @deprecated
4947
5014
  */
4948
- var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5015
+ var ToolbarRenderer = /** @class */ (function () {
4949
5016
  /**
4950
5017
  * Constructor for toolbar renderer module
4951
5018
  *
@@ -5083,6 +5150,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5083
5150
  openDelay: 400,
5084
5151
  opensOn: 'Hover',
5085
5152
  beforeRender: this.tooltipBeforeRender.bind(this),
5153
+ beforeOpen: this.tooltipBeforeOpen.bind(this),
5086
5154
  cssClass: this.parent.getCssClass(),
5087
5155
  windowCollision: true,
5088
5156
  position: 'BottomCenter'
@@ -5205,7 +5273,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5205
5273
  if ((divNode.textContent.trim() !== ''
5206
5274
  && args.element.childNodes[index].textContent.trim() === divNode.textContent.trim()) ||
5207
5275
  ((args.items[0].command === 'Formats' && !isNullOrUndefined(toolbarStatus.formats) && _this.parent.format.types[index].value.toLowerCase() === toolbarStatus.formats.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.format.types[index].cssClass))
5208
- || (args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && _this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.fontFamily.items[index].cssClass)))) {
5276
+ || (args.items[0].subCommand === 'FontName' && args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && !isNullOrUndefined(_this.parent.fontFamily.items[index]) && _this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.fontFamily.items[index].cssClass)))) {
5209
5277
  if (!args.element.childNodes[index].classList.contains('e-active')) {
5210
5278
  addClass([args.element.childNodes[index]], 'e-active');
5211
5279
  }
@@ -5391,8 +5459,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5391
5459
  target: colorPicker.element.parentElement, cssClass: css,
5392
5460
  enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
5393
5461
  beforeOpen: function (dropDownArgs) {
5394
- colorPicker.inline = true;
5395
- colorPicker.dataBind();
5396
5462
  if (proxy.parent.readonly || !proxy.parent.enabled) {
5397
5463
  dropDownArgs.cancel = true;
5398
5464
  return;
@@ -5531,14 +5597,18 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5531
5597
  var colorPicker = new ColorPicker({
5532
5598
  enablePersistence: this.parent.enablePersistence,
5533
5599
  enableRtl: this.parent.enableRtl,
5534
- inline: false,
5535
- 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',
5536
5603
  created: function () {
5537
5604
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5538
- colorPicker.setProperties({ value: value });
5605
+ colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5606
+ colorPicker.value = value;
5539
5607
  },
5540
5608
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5541
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,
5542
5612
  beforeTileRender: function (args) {
5543
5613
  args.element.classList.add(CLS_COLOR_PALETTE);
5544
5614
  args.element.classList.add(CLS_CUSTOM_TILE);
@@ -5583,14 +5653,15 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5583
5653
  }
5584
5654
  });
5585
5655
  colorPicker.isStringTemplate = true;
5586
- colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
5587
- colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
5588
- this.parent.fontColor.colorCode;
5589
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5590
5656
  colorPicker.createElement = this.parent.createElement;
5591
5657
  colorPicker.appendTo(document.getElementById(args.target));
5592
5658
  return colorPicker;
5593
5659
  };
5660
+ ToolbarRenderer.prototype.tooltipBeforeOpen = function (args) {
5661
+ if (args.element) {
5662
+ args.element.setAttribute('data-rte-id', this.parent.getID());
5663
+ }
5664
+ };
5594
5665
  /**
5595
5666
  * The function is used to render Rich Text Editor toolbar
5596
5667
  *
@@ -5628,7 +5699,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5628
5699
  /**
5629
5700
  * `Toolbar` module is used to handle Toolbar actions.
5630
5701
  */
5631
- var BaseToolbar = /** @__PURE__ @class */ (function () {
5702
+ var BaseToolbar = /** @class */ (function () {
5632
5703
  function BaseToolbar(parent, serviceLocator) {
5633
5704
  this.tools = {};
5634
5705
  this.parent = parent;
@@ -5836,7 +5907,7 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
5836
5907
  /**
5837
5908
  * `Toolbar` module is used to handle Toolbar actions.
5838
5909
  */
5839
- var DropDownButtons = /** @__PURE__ @class */ (function () {
5910
+ var DropDownButtons = /** @class */ (function () {
5840
5911
  function DropDownButtons(parent, serviceLocator) {
5841
5912
  this.parent = parent;
5842
5913
  this.locator = serviceLocator;
@@ -6367,7 +6438,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
6367
6438
  * @hidden
6368
6439
  * @deprecated
6369
6440
  */
6370
- var ServiceLocator = /** @__PURE__ @class */ (function () {
6441
+ var ServiceLocator = /** @class */ (function () {
6371
6442
  function ServiceLocator() {
6372
6443
  this.services = {};
6373
6444
  }
@@ -6411,7 +6482,7 @@ var ServiceLocator = /** @__PURE__ @class */ (function () {
6411
6482
  * @hidden
6412
6483
  * @deprecated
6413
6484
  */
6414
- var RendererFactory = /** @__PURE__ @class */ (function () {
6485
+ var RendererFactory = /** @class */ (function () {
6415
6486
  function RendererFactory() {
6416
6487
  this.rendererMap = {};
6417
6488
  }
@@ -6454,7 +6525,7 @@ var RendererFactory = /** @__PURE__ @class */ (function () {
6454
6525
  /**
6455
6526
  * `ToolbarAction` module is used to toolbar click action
6456
6527
  */
6457
- var ToolbarAction = /** @__PURE__ @class */ (function () {
6528
+ var ToolbarAction = /** @class */ (function () {
6458
6529
  function ToolbarAction(parent) {
6459
6530
  this.parent = parent;
6460
6531
  this.addEventListener();
@@ -6528,7 +6599,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
6528
6599
  /**
6529
6600
  * `Toolbar` module is used to handle Toolbar actions.
6530
6601
  */
6531
- var Toolbar$2 = /** @__PURE__ @class */ (function () {
6602
+ var Toolbar$2 = /** @class */ (function () {
6532
6603
  function Toolbar$$1(parent, serviceLocator) {
6533
6604
  this.tools = {};
6534
6605
  this.parent = parent;
@@ -7167,25 +7238,25 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
7167
7238
  return Toolbar$$1;
7168
7239
  }());
7169
7240
 
7170
- var __extends = (undefined && undefined.__extends) || (function () {
7171
- var extendStatics = function (d, b) {
7172
- extendStatics = Object.setPrototypeOf ||
7173
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7174
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7175
- return extendStatics(d, b);
7176
- };
7177
- return function (d, b) {
7178
- extendStatics(d, b);
7179
- function __() { this.constructor = d; }
7180
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7181
- };
7182
- })();
7183
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7184
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7185
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7186
- 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;
7187
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7188
- };
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
+ };
7189
7260
  var keyCode = {
7190
7261
  'backspace': 8,
7191
7262
  'tab': 9,
@@ -7255,7 +7326,7 @@ var keyCode = {
7255
7326
  * @hidden
7256
7327
  * @deprecated
7257
7328
  */
7258
- var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7329
+ var KeyboardEvents$1 = /** @class */ (function (_super) {
7259
7330
  __extends(KeyboardEvents$$1, _super);
7260
7331
  /**
7261
7332
  * Initializes the KeyboardEvents
@@ -7398,7 +7469,7 @@ var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7398
7469
  /**
7399
7470
  * `Color Picker` module is used to handle ColorPicker actions.
7400
7471
  */
7401
- var ColorPickerInput = /** @__PURE__ @class */ (function () {
7472
+ var ColorPickerInput = /** @class */ (function () {
7402
7473
  function ColorPickerInput(parent, serviceLocator) {
7403
7474
  this.tools = {};
7404
7475
  this.parent = parent;
@@ -7651,7 +7722,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
7651
7722
  /**
7652
7723
  * `Quick toolbar` module is used to handle Quick toolbar actions.
7653
7724
  */
7654
- var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
7725
+ var BaseQuickToolbar = /** @class */ (function () {
7655
7726
  function BaseQuickToolbar(parent, locator) {
7656
7727
  this.parent = parent;
7657
7728
  this.locator = locator;
@@ -8133,7 +8204,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
8133
8204
  * @hidden
8134
8205
  * @deprecated
8135
8206
  */
8136
- var PopupRenderer = /** @__PURE__ @class */ (function () {
8207
+ var PopupRenderer = /** @class */ (function () {
8137
8208
  /**
8138
8209
  * Constructor for popup renderer module
8139
8210
  *
@@ -8202,7 +8273,7 @@ var PopupRenderer = /** @__PURE__ @class */ (function () {
8202
8273
  /**
8203
8274
  * `Quick toolbar` module is used to handle Quick toolbar actions.
8204
8275
  */
8205
- var QuickToolbar = /** @__PURE__ @class */ (function () {
8276
+ var QuickToolbar = /** @class */ (function () {
8206
8277
  function QuickToolbar(parent, locator) {
8207
8278
  this.debounceTimeout = 1000;
8208
8279
  this.parent = parent;
@@ -8819,7 +8890,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
8819
8890
  /**
8820
8891
  * `Count` module is used to handle Count actions.
8821
8892
  */
8822
- var Count = /** @__PURE__ @class */ (function () {
8893
+ var Count = /** @class */ (function () {
8823
8894
  function Count(parent, serviceLocator) {
8824
8895
  this.parent = parent;
8825
8896
  this.locator = serviceLocator;
@@ -8947,7 +9018,7 @@ var Count = /** @__PURE__ @class */ (function () {
8947
9018
  * @hidden
8948
9019
  * @deprecated
8949
9020
  */
8950
- var MarkdownSelection = /** @__PURE__ @class */ (function () {
9021
+ var MarkdownSelection = /** @class */ (function () {
8951
9022
  function MarkdownSelection() {
8952
9023
  }
8953
9024
  /**
@@ -9163,7 +9234,7 @@ var MarkdownSelection = /** @__PURE__ @class */ (function () {
9163
9234
  /**
9164
9235
  * MarkdownToolbarStatus module for refresh the toolbar status
9165
9236
  */
9166
- var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9237
+ var MarkdownToolbarStatus = /** @class */ (function () {
9167
9238
  function MarkdownToolbarStatus(parent) {
9168
9239
  this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
9169
9240
  this.selection = new MarkdownSelection();
@@ -9286,7 +9357,7 @@ var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9286
9357
  /**
9287
9358
  * `ExecCommandCallBack` module is used to run the editor manager command
9288
9359
  */
9289
- var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
9360
+ var ExecCommandCallBack = /** @class */ (function () {
9290
9361
  function ExecCommandCallBack(parent) {
9291
9362
  this.parent = parent;
9292
9363
  this.addEventListener();
@@ -9416,7 +9487,7 @@ var MOUSE_DOWN = 'mouseDown';
9416
9487
  * @hidden
9417
9488
  * @deprecated
9418
9489
  */
9419
- var Formatter = /** @__PURE__ @class */ (function () {
9490
+ var Formatter = /** @class */ (function () {
9420
9491
  function Formatter() {
9421
9492
  }
9422
9493
  /**
@@ -9585,7 +9656,8 @@ var Formatter = /** @__PURE__ @class */ (function () {
9585
9656
  event: e, callBack: function () {
9586
9657
  self.notify(contentChanged, {});
9587
9658
  _this.enableUndo(self);
9588
- }
9659
+ },
9660
+ enterAction: self.enterKey
9589
9661
  });
9590
9662
  };
9591
9663
  /**
@@ -9724,7 +9796,7 @@ var INSERT_TEXT_COMMAND = 'insert-text';
9724
9796
  *
9725
9797
  * @hidden
9726
9798
  */
9727
- var MDLists = /** @__PURE__ @class */ (function () {
9799
+ var MDLists = /** @class */ (function () {
9728
9800
  /**
9729
9801
  * Constructor for creating the Lists plugin
9730
9802
  *
@@ -10195,7 +10267,7 @@ var MDLists = /** @__PURE__ @class */ (function () {
10195
10267
  * @hidden
10196
10268
  * @deprecated
10197
10269
  */
10198
- var MDFormats = /** @__PURE__ @class */ (function () {
10270
+ var MDFormats = /** @class */ (function () {
10199
10271
  /**
10200
10272
  * Constructor for creating the Formats plugin
10201
10273
  *
@@ -10423,7 +10495,7 @@ var MDFormats = /** @__PURE__ @class */ (function () {
10423
10495
  * @hidden
10424
10496
  * @deprecated
10425
10497
  */
10426
- var MDSelectionFormats = /** @__PURE__ @class */ (function () {
10498
+ var MDSelectionFormats = /** @class */ (function () {
10427
10499
  function MDSelectionFormats(parent) {
10428
10500
  extend(this, this, parent, true);
10429
10501
  this.selection = this.parent.markdownSelection;
@@ -10893,7 +10965,7 @@ var imageResizeFactor = {
10893
10965
  /**
10894
10966
  * `Undo` module is used to handle undo actions.
10895
10967
  */
10896
- var UndoRedoCommands = /** @__PURE__ @class */ (function () {
10968
+ var UndoRedoCommands = /** @class */ (function () {
10897
10969
  function UndoRedoCommands(parent, options) {
10898
10970
  this.undoRedoStack = [];
10899
10971
  this.parent = parent;
@@ -11088,7 +11160,7 @@ var UndoRedoCommands = /** @__PURE__ @class */ (function () {
11088
11160
  * @hidden
11089
11161
  * @deprecated
11090
11162
  */
11091
- var MDLink = /** @__PURE__ @class */ (function () {
11163
+ var MDLink = /** @class */ (function () {
11092
11164
  /**
11093
11165
  * Constructor for creating the Formats plugin
11094
11166
  *
@@ -11139,7 +11211,7 @@ var MDLink = /** @__PURE__ @class */ (function () {
11139
11211
  * @hidden
11140
11212
  * @deprecated
11141
11213
  */
11142
- var MDTable = /** @__PURE__ @class */ (function () {
11214
+ var MDTable = /** @class */ (function () {
11143
11215
  /**
11144
11216
  * Constructor for creating the Formats plugin
11145
11217
  *
@@ -11368,7 +11440,7 @@ var MDTable = /** @__PURE__ @class */ (function () {
11368
11440
  * @hidden
11369
11441
  * @deprecated
11370
11442
  */
11371
- var ClearFormat = /** @__PURE__ @class */ (function () {
11443
+ var ClearFormat = /** @class */ (function () {
11372
11444
  /**
11373
11445
  * Constructor for creating the clear format plugin
11374
11446
  *
@@ -11486,7 +11558,7 @@ var ClearFormat = /** @__PURE__ @class */ (function () {
11486
11558
  * @hidden
11487
11559
  * @deprecated
11488
11560
  */
11489
- var MDInsertText = /** @__PURE__ @class */ (function () {
11561
+ var MDInsertText = /** @class */ (function () {
11490
11562
  /**
11491
11563
  * Constructor for creating the insert text plugin
11492
11564
  *
@@ -11536,7 +11608,7 @@ var MDInsertText = /** @__PURE__ @class */ (function () {
11536
11608
  * @hidden
11537
11609
  * @deprecated
11538
11610
  */
11539
- var MarkdownParser = /** @__PURE__ @class */ (function () {
11611
+ var MarkdownParser = /** @class */ (function () {
11540
11612
  /**
11541
11613
  * Constructor for creating the component
11542
11614
  *
@@ -11632,26 +11704,26 @@ var MarkdownParser = /** @__PURE__ @class */ (function () {
11632
11704
  return MarkdownParser;
11633
11705
  }());
11634
11706
 
11635
- var __extends$1 = (undefined && undefined.__extends) || (function () {
11636
- var extendStatics = function (d, b) {
11637
- extendStatics = Object.setPrototypeOf ||
11638
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11639
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11640
- return extendStatics(d, b);
11641
- };
11642
- return function (d, b) {
11643
- extendStatics(d, b);
11644
- function __() { this.constructor = d; }
11645
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11646
- };
11647
- })();
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
+ })();
11648
11720
  /**
11649
11721
  * Markdown adapter
11650
11722
  *
11651
11723
  * @hidden
11652
11724
  * @deprecated
11653
11725
  */
11654
- var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11726
+ var MarkdownFormatter = /** @class */ (function (_super) {
11655
11727
  __extends$1(MarkdownFormatter, _super);
11656
11728
  function MarkdownFormatter(options) {
11657
11729
  var _this = _super.call(this) || this;
@@ -11698,7 +11770,7 @@ var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11698
11770
  * @hidden
11699
11771
  * @deprecated
11700
11772
  */
11701
- var MarkdownRender = /** @__PURE__ @class */ (function () {
11773
+ var MarkdownRender = /** @class */ (function () {
11702
11774
  /**
11703
11775
  * Constructor for content renderer module
11704
11776
  *
@@ -11781,7 +11853,7 @@ var MarkdownRender = /** @__PURE__ @class */ (function () {
11781
11853
  /**
11782
11854
  * `MarkdownEditor` module is used to markdown editor
11783
11855
  */
11784
- var MarkdownEditor = /** @__PURE__ @class */ (function () {
11856
+ var MarkdownEditor = /** @class */ (function () {
11785
11857
  function MarkdownEditor(parent, serviceLocator) {
11786
11858
  this.parent = parent;
11787
11859
  this.locator = serviceLocator;
@@ -11972,7 +12044,7 @@ var markerClassName = {
11972
12044
  * @hidden
11973
12045
  * @deprecated
11974
12046
  */
11975
- var DOMNode = /** @__PURE__ @class */ (function () {
12047
+ var DOMNode = /** @class */ (function () {
11976
12048
  /**
11977
12049
  * Constructor for creating the DOMNode plugin
11978
12050
  *
@@ -12277,7 +12349,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12277
12349
  DOMNode.prototype.unWrap = function (element) {
12278
12350
  var parent = element.parentNode;
12279
12351
  var unWrapNode = [];
12280
- while (element.firstChild) {
12352
+ while (element.firstChild && (element.previousSibling !== this.parent.querySelector('.e-mention-chip') || element.textContent !== ' ')) {
12281
12353
  unWrapNode.push(element.firstChild);
12282
12354
  parent.insertBefore(element.firstChild, element);
12283
12355
  }
@@ -12627,6 +12699,109 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12627
12699
  }
12628
12700
  return null;
12629
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
+ };
12630
12805
  /**
12631
12806
  * blockNodes method
12632
12807
  *
@@ -12891,7 +13066,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12891
13066
  * @hidden
12892
13067
  * @deprecated
12893
13068
  */
12894
- var Lists = /** @__PURE__ @class */ (function () {
13069
+ var Lists = /** @class */ (function () {
12895
13070
  /**
12896
13071
  * Constructor for creating the Lists plugin
12897
13072
  *
@@ -13135,7 +13310,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13135
13310
  e.event.preventDefault();
13136
13311
  }
13137
13312
  };
13138
- Lists.prototype.onKeyUp = function () {
13313
+ Lists.prototype.onKeyUp = function (e) {
13139
13314
  if (!isNullOrUndefined(this.commonLIParent) && !isNullOrUndefined(this.commonLIParent.querySelector('.removeList'))) {
13140
13315
  var currentLIElem = this.commonLIParent.querySelector('.removeList');
13141
13316
  while (!isNullOrUndefined(currentLIElem.firstChild)) {
@@ -13143,6 +13318,14 @@ var Lists = /** @__PURE__ @class */ (function () {
13143
13318
  }
13144
13319
  detach(currentLIElem);
13145
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
+ }
13146
13329
  };
13147
13330
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13148
13331
  Lists.prototype.firstListBackSpace = function (range, _e) {
@@ -13384,6 +13567,8 @@ var Lists = /** @__PURE__ @class */ (function () {
13384
13567
  else {
13385
13568
  if (prevSibling.tagName === 'LI') {
13386
13569
  var nestedElement = createElement(elements[i].parentNode.tagName);
13570
+ nestedElement.style.listStyleType =
13571
+ elements[i].parentNode.style.listStyleType;
13387
13572
  append([nestedElement], prevSibling);
13388
13573
  append([elements[i]], nestedElement);
13389
13574
  }
@@ -13433,61 +13618,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13433
13618
  var listsNodes = this.domNode.blockNodes(true);
13434
13619
  if (e.enterAction === 'BR') {
13435
13620
  this.setSelectionBRConfig();
13436
- var allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
13437
- var selectedNodes = this.parent.nodeSelection.getSelectionNodes(allSelectedNode);
13438
- var currentFormatNodes = [];
13439
- if (selectedNodes.length === 0) {
13440
- selectedNodes.push(listsNodes[0]);
13441
- }
13442
- for (var i = 0; i < selectedNodes.length; i++) {
13443
- var currentNode = selectedNodes[i];
13444
- var previousCurrentNode = void 0;
13445
- while (!this.parent.domNode.isBlockNode(currentNode) && currentNode !== this.parent.editableElement) {
13446
- previousCurrentNode = currentNode;
13447
- currentNode = currentNode.parentElement;
13448
- }
13449
- if (this.parent.domNode.isBlockNode(currentNode) && currentNode === this.parent.editableElement) {
13450
- currentFormatNodes.push(previousCurrentNode);
13451
- }
13452
- }
13453
- for (var i = 0; i < currentFormatNodes.length; i++) {
13454
- if (!this.parent.domNode.isBlockNode(currentFormatNodes[i])) {
13455
- var currentNode = currentFormatNodes[i];
13456
- var previousNode = currentNode;
13457
- while (currentNode === this.parent.editableElement) {
13458
- previousNode = currentNode;
13459
- currentNode = currentNode.parentElement;
13460
- }
13461
- var tempElem = void 0;
13462
- if (this.parent.domNode.isBlockNode(previousNode.parentElement) &&
13463
- previousNode.parentElement === this.parent.editableElement) {
13464
- tempElem = createElement('p');
13465
- previousNode.parentElement.insertBefore(tempElem, previousNode);
13466
- tempElem.appendChild(previousNode);
13467
- }
13468
- else {
13469
- tempElem = previousNode;
13470
- }
13471
- var preNode = tempElem.previousSibling;
13472
- while (!isNullOrUndefined(preNode) && preNode.nodeName !== 'BR' &&
13473
- !this.parent.domNode.isBlockNode(preNode)) {
13474
- tempElem.firstChild.parentElement.insertBefore(preNode, tempElem.firstChild);
13475
- preNode = tempElem.previousSibling;
13476
- }
13477
- if (!isNullOrUndefined(preNode) && preNode.nodeName === 'BR') {
13478
- detach(preNode);
13479
- }
13480
- var postNode = tempElem.nextSibling;
13481
- while (!isNullOrUndefined(postNode) && postNode.nodeName !== 'BR' &&
13482
- !this.parent.domNode.isBlockNode(postNode)) {
13483
- tempElem.appendChild(postNode);
13484
- postNode = tempElem.nextSibling;
13485
- }
13486
- if (!isNullOrUndefined(postNode) && postNode.nodeName === 'BR') {
13487
- detach(postNode);
13488
- }
13489
- }
13490
- }
13621
+ this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(), true);
13491
13622
  this.setSelectionBRConfig();
13492
13623
  listsNodes = this.parent.domNode.blockNodes();
13493
13624
  }
@@ -13544,7 +13675,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13544
13675
  }
13545
13676
  var elemAtt = void 0;
13546
13677
  elements[i].style.removeProperty('margin-left');
13547
- 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]);
13548
13679
  if (elements[i].getAttribute('contenteditable') === 'true'
13549
13680
  && elements[i].childNodes.length === 1 && elements[i].childNodes[0].nodeName === 'TABLE') {
13550
13681
  var listEle = document.createElement(type);
@@ -13586,6 +13717,16 @@ var Lists = /** @__PURE__ @class */ (function () {
13586
13717
  }
13587
13718
  }
13588
13719
  this.cleanNode();
13720
+ if (e.enterAction === 'BR') {
13721
+ var spansToRemove = document.querySelectorAll('span#removeSpan');
13722
+ spansToRemove.forEach(function (span) {
13723
+ var fragment = document.createDocumentFragment();
13724
+ while (span.firstChild) {
13725
+ fragment.appendChild(span.firstChild);
13726
+ }
13727
+ span.parentNode.replaceChild(fragment, span);
13728
+ });
13729
+ }
13589
13730
  this.parent.editableElement.focus();
13590
13731
  if (isIDevice$1()) {
13591
13732
  setEditFrameFocus(this.parent.editableElement, selector);
@@ -13655,6 +13796,13 @@ var Lists = /** @__PURE__ @class */ (function () {
13655
13796
  for (var c = 0; c < liParents.length; c++) {
13656
13797
  var node = liParents[c];
13657
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
+ }
13658
13806
  if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
13659
13807
  toFindtopOlUl = false;
13660
13808
  var preElement = liParents[c].parentElement.parentElement;
@@ -13674,9 +13822,43 @@ var Lists = /** @__PURE__ @class */ (function () {
13674
13822
  node.previousElementSibling.lastChild.append(node);
13675
13823
  }
13676
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
+ }
13677
13832
  }
13678
13833
  if (firstNodeOL) {
13679
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
+ }
13680
13862
  }
13681
13863
  };
13682
13864
  Lists.prototype.findUnSelected = function (temp, elements) {
@@ -13779,10 +13961,16 @@ var Lists = /** @__PURE__ @class */ (function () {
13779
13961
  parentNode.removeAttribute("style");
13780
13962
  }
13781
13963
  }
13782
- var wrapper = '<' + DEFAULT_TAG + wrapperclass + this.domNode.attributes(element) + '></' + DEFAULT_TAG + '>';
13964
+ var wrapper = '<' + e.enterAction + wrapperclass + this.domNode.attributes(element) + '></' + e.enterAction + '>';
13783
13965
  if (e.enterAction !== 'BR') {
13784
13966
  this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
13785
13967
  }
13968
+ else {
13969
+ var wrapperSpan = '<span class=e-rte-wrap-inner id=removeSpan></span>';
13970
+ var br = document.createElement('br');
13971
+ this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapperSpan));
13972
+ element.appendChild(br);
13973
+ }
13786
13974
  }
13787
13975
  else if (this.domNode.contents(element)[0].nodeType === 3) {
13788
13976
  var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
@@ -13795,8 +13983,18 @@ var Lists = /** @__PURE__ @class */ (function () {
13795
13983
  }
13796
13984
  else {
13797
13985
  var childNode = element.firstChild;
13986
+ if (childNode) {
13987
+ var attributes_1 = element.parentElement.attributes;
13988
+ if (attributes_1.length > 0) {
13989
+ for (var d = 0; d < attributes_1.length; d++) {
13990
+ var e_1 = attributes_1[d];
13991
+ var existingValue = childNode.getAttribute(e_1.nodeName);
13992
+ var parentValue = (element.parentElement).getAttribute(e_1.nodeName);
13993
+ childNode.setAttribute(e_1.nodeName, existingValue ? parentValue + ' ' + existingValue : parentValue);
13994
+ }
13995
+ }
13996
+ }
13798
13997
  className = childNode.getAttribute('class');
13799
- attributes(childNode, this.domNode.rawAttributes(parentNode));
13800
13998
  if (className && childNode.getAttribute('class')) {
13801
13999
  attributes(childNode, { 'class': className + ' ' + childNode.getAttribute('class') });
13802
14000
  }
@@ -13845,7 +14043,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13845
14043
  *
13846
14044
  * @hidden
13847
14045
  */
13848
- var InsertMethods = /** @__PURE__ @class */ (function () {
14046
+ var InsertMethods = /** @class */ (function () {
13849
14047
  function InsertMethods() {
13850
14048
  }
13851
14049
  /**
@@ -13922,7 +14120,7 @@ var InsertMethods = /** @__PURE__ @class */ (function () {
13922
14120
  * @hidden
13923
14121
  * @deprecated
13924
14122
  */
13925
- var NodeCutter = /** @__PURE__ @class */ (function () {
14123
+ var NodeCutter = /** @class */ (function () {
13926
14124
  function NodeCutter() {
13927
14125
  this.enterAction = 'P';
13928
14126
  this.position = -1;
@@ -13965,7 +14163,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
13965
14163
  fragment = this.spliceEmptyNode(fragment, false);
13966
14164
  if (fragment && fragment.childNodes.length > 0) {
13967
14165
  var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0)
13968
- && this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
14166
+ && this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
13969
14167
  if (!isEmpty) {
13970
14168
  if (node) {
13971
14169
  InsertMethods.AppendBefore(fragment, node);
@@ -13986,7 +14184,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
13986
14184
  fragment = this.spliceEmptyNode(fragment, true);
13987
14185
  if (fragment && fragment.childNodes.length > 0) {
13988
14186
  var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
13989
- && this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
14187
+ && this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
13990
14188
  if (!isEmpty) {
13991
14189
  if (node) {
13992
14190
  InsertMethods.AppendBefore(fragment, node, true);
@@ -14134,7 +14332,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
14134
14332
  * @hidden
14135
14333
  * @deprecated
14136
14334
  */
14137
- var Formats = /** @__PURE__ @class */ (function () {
14335
+ var Formats = /** @class */ (function () {
14138
14336
  /**
14139
14337
  * Constructor for creating the Formats plugin
14140
14338
  *
@@ -14176,6 +14374,12 @@ var Formats = /** @__PURE__ @class */ (function () {
14176
14374
  }
14177
14375
  }
14178
14376
  }
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) {
14378
+ var pTag = createElement(e.enterAction);
14379
+ range.startContainer.parentElement.insertBefore(pTag, range.startContainer);
14380
+ pTag.appendChild(range.startContainer);
14381
+ this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument, pTag, 1);
14382
+ }
14179
14383
  };
14180
14384
  Formats.prototype.getBlockParent = function (node, endNode) {
14181
14385
  var currentParent;
@@ -14538,7 +14742,7 @@ var Formats = /** @__PURE__ @class */ (function () {
14538
14742
  * @hidden
14539
14743
  * @deprecated
14540
14744
  */
14541
- var InsertHtml = /** @__PURE__ @class */ (function () {
14745
+ var InsertHtml = /** @class */ (function () {
14542
14746
  function InsertHtml() {
14543
14747
  }
14544
14748
  InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
@@ -14586,11 +14790,14 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14586
14790
  range.startContainer === range.endContainer;
14587
14791
  var isCollapsed = range.collapsed;
14588
14792
  var nodes = this.getNodeCollection(range, nodeSelection, node);
14589
- var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
14793
+ var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? (!isNullOrUndefined(nodes[0]) ? this.closestEle(nodes[0].parentNode, editNode) : range.startContainer) : nodes[0];
14590
14794
  if (closestParentNode && closestParentNode.nodeName === 'LI' && node.nodeName.toLowerCase() === 'table') {
14591
14795
  this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
14592
14796
  return;
14593
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
+ }
14594
14801
  if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
14595
14802
  node.classList.contains('pasteContent'))) {
14596
14803
  this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
@@ -14631,7 +14838,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14631
14838
  nodes[index].parentNode.removeChild(nodes[index]);
14632
14839
  }
14633
14840
  }
14634
- if (sibNode) {
14841
+ if (!isNullOrUndefined(sibNode) && !isNullOrUndefined(sibNode.parentNode)) {
14635
14842
  InsertMethods.AppendBefore(node, sibNode, true);
14636
14843
  }
14637
14844
  else {
@@ -14788,7 +14995,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14788
14995
  range.deleteContents();
14789
14996
  range.setStart(startContainerParent, startIndex);
14790
14997
  range.setEnd(startContainerParent, startIndex);
14791
- if (!isNullOrUndefined(lasNode)) {
14998
+ if (!isNullOrUndefined(lasNode) && lasNode !== editNode) {
14792
14999
  detach(lasNode);
14793
15000
  }
14794
15001
  // eslint-disable-next-line
@@ -14882,6 +15089,12 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14882
15089
  node.parentNode.replaceChild(fragment, node);
14883
15090
  }
14884
15091
  }
15092
+ if (lastSelectionNode.nodeName === 'TABLE') {
15093
+ var pTag = createElement('p');
15094
+ pTag.appendChild(createElement('br'));
15095
+ lastSelectionNode.parentElement.insertBefore(pTag, lastSelectionNode.nextSibling);
15096
+ lastSelectionNode = pTag;
15097
+ }
14885
15098
  if (lastSelectionNode.nodeName === '#text') {
14886
15099
  this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
14887
15100
  }
@@ -15147,7 +15360,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
15147
15360
  * @hidden
15148
15361
  * @deprecated
15149
15362
  */
15150
- var LinkCommand = /** @__PURE__ @class */ (function () {
15363
+ var LinkCommand = /** @class */ (function () {
15151
15364
  /**
15152
15365
  * Constructor for creating the Formats plugin
15153
15366
  *
@@ -15455,7 +15668,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
15455
15668
  * @hidden
15456
15669
  * @deprecated
15457
15670
  */
15458
- var Alignments = /** @__PURE__ @class */ (function () {
15671
+ var Alignments = /** @class */ (function () {
15459
15672
  /**
15460
15673
  * Constructor for creating the Formats plugin
15461
15674
  *
@@ -15511,6 +15724,9 @@ var Alignments = /** @__PURE__ @class */ (function () {
15511
15724
  if (!isTableAlign) {
15512
15725
  this.parent.domNode.setMarker(save);
15513
15726
  var alignmentNodes = this.parent.domNode.blockNodes();
15727
+ if (e.enterAction === 'BR') {
15728
+ alignmentNodes = this.parent.domNode.convertToBlockNodes(alignmentNodes, false);
15729
+ }
15514
15730
  for (var i = 0; i < alignmentNodes.length; i++) {
15515
15731
  var parentNode = alignmentNodes[i];
15516
15732
  setStyleAttribute(parentNode, { 'text-align': this.alignments[e.subCommand] });
@@ -15558,7 +15774,7 @@ var Alignments = /** @__PURE__ @class */ (function () {
15558
15774
  * @hidden
15559
15775
  * @deprecated
15560
15776
  */
15561
- var Indents = /** @__PURE__ @class */ (function () {
15777
+ var Indents = /** @class */ (function () {
15562
15778
  /**
15563
15779
  * Constructor for creating the Formats plugin
15564
15780
  *
@@ -15594,6 +15810,9 @@ var Indents = /** @__PURE__ @class */ (function () {
15594
15810
  var save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
15595
15811
  this.parent.domNode.setMarker(save);
15596
15812
  var indentsNodes = this.parent.domNode.blockNodes();
15813
+ if (e.enterAction === 'BR') {
15814
+ indentsNodes = this.parent.domNode.convertToBlockNodes(indentsNodes, false);
15815
+ }
15597
15816
  var parentNodes = indentsNodes.slice();
15598
15817
  var listsNodes = [];
15599
15818
  for (var i = 0; i < parentNodes.length; i++) {
@@ -15694,7 +15913,7 @@ var CLASS_VIDEO_INLINE = 'e-video-inline';
15694
15913
  * @hidden
15695
15914
  * @deprecated
15696
15915
  */
15697
- var ImageCommand = /** @__PURE__ @class */ (function () {
15916
+ var ImageCommand = /** @class */ (function () {
15698
15917
  /**
15699
15918
  * Constructor for creating the Formats plugin
15700
15919
  *
@@ -16081,7 +16300,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
16081
16300
  * @hidden
16082
16301
  * @deprecated
16083
16302
  */
16084
- var AudioCommand = /** @__PURE__ @class */ (function () {
16303
+ var AudioCommand = /** @class */ (function () {
16085
16304
  /**
16086
16305
  * Constructor for creating the Audio plugin
16087
16306
  *
@@ -16145,7 +16364,7 @@ var AudioCommand = /** @__PURE__ @class */ (function () {
16145
16364
  isReplaced = true;
16146
16365
  }
16147
16366
  else {
16148
- wrapElement = createElement('span', { className: CLASS_AUDIO_WRAP, attrs: { contentEditable: 'false', title: e.item.fileName } });
16367
+ wrapElement = createElement('span', { className: CLASS_AUDIO_WRAP, attrs: { contentEditable: 'false', title: ((!isNullOrUndefined(e.item.title)) ? e.item.title : (!isNullOrUndefined(e.item.fileName) ? e.item.fileName : '')) } });
16149
16368
  var audElement = createElement('audio', { className: CLASS_AUDIO + ' ' + CLASS_AUDIO_INLINE, attrs: { controls: '' } });
16150
16369
  var sourceElement = createElement('source');
16151
16370
  var clickElement = createElement('span', { className: CLASS_CLICK_ELEM });
@@ -16220,7 +16439,7 @@ var AudioCommand = /** @__PURE__ @class */ (function () {
16220
16439
  * @hidden
16221
16440
  * @deprecated
16222
16441
  */
16223
- var VideoCommand = /** @__PURE__ @class */ (function () {
16442
+ var VideoCommand = /** @class */ (function () {
16224
16443
  /**
16225
16444
  * Constructor for creating the Video plugin
16226
16445
  *
@@ -16341,7 +16560,7 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
16341
16560
  }
16342
16561
  else {
16343
16562
  if (!e.item.isEmbedUrl) {
16344
- wrapElement = createElement('span', { className: CLASS_VIDEO_WRAP, attrs: { contentEditable: 'false', title: e.item.fileName } });
16563
+ wrapElement = createElement('span', { className: CLASS_VIDEO_WRAP, attrs: { contentEditable: 'false', title: ((!isNullOrUndefined(e.item.title)) ? e.item.title : (!isNullOrUndefined(e.item.fileName) ? e.item.fileName : '')) } });
16345
16564
  vidElement = createElement('video', { className: CLASS_VIDEO + ' ' + CLASS_VIDEO_INLINE, attrs: { controls: '' } });
16346
16565
  sourceElement = createElement('source');
16347
16566
  this.setStyle(sourceElement, e, vidElement);
@@ -16468,7 +16687,7 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
16468
16687
  * @hidden
16469
16688
  * @deprecated
16470
16689
  */
16471
- var TableCommand = /** @__PURE__ @class */ (function () {
16690
+ var TableCommand = /** @class */ (function () {
16472
16691
  /**
16473
16692
  * Constructor for creating the Formats plugin
16474
16693
  *
@@ -17449,7 +17668,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
17449
17668
 
17450
17669
  return TableCommand;
17451
17670
  }());
17452
- var MinMax = /** @__PURE__ @class */ (function () {
17671
+ var MinMax = /** @class */ (function () {
17453
17672
  function MinMax() {
17454
17673
  }
17455
17674
  return MinMax;
@@ -17458,7 +17677,7 @@ var MinMax = /** @__PURE__ @class */ (function () {
17458
17677
  /**
17459
17678
  * `Selection` module is used to handle RTE Selections.
17460
17679
  */
17461
- var SelectionCommands = /** @__PURE__ @class */ (function () {
17680
+ var SelectionCommands = /** @class */ (function () {
17462
17681
  function SelectionCommands() {
17463
17682
  }
17464
17683
  /**
@@ -18434,7 +18653,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
18434
18653
  * @hidden
18435
18654
  * @deprecated
18436
18655
  */
18437
- var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18656
+ var SelectionBasedExec = /** @class */ (function () {
18438
18657
  /**
18439
18658
  * Constructor for creating the Formats plugin
18440
18659
  *
@@ -18483,7 +18702,7 @@ var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18483
18702
  * @hidden
18484
18703
  * @deprecated
18485
18704
  */
18486
- var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18705
+ var InsertHtmlExec = /** @class */ (function () {
18487
18706
  /**
18488
18707
  * Constructor for creating the Formats plugin
18489
18708
  *
@@ -18530,7 +18749,7 @@ var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18530
18749
  /**
18531
18750
  * `Clear Format` module is used to handle Clear Format.
18532
18751
  */
18533
- var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18752
+ var ClearFormat$1 = /** @class */ (function () {
18534
18753
  function ClearFormat() {
18535
18754
  }
18536
18755
  /**
@@ -18783,7 +19002,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18783
19002
  * @hidden
18784
19003
  * @deprecated
18785
19004
  */
18786
- var ClearFormatExec = /** @__PURE__ @class */ (function () {
19005
+ var ClearFormatExec = /** @class */ (function () {
18787
19006
  /**
18788
19007
  * Constructor for creating the Formats plugin
18789
19008
  *
@@ -18828,7 +19047,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
18828
19047
  /**
18829
19048
  * `Undo` module is used to handle undo actions.
18830
19049
  */
18831
- var UndoRedoManager = /** @__PURE__ @class */ (function () {
19050
+ var UndoRedoManager = /** @class */ (function () {
18832
19051
  function UndoRedoManager(parent, options) {
18833
19052
  this.undoRedoStack = [];
18834
19053
  this.parent = parent;
@@ -19006,6 +19225,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19006
19225
  this.parent.editableElement.innerHTML = '';
19007
19226
  this.parent.editableElement.appendChild(removedContent.cloneNode(true));
19008
19227
  this.parent.editableElement.focus();
19228
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
19009
19229
  if (isIDevice$1()) {
19010
19230
  setEditFrameFocus(this.parent.editableElement, e.selector);
19011
19231
  }
@@ -19038,6 +19258,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19038
19258
  this.parent.editableElement.innerHTML = '';
19039
19259
  this.parent.editableElement.appendChild(addedContent.cloneNode(true));
19040
19260
  this.parent.editableElement.focus();
19261
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
19041
19262
  if (isIDevice$1()) {
19042
19263
  setEditFrameFocus(this.parent.editableElement, e.selector);
19043
19264
  }
@@ -19080,7 +19301,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19080
19301
  * @hidden
19081
19302
  * @deprecated
19082
19303
  */
19083
- var MsWordPaste = /** @__PURE__ @class */ (function () {
19304
+ var MsWordPaste = /** @class */ (function () {
19084
19305
  function MsWordPaste(parent) {
19085
19306
  this.olData = [
19086
19307
  'decimal',
@@ -19139,9 +19360,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19139
19360
  var patern2 = /class="?Mso|style="[^ ]*\bmso-/i;
19140
19361
  var patern3 = /(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi;
19141
19362
  var pattern4 = /style='mso-width-source:/i;
19363
+ var source = this.findSource(elm);
19142
19364
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
19143
19365
  pattern4.test(tempHTMLContent)) {
19144
- var source = this.findSource(elm);
19145
19366
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
19146
19367
  this.addListClass(elm);
19147
19368
  listNodes = this.cleanUp(elm, listNodes);
@@ -19166,7 +19387,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19166
19387
  e.callBack(elm.innerHTML, this.cropImageDimensions, source);
19167
19388
  }
19168
19389
  else {
19169
- e.callBack(elm.innerHTML);
19390
+ e.callBack(elm.innerHTML, null, source);
19170
19391
  }
19171
19392
  };
19172
19393
  MsWordPaste.prototype.addDoubleBr = function (elm) {
@@ -19894,7 +20115,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
19894
20115
  !isNormalList) {
19895
20116
  prevList = null;
19896
20117
  }
19897
- var pElement = createElement('p', { className: 'MsoNormal' });
20118
+ var pElement = createElement('p', { className: 'MsoNoSpacing' });
19898
20119
  pElement.innerHTML = collection[index].content.join(' ');
19899
20120
  if ((collection[index].nestedLevel === 1) &&
19900
20121
  (listCount === 0 || lfo !== collection[index].listFormatOverride) &&
@@ -20148,7 +20369,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
20148
20369
  * @hidden
20149
20370
  * @deprecated
20150
20371
  */
20151
- var InsertTextExec = /** @__PURE__ @class */ (function () {
20372
+ var InsertTextExec = /** @class */ (function () {
20152
20373
  /**
20153
20374
  * Constructor for creating the InsertText plugin
20154
20375
  *
@@ -20179,7 +20400,7 @@ var InsertTextExec = /** @__PURE__ @class */ (function () {
20179
20400
  return InsertTextExec;
20180
20401
  }());
20181
20402
 
20182
- var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20403
+ var EmojiPickerAction = /** @class */ (function () {
20183
20404
  function EmojiPickerAction(parent) {
20184
20405
  this.parent = parent;
20185
20406
  this.addEventListener();
@@ -20243,7 +20464,7 @@ var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20243
20464
  * Base export
20244
20465
  */
20245
20466
 
20246
- var FormatPainterActions = /** @__PURE__ @class */ (function () {
20467
+ var FormatPainterActions = /** @class */ (function () {
20247
20468
  function FormatPainterActions(parent, options) {
20248
20469
  this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
20249
20470
  this.parent = parent;
@@ -20886,7 +21107,7 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
20886
21107
  * @hidden
20887
21108
  * @deprecated
20888
21109
  */
20889
- var EditorManager = /** @__PURE__ @class */ (function () {
21110
+ var EditorManager = /** @class */ (function () {
20890
21111
  /**
20891
21112
  * Constructor for creating the component
20892
21113
  *
@@ -20974,12 +21195,14 @@ var EditorManager = /** @__PURE__ @class */ (function () {
20974
21195
  case 'alignments':
20975
21196
  this.observer.notify(ALIGNMENT_TYPE, {
20976
21197
  subCommand: value, event: event, callBack: callBack,
20977
- selector: selector,
20978
- value: exeValue
21198
+ selector: selector, value: exeValue, enterAction: enterAction
20979
21199
  });
20980
21200
  break;
20981
21201
  case 'indents':
20982
- 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
+ });
20983
21206
  break;
20984
21207
  case 'links':
20985
21208
  this.observer.notify(LINK, { command: command, value: value, item: exeValue, event: event, callBack: callBack });
@@ -21132,26 +21355,26 @@ var EditorManager = /** @__PURE__ @class */ (function () {
21132
21355
  return EditorManager;
21133
21356
  }());
21134
21357
 
21135
- var __extends$2 = (undefined && undefined.__extends) || (function () {
21136
- var extendStatics = function (d, b) {
21137
- extendStatics = Object.setPrototypeOf ||
21138
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21139
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21140
- return extendStatics(d, b);
21141
- };
21142
- return function (d, b) {
21143
- extendStatics(d, b);
21144
- function __() { this.constructor = d; }
21145
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21146
- };
21147
- })();
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
+ })();
21148
21371
  /**
21149
21372
  * HTML adapter
21150
21373
  *
21151
21374
  * @hidden
21152
21375
  * @deprecated
21153
21376
  */
21154
- var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21377
+ var HTMLFormatter = /** @class */ (function (_super) {
21155
21378
  __extends$2(HTMLFormatter, _super);
21156
21379
  function HTMLFormatter(options) {
21157
21380
  var _this = _super.call(this) || this;
@@ -21192,7 +21415,7 @@ var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21192
21415
  /**
21193
21416
  * HtmlToolbarStatus module for refresh the toolbar status
21194
21417
  */
21195
- var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21418
+ var HtmlToolbarStatus = /** @class */ (function () {
21196
21419
  function HtmlToolbarStatus(parent) {
21197
21420
  this.parent = parent;
21198
21421
  this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
@@ -21239,7 +21462,7 @@ var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21239
21462
  * @hidden
21240
21463
  * @deprecated
21241
21464
  */
21242
- var ContentRender = /** @__PURE__ @class */ (function () {
21465
+ var ContentRender = /** @class */ (function () {
21243
21466
  /**
21244
21467
  * Constructor for content renderer module
21245
21468
  *
@@ -21327,27 +21550,27 @@ var ContentRender = /** @__PURE__ @class */ (function () {
21327
21550
  return ContentRender;
21328
21551
  }());
21329
21552
 
21330
- var __extends$3 = (undefined && undefined.__extends) || (function () {
21331
- var extendStatics = function (d, b) {
21332
- extendStatics = Object.setPrototypeOf ||
21333
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21334
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21335
- return extendStatics(d, b);
21336
- };
21337
- return function (d, b) {
21338
- extendStatics(d, b);
21339
- function __() { this.constructor = d; }
21340
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21341
- };
21342
- })();
21343
- 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 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>";
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
+ })();
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>";
21344
21567
  /**
21345
21568
  * Content module is used to render Rich Text Editor content
21346
21569
  *
21347
21570
  * @hidden
21348
21571
  * @deprecated
21349
21572
  */
21350
- var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21573
+ var IframeContentRender = /** @class */ (function (_super) {
21351
21574
  __extends$3(IframeContentRender, _super);
21352
21575
  function IframeContentRender() {
21353
21576
  return _super !== null && _super.apply(this, arguments) || this;
@@ -21420,7 +21643,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21420
21643
  /**
21421
21644
  * XhtmlValidation module called when set enableXhtml as true
21422
21645
  */
21423
- var XhtmlValidation = /** @__PURE__ @class */ (function () {
21646
+ var XhtmlValidation = /** @class */ (function () {
21424
21647
  function XhtmlValidation(parent) {
21425
21648
  this.parent = parent;
21426
21649
  this.addEventListener();
@@ -21591,7 +21814,7 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
21591
21814
  /**
21592
21815
  * `HtmlEditor` module is used to HTML editor
21593
21816
  */
21594
- var HtmlEditor = /** @__PURE__ @class */ (function () {
21817
+ var HtmlEditor = /** @class */ (function () {
21595
21818
  function HtmlEditor(parent, serviceLocator) {
21596
21819
  this.rangeCollection = [];
21597
21820
  this.isImageDelete = false;
@@ -21789,8 +22012,14 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21789
22012
  range.insertNode(tempSpan);
21790
22013
  }
21791
22014
  var currentChild = this.parent.inputElement.firstChild;
21792
- while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
21793
- currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
22015
+ while (!isNullOrUndefined(currentChild)) {
22016
+ if (currentChild.nodeName === '#text') {
22017
+ currentChild = currentChild.nextElementSibling;
22018
+ continue;
22019
+ }
22020
+ if (currentChild.textContent.replace(regEx, '').trim().length > 0) {
22021
+ currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
22022
+ }
21794
22023
  currentChild = currentChild.nextElementSibling;
21795
22024
  }
21796
22025
  var tempSpanToRemove = this.parent.inputElement.querySelector('.tempSpan');
@@ -21854,25 +22083,54 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21854
22083
  this.deleteCleanup(e, currentRange);
21855
22084
  }
21856
22085
  if (args.keyCode === 9 && this.parent.enableTabKey) {
22086
+ this.parent.formatter.saveData(e);
21857
22087
  if (!isNullOrUndefined(args.target) && isNullOrUndefined(closest(args.target, '.e-rte-toolbar'))) {
21858
22088
  var range = this.nodeSelectionObj.getRange(this.contentRenderer.getDocument());
21859
22089
  var parentNode = this.nodeSelectionObj.getParentNodeCollection(range);
21860
22090
  if (!((parentNode[0].nodeName === 'LI' || closest(parentNode[0], 'li') ||
21861
- closest(parentNode[0], 'table')) && range.startOffset === 0)) {
22091
+ closest(parentNode[0], 'table')))) {
21862
22092
  args.preventDefault();
21863
- if (!args.shiftKey) {
21864
- InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
21865
- 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
+ }
21866
22109
  }
21867
- else if (this.rangeCollection.length > 0 &&
21868
- this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
21869
- var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
21870
- this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
21871
- InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
21872
- 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
+ }
21873
22130
  }
21874
22131
  }
21875
22132
  }
22133
+ this.parent.formatter.saveData(e);
21876
22134
  }
21877
22135
  if (e.args.action === 'space' ||
21878
22136
  e.args.action === 'enter' ||
@@ -21889,15 +22147,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21889
22147
  }
21890
22148
  else {
21891
22149
  this.parent.notify(enterHandler, { args: e.args });
21892
- var newRange = this.parent.getRange();
21893
- if (!isNullOrUndefined(newRange.startContainer) && this.parent.height !== 'auto' && newRange.startContainer.nodeName !== '#text'
21894
- && !this.parent.iframeSettings.enable && newRange.startContainer.getBoundingClientRect().bottom > this.parent.element.getBoundingClientRect().bottom) {
21895
- this.parent.element.querySelector('.e-rte-content').scrollTop += newRange.startContainer.getBoundingClientRect().bottom - this.parent.element.getBoundingClientRect().bottom;
21896
- }
21897
- else if (!isNullOrUndefined(newRange.startContainer) && this.parent.height === 'auto' && newRange.startContainer.nodeName !== '#text'
21898
- && !this.parent.iframeSettings.enable && window.innerHeight < newRange.startContainer.getBoundingClientRect().top) {
21899
- newRange.startContainer.scrollIntoView({ block: 'end', inline: 'nearest' });
21900
- }
22150
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
21901
22151
  }
21902
22152
  }
21903
22153
  }
@@ -21906,7 +22156,11 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21906
22156
  var editorValue = currentRange_1.startContainer.textContent.slice(0, currentRange_1.startOffset);
21907
22157
  var orderedList_1 = this.isOrderedList(editorValue);
21908
22158
  var unOrderedList = this.isUnOrderedList(editorValue);
21909
- if (orderedList_1 && !unOrderedList || unOrderedList && !orderedList_1) {
22159
+ var hasSplitedText = false;
22160
+ if (orderedList_1 || unOrderedList) {
22161
+ hasSplitedText = this.hasMultipleTextNode(currentRange_1);
22162
+ }
22163
+ if (!hasSplitedText && (orderedList_1 && !unOrderedList || unOrderedList && !orderedList_1)) {
21910
22164
  var eventArgs_1 = {
21911
22165
  callBack: null,
21912
22166
  event: e.args,
@@ -21971,6 +22225,31 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21971
22225
  }
21972
22226
  return false;
21973
22227
  };
22228
+ HtmlEditor.prototype.hasMultipleTextNode = function (range) {
22229
+ if (range && range.startContainer && range.startContainer.parentNode) {
22230
+ var parentNode = range.startContainer.parentNode;
22231
+ if (range.startContainer.previousElementSibling &&
22232
+ range.startContainer.previousElementSibling.classList.contains('e-mention-chip')
22233
+ && !range.startContainer.previousElementSibling.isContentEditable) {
22234
+ return true;
22235
+ }
22236
+ if (this.parent.enterKey === 'BR' || closest(parentNode, 'table')) {
22237
+ return false;
22238
+ }
22239
+ var childNodes = parentNode.childNodes;
22240
+ var textNodes = [];
22241
+ for (var i = 0; i < childNodes.length; i++) {
22242
+ var node = childNodes[i];
22243
+ if (node && node.nodeType === Node.TEXT_NODE) {
22244
+ textNodes.push(node);
22245
+ if (textNodes.length > 1) {
22246
+ return true;
22247
+ }
22248
+ }
22249
+ }
22250
+ }
22251
+ return false;
22252
+ };
21974
22253
  HtmlEditor.prototype.backSpaceCleanup = function (e, currentRange) {
21975
22254
  var isLiElement = false;
21976
22255
  var isPreviousNotContentEditable = true;
@@ -22543,13 +22822,37 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
22543
22822
  HtmlEditor.prototype.getSelectedHtml = function (e) {
22544
22823
  e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString());
22545
22824
  };
22825
+ HtmlEditor.prototype.marginTabAdd = function (val, alignmentNodes) {
22826
+ for (var index = 0; index < alignmentNodes.length; index++) {
22827
+ var element = alignmentNodes[index];
22828
+ if (element.closest('li')) {
22829
+ continue;
22830
+ }
22831
+ if (element.style.marginLeft) {
22832
+ var count$$1 = parseInt(element.style.marginLeft, 10);
22833
+ if (val) {
22834
+ count$$1 -= 20;
22835
+ }
22836
+ else {
22837
+ count$$1 += 20;
22838
+ }
22839
+ element.style.marginLeft = count$$1.toString() + 'px';
22840
+ if (element.style.marginLeft === '0px') {
22841
+ element.removeAttribute('style');
22842
+ }
22843
+ }
22844
+ else if (!val) {
22845
+ element.style.marginLeft = '20px';
22846
+ }
22847
+ }
22848
+ };
22546
22849
  return HtmlEditor;
22547
22850
  }());
22548
22851
 
22549
22852
  /**
22550
22853
  * PasteCleanup module called when pasting content in RichTextEditor
22551
22854
  */
22552
- var PasteCleanup = /** @__PURE__ @class */ (function () {
22855
+ var PasteCleanup = /** @class */ (function () {
22553
22856
  function PasteCleanup(parent, serviceLocator) {
22554
22857
  this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
22555
22858
  'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
@@ -22934,12 +23237,15 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22934
23237
  popupObj.close();
22935
23238
  }
22936
23239
  this.parent.trigger(imageUploadFailed, e);
22937
- uploadObj.destroy();
23240
+ if (uploadObj && document.body.contains(uploadObj.element)) {
23241
+ uploadObj.destroy();
23242
+ }
22938
23243
  };
22939
23244
  PasteCleanup.prototype.popupClose = function (popupObj, uploadObj, imgElem, e) {
22940
23245
  var _this = this;
22941
23246
  this.parent.inputElement.contentEditable = 'true';
22942
23247
  e.element = imgElem;
23248
+ e.detectImageSource = ImageInputSource.Pasted;
22943
23249
  this.parent.trigger(imageUploadSuccess, e, function (e) {
22944
23250
  if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
22945
23251
  var url = _this.parent.insertImageSettings.path + e.file.name;
@@ -22949,7 +23255,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
22949
23255
  });
22950
23256
  popupObj.close();
22951
23257
  imgElem.style.opacity = '1';
22952
- if (!uploadObj.isDestroyed) {
23258
+ if (uploadObj && document.body.contains(uploadObj.element)) {
22953
23259
  uploadObj.destroy();
22954
23260
  }
22955
23261
  this.toolbarEnableDisable(false);
@@ -23200,7 +23506,8 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23200
23506
  clipBoardElem = this.allowedStyle(clipBoardElem);
23201
23507
  }
23202
23508
  this.saveSelection.restore();
23203
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
23509
+ var newText = clipBoardElem.innerHTML.split("&").join("&amp;");
23510
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
23204
23511
  var allImg = clipBoardElem.querySelectorAll('img');
23205
23512
  for (var i = 0; i < allImg.length; i++) {
23206
23513
  if (!isNullOrUndefined(allImg[i].getAttribute('src'))) {
@@ -23248,32 +23555,43 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23248
23555
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
23249
23556
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
23250
23557
  _this.parent.formatter.onSuccess(_this.parent, args);
23251
- if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem) &&
23252
- returnArgs.imgElem.length > 0) {
23253
- var pasteContent = returnArgs.elements;
23254
- var imageContent = returnArgs.imgElem;
23255
- var lastElementChild = _this.findLastElement(pasteContent[pasteContent.length - 1]);
23256
- var isImageAtLast = !isNullOrUndefined(lastElementChild) ? lastElementChild.nodeName === 'IMG' : false;
23257
- if (isImageAtLast || pasteContent[pasteContent.length - 1] === imageContent[imageContent.length - 1]) {
23258
- _this.parent.notify(insertCompleted, {
23259
- args: args.event,
23260
- type: 'Images',
23261
- isNotify: true,
23262
- elements: imageContent[imageContent.length - 1]
23263
- });
23264
- }
23265
- }
23266
23558
  }, clipBoardElem, null, null, this.parent.enterKey);
23559
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
23267
23560
  this.removeTempClass();
23268
23561
  this.parent.notify(toolbarRefresh, {});
23269
23562
  this.cropImageHandler(this.parent.inputElement);
23270
23563
  }
23271
23564
  };
23565
+ PasteCleanup.prototype.convertBlobToBase64 = function (element) {
23566
+ var imgElem = element.querySelectorAll('img');
23567
+ var _loop_1 = function (i) {
23568
+ if (imgElem[i].getAttribute('src') &&
23569
+ imgElem[i].getAttribute('src').startsWith("blob")) {
23570
+ var blobImageUrl = imgElem[i].getAttribute('src');
23571
+ var img_1 = new Image();
23572
+ var onImageLoadEvent_1 = function () {
23573
+ var canvas = document.createElement('canvas');
23574
+ var ctx = canvas.getContext('2d');
23575
+ canvas.width = img_1.width;
23576
+ canvas.height = img_1.height;
23577
+ ctx.drawImage(img_1, 0, 0);
23578
+ var base64String = canvas.toDataURL('image/png');
23579
+ imgElem[i].src = base64String;
23580
+ img_1.removeEventListener('load', onImageLoadEvent_1);
23581
+ };
23582
+ img_1.src = blobImageUrl;
23583
+ img_1.addEventListener('load', onImageLoadEvent_1);
23584
+ }
23585
+ };
23586
+ for (var i = 0; i < imgElem.length; i++) {
23587
+ _loop_1(i);
23588
+ }
23589
+ };
23272
23590
  PasteCleanup.prototype.cropImageHandler = function (element) {
23273
23591
  var _this = this;
23274
23592
  var allImgElm = element.querySelectorAll('.e-img-cropped');
23275
23593
  if (allImgElm.length > 0) {
23276
- var _loop_1 = function (i) {
23594
+ var _loop_2 = function (i) {
23277
23595
  if (allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
23278
23596
  var image_1 = new Image();
23279
23597
  image_1.src = allImgElm[i].getAttribute('src');
@@ -23307,26 +23625,37 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23307
23625
  }
23308
23626
  };
23309
23627
  for (var i = 0; i < allImgElm.length; i++) {
23310
- _loop_1(i);
23628
+ _loop_2(i);
23311
23629
  }
23312
23630
  }
23313
23631
  else {
23314
- this.imgUploading(this.parent.inputElement);
23315
- if (this.parent.iframeSettings.enable) {
23316
- this.parent.updateValue();
23632
+ 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")) {
23633
+ this.convertBlobToBase64(this.parent.inputElement);
23634
+ setTimeout(function () {
23635
+ _this.imgUploading(_this.parent.inputElement);
23636
+ if (_this.parent.iframeSettings.enable) {
23637
+ _this.parent.updateValue();
23638
+ }
23639
+ }, 20);
23640
+ }
23641
+ else {
23642
+ this.imgUploading(this.parent.inputElement);
23643
+ if (this.parent.iframeSettings.enable) {
23644
+ this.parent.updateValue();
23645
+ }
23317
23646
  }
23318
23647
  }
23319
23648
  };
23320
23649
  PasteCleanup.prototype.addTableClass = function (element, source) {
23321
- source = isNullOrUndefined(source) ? '' : source;
23322
23650
  var tableElement = element.querySelectorAll('table');
23323
23651
  for (var i = 0; i < tableElement.length; i++) {
23324
- if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
23325
- tableElement[i].classList.add('e-rte-table');
23326
- }
23327
- else if (source && source !== 'html') {
23652
+ var isMSTeamsTable = tableElement[i].parentElement.nodeName === 'FIGURE';
23653
+ if (this.parent.pasteCleanupSettings.keepFormat && source && !isMSTeamsTable) {
23328
23654
  tableElement[i].classList.add('e-rte-paste-' + source + '-table');
23329
23655
  }
23656
+ else if (!tableElement[i].classList.contains('e-rte-table')) {
23657
+ tableElement[i].classList.add('e-rte-table');
23658
+ }
23330
23659
  }
23331
23660
  return element;
23332
23661
  };
@@ -23661,16 +23990,6 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23661
23990
  }
23662
23991
  return clipBoardElem;
23663
23992
  };
23664
- PasteCleanup.prototype.findLastElement = function (element) {
23665
- if (!isNullOrUndefined(element) && !isNullOrUndefined(element.lastElementChild)) {
23666
- var lastChild = element.lastElementChild;
23667
- while (lastChild && lastChild.lastElementChild) {
23668
- lastChild = lastChild.lastElementChild;
23669
- }
23670
- return lastChild;
23671
- }
23672
- return null;
23673
- };
23674
23993
  PasteCleanup.prototype.processPictureElement = function (clipBoardElem) {
23675
23994
  var pictureElems = clipBoardElem.querySelectorAll('picture');
23676
23995
  for (var i = 0; i < pictureElems.length; i++) {
@@ -23706,7 +24025,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23706
24025
  /**
23707
24026
  * `Resize` module is used to resize the editor
23708
24027
  */
23709
- var Resize = /** @__PURE__ @class */ (function () {
24028
+ var Resize = /** @class */ (function () {
23710
24029
  function Resize(parent) {
23711
24030
  this.parent = parent;
23712
24031
  this.addEventListener();
@@ -23840,7 +24159,7 @@ var Resize = /** @__PURE__ @class */ (function () {
23840
24159
  /**
23841
24160
  * `FileManager` module is used to display the directories and images inside the editor.
23842
24161
  */
23843
- var FileManager$1 = /** @__PURE__ @class */ (function () {
24162
+ var FileManager$1 = /** @class */ (function () {
23844
24163
  function FileManager$$1(parent, locator) {
23845
24164
  FileManager.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$1);
23846
24165
  this.parent = parent;
@@ -24090,7 +24409,7 @@ var FileManager$1 = /** @__PURE__ @class */ (function () {
24090
24409
  /**
24091
24410
  * `FullScreen` module is used to maximize and minimize screen
24092
24411
  */
24093
- var FullScreen = /** @__PURE__ @class */ (function () {
24412
+ var FullScreen = /** @class */ (function () {
24094
24413
  function FullScreen(parent) {
24095
24414
  this.parent = parent;
24096
24415
  this.addEventListener();
@@ -24109,9 +24428,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24109
24428
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24110
24429
  this.parent.quickToolbarModule.hideQuickToolbars();
24111
24430
  }
24112
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24113
- this.parent.notify(destroyTooltip, { args: event });
24114
- }
24115
24431
  this.scrollableParent = getScrollableParent(this.parent.element);
24116
24432
  if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24117
24433
  var evenArgs = {
@@ -24164,9 +24480,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24164
24480
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24165
24481
  this.parent.quickToolbarModule.hideQuickToolbars();
24166
24482
  }
24167
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24168
- this.parent.notify(destroyTooltip, { args: event });
24169
- }
24170
24483
  if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24171
24484
  var evenArgs = {
24172
24485
  cancel: false,
@@ -24321,7 +24634,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
24321
24634
  }
24322
24635
  }
24323
24636
 
24324
- var FormatPainter = /** @__PURE__ @class */ (function () {
24637
+ var FormatPainter = /** @class */ (function () {
24325
24638
  function FormatPainter(parent) {
24326
24639
  this.isSticky = false;
24327
24640
  this.isActive = false;
@@ -24479,7 +24792,7 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
24479
24792
  return FormatPainter;
24480
24793
  }());
24481
24794
 
24482
- var EmojiPicker = /** @__PURE__ @class */ (function () {
24795
+ var EmojiPicker = /** @class */ (function () {
24483
24796
  function EmojiPicker(parent, serviceLocator) {
24484
24797
  this.parent = parent;
24485
24798
  this.locator = serviceLocator;
@@ -25242,7 +25555,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
25242
25555
  var popupHeight = 330;
25243
25556
  var popupTop = cursorTop;
25244
25557
  var popupLeft = cursorLeft + rect.width;
25245
- if (rteEle.getBoundingClientRect().top < 0) {
25558
+ if (rteEle.getBoundingClientRect().top < 0 && !this.parent.inlineMode.enable) {
25246
25559
  popupTop = popupTop + rteContent.getBoundingClientRect().top - toolbarHeight;
25247
25560
  }
25248
25561
  if (rect.top < popupHeight) {
@@ -25296,7 +25609,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
25296
25609
  * @hidden
25297
25610
  * @deprecated
25298
25611
  */
25299
- var Render = /** @__PURE__ @class */ (function () {
25612
+ var Render = /** @class */ (function () {
25300
25613
  /**
25301
25614
  * Constructor for render module
25302
25615
  *
@@ -25395,7 +25708,7 @@ var Render = /** @__PURE__ @class */ (function () {
25395
25708
  /**
25396
25709
  * `Link` module is used to handle undo actions.
25397
25710
  */
25398
- var Link = /** @__PURE__ @class */ (function () {
25711
+ var Link = /** @class */ (function () {
25399
25712
  function Link(parent, serviceLocator) {
25400
25713
  this.parent = parent;
25401
25714
  this.rteID = parent.element.id;
@@ -25913,7 +26226,10 @@ var Link = /** @__PURE__ @class */ (function () {
25913
26226
  this.selection.restore();
25914
26227
  }
25915
26228
  else {
26229
+ var x = window.scrollX;
26230
+ var y = window.scrollY;
25916
26231
  this.selfLink.parent.contentModule.getEditPanel().focus();
26232
+ window.scrollTo(x, y);
25917
26233
  }
25918
26234
  };
25919
26235
  Link.prototype.onDocumentClick = function (e) {
@@ -25964,7 +26280,7 @@ var Link = /** @__PURE__ @class */ (function () {
25964
26280
  /**
25965
26281
  * `Image` module is used to handle image actions.
25966
26282
  */
25967
- var Image$1 = /** @__PURE__ @class */ (function () {
26283
+ var Image$1 = /** @class */ (function () {
25968
26284
  function Image(parent, serviceLocator) {
25969
26285
  this.isImgUploaded = false;
25970
26286
  this.isAllowedTypes = true;
@@ -26576,13 +26892,13 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26576
26892
  selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
26577
26893
  if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
26578
26894
  (!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
26579
- var prev = selectParentEle[0].parentElement.childNodes[0];
26580
26895
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
26581
26896
  this.removeResizeEle();
26582
26897
  }
26583
- this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), prev, prev, prev.textContent.length, prev.textContent.length);
26584
26898
  removeClass([selectParentEle[0]], 'e-img-focus');
26585
- this.quickToolObj.imageQTBar.hidePopup();
26899
+ if (this.quickToolObj && this.quickToolObj.imageQTBar) {
26900
+ this.quickToolObj.imageQTBar.hidePopup();
26901
+ }
26586
26902
  }
26587
26903
  }
26588
26904
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
@@ -27348,7 +27664,12 @@ var Image$1 = /** @__PURE__ @class */ (function () {
27348
27664
  animationSettings: { effect: 'None' },
27349
27665
  close: function (event) {
27350
27666
  if (_this.isImgUploaded) {
27351
- _this.uploadObj.remove();
27667
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
27668
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
27669
+ }
27670
+ else {
27671
+ _this.uploadObj.remove();
27672
+ }
27352
27673
  }
27353
27674
  _this.parent.isBlur = false;
27354
27675
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -27749,6 +28070,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
27749
28070
  }
27750
28071
  },
27751
28072
  success: function (e) {
28073
+ e.detectImageSource = ImageInputSource.Uploaded;
27752
28074
  _this.parent.trigger(imageUploadSuccess, e, function (e) {
27753
28075
  if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
27754
28076
  var url = _this.parent.insertImageSettings.path + e.file.name;
@@ -28193,6 +28515,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
28193
28515
  imageElement.style.opacity = '1';
28194
28516
  imageElement.classList.add(CLS_IMG_FOCUS);
28195
28517
  e.element = imageElement;
28518
+ e.detectImageSource = ImageInputSource.Dropped;
28196
28519
  this.parent.trigger(imageUploadSuccess, e, function (e) {
28197
28520
  if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
28198
28521
  var url = _this.parent.insertImageSettings.path + e.file.name;
@@ -28293,7 +28616,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
28293
28616
  /**
28294
28617
  * `Audio` module is used to handle audio actions.
28295
28618
  */
28296
- var Audio = /** @__PURE__ @class */ (function () {
28619
+ var Audio = /** @class */ (function () {
28297
28620
  function Audio(parent, serviceLocator) {
28298
28621
  this.isAudioUploaded = false;
28299
28622
  this.isAllowedTypes = true;
@@ -28866,7 +29189,12 @@ var Audio = /** @__PURE__ @class */ (function () {
28866
29189
  animationSettings: { effect: 'None' },
28867
29190
  close: function (event) {
28868
29191
  if (_this.isAudioUploaded) {
28869
- _this.uploadObj.removing();
29192
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
29193
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
29194
+ }
29195
+ else {
29196
+ _this.uploadObj.remove();
29197
+ }
28870
29198
  }
28871
29199
  _this.parent.isBlur = false;
28872
29200
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -29152,7 +29480,7 @@ var Audio = /** @__PURE__ @class */ (function () {
29152
29480
  return Audio;
29153
29481
  }());
29154
29482
 
29155
- var Video = /** @__PURE__ @class */ (function () {
29483
+ var Video = /** @class */ (function () {
29156
29484
  function Video(parent, serviceLocator) {
29157
29485
  this.isVideoUploaded = false;
29158
29486
  this.isAllowedTypes = true;
@@ -30226,7 +30554,12 @@ var Video = /** @__PURE__ @class */ (function () {
30226
30554
  animationSettings: { effect: 'None' },
30227
30555
  close: function (event) {
30228
30556
  if (_this.isVideoUploaded) {
30229
- _this.uploadObj.removing();
30557
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
30558
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
30559
+ }
30560
+ else {
30561
+ _this.uploadObj.remove();
30562
+ }
30230
30563
  }
30231
30564
  _this.parent.isBlur = false;
30232
30565
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -30603,7 +30936,7 @@ var Video = /** @__PURE__ @class */ (function () {
30603
30936
  * @hidden
30604
30937
  * @deprecated
30605
30938
  */
30606
- var ViewSource = /** @__PURE__ @class */ (function () {
30939
+ var ViewSource = /** @class */ (function () {
30607
30940
  /**
30608
30941
  * Constructor for view source module
30609
30942
  *
@@ -30883,7 +31216,7 @@ var ViewSource = /** @__PURE__ @class */ (function () {
30883
31216
  /**
30884
31217
  * `Table` module is used to handle table actions.
30885
31218
  */
30886
- var Table = /** @__PURE__ @class */ (function () {
31219
+ var Table = /** @class */ (function () {
30887
31220
  function Table(parent, serviceLocator) {
30888
31221
  this.ensureInsideTableList = true;
30889
31222
  this.pageX = null;
@@ -31478,8 +31811,11 @@ var Table = /** @__PURE__ @class */ (function () {
31478
31811
  if (proxy.editdlgObj) {
31479
31812
  proxy.editdlgObj.hide();
31480
31813
  }
31814
+ var x = window.scrollX;
31815
+ var y = window.scrollY;
31481
31816
  proxy.parent.formatter.process(proxy.parent, selectionObj.args, selectionObj.args.originalEvent, value);
31482
31817
  proxy.contentModule.getEditPanel().focus();
31818
+ window.scrollTo(x, y);
31483
31819
  proxy.parent.on(mouseDown, proxy.cellSelect, proxy);
31484
31820
  };
31485
31821
  Table.prototype.cellSelect = function (e) {
@@ -32463,7 +32799,8 @@ var Table = /** @__PURE__ @class */ (function () {
32463
32799
  var argument = ((Browser.isDevice || (!isNullOrUndefined(args.args)
32464
32800
  && !isNullOrUndefined(args.args.originalEvent) &&
32465
32801
  args.args.originalEvent.action === 'insert-table')
32466
- || proxy.parent.inlineMode.enable || !isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) ? args :
32802
+ || proxy.parent.inlineMode.enable || ((!isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) &&
32803
+ !(args instanceof PointerEvent))) ? args :
32467
32804
  this);
32468
32805
  proxy.tableInsert(proxy.rowTextBox.value, proxy.columnTextBox.value, e, argument);
32469
32806
  }
@@ -32598,7 +32935,7 @@ var Table = /** @__PURE__ @class */ (function () {
32598
32935
  /**
32599
32936
  * Dialog Renderer
32600
32937
  */
32601
- var DialogRenderer = /** @__PURE__ @class */ (function () {
32938
+ var DialogRenderer = /** @class */ (function () {
32602
32939
  function DialogRenderer(parent) {
32603
32940
  this.parent = parent;
32604
32941
  this.addEventListener();
@@ -32915,29 +33252,29 @@ var executeGroup = {
32915
33252
  }
32916
33253
  };
32917
33254
 
32918
- var __extends$5 = (undefined && undefined.__extends) || (function () {
32919
- var extendStatics = function (d, b) {
32920
- extendStatics = Object.setPrototypeOf ||
32921
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32922
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
32923
- return extendStatics(d, b);
32924
- };
32925
- return function (d, b) {
32926
- extendStatics(d, b);
32927
- function __() { this.constructor = d; }
32928
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32929
- };
32930
- })();
32931
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32932
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32933
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32934
- 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;
32935
- return c > 3 && r && Object.defineProperty(target, key, r), r;
32936
- };
33255
+ var __extends$5 = (undefined && undefined.__extends) || (function () {
33256
+ var extendStatics = function (d, b) {
33257
+ extendStatics = Object.setPrototypeOf ||
33258
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33259
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33260
+ return extendStatics(d, b);
33261
+ };
33262
+ return function (d, b) {
33263
+ extendStatics(d, b);
33264
+ function __() { this.constructor = d; }
33265
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33266
+ };
33267
+ })();
33268
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33269
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33270
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33271
+ 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;
33272
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33273
+ };
32937
33274
  /**
32938
33275
  * Configures the toolbar settings of the RichTextEditor.
32939
33276
  */
32940
- var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
33277
+ var ToolbarSettings$1 = /** @class */ (function (_super) {
32941
33278
  __extends$5(ToolbarSettings$$1, _super);
32942
33279
  function ToolbarSettings$$1() {
32943
33280
  return _super !== null && _super.apply(this, arguments) || this;
@@ -32962,7 +33299,7 @@ var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
32962
33299
  /**
32963
33300
  * Configures the image settings of the RichTextEditor.
32964
33301
  */
32965
- var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33302
+ var ImageSettings = /** @class */ (function (_super) {
32966
33303
  __extends$5(ImageSettings, _super);
32967
33304
  function ImageSettings() {
32968
33305
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33014,7 +33351,7 @@ var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33014
33351
  /**
33015
33352
  * Configures the audio settings of the RichTextEditor.
33016
33353
  */
33017
- var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33354
+ var AudioSettings = /** @class */ (function (_super) {
33018
33355
  __extends$5(AudioSettings, _super);
33019
33356
  function AudioSettings() {
33020
33357
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33042,7 +33379,7 @@ var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33042
33379
  /**
33043
33380
  * Configures the video settings of the RichTextEditor.
33044
33381
  */
33045
- var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33382
+ var VideoSettings = /** @class */ (function (_super) {
33046
33383
  __extends$5(VideoSettings, _super);
33047
33384
  function VideoSettings() {
33048
33385
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33094,7 +33431,7 @@ var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33094
33431
  /**
33095
33432
  * Configures the file manager settings of the RichTextEditor.
33096
33433
  */
33097
- var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33434
+ var FileManagerSettings = /** @class */ (function (_super) {
33098
33435
  __extends$5(FileManagerSettings, _super);
33099
33436
  function FileManagerSettings() {
33100
33437
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33155,7 +33492,7 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33155
33492
  ], FileManagerSettings.prototype, "view", void 0);
33156
33493
  return FileManagerSettings;
33157
33494
  }(ChildProperty));
33158
- var TableSettings = /** @__PURE__ @class */ (function (_super) {
33495
+ var TableSettings = /** @class */ (function (_super) {
33159
33496
  __extends$5(TableSettings, _super);
33160
33497
  function TableSettings() {
33161
33498
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33180,7 +33517,7 @@ var TableSettings = /** @__PURE__ @class */ (function (_super) {
33180
33517
  /**
33181
33518
  * Configures the quick toolbar settings of the RichTextEditor.
33182
33519
  */
33183
- var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33520
+ var QuickToolbarSettings = /** @class */ (function (_super) {
33184
33521
  __extends$5(QuickToolbarSettings, _super);
33185
33522
  function QuickToolbarSettings() {
33186
33523
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33217,7 +33554,7 @@ var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33217
33554
  /**
33218
33555
  * Configure the format painter settings of the Rich Text Editor.
33219
33556
  */
33220
- var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33557
+ var FormatPainterSettings = /** @class */ (function (_super) {
33221
33558
  __extends$5(FormatPainterSettings, _super);
33222
33559
  function FormatPainterSettings() {
33223
33560
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33233,7 +33570,7 @@ var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33233
33570
  /**
33234
33571
  * Specifies the emoji picker options in Rich Text Editor with the following properties.
33235
33572
  */
33236
- var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33573
+ var EmojiSettings = /** @class */ (function (_super) {
33237
33574
  __extends$5(EmojiSettings, _super);
33238
33575
  function EmojiSettings() {
33239
33576
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33249,7 +33586,7 @@ var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33249
33586
  /**
33250
33587
  * Configures the Paste Cleanup settings of the RichTextEditor.
33251
33588
  */
33252
- var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33589
+ var PasteCleanupSettings = /** @class */ (function (_super) {
33253
33590
  __extends$5(PasteCleanupSettings, _super);
33254
33591
  function PasteCleanupSettings() {
33255
33592
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33277,7 +33614,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33277
33614
  /**
33278
33615
  * Configures the font family settings of the RichTextEditor.
33279
33616
  */
33280
- var FontFamily = /** @__PURE__ @class */ (function (_super) {
33617
+ var FontFamily = /** @class */ (function (_super) {
33281
33618
  __extends$5(FontFamily, _super);
33282
33619
  function FontFamily() {
33283
33620
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33296,7 +33633,7 @@ var FontFamily = /** @__PURE__ @class */ (function (_super) {
33296
33633
  /**
33297
33634
  * Configures the font size settings of the RichTextEditor.
33298
33635
  */
33299
- var FontSize = /** @__PURE__ @class */ (function (_super) {
33636
+ var FontSize = /** @class */ (function (_super) {
33300
33637
  __extends$5(FontSize, _super);
33301
33638
  function FontSize() {
33302
33639
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33315,7 +33652,7 @@ var FontSize = /** @__PURE__ @class */ (function (_super) {
33315
33652
  /**
33316
33653
  * Configures the format settings of the RichTextEditor.
33317
33654
  */
33318
- var Format = /** @__PURE__ @class */ (function (_super) {
33655
+ var Format = /** @class */ (function (_super) {
33319
33656
  __extends$5(Format, _super);
33320
33657
  function Format() {
33321
33658
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33334,7 +33671,7 @@ var Format = /** @__PURE__ @class */ (function (_super) {
33334
33671
  /**
33335
33672
  * Configures the font Color settings of the RichTextEditor.
33336
33673
  */
33337
- var FontColor = /** @__PURE__ @class */ (function (_super) {
33674
+ var FontColor = /** @class */ (function (_super) {
33338
33675
  __extends$5(FontColor, _super);
33339
33676
  function FontColor() {
33340
33677
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33359,7 +33696,7 @@ var FontColor = /** @__PURE__ @class */ (function (_super) {
33359
33696
  /**
33360
33697
  * Configures the background Color settings of the RichTextEditor.
33361
33698
  */
33362
- var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33699
+ var BackgroundColor = /** @class */ (function (_super) {
33363
33700
  __extends$5(BackgroundColor, _super);
33364
33701
  function BackgroundColor() {
33365
33702
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33384,7 +33721,7 @@ var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33384
33721
  /**
33385
33722
  * Configures the numberFormatList settings of the RichTextEditor.
33386
33723
  */
33387
- var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33724
+ var NumberFormatList = /** @class */ (function (_super) {
33388
33725
  __extends$5(NumberFormatList, _super);
33389
33726
  function NumberFormatList() {
33390
33727
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33397,7 +33734,7 @@ var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33397
33734
  /**
33398
33735
  * Configures the bulletFormatList settings of the RichTextEditor.
33399
33736
  */
33400
- var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33737
+ var BulletFormatList = /** @class */ (function (_super) {
33401
33738
  __extends$5(BulletFormatList, _super);
33402
33739
  function BulletFormatList() {
33403
33740
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33408,29 +33745,29 @@ var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33408
33745
  return BulletFormatList;
33409
33746
  }(ChildProperty));
33410
33747
 
33411
- var __extends$6 = (undefined && undefined.__extends) || (function () {
33412
- var extendStatics = function (d, b) {
33413
- extendStatics = Object.setPrototypeOf ||
33414
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33415
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33416
- return extendStatics(d, b);
33417
- };
33418
- return function (d, b) {
33419
- extendStatics(d, b);
33420
- function __() { this.constructor = d; }
33421
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33422
- };
33423
- })();
33424
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33425
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33426
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33427
- 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;
33428
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33429
- };
33748
+ var __extends$6 = (undefined && undefined.__extends) || (function () {
33749
+ var extendStatics = function (d, b) {
33750
+ extendStatics = Object.setPrototypeOf ||
33751
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33752
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33753
+ return extendStatics(d, b);
33754
+ };
33755
+ return function (d, b) {
33756
+ extendStatics(d, b);
33757
+ function __() { this.constructor = d; }
33758
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33759
+ };
33760
+ })();
33761
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33762
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33763
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33764
+ 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;
33765
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33766
+ };
33430
33767
  /**
33431
33768
  * Objects used for configuring the iframe resources properties.
33432
33769
  */
33433
- var Resources = /** @__PURE__ @class */ (function (_super) {
33770
+ var Resources = /** @class */ (function (_super) {
33434
33771
  __extends$6(Resources, _super);
33435
33772
  function Resources() {
33436
33773
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33446,7 +33783,7 @@ var Resources = /** @__PURE__ @class */ (function (_super) {
33446
33783
  /**
33447
33784
  * Configures the iframe settings of the RTE.
33448
33785
  */
33449
- var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33786
+ var IFrameSettings = /** @class */ (function (_super) {
33450
33787
  __extends$6(IFrameSettings, _super);
33451
33788
  function IFrameSettings() {
33452
33789
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33463,29 +33800,29 @@ var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33463
33800
  return IFrameSettings;
33464
33801
  }(ChildProperty));
33465
33802
 
33466
- var __extends$7 = (undefined && undefined.__extends) || (function () {
33467
- var extendStatics = function (d, b) {
33468
- extendStatics = Object.setPrototypeOf ||
33469
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33470
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33471
- return extendStatics(d, b);
33472
- };
33473
- return function (d, b) {
33474
- extendStatics(d, b);
33475
- function __() { this.constructor = d; }
33476
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33477
- };
33478
- })();
33479
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33480
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33481
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33482
- 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;
33483
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33484
- };
33803
+ var __extends$7 = (undefined && undefined.__extends) || (function () {
33804
+ var extendStatics = function (d, b) {
33805
+ extendStatics = Object.setPrototypeOf ||
33806
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33807
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33808
+ return extendStatics(d, b);
33809
+ };
33810
+ return function (d, b) {
33811
+ extendStatics(d, b);
33812
+ function __() { this.constructor = d; }
33813
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33814
+ };
33815
+ })();
33816
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33817
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33818
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33819
+ 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;
33820
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33821
+ };
33485
33822
  /**
33486
33823
  * Configures the inlineMode property of the RTE.
33487
33824
  */
33488
- var InlineMode = /** @__PURE__ @class */ (function (_super) {
33825
+ var InlineMode = /** @class */ (function (_super) {
33489
33826
  __extends$7(InlineMode, _super);
33490
33827
  function InlineMode() {
33491
33828
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33502,7 +33839,7 @@ var InlineMode = /** @__PURE__ @class */ (function (_super) {
33502
33839
  /**
33503
33840
  * `EnterKey` module is used to handle enter key press actions.
33504
33841
  */
33505
- var EnterKeyAction = /** @__PURE__ @class */ (function () {
33842
+ var EnterKeyAction = /** @class */ (function () {
33506
33843
  function EnterKeyAction(parent) {
33507
33844
  this.parent = parent;
33508
33845
  this.addEventListener();
@@ -33538,6 +33875,19 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33538
33875
  this.getRangeNode();
33539
33876
  var isTableEnter = true;
33540
33877
  this.formatTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'];
33878
+ var tableImagCursor = this.processedTableImageCursor();
33879
+ if (tableImagCursor.start || tableImagCursor.end) {
33880
+ if (tableImagCursor.startName === 'TABLE' || tableImagCursor.endName === 'TABLE') { // Default browser action prevented and hanled manually.
33881
+ this.handleCursorAtTableSide(e, tableImagCursor.start, tableImagCursor.end);
33882
+ return;
33883
+ }
33884
+ }
33885
+ if (tableImagCursor.start || tableImagCursor.end || this.range.startContainer.nodeName === 'IMG') {
33886
+ if (this.parent.enterKey === 'BR' && (tableImagCursor.startName === 'IMG' || tableImagCursor.endName === 'IMG' || this.range.startContainer.nodeName === 'IMG')) { // Default browser action prevented and hanled manually.
33887
+ this.handleEnterKeyAtImageSide(e, tableImagCursor.start, tableImagCursor.end);
33888
+ return;
33889
+ }
33890
+ }
33541
33891
  if (!isNullOrUndefined(this.startNode.closest('TABLE')) && !isNullOrUndefined(this.endNode.closest('TABLE'))) {
33542
33892
  isTableEnter = false;
33543
33893
  var curElement = this.startNode;
@@ -33852,6 +34202,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33852
34202
  else {
33853
34203
  currentParent = _this.startNode;
33854
34204
  }
34205
+ var currentParentStyle = window.getComputedStyle(currentParent);
33855
34206
  _this.removeBRElement(currentParent);
33856
34207
  var currentParentLastChild = currentParent.lastChild;
33857
34208
  while (!isNullOrUndefined(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text' || currentParentLastChild.nodeName === 'BR'
@@ -33903,7 +34254,6 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33903
34254
  var outerBRElem = _this.parent.createElement('br');
33904
34255
  if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
33905
34256
  !isNullOrUndefined(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR' && currentParent.nodeName !== 'P' && currentParent.nodeName !== 'DIV') {
33906
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
33907
34257
  newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, false).cloneNode(true);
33908
34258
  _this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
33909
34259
  _this.insertFocusContent();
@@ -33915,6 +34265,14 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33915
34265
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33916
34266
 
33917
34267
  }
34268
+ else if (currentParent !== _this.parent.inputElement &&
34269
+ (currentParentStyle.display === 'inline' || currentParentStyle.display === 'inline-block')) {
34270
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
34271
+ newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, true).cloneNode(true);
34272
+ currentParent.parentElement.insertBefore(outerBRElem, currentParent);
34273
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), currentParent, 0);
34274
+ _this.insertFocusContent();
34275
+ }
33918
34276
  else {
33919
34277
  _this.insertBRElement();
33920
34278
  }
@@ -33925,7 +34283,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33925
34283
  }
33926
34284
  e.args.preventDefault();
33927
34285
  }
33928
- _this.parent.trigger(actionComplete, { requestType: shiftKey_1 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34286
+ _this.triggerActionComplete(e, shiftKey_1);
33929
34287
  }
33930
34288
  });
33931
34289
  }
@@ -33995,39 +34353,158 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33995
34353
  }
33996
34354
  return insertElem;
33997
34355
  };
34356
+ EnterKeyAction.prototype.triggerActionComplete = function (e, shiftKey) {
34357
+ this.parent.trigger(actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34358
+ };
34359
+ EnterKeyAction.prototype.handleCursorAtTableSide = function (e, isStart, isEnd) {
34360
+ var _this = this;
34361
+ if (this.parent.enterKey !== 'BR') {
34362
+ var shiftKey_2 = e.args.shiftKey;
34363
+ var actionBeginArgs = {
34364
+ cancel: false,
34365
+ name: actionBegin,
34366
+ requestType: shiftKey_2 ? 'ShiftEnterAction' : 'EnterAction',
34367
+ originalEvent: e.args
34368
+ };
34369
+ this.parent.trigger(actionBegin, actionBeginArgs, function (actionBeginArgs) {
34370
+ if (!actionBeginArgs.cancel) {
34371
+ var newElement = _this.parent.createElement(_this.parent.enterKey);
34372
+ newElement.innerHTML = '<br>';
34373
+ var tableElement = void 0;
34374
+ if (isStart) {
34375
+ tableElement = _this.range.startContainer.childNodes[_this.range.startOffset];
34376
+ tableElement.parentElement.insertBefore(newElement, tableElement);
34377
+ }
34378
+ if (isEnd) {
34379
+ tableElement = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
34380
+ if (!isNullOrUndefined(tableElement.nextSibling)) {
34381
+ tableElement.parentElement.insertBefore(newElement, tableElement.nextSibling);
34382
+ }
34383
+ else if (isNullOrUndefined(tableElement.nextSibling)) {
34384
+ tableElement.parentElement.appendChild(newElement);
34385
+ }
34386
+ }
34387
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement, 0);
34388
+ e.args.preventDefault();
34389
+ _this.triggerActionComplete(e, shiftKey_2);
34390
+ }
34391
+ });
34392
+ }
34393
+ };
34394
+ EnterKeyAction.prototype.handleEnterKeyAtImageSide = function (e, isStart, isEnd) {
34395
+ var _this = this;
34396
+ var actionBeginArgs = {
34397
+ cancel: false,
34398
+ name: actionBegin,
34399
+ requestType: e.args.shiftKey ? 'ShiftEnterAction' : 'EnterAction',
34400
+ originalEvent: e.args
34401
+ };
34402
+ var directRange = false;
34403
+ if (this.range.startContainer.nodeName === 'IMG' && this.range.startOffset === 0) {
34404
+ directRange = true;
34405
+ }
34406
+ this.parent.trigger(actionBegin, actionBeginArgs, function (actionBeginArgs) {
34407
+ if (!actionBeginArgs.cancel) {
34408
+ if (_this.parent.enterKey === 'BR') {
34409
+ var newElement = _this.parent.createElement('BR');
34410
+ var imageElement = void 0;
34411
+ if (directRange) {
34412
+ imageElement = _this.range.startContainer;
34413
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34414
+ _this.parent.formatter.editorManager.nodeSelection.
34415
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34416
+ }
34417
+ if (isStart) {
34418
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset];
34419
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34420
+ _this.parent.formatter.editorManager.nodeSelection.
34421
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34422
+ }
34423
+ if (isEnd) {
34424
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
34425
+ if (!isNullOrUndefined(imageElement.nextSibling)) {
34426
+ imageElement.parentElement.insertBefore(newElement, imageElement.nextSibling);
34427
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement.nextSibling, 0);
34428
+ }
34429
+ else if (isNullOrUndefined(imageElement.nextSibling)) {
34430
+ imageElement.parentElement.appendChild(newElement);
34431
+ var brElement = _this.parent.createElement('BR');
34432
+ imageElement.parentElement.appendChild(brElement);
34433
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), brElement, 0);
34434
+ }
34435
+ }
34436
+ e.args.preventDefault();
34437
+ _this.triggerActionComplete(e, e.args.shiftKey);
34438
+ }
34439
+ }
34440
+ });
34441
+ };
34442
+ EnterKeyAction.prototype.isTableOrImageStart = function () {
34443
+ var customHandlerElements = ['IMG', 'TABLE'];
34444
+ var startContainer = this.range.startContainer;
34445
+ var startOffset = this.range.startOffset;
34446
+ var isCursorAtStart = this.range.collapsed && (startContainer.nodeType === 1) &&
34447
+ startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
34448
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
34449
+ if (isCursorAtStart) {
34450
+ return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
34451
+ }
34452
+ else {
34453
+ return { start: false, startNodeName: '' };
34454
+ }
34455
+ };
34456
+ EnterKeyAction.prototype.isTableOrImageEnd = function () {
34457
+ var customHandlerElements = ['IMG', 'TABLE'];
34458
+ var startContainer = this.range.startContainer;
34459
+ var startOffset = this.range.startOffset;
34460
+ var isCursorAtEnd = this.range.collapsed && (startContainer.nodeType === 1) &&
34461
+ startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
34462
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
34463
+ if (isCursorAtEnd) {
34464
+ return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
34465
+ }
34466
+ else {
34467
+ return { end: false, endNodeName: '' };
34468
+ }
34469
+ };
34470
+ EnterKeyAction.prototype.processedTableImageCursor = function () {
34471
+ var _a = this.isTableOrImageStart(), start = _a.start, startNodeName = _a.startNodeName;
34472
+ var _b = this.isTableOrImageEnd(), end = _b.end, endNodeName = _b.endNodeName;
34473
+ return { start: start, startName: startNodeName, end: end, endName: endNodeName };
34474
+ };
33998
34475
  return EnterKeyAction;
33999
34476
  }());
34000
34477
 
34001
- var __extends$4 = (undefined && undefined.__extends) || (function () {
34002
- var extendStatics = function (d, b) {
34003
- extendStatics = Object.setPrototypeOf ||
34004
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34005
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34006
- return extendStatics(d, b);
34007
- };
34008
- return function (d, b) {
34009
- extendStatics(d, b);
34010
- function __() { this.constructor = d; }
34011
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34012
- };
34013
- })();
34014
- var __assign = (undefined && undefined.__assign) || function () {
34015
- __assign = Object.assign || function(t) {
34016
- for (var s, i = 1, n = arguments.length; i < n; i++) {
34017
- s = arguments[i];
34018
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34019
- t[p] = s[p];
34020
- }
34021
- return t;
34022
- };
34023
- return __assign.apply(this, arguments);
34024
- };
34025
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34026
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34027
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34028
- 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;
34029
- return c > 3 && r && Object.defineProperty(target, key, r), r;
34030
- };
34478
+ var __extends$4 = (undefined && undefined.__extends) || (function () {
34479
+ var extendStatics = function (d, b) {
34480
+ extendStatics = Object.setPrototypeOf ||
34481
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34482
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34483
+ return extendStatics(d, b);
34484
+ };
34485
+ return function (d, b) {
34486
+ extendStatics(d, b);
34487
+ function __() { this.constructor = d; }
34488
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34489
+ };
34490
+ })();
34491
+ var __assign = (undefined && undefined.__assign) || function () {
34492
+ __assign = Object.assign || function(t) {
34493
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
34494
+ s = arguments[i];
34495
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34496
+ t[p] = s[p];
34497
+ }
34498
+ return t;
34499
+ };
34500
+ return __assign.apply(this, arguments);
34501
+ };
34502
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34503
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34504
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34505
+ 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;
34506
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
34507
+ };
34031
34508
  /**
34032
34509
  * Represents the Rich Text Editor component.
34033
34510
  * ```html
@@ -34038,7 +34515,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
34038
34515
  * </script>
34039
34516
  * ```
34040
34517
  */
34041
- var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34518
+ var RichTextEditor = /** @class */ (function (_super) {
34042
34519
  __extends$4(RichTextEditor, _super);
34043
34520
  function RichTextEditor(options, element) {
34044
34521
  var _this = _super.call(this, options, element) || this;
@@ -34167,6 +34644,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34167
34644
  this.persistData();
34168
34645
  setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
34169
34646
  attributes(this.element, { role: 'application', 'aria-label': 'Rich Text Editor' });
34647
+ this.beforeRenderClassValue = this.element.getAttribute('class');
34170
34648
  };
34171
34649
  RichTextEditor.prototype.persistData = function () {
34172
34650
  if (this.enablePersistence && this.originalElement.tagName === 'TEXTAREA') {
@@ -35039,10 +35517,21 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35039
35517
  if (this.isDestroyed || !this.isRendered) {
35040
35518
  return;
35041
35519
  }
35520
+ this.element.className = this.beforeRenderClassValue;
35521
+ this.removeHtmlAttributes();
35522
+ this.removeAttributes();
35523
+ this.beforeRenderClassValue = null;
35042
35524
  if (!isNullOrUndefined(this.timeInterval)) {
35043
35525
  clearInterval(this.timeInterval);
35044
35526
  this.timeInterval = null;
35045
35527
  }
35528
+ var tooltipElements = document.querySelectorAll('[data-rte-id="' + this.getID() + '"]');
35529
+ for (var i = 0; i < tooltipElements.length; i++) {
35530
+ var tooltipEle = tooltipElements[i];
35531
+ if (this.getID() === tooltipEle.getAttribute('data-rte-id')) {
35532
+ detach(tooltipEle);
35533
+ }
35534
+ }
35046
35535
  if (this.element.offsetParent === null) {
35047
35536
  if (!isNullOrUndefined(this.toolbarModule)) {
35048
35537
  this.toolbarModule.destroy();
@@ -35099,8 +35588,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35099
35588
  }
35100
35589
  }
35101
35590
  }
35102
- this.removeHtmlAttributes();
35103
- this.removeAttributes();
35104
35591
  _super.prototype.destroy.call(this);
35105
35592
  this.isRendered = false;
35106
35593
  };
@@ -35131,6 +35618,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35131
35618
  this.element.removeAttribute('aria-disabled');
35132
35619
  this.element.removeAttribute('role');
35133
35620
  this.element.removeAttribute('tabindex');
35621
+ this.element.removeAttribute('aria-label');
35134
35622
  };
35135
35623
  RichTextEditor.prototype.destroyDependentModules = function () {
35136
35624
  /* destroy dependent modules */
@@ -35385,7 +35873,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35385
35873
  }
35386
35874
  };
35387
35875
  RichTextEditor.prototype.updatePanelValue = function () {
35388
- var value = this.value;
35876
+ var value = this.listOrderCorrection(this.value);
35389
35877
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
35390
35878
  var getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
35391
35879
  if (value) {
@@ -35429,6 +35917,17 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35429
35917
  this.countModule.refresh();
35430
35918
  }
35431
35919
  };
35920
+ RichTextEditor.prototype.listOrderCorrection = function (value) {
35921
+ var valueElementWrapper = this.createElement('div');
35922
+ valueElementWrapper.innerHTML = value;
35923
+ var listElements = valueElementWrapper.querySelectorAll('UL, OL');
35924
+ for (var i = 0; i < listElements.length; i++) {
35925
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
35926
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
35927
+ }
35928
+ }
35929
+ return valueElementWrapper.innerHTML;
35930
+ };
35432
35931
  RichTextEditor.prototype.setHeight = function (height) {
35433
35932
  if (height !== 'auto') {
35434
35933
  this.element.style.height = formatUnit(height);
@@ -36900,5 +37399,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
36900
37399
  * Rich Text Editor component exported items
36901
37400
  */
36902
37401
 
36903
- export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
37402
+ export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, ImageInputSource, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
36904
37403
  //# sourceMappingURL=ej2-richtexteditor.es5.js.map