@syncfusion/ej2-richtexteditor 25.2.3 → 25.2.4-621927

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/.eslintrc.json +259 -259
  2. package/CHANGELOG.md +2067 -2011
  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 +575 -287
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +675 -383
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/helpers/e2e/index.js +3 -3
  11. package/helpers/e2e/rte-helper.js +13 -13
  12. package/license +9 -9
  13. package/package.json +84 -84
  14. package/src/common/interface.d.ts +22 -8
  15. package/src/common/util.js +4 -1
  16. package/src/editor-manager/base/classes.d.ts +1 -1
  17. package/src/editor-manager/base/classes.js +1 -1
  18. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  19. package/src/editor-manager/base/editor-manager.js +8 -6
  20. package/src/editor-manager/base/enum.d.ts +2 -2
  21. package/src/editor-manager/base/interface.d.ts +9 -9
  22. package/src/editor-manager/base/types.d.ts +1 -1
  23. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  24. package/src/editor-manager/plugin/alignments.js +5 -2
  25. package/src/editor-manager/plugin/audio.d.ts +3 -3
  26. package/src/editor-manager/plugin/audio.js +3 -3
  27. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  28. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  29. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  30. package/src/editor-manager/plugin/clearformat.js +1 -1
  31. package/src/editor-manager/plugin/dom-node.d.ts +54 -34
  32. package/src/editor-manager/plugin/dom-node.js +139 -36
  33. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  34. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  35. package/src/editor-manager/plugin/formats.d.ts +2 -2
  36. package/src/editor-manager/plugin/formats.js +3 -3
  37. package/src/editor-manager/plugin/image.d.ts +3 -3
  38. package/src/editor-manager/plugin/image.js +3 -3
  39. package/src/editor-manager/plugin/indents.d.ts +2 -2
  40. package/src/editor-manager/plugin/indents.js +5 -2
  41. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  42. package/src/editor-manager/plugin/insert-methods.js +4 -4
  43. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  44. package/src/editor-manager/plugin/insert-text.js +2 -2
  45. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  46. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  47. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  48. package/src/editor-manager/plugin/inserthtml.js +5 -2
  49. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  50. package/src/editor-manager/plugin/isformatted.js +8 -8
  51. package/src/editor-manager/plugin/link.d.ts +2 -2
  52. package/src/editor-manager/plugin/link.js +2 -2
  53. package/src/editor-manager/plugin/lists.d.ts +2 -3
  54. package/src/editor-manager/plugin/lists.js +57 -80
  55. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  56. package/src/editor-manager/plugin/ms-word-clean-up.js +2 -2
  57. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  58. package/src/editor-manager/plugin/nodecutter.js +6 -6
  59. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  60. package/src/editor-manager/plugin/selection-commands.js +1 -1
  61. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  62. package/src/editor-manager/plugin/selection-exec.js +2 -2
  63. package/src/editor-manager/plugin/table.d.ts +2 -2
  64. package/src/editor-manager/plugin/table.js +2 -2
  65. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  66. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  67. package/src/editor-manager/plugin/undo.d.ts +6 -6
  68. package/src/editor-manager/plugin/undo.js +6 -6
  69. package/src/editor-manager/plugin/video.d.ts +3 -3
  70. package/src/editor-manager/plugin/video.js +3 -3
  71. package/src/markdown-parser/base/interface.d.ts +10 -10
  72. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  73. package/src/markdown-parser/base/markdown-parser.js +3 -3
  74. package/src/markdown-parser/base/types.d.ts +1 -1
  75. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  76. package/src/markdown-parser/plugin/clearformat.js +2 -2
  77. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  78. package/src/markdown-parser/plugin/formats.js +2 -2
  79. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  80. package/src/markdown-parser/plugin/insert-text.js +2 -2
  81. package/src/markdown-parser/plugin/link.d.ts +2 -2
  82. package/src/markdown-parser/plugin/link.js +2 -2
  83. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  84. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  85. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  86. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  87. package/src/markdown-parser/plugin/table.d.ts +3 -3
  88. package/src/markdown-parser/plugin/table.js +3 -3
  89. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  90. package/src/markdown-parser/plugin/undo.js +6 -6
  91. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  92. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  93. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  94. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  95. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  96. package/src/rich-text-editor/actions/color-picker.js +2 -2
  97. package/src/rich-text-editor/actions/count.d.ts +3 -3
  98. package/src/rich-text-editor/actions/count.js +3 -3
  99. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  100. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  101. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  102. package/src/rich-text-editor/actions/emoji-picker.js +1 -1
  103. package/src/rich-text-editor/actions/enter-key.d.ts +5 -0
  104. package/src/rich-text-editor/actions/enter-key.js +98 -13
  105. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  106. package/src/rich-text-editor/actions/full-screen.js +3 -9
  107. package/src/rich-text-editor/actions/html-editor.d.ts +4 -3
  108. package/src/rich-text-editor/actions/html-editor.js +66 -13
  109. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  110. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  111. package/src/rich-text-editor/actions/keyboard.js +20 -20
  112. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  113. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  114. package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -1
  115. package/src/rich-text-editor/actions/paste-clean-up.js +44 -7
  116. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  117. package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
  118. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  119. package/src/rich-text-editor/actions/toolbar.js +13 -13
  120. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  121. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  122. package/src/rich-text-editor/base/classes.d.ts +121 -121
  123. package/src/rich-text-editor/base/classes.js +121 -121
  124. package/src/rich-text-editor/base/constant.d.ts +158 -158
  125. package/src/rich-text-editor/base/constant.js +158 -158
  126. package/src/rich-text-editor/base/enum.d.ts +1 -1
  127. package/src/rich-text-editor/base/enum.js +1 -1
  128. package/src/rich-text-editor/base/interface.d.ts +50 -50
  129. package/src/rich-text-editor/base/interface.js +1 -1
  130. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  131. package/src/rich-text-editor/base/rich-text-editor.d.ts +63 -61
  132. package/src/rich-text-editor/base/rich-text-editor.js +82 -67
  133. package/src/rich-text-editor/base/util.d.ts +1 -1
  134. package/src/rich-text-editor/base/util.js +1 -1
  135. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  136. package/src/rich-text-editor/formatter/formatter.js +8 -8
  137. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  138. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  139. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  140. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  141. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  142. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  143. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  144. package/src/rich-text-editor/models/inline-mode.js +19 -19
  145. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  146. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  147. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  148. package/src/rich-text-editor/renderer/audio-module.js +7 -2
  149. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  150. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  151. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  152. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  153. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  154. package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
  155. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  156. package/src/rich-text-editor/renderer/image-module.js +10 -5
  157. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  158. package/src/rich-text-editor/renderer/link-module.js +1 -1
  159. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  160. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  161. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  162. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  163. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  164. package/src/rich-text-editor/renderer/render.js +2 -2
  165. package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
  166. package/src/rich-text-editor/renderer/table-module.js +3 -2
  167. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
  168. package/src/rich-text-editor/renderer/toolbar-renderer.js +16 -18
  169. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  170. package/src/rich-text-editor/renderer/video-module.js +7 -2
  171. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  172. package/src/rich-text-editor/renderer/view-source.js +6 -6
  173. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  174. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  175. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  176. package/src/rich-text-editor/services/service-locator.js +3 -3
  177. package/src/selection/selection.d.ts +22 -22
  178. package/src/selection/selection.js +22 -22
  179. package/styles/_all.scss +1 -1
  180. package/styles/bootstrap-dark.css +702 -795
  181. package/styles/bootstrap-dark.scss +4 -1
  182. package/styles/bootstrap.css +686 -795
  183. package/styles/bootstrap.scss +4 -1
  184. package/styles/bootstrap4.css +689 -797
  185. package/styles/bootstrap4.scss +4 -1
  186. package/styles/bootstrap5-dark.css +713 -834
  187. package/styles/bootstrap5-dark.scss +4 -1
  188. package/styles/bootstrap5.css +712 -833
  189. package/styles/bootstrap5.scss +4 -1
  190. package/styles/fabric-dark.css +687 -791
  191. package/styles/fabric-dark.scss +4 -1
  192. package/styles/fabric.css +683 -791
  193. package/styles/fabric.scss +4 -1
  194. package/styles/fluent-dark.css +690 -814
  195. package/styles/fluent-dark.scss +4 -1
  196. package/styles/fluent.css +689 -813
  197. package/styles/fluent.scss +4 -1
  198. package/styles/fluent2.css +4219 -0
  199. package/styles/fluent2.scss +4 -0
  200. package/styles/highcontrast-light.css +658 -789
  201. package/styles/highcontrast-light.scss +4 -1
  202. package/styles/highcontrast.css +664 -787
  203. package/styles/highcontrast.scss +4 -1
  204. package/styles/material-dark.css +679 -792
  205. package/styles/material-dark.scss +4 -1
  206. package/styles/material.css +676 -794
  207. package/styles/material.scss +4 -1
  208. package/styles/material3-dark.css +715 -852
  209. package/styles/material3-dark.scss +4 -1
  210. package/styles/material3.css +715 -852
  211. package/styles/material3.scss +4 -1
  212. package/styles/rich-text-editor/_all.scss +2 -2
  213. package/styles/rich-text-editor/_bds-definition.scss +288 -285
  214. package/styles/rich-text-editor/_bigger.scss +610 -0
  215. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +289 -287
  216. package/styles/rich-text-editor/_bootstrap-definition.scss +347 -343
  217. package/styles/rich-text-editor/_bootstrap4-definition.scss +474 -470
  218. package/styles/rich-text-editor/_bootstrap5-definition.scss +276 -272
  219. package/styles/rich-text-editor/_bootstrap5.3-definition.scss +276 -0
  220. package/styles/rich-text-editor/_fabric-dark-definition.scss +273 -269
  221. package/styles/rich-text-editor/_fabric-definition.scss +271 -267
  222. package/styles/rich-text-editor/_fluent-definition.scss +277 -273
  223. package/styles/rich-text-editor/_fluent2-definition.scss +285 -0
  224. package/styles/rich-text-editor/_fusionnew-definition.scss +274 -271
  225. package/styles/rich-text-editor/_highcontrast-definition.scss +272 -267
  226. package/styles/rich-text-editor/_highcontrast-light-definition.scss +271 -267
  227. package/styles/rich-text-editor/_layout.scss +2148 -2269
  228. package/styles/rich-text-editor/_material-dark-definition.scss +276 -272
  229. package/styles/rich-text-editor/_material-definition.scss +274 -270
  230. package/styles/rich-text-editor/_material3-definition.scss +276 -272
  231. package/styles/rich-text-editor/_tailwind-definition.scss +271 -267
  232. package/styles/rich-text-editor/_theme.scss +802 -927
  233. package/styles/rich-text-editor/bootstrap-dark.css +702 -795
  234. package/styles/rich-text-editor/bootstrap.css +686 -795
  235. package/styles/rich-text-editor/bootstrap4.css +689 -797
  236. package/styles/rich-text-editor/bootstrap5-dark.css +713 -834
  237. package/styles/rich-text-editor/bootstrap5.css +712 -833
  238. package/styles/rich-text-editor/fabric-dark.css +687 -791
  239. package/styles/rich-text-editor/fabric.css +683 -791
  240. package/styles/rich-text-editor/fluent-dark.css +690 -814
  241. package/styles/rich-text-editor/fluent.css +689 -813
  242. package/styles/rich-text-editor/fluent2.css +4219 -0
  243. package/styles/rich-text-editor/fluent2.scss +4 -0
  244. package/styles/rich-text-editor/highcontrast-light.css +658 -789
  245. package/styles/rich-text-editor/highcontrast.css +664 -787
  246. package/styles/rich-text-editor/icons/_bds.scss +372 -351
  247. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -352
  248. package/styles/rich-text-editor/icons/_bootstrap.scss +373 -352
  249. package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -352
  250. package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -0
  251. package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -351
  252. package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -352
  253. package/styles/rich-text-editor/icons/_fabric.scss +373 -352
  254. package/styles/rich-text-editor/icons/_fluent.scss +372 -351
  255. package/styles/rich-text-editor/icons/_fluent2.scss +369 -0
  256. package/styles/rich-text-editor/icons/_fusionnew.scss +357 -348
  257. package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -352
  258. package/styles/rich-text-editor/icons/_highcontrast.scss +361 -352
  259. package/styles/rich-text-editor/icons/_material-dark.scss +373 -352
  260. package/styles/rich-text-editor/icons/_material.scss +373 -352
  261. package/styles/rich-text-editor/icons/_material3.scss +372 -351
  262. package/styles/rich-text-editor/icons/_tailwind.scss +372 -351
  263. package/styles/rich-text-editor/material-dark.css +679 -792
  264. package/styles/rich-text-editor/material.css +676 -794
  265. package/styles/rich-text-editor/material3-dark.css +715 -852
  266. package/styles/rich-text-editor/material3-dark.scss +1 -1
  267. package/styles/rich-text-editor/material3.css +715 -852
  268. package/styles/rich-text-editor/material3.scss +1 -1
  269. package/styles/rich-text-editor/tailwind-dark.css +702 -822
  270. package/styles/rich-text-editor/tailwind.css +702 -822
  271. package/styles/tailwind-dark.css +702 -822
  272. package/styles/tailwind-dark.scss +4 -1
  273. package/styles/tailwind.css +702 -822
  274. package/styles/tailwind.scss +4 -1
  275. package/dist/ej2-richtexteditor.min.js +0 -10
  276. package/dist/global/ej2-richtexteditor.min.js +0 -11
  277. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  278. package/dist/global/index.d.ts +0 -14
  279. package/tslint.json +0 -111
@@ -3570,7 +3570,7 @@ function updateDropDownFontFormatLocale(self) {
3570
3570
  * @hidden
3571
3571
  * @deprecated
3572
3572
  */
3573
- var IsFormatted = /** @__PURE__ @class */ (function () {
3573
+ var IsFormatted = /** @class */ (function () {
3574
3574
  function IsFormatted() {
3575
3575
  }
3576
3576
  /**
@@ -3916,7 +3916,7 @@ var PASTE_SOURCE = ['word', 'excel', 'onenote'];
3916
3916
  /**
3917
3917
  * `Selection` module is used to handle RTE Selections.
3918
3918
  */
3919
- var NodeSelection = /** @__PURE__ @class */ (function () {
3919
+ var NodeSelection = /** @class */ (function () {
3920
3920
  function NodeSelection() {
3921
3921
  this.startNodeName = [];
3922
3922
  this.endNodeName = [];
@@ -4573,11 +4573,14 @@ function nestedListCleanUp(range) {
4573
4573
  item.remove();
4574
4574
  });
4575
4575
  }
4576
+ else {
4577
+ break;
4578
+ }
4576
4579
  }
4577
4580
  var liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
4578
4581
  if (liElem.length > 0) {
4579
4582
  liElem.forEach(function (item) {
4580
- if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
4583
+ if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL")) {
4581
4584
  item.style.listStyleType = "none";
4582
4585
  }
4583
4586
  });
@@ -4640,7 +4643,7 @@ function scrollToCursor(document, inputElement) {
4640
4643
  * @deprecated
4641
4644
  */
4642
4645
  var statusCollection = getDefaultHtmlTbStatus();
4643
- var ToolbarStatus = /** @__PURE__ @class */ (function () {
4646
+ var ToolbarStatus = /** @class */ (function () {
4644
4647
  function ToolbarStatus() {
4645
4648
  }
4646
4649
  /**
@@ -5009,7 +5012,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
5009
5012
  * @hidden
5010
5013
  * @deprecated
5011
5014
  */
5012
- var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5015
+ var ToolbarRenderer = /** @class */ (function () {
5013
5016
  /**
5014
5017
  * Constructor for toolbar renderer module
5015
5018
  *
@@ -5456,8 +5459,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5456
5459
  target: colorPicker.element.parentElement, cssClass: css,
5457
5460
  enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
5458
5461
  beforeOpen: function (dropDownArgs) {
5459
- colorPicker.inline = true;
5460
- colorPicker.dataBind();
5461
5462
  if (proxy.parent.readonly || !proxy.parent.enabled) {
5462
5463
  dropDownArgs.cancel = true;
5463
5464
  return;
@@ -5596,14 +5597,18 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5596
5597
  var colorPicker = new ColorPicker({
5597
5598
  enablePersistence: this.parent.enablePersistence,
5598
5599
  enableRtl: this.parent.enableRtl,
5599
- inline: false,
5600
- 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',
5601
5603
  created: function () {
5602
5604
  var value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5603
- colorPicker.setProperties({ value: value });
5605
+ colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5606
+ colorPicker.value = value;
5604
5607
  },
5605
5608
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5606
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,
5607
5612
  beforeTileRender: function (args) {
5608
5613
  args.element.classList.add(CLS_COLOR_PALETTE);
5609
5614
  args.element.classList.add(CLS_CUSTOM_TILE);
@@ -5648,10 +5653,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5648
5653
  }
5649
5654
  });
5650
5655
  colorPicker.isStringTemplate = true;
5651
- colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
5652
- colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
5653
- this.parent.fontColor.colorCode;
5654
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5655
5656
  colorPicker.createElement = this.parent.createElement;
5656
5657
  colorPicker.appendTo(document.getElementById(args.target));
5657
5658
  return colorPicker;
@@ -5698,7 +5699,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
5698
5699
  /**
5699
5700
  * `Toolbar` module is used to handle Toolbar actions.
5700
5701
  */
5701
- var BaseToolbar = /** @__PURE__ @class */ (function () {
5702
+ var BaseToolbar = /** @class */ (function () {
5702
5703
  function BaseToolbar(parent, serviceLocator) {
5703
5704
  this.tools = {};
5704
5705
  this.parent = parent;
@@ -5906,7 +5907,7 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
5906
5907
  /**
5907
5908
  * `Toolbar` module is used to handle Toolbar actions.
5908
5909
  */
5909
- var DropDownButtons = /** @__PURE__ @class */ (function () {
5910
+ var DropDownButtons = /** @class */ (function () {
5910
5911
  function DropDownButtons(parent, serviceLocator) {
5911
5912
  this.parent = parent;
5912
5913
  this.locator = serviceLocator;
@@ -6437,7 +6438,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
6437
6438
  * @hidden
6438
6439
  * @deprecated
6439
6440
  */
6440
- var ServiceLocator = /** @__PURE__ @class */ (function () {
6441
+ var ServiceLocator = /** @class */ (function () {
6441
6442
  function ServiceLocator() {
6442
6443
  this.services = {};
6443
6444
  }
@@ -6481,7 +6482,7 @@ var ServiceLocator = /** @__PURE__ @class */ (function () {
6481
6482
  * @hidden
6482
6483
  * @deprecated
6483
6484
  */
6484
- var RendererFactory = /** @__PURE__ @class */ (function () {
6485
+ var RendererFactory = /** @class */ (function () {
6485
6486
  function RendererFactory() {
6486
6487
  this.rendererMap = {};
6487
6488
  }
@@ -6524,7 +6525,7 @@ var RendererFactory = /** @__PURE__ @class */ (function () {
6524
6525
  /**
6525
6526
  * `ToolbarAction` module is used to toolbar click action
6526
6527
  */
6527
- var ToolbarAction = /** @__PURE__ @class */ (function () {
6528
+ var ToolbarAction = /** @class */ (function () {
6528
6529
  function ToolbarAction(parent) {
6529
6530
  this.parent = parent;
6530
6531
  this.addEventListener();
@@ -6598,7 +6599,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
6598
6599
  /**
6599
6600
  * `Toolbar` module is used to handle Toolbar actions.
6600
6601
  */
6601
- var Toolbar$2 = /** @__PURE__ @class */ (function () {
6602
+ var Toolbar$2 = /** @class */ (function () {
6602
6603
  function Toolbar$$1(parent, serviceLocator) {
6603
6604
  this.tools = {};
6604
6605
  this.parent = parent;
@@ -7237,25 +7238,25 @@ var Toolbar$2 = /** @__PURE__ @class */ (function () {
7237
7238
  return Toolbar$$1;
7238
7239
  }());
7239
7240
 
7240
- var __extends = (undefined && undefined.__extends) || (function () {
7241
- var extendStatics = function (d, b) {
7242
- extendStatics = Object.setPrototypeOf ||
7243
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7244
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7245
- return extendStatics(d, b);
7246
- };
7247
- return function (d, b) {
7248
- extendStatics(d, b);
7249
- function __() { this.constructor = d; }
7250
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7251
- };
7252
- })();
7253
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7254
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7255
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7256
- 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;
7257
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7258
- };
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
+ };
7259
7260
  var keyCode = {
7260
7261
  'backspace': 8,
7261
7262
  'tab': 9,
@@ -7325,7 +7326,7 @@ var keyCode = {
7325
7326
  * @hidden
7326
7327
  * @deprecated
7327
7328
  */
7328
- var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7329
+ var KeyboardEvents$1 = /** @class */ (function (_super) {
7329
7330
  __extends(KeyboardEvents$$1, _super);
7330
7331
  /**
7331
7332
  * Initializes the KeyboardEvents
@@ -7468,7 +7469,7 @@ var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
7468
7469
  /**
7469
7470
  * `Color Picker` module is used to handle ColorPicker actions.
7470
7471
  */
7471
- var ColorPickerInput = /** @__PURE__ @class */ (function () {
7472
+ var ColorPickerInput = /** @class */ (function () {
7472
7473
  function ColorPickerInput(parent, serviceLocator) {
7473
7474
  this.tools = {};
7474
7475
  this.parent = parent;
@@ -7721,7 +7722,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
7721
7722
  /**
7722
7723
  * `Quick toolbar` module is used to handle Quick toolbar actions.
7723
7724
  */
7724
- var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
7725
+ var BaseQuickToolbar = /** @class */ (function () {
7725
7726
  function BaseQuickToolbar(parent, locator) {
7726
7727
  this.parent = parent;
7727
7728
  this.locator = locator;
@@ -8203,7 +8204,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
8203
8204
  * @hidden
8204
8205
  * @deprecated
8205
8206
  */
8206
- var PopupRenderer = /** @__PURE__ @class */ (function () {
8207
+ var PopupRenderer = /** @class */ (function () {
8207
8208
  /**
8208
8209
  * Constructor for popup renderer module
8209
8210
  *
@@ -8272,7 +8273,7 @@ var PopupRenderer = /** @__PURE__ @class */ (function () {
8272
8273
  /**
8273
8274
  * `Quick toolbar` module is used to handle Quick toolbar actions.
8274
8275
  */
8275
- var QuickToolbar = /** @__PURE__ @class */ (function () {
8276
+ var QuickToolbar = /** @class */ (function () {
8276
8277
  function QuickToolbar(parent, locator) {
8277
8278
  this.debounceTimeout = 1000;
8278
8279
  this.parent = parent;
@@ -8889,7 +8890,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
8889
8890
  /**
8890
8891
  * `Count` module is used to handle Count actions.
8891
8892
  */
8892
- var Count = /** @__PURE__ @class */ (function () {
8893
+ var Count = /** @class */ (function () {
8893
8894
  function Count(parent, serviceLocator) {
8894
8895
  this.parent = parent;
8895
8896
  this.locator = serviceLocator;
@@ -9017,7 +9018,7 @@ var Count = /** @__PURE__ @class */ (function () {
9017
9018
  * @hidden
9018
9019
  * @deprecated
9019
9020
  */
9020
- var MarkdownSelection = /** @__PURE__ @class */ (function () {
9021
+ var MarkdownSelection = /** @class */ (function () {
9021
9022
  function MarkdownSelection() {
9022
9023
  }
9023
9024
  /**
@@ -9233,7 +9234,7 @@ var MarkdownSelection = /** @__PURE__ @class */ (function () {
9233
9234
  /**
9234
9235
  * MarkdownToolbarStatus module for refresh the toolbar status
9235
9236
  */
9236
- var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9237
+ var MarkdownToolbarStatus = /** @class */ (function () {
9237
9238
  function MarkdownToolbarStatus(parent) {
9238
9239
  this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
9239
9240
  this.selection = new MarkdownSelection();
@@ -9356,7 +9357,7 @@ var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
9356
9357
  /**
9357
9358
  * `ExecCommandCallBack` module is used to run the editor manager command
9358
9359
  */
9359
- var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
9360
+ var ExecCommandCallBack = /** @class */ (function () {
9360
9361
  function ExecCommandCallBack(parent) {
9361
9362
  this.parent = parent;
9362
9363
  this.addEventListener();
@@ -9486,7 +9487,7 @@ var MOUSE_DOWN = 'mouseDown';
9486
9487
  * @hidden
9487
9488
  * @deprecated
9488
9489
  */
9489
- var Formatter = /** @__PURE__ @class */ (function () {
9490
+ var Formatter = /** @class */ (function () {
9490
9491
  function Formatter() {
9491
9492
  }
9492
9493
  /**
@@ -9795,7 +9796,7 @@ var INSERT_TEXT_COMMAND = 'insert-text';
9795
9796
  *
9796
9797
  * @hidden
9797
9798
  */
9798
- var MDLists = /** @__PURE__ @class */ (function () {
9799
+ var MDLists = /** @class */ (function () {
9799
9800
  /**
9800
9801
  * Constructor for creating the Lists plugin
9801
9802
  *
@@ -10266,7 +10267,7 @@ var MDLists = /** @__PURE__ @class */ (function () {
10266
10267
  * @hidden
10267
10268
  * @deprecated
10268
10269
  */
10269
- var MDFormats = /** @__PURE__ @class */ (function () {
10270
+ var MDFormats = /** @class */ (function () {
10270
10271
  /**
10271
10272
  * Constructor for creating the Formats plugin
10272
10273
  *
@@ -10494,7 +10495,7 @@ var MDFormats = /** @__PURE__ @class */ (function () {
10494
10495
  * @hidden
10495
10496
  * @deprecated
10496
10497
  */
10497
- var MDSelectionFormats = /** @__PURE__ @class */ (function () {
10498
+ var MDSelectionFormats = /** @class */ (function () {
10498
10499
  function MDSelectionFormats(parent) {
10499
10500
  extend(this, this, parent, true);
10500
10501
  this.selection = this.parent.markdownSelection;
@@ -10964,7 +10965,7 @@ var imageResizeFactor = {
10964
10965
  /**
10965
10966
  * `Undo` module is used to handle undo actions.
10966
10967
  */
10967
- var UndoRedoCommands = /** @__PURE__ @class */ (function () {
10968
+ var UndoRedoCommands = /** @class */ (function () {
10968
10969
  function UndoRedoCommands(parent, options) {
10969
10970
  this.undoRedoStack = [];
10970
10971
  this.parent = parent;
@@ -11159,7 +11160,7 @@ var UndoRedoCommands = /** @__PURE__ @class */ (function () {
11159
11160
  * @hidden
11160
11161
  * @deprecated
11161
11162
  */
11162
- var MDLink = /** @__PURE__ @class */ (function () {
11163
+ var MDLink = /** @class */ (function () {
11163
11164
  /**
11164
11165
  * Constructor for creating the Formats plugin
11165
11166
  *
@@ -11210,7 +11211,7 @@ var MDLink = /** @__PURE__ @class */ (function () {
11210
11211
  * @hidden
11211
11212
  * @deprecated
11212
11213
  */
11213
- var MDTable = /** @__PURE__ @class */ (function () {
11214
+ var MDTable = /** @class */ (function () {
11214
11215
  /**
11215
11216
  * Constructor for creating the Formats plugin
11216
11217
  *
@@ -11439,7 +11440,7 @@ var MDTable = /** @__PURE__ @class */ (function () {
11439
11440
  * @hidden
11440
11441
  * @deprecated
11441
11442
  */
11442
- var ClearFormat = /** @__PURE__ @class */ (function () {
11443
+ var ClearFormat = /** @class */ (function () {
11443
11444
  /**
11444
11445
  * Constructor for creating the clear format plugin
11445
11446
  *
@@ -11557,7 +11558,7 @@ var ClearFormat = /** @__PURE__ @class */ (function () {
11557
11558
  * @hidden
11558
11559
  * @deprecated
11559
11560
  */
11560
- var MDInsertText = /** @__PURE__ @class */ (function () {
11561
+ var MDInsertText = /** @class */ (function () {
11561
11562
  /**
11562
11563
  * Constructor for creating the insert text plugin
11563
11564
  *
@@ -11607,7 +11608,7 @@ var MDInsertText = /** @__PURE__ @class */ (function () {
11607
11608
  * @hidden
11608
11609
  * @deprecated
11609
11610
  */
11610
- var MarkdownParser = /** @__PURE__ @class */ (function () {
11611
+ var MarkdownParser = /** @class */ (function () {
11611
11612
  /**
11612
11613
  * Constructor for creating the component
11613
11614
  *
@@ -11703,26 +11704,26 @@ var MarkdownParser = /** @__PURE__ @class */ (function () {
11703
11704
  return MarkdownParser;
11704
11705
  }());
11705
11706
 
11706
- var __extends$1 = (undefined && undefined.__extends) || (function () {
11707
- var extendStatics = function (d, b) {
11708
- extendStatics = Object.setPrototypeOf ||
11709
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11710
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11711
- return extendStatics(d, b);
11712
- };
11713
- return function (d, b) {
11714
- extendStatics(d, b);
11715
- function __() { this.constructor = d; }
11716
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11717
- };
11718
- })();
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
+ })();
11719
11720
  /**
11720
11721
  * Markdown adapter
11721
11722
  *
11722
11723
  * @hidden
11723
11724
  * @deprecated
11724
11725
  */
11725
- var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11726
+ var MarkdownFormatter = /** @class */ (function (_super) {
11726
11727
  __extends$1(MarkdownFormatter, _super);
11727
11728
  function MarkdownFormatter(options) {
11728
11729
  var _this = _super.call(this) || this;
@@ -11769,7 +11770,7 @@ var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
11769
11770
  * @hidden
11770
11771
  * @deprecated
11771
11772
  */
11772
- var MarkdownRender = /** @__PURE__ @class */ (function () {
11773
+ var MarkdownRender = /** @class */ (function () {
11773
11774
  /**
11774
11775
  * Constructor for content renderer module
11775
11776
  *
@@ -11852,7 +11853,7 @@ var MarkdownRender = /** @__PURE__ @class */ (function () {
11852
11853
  /**
11853
11854
  * `MarkdownEditor` module is used to markdown editor
11854
11855
  */
11855
- var MarkdownEditor = /** @__PURE__ @class */ (function () {
11856
+ var MarkdownEditor = /** @class */ (function () {
11856
11857
  function MarkdownEditor(parent, serviceLocator) {
11857
11858
  this.parent = parent;
11858
11859
  this.locator = serviceLocator;
@@ -12043,7 +12044,7 @@ var markerClassName = {
12043
12044
  * @hidden
12044
12045
  * @deprecated
12045
12046
  */
12046
- var DOMNode = /** @__PURE__ @class */ (function () {
12047
+ var DOMNode = /** @class */ (function () {
12047
12048
  /**
12048
12049
  * Constructor for creating the DOMNode plugin
12049
12050
  *
@@ -12348,7 +12349,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12348
12349
  DOMNode.prototype.unWrap = function (element) {
12349
12350
  var parent = element.parentNode;
12350
12351
  var unWrapNode = [];
12351
- while (element.firstChild) {
12352
+ while (element.firstChild && (element.previousSibling !== this.parent.querySelector('.e-mention-chip') || element.textContent !== ' ')) {
12352
12353
  unWrapNode.push(element.firstChild);
12353
12354
  parent.insertBefore(element.firstChild, element);
12354
12355
  }
@@ -12698,6 +12699,109 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12698
12699
  }
12699
12700
  return null;
12700
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
+ };
12701
12805
  /**
12702
12806
  * blockNodes method
12703
12807
  *
@@ -12962,7 +13066,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
12962
13066
  * @hidden
12963
13067
  * @deprecated
12964
13068
  */
12965
- var Lists = /** @__PURE__ @class */ (function () {
13069
+ var Lists = /** @class */ (function () {
12966
13070
  /**
12967
13071
  * Constructor for creating the Lists plugin
12968
13072
  *
@@ -13206,7 +13310,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13206
13310
  e.event.preventDefault();
13207
13311
  }
13208
13312
  };
13209
- Lists.prototype.onKeyUp = function () {
13313
+ Lists.prototype.onKeyUp = function (e) {
13210
13314
  if (!isNullOrUndefined(this.commonLIParent) && !isNullOrUndefined(this.commonLIParent.querySelector('.removeList'))) {
13211
13315
  var currentLIElem = this.commonLIParent.querySelector('.removeList');
13212
13316
  while (!isNullOrUndefined(currentLIElem.firstChild)) {
@@ -13214,6 +13318,14 @@ var Lists = /** @__PURE__ @class */ (function () {
13214
13318
  }
13215
13319
  detach(currentLIElem);
13216
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
+ }
13217
13329
  };
13218
13330
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13219
13331
  Lists.prototype.firstListBackSpace = function (range, _e) {
@@ -13455,6 +13567,8 @@ var Lists = /** @__PURE__ @class */ (function () {
13455
13567
  else {
13456
13568
  if (prevSibling.tagName === 'LI') {
13457
13569
  var nestedElement = createElement(elements[i].parentNode.tagName);
13570
+ nestedElement.style.listStyleType =
13571
+ elements[i].parentNode.style.listStyleType;
13458
13572
  append([nestedElement], prevSibling);
13459
13573
  append([elements[i]], nestedElement);
13460
13574
  }
@@ -13504,39 +13618,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13504
13618
  var listsNodes = this.domNode.blockNodes(true);
13505
13619
  if (e.enterAction === 'BR') {
13506
13620
  this.setSelectionBRConfig();
13507
- var selectedNodes = this.parent.domNode.blockNodes();
13508
- if (selectedNodes.length > 1) {
13509
- var i = 0;
13510
- var currentAlignmentNode = selectedNodes[0];
13511
- while (!isNullOrUndefined(currentAlignmentNode)) {
13512
- if (currentAlignmentNode.nodeName === 'BR') {
13513
- var nextNode = currentAlignmentNode.nextSibling;
13514
- detach(currentAlignmentNode);
13515
- currentAlignmentNode = nextNode;
13516
- }
13517
- if (!isNullOrUndefined(currentAlignmentNode)) {
13518
- selectedNodes[i] = currentAlignmentNode.nodeName === 'LI' || this.parent.domNode.isBlockNode(currentAlignmentNode) ?
13519
- currentAlignmentNode : this.gatherElementsAround(currentAlignmentNode);
13520
- var currentSelectNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
13521
- var currentElementCheckNode = currentAlignmentNode.nodeName === '#text' ? currentAlignmentNode.parentElement : currentAlignmentNode;
13522
- currentAlignmentNode = !isNullOrUndefined(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
13523
- !isNullOrUndefined(closest(currentAlignmentNode, '.e-editor-select-end')) ?
13524
- null : currentSelectNode.nextSibling;
13525
- if (currentAlignmentNode === null && !isNullOrUndefined(currentSelectNode.nextSibling) && currentSelectNode.nextSibling.nodeName === 'BR') {
13526
- detach(currentSelectNode.nextSibling);
13527
- }
13528
- }
13529
- i++;
13530
- }
13531
- }
13532
- else {
13533
- if (!this.parent.domNode.isBlockNode(selectedNodes[0])) {
13534
- selectedNodes[0] = this.gatherElementsAround(selectedNodes[0]);
13535
- if (!isNullOrUndefined(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
13536
- detach(selectedNodes[0].nextSibling);
13537
- }
13538
- }
13539
- }
13621
+ this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(), true);
13540
13622
  this.setSelectionBRConfig();
13541
13623
  listsNodes = this.parent.domNode.blockNodes();
13542
13624
  }
@@ -13593,7 +13675,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13593
13675
  }
13594
13676
  var elemAtt = void 0;
13595
13677
  elements[i].style.removeProperty('margin-left');
13596
- 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]);
13597
13679
  if (elements[i].getAttribute('contenteditable') === 'true'
13598
13680
  && elements[i].childNodes.length === 1 && elements[i].childNodes[0].nodeName === 'TABLE') {
13599
13681
  var listEle = document.createElement(type);
@@ -13714,6 +13796,13 @@ var Lists = /** @__PURE__ @class */ (function () {
13714
13796
  for (var c = 0; c < liParents.length; c++) {
13715
13797
  var node = liParents[c];
13716
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
+ }
13717
13806
  if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
13718
13807
  toFindtopOlUl = false;
13719
13808
  var preElement = liParents[c].parentElement.parentElement;
@@ -13733,9 +13822,43 @@ var Lists = /** @__PURE__ @class */ (function () {
13733
13822
  node.previousElementSibling.lastChild.append(node);
13734
13823
  }
13735
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
+ }
13736
13832
  }
13737
13833
  if (firstNodeOL) {
13738
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
+ }
13739
13862
  }
13740
13863
  };
13741
13864
  Lists.prototype.findUnSelected = function (temp, elements) {
@@ -13838,7 +13961,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13838
13961
  parentNode.removeAttribute("style");
13839
13962
  }
13840
13963
  }
13841
- var wrapper = '<' + DEFAULT_TAG + wrapperclass + this.domNode.attributes(element) + '></' + DEFAULT_TAG + '>';
13964
+ var wrapper = '<' + e.enterAction + wrapperclass + this.domNode.attributes(element) + '></' + e.enterAction + '>';
13842
13965
  if (e.enterAction !== 'BR') {
13843
13966
  this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
13844
13967
  }
@@ -13912,48 +14035,6 @@ var Lists = /** @__PURE__ @class */ (function () {
13912
14035
  Lists.prototype.closeTag = function (type) {
13913
14036
  return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-' + type.toLowerCase() + '"></span>');
13914
14037
  };
13915
- Lists.prototype.gatherElementsAround = function (node) {
13916
- var pWrap = document.createElement('p');
13917
- // Insert the new div before the current node
13918
- var currentNode = node.previousSibling;
13919
- var classNode = node.parentNode;
13920
- if (classNode.className === 'e-editor-select-start') {
13921
- node.parentNode.parentNode.insertBefore(pWrap, node.parentNode);
13922
- }
13923
- else if (node.parentNode) {
13924
- node.parentNode.insertBefore(pWrap, node);
13925
- }
13926
- // Gather text and inline elements before the currentNode
13927
- var i = 0;
13928
- while (currentNode !== null && currentNode.nodeName !== 'BR' &&
13929
- !this.parent.domNode.isBlockNode(currentNode)) {
13930
- var prevSibling = currentNode.previousSibling;
13931
- if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
13932
- if (i === 0) {
13933
- pWrap.appendChild(currentNode);
13934
- }
13935
- else {
13936
- pWrap.insertBefore(currentNode, pWrap.firstChild);
13937
- }
13938
- }
13939
- currentNode = prevSibling;
13940
- i++;
13941
- }
13942
- // Add the current node to the new p
13943
- pWrap.appendChild(node);
13944
- // Gather text and inline elements after the currentNode
13945
- currentNode = pWrap.nextSibling ? pWrap.nextSibling : pWrap.parentElement.nextSibling;
13946
- while (currentNode !== null && currentNode.nodeName !== 'BR' &&
13947
- !this.parent.domNode.isBlockNode(currentNode)) {
13948
- var nextSibling = currentNode.nextSibling ?
13949
- currentNode.nextSibling : currentNode.parentElement.nextSibling;
13950
- if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
13951
- pWrap.appendChild(currentNode);
13952
- }
13953
- currentNode = nextSibling;
13954
- }
13955
- return pWrap;
13956
- };
13957
14038
  return Lists;
13958
14039
  }());
13959
14040
 
@@ -13962,7 +14043,7 @@ var Lists = /** @__PURE__ @class */ (function () {
13962
14043
  *
13963
14044
  * @hidden
13964
14045
  */
13965
- var InsertMethods = /** @__PURE__ @class */ (function () {
14046
+ var InsertMethods = /** @class */ (function () {
13966
14047
  function InsertMethods() {
13967
14048
  }
13968
14049
  /**
@@ -14039,7 +14120,7 @@ var InsertMethods = /** @__PURE__ @class */ (function () {
14039
14120
  * @hidden
14040
14121
  * @deprecated
14041
14122
  */
14042
- var NodeCutter = /** @__PURE__ @class */ (function () {
14123
+ var NodeCutter = /** @class */ (function () {
14043
14124
  function NodeCutter() {
14044
14125
  this.enterAction = 'P';
14045
14126
  this.position = -1;
@@ -14251,7 +14332,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
14251
14332
  * @hidden
14252
14333
  * @deprecated
14253
14334
  */
14254
- var Formats = /** @__PURE__ @class */ (function () {
14335
+ var Formats = /** @class */ (function () {
14255
14336
  /**
14256
14337
  * Constructor for creating the Formats plugin
14257
14338
  *
@@ -14293,7 +14374,7 @@ var Formats = /** @__PURE__ @class */ (function () {
14293
14374
  }
14294
14375
  }
14295
14376
  }
14296
- if (e.enterAction !== 'BR' && !isNullOrUndefined(range.startContainer) && !isNullOrUndefined(range.startContainer.parentElement) && range.startContainer === range.endContainer && range.startContainer.nodeName === '#text' && range.startContainer.parentElement.classList.contains("e-content") && range.startContainer.parentElement.isContentEditable) {
14377
+ if (e.enterAction !== 'BR' && !isNullOrUndefined(range.startContainer) && !isNullOrUndefined(range.startContainer.parentElement) && range.startContainer === range.endContainer && range.startContainer.nodeName === '#text' && range.startContainer.parentElement.classList.contains('e-content') && range.startContainer.parentElement.isContentEditable) {
14297
14378
  var pTag = createElement(e.enterAction);
14298
14379
  range.startContainer.parentElement.insertBefore(pTag, range.startContainer);
14299
14380
  pTag.appendChild(range.startContainer);
@@ -14661,7 +14742,7 @@ var Formats = /** @__PURE__ @class */ (function () {
14661
14742
  * @hidden
14662
14743
  * @deprecated
14663
14744
  */
14664
- var InsertHtml = /** @__PURE__ @class */ (function () {
14745
+ var InsertHtml = /** @class */ (function () {
14665
14746
  function InsertHtml() {
14666
14747
  }
14667
14748
  InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
@@ -14714,6 +14795,9 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
14714
14795
  this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
14715
14796
  return;
14716
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
+ }
14717
14801
  if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
14718
14802
  node.classList.contains('pasteContent'))) {
14719
14803
  this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
@@ -15276,7 +15360,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
15276
15360
  * @hidden
15277
15361
  * @deprecated
15278
15362
  */
15279
- var LinkCommand = /** @__PURE__ @class */ (function () {
15363
+ var LinkCommand = /** @class */ (function () {
15280
15364
  /**
15281
15365
  * Constructor for creating the Formats plugin
15282
15366
  *
@@ -15584,7 +15668,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
15584
15668
  * @hidden
15585
15669
  * @deprecated
15586
15670
  */
15587
- var Alignments = /** @__PURE__ @class */ (function () {
15671
+ var Alignments = /** @class */ (function () {
15588
15672
  /**
15589
15673
  * Constructor for creating the Formats plugin
15590
15674
  *
@@ -15640,6 +15724,9 @@ var Alignments = /** @__PURE__ @class */ (function () {
15640
15724
  if (!isTableAlign) {
15641
15725
  this.parent.domNode.setMarker(save);
15642
15726
  var alignmentNodes = this.parent.domNode.blockNodes();
15727
+ if (e.enterAction === 'BR') {
15728
+ alignmentNodes = this.parent.domNode.convertToBlockNodes(alignmentNodes, false);
15729
+ }
15643
15730
  for (var i = 0; i < alignmentNodes.length; i++) {
15644
15731
  var parentNode = alignmentNodes[i];
15645
15732
  setStyleAttribute(parentNode, { 'text-align': this.alignments[e.subCommand] });
@@ -15687,7 +15774,7 @@ var Alignments = /** @__PURE__ @class */ (function () {
15687
15774
  * @hidden
15688
15775
  * @deprecated
15689
15776
  */
15690
- var Indents = /** @__PURE__ @class */ (function () {
15777
+ var Indents = /** @class */ (function () {
15691
15778
  /**
15692
15779
  * Constructor for creating the Formats plugin
15693
15780
  *
@@ -15723,6 +15810,9 @@ var Indents = /** @__PURE__ @class */ (function () {
15723
15810
  var save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
15724
15811
  this.parent.domNode.setMarker(save);
15725
15812
  var indentsNodes = this.parent.domNode.blockNodes();
15813
+ if (e.enterAction === 'BR') {
15814
+ indentsNodes = this.parent.domNode.convertToBlockNodes(indentsNodes, false);
15815
+ }
15726
15816
  var parentNodes = indentsNodes.slice();
15727
15817
  var listsNodes = [];
15728
15818
  for (var i = 0; i < parentNodes.length; i++) {
@@ -15823,7 +15913,7 @@ var CLASS_VIDEO_INLINE = 'e-video-inline';
15823
15913
  * @hidden
15824
15914
  * @deprecated
15825
15915
  */
15826
- var ImageCommand = /** @__PURE__ @class */ (function () {
15916
+ var ImageCommand = /** @class */ (function () {
15827
15917
  /**
15828
15918
  * Constructor for creating the Formats plugin
15829
15919
  *
@@ -16210,7 +16300,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
16210
16300
  * @hidden
16211
16301
  * @deprecated
16212
16302
  */
16213
- var AudioCommand = /** @__PURE__ @class */ (function () {
16303
+ var AudioCommand = /** @class */ (function () {
16214
16304
  /**
16215
16305
  * Constructor for creating the Audio plugin
16216
16306
  *
@@ -16349,7 +16439,7 @@ var AudioCommand = /** @__PURE__ @class */ (function () {
16349
16439
  * @hidden
16350
16440
  * @deprecated
16351
16441
  */
16352
- var VideoCommand = /** @__PURE__ @class */ (function () {
16442
+ var VideoCommand = /** @class */ (function () {
16353
16443
  /**
16354
16444
  * Constructor for creating the Video plugin
16355
16445
  *
@@ -16597,7 +16687,7 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
16597
16687
  * @hidden
16598
16688
  * @deprecated
16599
16689
  */
16600
- var TableCommand = /** @__PURE__ @class */ (function () {
16690
+ var TableCommand = /** @class */ (function () {
16601
16691
  /**
16602
16692
  * Constructor for creating the Formats plugin
16603
16693
  *
@@ -17578,7 +17668,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
17578
17668
 
17579
17669
  return TableCommand;
17580
17670
  }());
17581
- var MinMax = /** @__PURE__ @class */ (function () {
17671
+ var MinMax = /** @class */ (function () {
17582
17672
  function MinMax() {
17583
17673
  }
17584
17674
  return MinMax;
@@ -17587,7 +17677,7 @@ var MinMax = /** @__PURE__ @class */ (function () {
17587
17677
  /**
17588
17678
  * `Selection` module is used to handle RTE Selections.
17589
17679
  */
17590
- var SelectionCommands = /** @__PURE__ @class */ (function () {
17680
+ var SelectionCommands = /** @class */ (function () {
17591
17681
  function SelectionCommands() {
17592
17682
  }
17593
17683
  /**
@@ -18563,7 +18653,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
18563
18653
  * @hidden
18564
18654
  * @deprecated
18565
18655
  */
18566
- var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18656
+ var SelectionBasedExec = /** @class */ (function () {
18567
18657
  /**
18568
18658
  * Constructor for creating the Formats plugin
18569
18659
  *
@@ -18612,7 +18702,7 @@ var SelectionBasedExec = /** @__PURE__ @class */ (function () {
18612
18702
  * @hidden
18613
18703
  * @deprecated
18614
18704
  */
18615
- var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18705
+ var InsertHtmlExec = /** @class */ (function () {
18616
18706
  /**
18617
18707
  * Constructor for creating the Formats plugin
18618
18708
  *
@@ -18659,7 +18749,7 @@ var InsertHtmlExec = /** @__PURE__ @class */ (function () {
18659
18749
  /**
18660
18750
  * `Clear Format` module is used to handle Clear Format.
18661
18751
  */
18662
- var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18752
+ var ClearFormat$1 = /** @class */ (function () {
18663
18753
  function ClearFormat() {
18664
18754
  }
18665
18755
  /**
@@ -18912,7 +19002,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
18912
19002
  * @hidden
18913
19003
  * @deprecated
18914
19004
  */
18915
- var ClearFormatExec = /** @__PURE__ @class */ (function () {
19005
+ var ClearFormatExec = /** @class */ (function () {
18916
19006
  /**
18917
19007
  * Constructor for creating the Formats plugin
18918
19008
  *
@@ -18957,7 +19047,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
18957
19047
  /**
18958
19048
  * `Undo` module is used to handle undo actions.
18959
19049
  */
18960
- var UndoRedoManager = /** @__PURE__ @class */ (function () {
19050
+ var UndoRedoManager = /** @class */ (function () {
18961
19051
  function UndoRedoManager(parent, options) {
18962
19052
  this.undoRedoStack = [];
18963
19053
  this.parent = parent;
@@ -19211,7 +19301,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
19211
19301
  * @hidden
19212
19302
  * @deprecated
19213
19303
  */
19214
- var MsWordPaste = /** @__PURE__ @class */ (function () {
19304
+ var MsWordPaste = /** @class */ (function () {
19215
19305
  function MsWordPaste(parent) {
19216
19306
  this.olData = [
19217
19307
  'decimal',
@@ -20025,7 +20115,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
20025
20115
  !isNormalList) {
20026
20116
  prevList = null;
20027
20117
  }
20028
- var pElement = createElement('p', { className: 'MsoNormal' });
20118
+ var pElement = createElement('p', { className: 'MsoNoSpacing' });
20029
20119
  pElement.innerHTML = collection[index].content.join(' ');
20030
20120
  if ((collection[index].nestedLevel === 1) &&
20031
20121
  (listCount === 0 || lfo !== collection[index].listFormatOverride) &&
@@ -20279,7 +20369,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
20279
20369
  * @hidden
20280
20370
  * @deprecated
20281
20371
  */
20282
- var InsertTextExec = /** @__PURE__ @class */ (function () {
20372
+ var InsertTextExec = /** @class */ (function () {
20283
20373
  /**
20284
20374
  * Constructor for creating the InsertText plugin
20285
20375
  *
@@ -20310,7 +20400,7 @@ var InsertTextExec = /** @__PURE__ @class */ (function () {
20310
20400
  return InsertTextExec;
20311
20401
  }());
20312
20402
 
20313
- var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20403
+ var EmojiPickerAction = /** @class */ (function () {
20314
20404
  function EmojiPickerAction(parent) {
20315
20405
  this.parent = parent;
20316
20406
  this.addEventListener();
@@ -20374,7 +20464,7 @@ var EmojiPickerAction = /** @__PURE__ @class */ (function () {
20374
20464
  * Base export
20375
20465
  */
20376
20466
 
20377
- var FormatPainterActions = /** @__PURE__ @class */ (function () {
20467
+ var FormatPainterActions = /** @class */ (function () {
20378
20468
  function FormatPainterActions(parent, options) {
20379
20469
  this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
20380
20470
  this.parent = parent;
@@ -21017,7 +21107,7 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
21017
21107
  * @hidden
21018
21108
  * @deprecated
21019
21109
  */
21020
- var EditorManager = /** @__PURE__ @class */ (function () {
21110
+ var EditorManager = /** @class */ (function () {
21021
21111
  /**
21022
21112
  * Constructor for creating the component
21023
21113
  *
@@ -21105,12 +21195,14 @@ var EditorManager = /** @__PURE__ @class */ (function () {
21105
21195
  case 'alignments':
21106
21196
  this.observer.notify(ALIGNMENT_TYPE, {
21107
21197
  subCommand: value, event: event, callBack: callBack,
21108
- selector: selector,
21109
- value: exeValue
21198
+ selector: selector, value: exeValue, enterAction: enterAction
21110
21199
  });
21111
21200
  break;
21112
21201
  case 'indents':
21113
- 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
+ });
21114
21206
  break;
21115
21207
  case 'links':
21116
21208
  this.observer.notify(LINK, { command: command, value: value, item: exeValue, event: event, callBack: callBack });
@@ -21263,26 +21355,26 @@ var EditorManager = /** @__PURE__ @class */ (function () {
21263
21355
  return EditorManager;
21264
21356
  }());
21265
21357
 
21266
- var __extends$2 = (undefined && undefined.__extends) || (function () {
21267
- var extendStatics = function (d, b) {
21268
- extendStatics = Object.setPrototypeOf ||
21269
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21270
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21271
- return extendStatics(d, b);
21272
- };
21273
- return function (d, b) {
21274
- extendStatics(d, b);
21275
- function __() { this.constructor = d; }
21276
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21277
- };
21278
- })();
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
+ })();
21279
21371
  /**
21280
21372
  * HTML adapter
21281
21373
  *
21282
21374
  * @hidden
21283
21375
  * @deprecated
21284
21376
  */
21285
- var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21377
+ var HTMLFormatter = /** @class */ (function (_super) {
21286
21378
  __extends$2(HTMLFormatter, _super);
21287
21379
  function HTMLFormatter(options) {
21288
21380
  var _this = _super.call(this) || this;
@@ -21323,7 +21415,7 @@ var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
21323
21415
  /**
21324
21416
  * HtmlToolbarStatus module for refresh the toolbar status
21325
21417
  */
21326
- var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21418
+ var HtmlToolbarStatus = /** @class */ (function () {
21327
21419
  function HtmlToolbarStatus(parent) {
21328
21420
  this.parent = parent;
21329
21421
  this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
@@ -21370,7 +21462,7 @@ var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
21370
21462
  * @hidden
21371
21463
  * @deprecated
21372
21464
  */
21373
- var ContentRender = /** @__PURE__ @class */ (function () {
21465
+ var ContentRender = /** @class */ (function () {
21374
21466
  /**
21375
21467
  * Constructor for content renderer module
21376
21468
  *
@@ -21458,19 +21550,19 @@ var ContentRender = /** @__PURE__ @class */ (function () {
21458
21550
  return ContentRender;
21459
21551
  }());
21460
21552
 
21461
- var __extends$3 = (undefined && undefined.__extends) || (function () {
21462
- var extendStatics = function (d, b) {
21463
- extendStatics = Object.setPrototypeOf ||
21464
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21465
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21466
- return extendStatics(d, b);
21467
- };
21468
- return function (d, b) {
21469
- extendStatics(d, b);
21470
- function __() { this.constructor = d; }
21471
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21472
- };
21473
- })();
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
+ })();
21474
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>";
21475
21567
  /**
21476
21568
  * Content module is used to render Rich Text Editor content
@@ -21478,7 +21570,7 @@ var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n
21478
21570
  * @hidden
21479
21571
  * @deprecated
21480
21572
  */
21481
- var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21573
+ var IframeContentRender = /** @class */ (function (_super) {
21482
21574
  __extends$3(IframeContentRender, _super);
21483
21575
  function IframeContentRender() {
21484
21576
  return _super !== null && _super.apply(this, arguments) || this;
@@ -21551,7 +21643,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
21551
21643
  /**
21552
21644
  * XhtmlValidation module called when set enableXhtml as true
21553
21645
  */
21554
- var XhtmlValidation = /** @__PURE__ @class */ (function () {
21646
+ var XhtmlValidation = /** @class */ (function () {
21555
21647
  function XhtmlValidation(parent) {
21556
21648
  this.parent = parent;
21557
21649
  this.addEventListener();
@@ -21722,7 +21814,7 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
21722
21814
  /**
21723
21815
  * `HtmlEditor` module is used to HTML editor
21724
21816
  */
21725
- var HtmlEditor = /** @__PURE__ @class */ (function () {
21817
+ var HtmlEditor = /** @class */ (function () {
21726
21818
  function HtmlEditor(parent, serviceLocator) {
21727
21819
  this.rangeCollection = [];
21728
21820
  this.isImageDelete = false;
@@ -21991,25 +22083,54 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
21991
22083
  this.deleteCleanup(e, currentRange);
21992
22084
  }
21993
22085
  if (args.keyCode === 9 && this.parent.enableTabKey) {
22086
+ this.parent.formatter.saveData(e);
21994
22087
  if (!isNullOrUndefined(args.target) && isNullOrUndefined(closest(args.target, '.e-rte-toolbar'))) {
21995
22088
  var range = this.nodeSelectionObj.getRange(this.contentRenderer.getDocument());
21996
22089
  var parentNode = this.nodeSelectionObj.getParentNodeCollection(range);
21997
22090
  if (!((parentNode[0].nodeName === 'LI' || closest(parentNode[0], 'li') ||
21998
- closest(parentNode[0], 'table')) && range.startOffset === 0)) {
22091
+ closest(parentNode[0], 'table')))) {
21999
22092
  args.preventDefault();
22000
- if (!args.shiftKey) {
22001
- InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
22002
- 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
+ }
22003
22109
  }
22004
- else if (this.rangeCollection.length > 0 &&
22005
- this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
22006
- var textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
22007
- this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
22008
- InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
22009
- 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
+ }
22010
22130
  }
22011
22131
  }
22012
22132
  }
22133
+ this.parent.formatter.saveData(e);
22013
22134
  }
22014
22135
  if (e.args.action === 'space' ||
22015
22136
  e.args.action === 'enter' ||
@@ -22672,13 +22793,37 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
22672
22793
  HtmlEditor.prototype.getSelectedHtml = function (e) {
22673
22794
  e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString());
22674
22795
  };
22796
+ HtmlEditor.prototype.marginTabAdd = function (val, alignmentNodes) {
22797
+ for (var index = 0; index < alignmentNodes.length; index++) {
22798
+ var element = alignmentNodes[index];
22799
+ if (element.closest('li')) {
22800
+ continue;
22801
+ }
22802
+ if (element.style.marginLeft) {
22803
+ var count$$1 = parseInt(element.style.marginLeft, 10);
22804
+ if (val) {
22805
+ count$$1 -= 20;
22806
+ }
22807
+ else {
22808
+ count$$1 += 20;
22809
+ }
22810
+ element.style.marginLeft = count$$1.toString() + 'px';
22811
+ if (element.style.marginLeft === '0px') {
22812
+ element.removeAttribute('style');
22813
+ }
22814
+ }
22815
+ else if (!val) {
22816
+ element.style.marginLeft = '20px';
22817
+ }
22818
+ }
22819
+ };
22675
22820
  return HtmlEditor;
22676
22821
  }());
22677
22822
 
22678
22823
  /**
22679
22824
  * PasteCleanup module called when pasting content in RichTextEditor
22680
22825
  */
22681
- var PasteCleanup = /** @__PURE__ @class */ (function () {
22826
+ var PasteCleanup = /** @class */ (function () {
22682
22827
  function PasteCleanup(parent, serviceLocator) {
22683
22828
  this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
22684
22829
  'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
@@ -23332,7 +23477,8 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23332
23477
  clipBoardElem = this.allowedStyle(clipBoardElem);
23333
23478
  }
23334
23479
  this.saveSelection.restore();
23335
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
23480
+ var newText = clipBoardElem.innerHTML.split("&").join("&amp;");
23481
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
23336
23482
  var allImg = clipBoardElem.querySelectorAll('img');
23337
23483
  for (var i = 0; i < allImg.length; i++) {
23338
23484
  if (!isNullOrUndefined(allImg[i].getAttribute('src'))) {
@@ -23387,11 +23533,36 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23387
23533
  this.cropImageHandler(this.parent.inputElement);
23388
23534
  }
23389
23535
  };
23536
+ PasteCleanup.prototype.convertBlobToBase64 = function (element) {
23537
+ var imgElem = element.querySelectorAll('img');
23538
+ var _loop_1 = function (i) {
23539
+ if (imgElem[i].getAttribute('src') &&
23540
+ imgElem[i].getAttribute('src').startsWith("blob")) {
23541
+ var blobImageUrl = imgElem[i].getAttribute('src');
23542
+ var img_1 = new Image();
23543
+ var onImageLoadEvent_1 = function () {
23544
+ var canvas = document.createElement('canvas');
23545
+ var ctx = canvas.getContext('2d');
23546
+ canvas.width = img_1.width;
23547
+ canvas.height = img_1.height;
23548
+ ctx.drawImage(img_1, 0, 0);
23549
+ var base64String = canvas.toDataURL('image/png');
23550
+ imgElem[i].src = base64String;
23551
+ img_1.removeEventListener('load', onImageLoadEvent_1);
23552
+ };
23553
+ img_1.src = blobImageUrl;
23554
+ img_1.addEventListener('load', onImageLoadEvent_1);
23555
+ }
23556
+ };
23557
+ for (var i = 0; i < imgElem.length; i++) {
23558
+ _loop_1(i);
23559
+ }
23560
+ };
23390
23561
  PasteCleanup.prototype.cropImageHandler = function (element) {
23391
23562
  var _this = this;
23392
23563
  var allImgElm = element.querySelectorAll('.e-img-cropped');
23393
23564
  if (allImgElm.length > 0) {
23394
- var _loop_1 = function (i) {
23565
+ var _loop_2 = function (i) {
23395
23566
  if (allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
23396
23567
  var image_1 = new Image();
23397
23568
  image_1.src = allImgElm[i].getAttribute('src');
@@ -23425,13 +23596,24 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23425
23596
  }
23426
23597
  };
23427
23598
  for (var i = 0; i < allImgElm.length; i++) {
23428
- _loop_1(i);
23599
+ _loop_2(i);
23429
23600
  }
23430
23601
  }
23431
23602
  else {
23432
- this.imgUploading(this.parent.inputElement);
23433
- if (this.parent.iframeSettings.enable) {
23434
- this.parent.updateValue();
23603
+ if (!isNullOrUndefined(this.parent.insertImageSettings.saveUrl) && !isNullOrUndefined(this.parent.insertImageSettings.path) && !isNullOrUndefined(this.parent.inputElement.querySelectorAll("img")) && this.parent.inputElement.querySelectorAll("img")[0].src.startsWith("blob")) {
23604
+ this.convertBlobToBase64(this.parent.inputElement);
23605
+ setTimeout(function () {
23606
+ _this.imgUploading(_this.parent.inputElement);
23607
+ if (_this.parent.iframeSettings.enable) {
23608
+ _this.parent.updateValue();
23609
+ }
23610
+ }, 20);
23611
+ }
23612
+ else {
23613
+ this.imgUploading(this.parent.inputElement);
23614
+ if (this.parent.iframeSettings.enable) {
23615
+ this.parent.updateValue();
23616
+ }
23435
23617
  }
23436
23618
  }
23437
23619
  };
@@ -23814,7 +23996,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
23814
23996
  /**
23815
23997
  * `Resize` module is used to resize the editor
23816
23998
  */
23817
- var Resize = /** @__PURE__ @class */ (function () {
23999
+ var Resize = /** @class */ (function () {
23818
24000
  function Resize(parent) {
23819
24001
  this.parent = parent;
23820
24002
  this.addEventListener();
@@ -23948,7 +24130,7 @@ var Resize = /** @__PURE__ @class */ (function () {
23948
24130
  /**
23949
24131
  * `FileManager` module is used to display the directories and images inside the editor.
23950
24132
  */
23951
- var FileManager$1 = /** @__PURE__ @class */ (function () {
24133
+ var FileManager$1 = /** @class */ (function () {
23952
24134
  function FileManager$$1(parent, locator) {
23953
24135
  FileManager.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$1);
23954
24136
  this.parent = parent;
@@ -24198,7 +24380,7 @@ var FileManager$1 = /** @__PURE__ @class */ (function () {
24198
24380
  /**
24199
24381
  * `FullScreen` module is used to maximize and minimize screen
24200
24382
  */
24201
- var FullScreen = /** @__PURE__ @class */ (function () {
24383
+ var FullScreen = /** @class */ (function () {
24202
24384
  function FullScreen(parent) {
24203
24385
  this.parent = parent;
24204
24386
  this.addEventListener();
@@ -24217,9 +24399,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24217
24399
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24218
24400
  this.parent.quickToolbarModule.hideQuickToolbars();
24219
24401
  }
24220
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24221
- this.parent.notify(destroyTooltip, { args: event });
24222
- }
24223
24402
  this.scrollableParent = getScrollableParent(this.parent.element);
24224
24403
  if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24225
24404
  var evenArgs = {
@@ -24272,9 +24451,6 @@ var FullScreen = /** @__PURE__ @class */ (function () {
24272
24451
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24273
24452
  this.parent.quickToolbarModule.hideQuickToolbars();
24274
24453
  }
24275
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24276
- this.parent.notify(destroyTooltip, { args: event });
24277
- }
24278
24454
  if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24279
24455
  var evenArgs = {
24280
24456
  cancel: false,
@@ -24429,7 +24605,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
24429
24605
  }
24430
24606
  }
24431
24607
 
24432
- var FormatPainter = /** @__PURE__ @class */ (function () {
24608
+ var FormatPainter = /** @class */ (function () {
24433
24609
  function FormatPainter(parent) {
24434
24610
  this.isSticky = false;
24435
24611
  this.isActive = false;
@@ -24587,7 +24763,7 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
24587
24763
  return FormatPainter;
24588
24764
  }());
24589
24765
 
24590
- var EmojiPicker = /** @__PURE__ @class */ (function () {
24766
+ var EmojiPicker = /** @class */ (function () {
24591
24767
  function EmojiPicker(parent, serviceLocator) {
24592
24768
  this.parent = parent;
24593
24769
  this.locator = serviceLocator;
@@ -25404,7 +25580,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
25404
25580
  * @hidden
25405
25581
  * @deprecated
25406
25582
  */
25407
- var Render = /** @__PURE__ @class */ (function () {
25583
+ var Render = /** @class */ (function () {
25408
25584
  /**
25409
25585
  * Constructor for render module
25410
25586
  *
@@ -25503,7 +25679,7 @@ var Render = /** @__PURE__ @class */ (function () {
25503
25679
  /**
25504
25680
  * `Link` module is used to handle undo actions.
25505
25681
  */
25506
- var Link = /** @__PURE__ @class */ (function () {
25682
+ var Link = /** @class */ (function () {
25507
25683
  function Link(parent, serviceLocator) {
25508
25684
  this.parent = parent;
25509
25685
  this.rteID = parent.element.id;
@@ -26075,7 +26251,7 @@ var Link = /** @__PURE__ @class */ (function () {
26075
26251
  /**
26076
26252
  * `Image` module is used to handle image actions.
26077
26253
  */
26078
- var Image$1 = /** @__PURE__ @class */ (function () {
26254
+ var Image$1 = /** @class */ (function () {
26079
26255
  function Image(parent, serviceLocator) {
26080
26256
  this.isImgUploaded = false;
26081
26257
  this.isAllowedTypes = true;
@@ -26687,13 +26863,13 @@ var Image$1 = /** @__PURE__ @class */ (function () {
26687
26863
  selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
26688
26864
  if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
26689
26865
  (!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
26690
- var prev = selectParentEle[0].parentElement.childNodes[0];
26691
26866
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
26692
26867
  this.removeResizeEle();
26693
26868
  }
26694
- this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), prev, prev, prev.textContent.length, prev.textContent.length);
26695
26869
  removeClass([selectParentEle[0]], 'e-img-focus');
26696
- this.quickToolObj.imageQTBar.hidePopup();
26870
+ if (this.quickToolObj && this.quickToolObj.imageQTBar) {
26871
+ this.quickToolObj.imageQTBar.hidePopup();
26872
+ }
26697
26873
  }
26698
26874
  }
26699
26875
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
@@ -27459,7 +27635,12 @@ var Image$1 = /** @__PURE__ @class */ (function () {
27459
27635
  animationSettings: { effect: 'None' },
27460
27636
  close: function (event) {
27461
27637
  if (_this.isImgUploaded) {
27462
- _this.uploadObj.remove();
27638
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
27639
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
27640
+ }
27641
+ else {
27642
+ _this.uploadObj.remove();
27643
+ }
27463
27644
  }
27464
27645
  _this.parent.isBlur = false;
27465
27646
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -28406,7 +28587,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
28406
28587
  /**
28407
28588
  * `Audio` module is used to handle audio actions.
28408
28589
  */
28409
- var Audio = /** @__PURE__ @class */ (function () {
28590
+ var Audio = /** @class */ (function () {
28410
28591
  function Audio(parent, serviceLocator) {
28411
28592
  this.isAudioUploaded = false;
28412
28593
  this.isAllowedTypes = true;
@@ -28979,7 +29160,12 @@ var Audio = /** @__PURE__ @class */ (function () {
28979
29160
  animationSettings: { effect: 'None' },
28980
29161
  close: function (event) {
28981
29162
  if (_this.isAudioUploaded) {
28982
- _this.uploadObj.removing();
29163
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
29164
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
29165
+ }
29166
+ else {
29167
+ _this.uploadObj.remove();
29168
+ }
28983
29169
  }
28984
29170
  _this.parent.isBlur = false;
28985
29171
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -29265,7 +29451,7 @@ var Audio = /** @__PURE__ @class */ (function () {
29265
29451
  return Audio;
29266
29452
  }());
29267
29453
 
29268
- var Video = /** @__PURE__ @class */ (function () {
29454
+ var Video = /** @class */ (function () {
29269
29455
  function Video(parent, serviceLocator) {
29270
29456
  this.isVideoUploaded = false;
29271
29457
  this.isAllowedTypes = true;
@@ -30339,7 +30525,12 @@ var Video = /** @__PURE__ @class */ (function () {
30339
30525
  animationSettings: { effect: 'None' },
30340
30526
  close: function (event) {
30341
30527
  if (_this.isVideoUploaded) {
30342
- _this.uploadObj.removing();
30528
+ if (_this.dialogObj.element.querySelector('.e-file-abort-btn')) {
30529
+ _this.dialogObj.element.querySelector('.e-file-abort-btn').click();
30530
+ }
30531
+ else {
30532
+ _this.uploadObj.remove();
30533
+ }
30343
30534
  }
30344
30535
  _this.parent.isBlur = false;
30345
30536
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -30716,7 +30907,7 @@ var Video = /** @__PURE__ @class */ (function () {
30716
30907
  * @hidden
30717
30908
  * @deprecated
30718
30909
  */
30719
- var ViewSource = /** @__PURE__ @class */ (function () {
30910
+ var ViewSource = /** @class */ (function () {
30720
30911
  /**
30721
30912
  * Constructor for view source module
30722
30913
  *
@@ -30996,7 +31187,7 @@ var ViewSource = /** @__PURE__ @class */ (function () {
30996
31187
  /**
30997
31188
  * `Table` module is used to handle table actions.
30998
31189
  */
30999
- var Table = /** @__PURE__ @class */ (function () {
31190
+ var Table = /** @class */ (function () {
31000
31191
  function Table(parent, serviceLocator) {
31001
31192
  this.ensureInsideTableList = true;
31002
31193
  this.pageX = null;
@@ -32579,7 +32770,8 @@ var Table = /** @__PURE__ @class */ (function () {
32579
32770
  var argument = ((Browser.isDevice || (!isNullOrUndefined(args.args)
32580
32771
  && !isNullOrUndefined(args.args.originalEvent) &&
32581
32772
  args.args.originalEvent.action === 'insert-table')
32582
- || proxy.parent.inlineMode.enable || !isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) ? args :
32773
+ || proxy.parent.inlineMode.enable || ((!isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) &&
32774
+ !(args instanceof PointerEvent))) ? args :
32583
32775
  this);
32584
32776
  proxy.tableInsert(proxy.rowTextBox.value, proxy.columnTextBox.value, e, argument);
32585
32777
  }
@@ -32714,7 +32906,7 @@ var Table = /** @__PURE__ @class */ (function () {
32714
32906
  /**
32715
32907
  * Dialog Renderer
32716
32908
  */
32717
- var DialogRenderer = /** @__PURE__ @class */ (function () {
32909
+ var DialogRenderer = /** @class */ (function () {
32718
32910
  function DialogRenderer(parent) {
32719
32911
  this.parent = parent;
32720
32912
  this.addEventListener();
@@ -33031,29 +33223,29 @@ var executeGroup = {
33031
33223
  }
33032
33224
  };
33033
33225
 
33034
- var __extends$5 = (undefined && undefined.__extends) || (function () {
33035
- var extendStatics = function (d, b) {
33036
- extendStatics = Object.setPrototypeOf ||
33037
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33038
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33039
- return extendStatics(d, b);
33040
- };
33041
- return function (d, b) {
33042
- extendStatics(d, b);
33043
- function __() { this.constructor = d; }
33044
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33045
- };
33046
- })();
33047
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33048
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33049
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33050
- 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;
33051
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33052
- };
33226
+ var __extends$5 = (undefined && undefined.__extends) || (function () {
33227
+ var extendStatics = function (d, b) {
33228
+ extendStatics = Object.setPrototypeOf ||
33229
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33230
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33231
+ return extendStatics(d, b);
33232
+ };
33233
+ return function (d, b) {
33234
+ extendStatics(d, b);
33235
+ function __() { this.constructor = d; }
33236
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33237
+ };
33238
+ })();
33239
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33240
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33241
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33242
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33243
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33244
+ };
33053
33245
  /**
33054
33246
  * Configures the toolbar settings of the RichTextEditor.
33055
33247
  */
33056
- var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
33248
+ var ToolbarSettings$1 = /** @class */ (function (_super) {
33057
33249
  __extends$5(ToolbarSettings$$1, _super);
33058
33250
  function ToolbarSettings$$1() {
33059
33251
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33078,7 +33270,7 @@ var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
33078
33270
  /**
33079
33271
  * Configures the image settings of the RichTextEditor.
33080
33272
  */
33081
- var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33273
+ var ImageSettings = /** @class */ (function (_super) {
33082
33274
  __extends$5(ImageSettings, _super);
33083
33275
  function ImageSettings() {
33084
33276
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33130,7 +33322,7 @@ var ImageSettings = /** @__PURE__ @class */ (function (_super) {
33130
33322
  /**
33131
33323
  * Configures the audio settings of the RichTextEditor.
33132
33324
  */
33133
- var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33325
+ var AudioSettings = /** @class */ (function (_super) {
33134
33326
  __extends$5(AudioSettings, _super);
33135
33327
  function AudioSettings() {
33136
33328
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33158,7 +33350,7 @@ var AudioSettings = /** @__PURE__ @class */ (function (_super) {
33158
33350
  /**
33159
33351
  * Configures the video settings of the RichTextEditor.
33160
33352
  */
33161
- var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33353
+ var VideoSettings = /** @class */ (function (_super) {
33162
33354
  __extends$5(VideoSettings, _super);
33163
33355
  function VideoSettings() {
33164
33356
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33210,7 +33402,7 @@ var VideoSettings = /** @__PURE__ @class */ (function (_super) {
33210
33402
  /**
33211
33403
  * Configures the file manager settings of the RichTextEditor.
33212
33404
  */
33213
- var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33405
+ var FileManagerSettings = /** @class */ (function (_super) {
33214
33406
  __extends$5(FileManagerSettings, _super);
33215
33407
  function FileManagerSettings() {
33216
33408
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33271,7 +33463,7 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
33271
33463
  ], FileManagerSettings.prototype, "view", void 0);
33272
33464
  return FileManagerSettings;
33273
33465
  }(ChildProperty));
33274
- var TableSettings = /** @__PURE__ @class */ (function (_super) {
33466
+ var TableSettings = /** @class */ (function (_super) {
33275
33467
  __extends$5(TableSettings, _super);
33276
33468
  function TableSettings() {
33277
33469
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33296,7 +33488,7 @@ var TableSettings = /** @__PURE__ @class */ (function (_super) {
33296
33488
  /**
33297
33489
  * Configures the quick toolbar settings of the RichTextEditor.
33298
33490
  */
33299
- var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33491
+ var QuickToolbarSettings = /** @class */ (function (_super) {
33300
33492
  __extends$5(QuickToolbarSettings, _super);
33301
33493
  function QuickToolbarSettings() {
33302
33494
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33333,7 +33525,7 @@ var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
33333
33525
  /**
33334
33526
  * Configure the format painter settings of the Rich Text Editor.
33335
33527
  */
33336
- var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33528
+ var FormatPainterSettings = /** @class */ (function (_super) {
33337
33529
  __extends$5(FormatPainterSettings, _super);
33338
33530
  function FormatPainterSettings() {
33339
33531
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33349,7 +33541,7 @@ var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
33349
33541
  /**
33350
33542
  * Specifies the emoji picker options in Rich Text Editor with the following properties.
33351
33543
  */
33352
- var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33544
+ var EmojiSettings = /** @class */ (function (_super) {
33353
33545
  __extends$5(EmojiSettings, _super);
33354
33546
  function EmojiSettings() {
33355
33547
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33365,7 +33557,7 @@ var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
33365
33557
  /**
33366
33558
  * Configures the Paste Cleanup settings of the RichTextEditor.
33367
33559
  */
33368
- var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33560
+ var PasteCleanupSettings = /** @class */ (function (_super) {
33369
33561
  __extends$5(PasteCleanupSettings, _super);
33370
33562
  function PasteCleanupSettings() {
33371
33563
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33393,7 +33585,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
33393
33585
  /**
33394
33586
  * Configures the font family settings of the RichTextEditor.
33395
33587
  */
33396
- var FontFamily = /** @__PURE__ @class */ (function (_super) {
33588
+ var FontFamily = /** @class */ (function (_super) {
33397
33589
  __extends$5(FontFamily, _super);
33398
33590
  function FontFamily() {
33399
33591
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33412,7 +33604,7 @@ var FontFamily = /** @__PURE__ @class */ (function (_super) {
33412
33604
  /**
33413
33605
  * Configures the font size settings of the RichTextEditor.
33414
33606
  */
33415
- var FontSize = /** @__PURE__ @class */ (function (_super) {
33607
+ var FontSize = /** @class */ (function (_super) {
33416
33608
  __extends$5(FontSize, _super);
33417
33609
  function FontSize() {
33418
33610
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33431,7 +33623,7 @@ var FontSize = /** @__PURE__ @class */ (function (_super) {
33431
33623
  /**
33432
33624
  * Configures the format settings of the RichTextEditor.
33433
33625
  */
33434
- var Format = /** @__PURE__ @class */ (function (_super) {
33626
+ var Format = /** @class */ (function (_super) {
33435
33627
  __extends$5(Format, _super);
33436
33628
  function Format() {
33437
33629
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33450,7 +33642,7 @@ var Format = /** @__PURE__ @class */ (function (_super) {
33450
33642
  /**
33451
33643
  * Configures the font Color settings of the RichTextEditor.
33452
33644
  */
33453
- var FontColor = /** @__PURE__ @class */ (function (_super) {
33645
+ var FontColor = /** @class */ (function (_super) {
33454
33646
  __extends$5(FontColor, _super);
33455
33647
  function FontColor() {
33456
33648
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33475,7 +33667,7 @@ var FontColor = /** @__PURE__ @class */ (function (_super) {
33475
33667
  /**
33476
33668
  * Configures the background Color settings of the RichTextEditor.
33477
33669
  */
33478
- var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33670
+ var BackgroundColor = /** @class */ (function (_super) {
33479
33671
  __extends$5(BackgroundColor, _super);
33480
33672
  function BackgroundColor() {
33481
33673
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33500,7 +33692,7 @@ var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
33500
33692
  /**
33501
33693
  * Configures the numberFormatList settings of the RichTextEditor.
33502
33694
  */
33503
- var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33695
+ var NumberFormatList = /** @class */ (function (_super) {
33504
33696
  __extends$5(NumberFormatList, _super);
33505
33697
  function NumberFormatList() {
33506
33698
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33513,7 +33705,7 @@ var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
33513
33705
  /**
33514
33706
  * Configures the bulletFormatList settings of the RichTextEditor.
33515
33707
  */
33516
- var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33708
+ var BulletFormatList = /** @class */ (function (_super) {
33517
33709
  __extends$5(BulletFormatList, _super);
33518
33710
  function BulletFormatList() {
33519
33711
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33524,29 +33716,29 @@ var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
33524
33716
  return BulletFormatList;
33525
33717
  }(ChildProperty));
33526
33718
 
33527
- var __extends$6 = (undefined && undefined.__extends) || (function () {
33528
- var extendStatics = function (d, b) {
33529
- extendStatics = Object.setPrototypeOf ||
33530
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33531
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33532
- return extendStatics(d, b);
33533
- };
33534
- return function (d, b) {
33535
- extendStatics(d, b);
33536
- function __() { this.constructor = d; }
33537
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33538
- };
33539
- })();
33540
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33541
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33542
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33543
- 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;
33544
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33545
- };
33719
+ var __extends$6 = (undefined && undefined.__extends) || (function () {
33720
+ var extendStatics = function (d, b) {
33721
+ extendStatics = Object.setPrototypeOf ||
33722
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33723
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33724
+ return extendStatics(d, b);
33725
+ };
33726
+ return function (d, b) {
33727
+ extendStatics(d, b);
33728
+ function __() { this.constructor = d; }
33729
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33730
+ };
33731
+ })();
33732
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33733
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33734
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33735
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33736
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33737
+ };
33546
33738
  /**
33547
33739
  * Objects used for configuring the iframe resources properties.
33548
33740
  */
33549
- var Resources = /** @__PURE__ @class */ (function (_super) {
33741
+ var Resources = /** @class */ (function (_super) {
33550
33742
  __extends$6(Resources, _super);
33551
33743
  function Resources() {
33552
33744
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33562,7 +33754,7 @@ var Resources = /** @__PURE__ @class */ (function (_super) {
33562
33754
  /**
33563
33755
  * Configures the iframe settings of the RTE.
33564
33756
  */
33565
- var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33757
+ var IFrameSettings = /** @class */ (function (_super) {
33566
33758
  __extends$6(IFrameSettings, _super);
33567
33759
  function IFrameSettings() {
33568
33760
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33579,29 +33771,29 @@ var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
33579
33771
  return IFrameSettings;
33580
33772
  }(ChildProperty));
33581
33773
 
33582
- var __extends$7 = (undefined && undefined.__extends) || (function () {
33583
- var extendStatics = function (d, b) {
33584
- extendStatics = Object.setPrototypeOf ||
33585
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33586
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33587
- return extendStatics(d, b);
33588
- };
33589
- return function (d, b) {
33590
- extendStatics(d, b);
33591
- function __() { this.constructor = d; }
33592
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33593
- };
33594
- })();
33595
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33596
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33597
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33598
- 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;
33599
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33600
- };
33774
+ var __extends$7 = (undefined && undefined.__extends) || (function () {
33775
+ var extendStatics = function (d, b) {
33776
+ extendStatics = Object.setPrototypeOf ||
33777
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33778
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33779
+ return extendStatics(d, b);
33780
+ };
33781
+ return function (d, b) {
33782
+ extendStatics(d, b);
33783
+ function __() { this.constructor = d; }
33784
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33785
+ };
33786
+ })();
33787
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33788
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33789
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33790
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33791
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33792
+ };
33601
33793
  /**
33602
33794
  * Configures the inlineMode property of the RTE.
33603
33795
  */
33604
- var InlineMode = /** @__PURE__ @class */ (function (_super) {
33796
+ var InlineMode = /** @class */ (function (_super) {
33605
33797
  __extends$7(InlineMode, _super);
33606
33798
  function InlineMode() {
33607
33799
  return _super !== null && _super.apply(this, arguments) || this;
@@ -33618,7 +33810,7 @@ var InlineMode = /** @__PURE__ @class */ (function (_super) {
33618
33810
  /**
33619
33811
  * `EnterKey` module is used to handle enter key press actions.
33620
33812
  */
33621
- var EnterKeyAction = /** @__PURE__ @class */ (function () {
33813
+ var EnterKeyAction = /** @class */ (function () {
33622
33814
  function EnterKeyAction(parent) {
33623
33815
  this.parent = parent;
33624
33816
  this.addEventListener();
@@ -33654,16 +33846,18 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
33654
33846
  this.getRangeNode();
33655
33847
  var isTableEnter = true;
33656
33848
  this.formatTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'];
33657
- var isCursorAtTableEnd = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
33658
- this.range.startContainer.isContentEditable &&
33659
- this.range.startContainer.childNodes[this.range.startOffset - 1] &&
33660
- this.range.startContainer.childNodes[this.range.startOffset - 1].nodeName === 'TABLE';
33661
- var isCursorAtTableStart = this.range.collapsed && (this.range.startContainer.nodeType === 1) &&
33662
- this.range.startContainer.isContentEditable && this.range.startContainer.childNodes[this.range.startOffset] &&
33663
- this.range.startContainer.childNodes[this.range.startOffset].nodeName === 'TABLE';
33664
- if (isCursorAtTableEnd || isCursorAtTableStart) {
33665
- this.handleCursorAtTableSide(e, isCursorAtTableStart, isCursorAtTableEnd);
33666
- return;
33849
+ var tableImagCursor = this.processedTableImageCursor();
33850
+ if (tableImagCursor.start || tableImagCursor.end) {
33851
+ if (tableImagCursor.startName === 'TABLE' || tableImagCursor.endName === 'TABLE') { // Default browser action prevented and hanled manually.
33852
+ this.handleCursorAtTableSide(e, tableImagCursor.start, tableImagCursor.end);
33853
+ return;
33854
+ }
33855
+ }
33856
+ if (tableImagCursor.start || tableImagCursor.end || this.range.startContainer.nodeName === 'IMG') {
33857
+ if (this.parent.enterKey === 'BR' && (tableImagCursor.startName === 'IMG' || tableImagCursor.endName === 'IMG' || this.range.startContainer.nodeName === 'IMG')) { // Default browser action prevented and hanled manually.
33858
+ this.handleEnterKeyAtImageSide(e, tableImagCursor.start, tableImagCursor.end);
33859
+ return;
33860
+ }
33667
33861
  }
33668
33862
  if (!isNullOrUndefined(this.startNode.closest('TABLE')) && !isNullOrUndefined(this.endNode.closest('TABLE'))) {
33669
33863
  isTableEnter = false;
@@ -34031,7 +34225,6 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34031
34225
  var outerBRElem = _this.parent.createElement('br');
34032
34226
  if (_this.range.startOffset === 0 && _this.range.endOffset === 0 &&
34033
34227
  !isNullOrUndefined(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR' && currentParent.nodeName !== 'P' && currentParent.nodeName !== 'DIV') {
34034
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
34035
34228
  newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, false).cloneNode(true);
34036
34229
  _this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
34037
34230
  _this.insertFocusContent();
@@ -34061,7 +34254,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34061
34254
  }
34062
34255
  e.args.preventDefault();
34063
34256
  }
34064
- _this.parent.trigger(actionComplete, { requestType: shiftKey_1 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34257
+ _this.triggerActionComplete(e, shiftKey_1);
34065
34258
  }
34066
34259
  });
34067
34260
  }
@@ -34131,6 +34324,9 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34131
34324
  }
34132
34325
  return insertElem;
34133
34326
  };
34327
+ EnterKeyAction.prototype.triggerActionComplete = function (e, shiftKey) {
34328
+ this.parent.trigger(actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34329
+ };
34134
34330
  EnterKeyAction.prototype.handleCursorAtTableSide = function (e, isStart, isEnd) {
34135
34331
  var _this = this;
34136
34332
  if (this.parent.enterKey !== 'BR') {
@@ -34161,44 +34357,125 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
34161
34357
  }
34162
34358
  _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement, 0);
34163
34359
  e.args.preventDefault();
34164
- _this.parent.trigger(actionComplete, { requestType: shiftKey_2 ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34360
+ _this.triggerActionComplete(e, shiftKey_2);
34165
34361
  }
34166
34362
  });
34167
34363
  }
34168
34364
  };
34365
+ EnterKeyAction.prototype.handleEnterKeyAtImageSide = function (e, isStart, isEnd) {
34366
+ var _this = this;
34367
+ var actionBeginArgs = {
34368
+ cancel: false,
34369
+ name: actionBegin,
34370
+ requestType: e.args.shiftKey ? 'ShiftEnterAction' : 'EnterAction',
34371
+ originalEvent: e.args
34372
+ };
34373
+ var directRange = false;
34374
+ if (this.range.startContainer.nodeName === 'IMG' && this.range.startOffset === 0) {
34375
+ directRange = true;
34376
+ }
34377
+ this.parent.trigger(actionBegin, actionBeginArgs, function (actionBeginArgs) {
34378
+ if (!actionBeginArgs.cancel) {
34379
+ if (_this.parent.enterKey === 'BR') {
34380
+ var newElement = _this.parent.createElement('BR');
34381
+ var imageElement = void 0;
34382
+ if (directRange) {
34383
+ imageElement = _this.range.startContainer;
34384
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34385
+ _this.parent.formatter.editorManager.nodeSelection.
34386
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34387
+ }
34388
+ if (isStart) {
34389
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset];
34390
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34391
+ _this.parent.formatter.editorManager.nodeSelection.
34392
+ setCursorPoint(_this.parent.contentModule.getDocument(), imageElement, 0);
34393
+ }
34394
+ if (isEnd) {
34395
+ imageElement = _this.range.startContainer.childNodes[_this.range.startOffset - 1];
34396
+ if (!isNullOrUndefined(imageElement.nextSibling)) {
34397
+ imageElement.parentElement.insertBefore(newElement, imageElement.nextSibling);
34398
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement.nextSibling, 0);
34399
+ }
34400
+ else if (isNullOrUndefined(imageElement.nextSibling)) {
34401
+ imageElement.parentElement.appendChild(newElement);
34402
+ var brElement = _this.parent.createElement('BR');
34403
+ imageElement.parentElement.appendChild(brElement);
34404
+ _this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), brElement, 0);
34405
+ }
34406
+ }
34407
+ e.args.preventDefault();
34408
+ _this.triggerActionComplete(e, e.args.shiftKey);
34409
+ }
34410
+ }
34411
+ });
34412
+ };
34413
+ EnterKeyAction.prototype.isTableOrImageStart = function () {
34414
+ var customHandlerElements = ['IMG', 'TABLE'];
34415
+ var startContainer = this.range.startContainer;
34416
+ var startOffset = this.range.startOffset;
34417
+ var isCursorAtStart = this.range.collapsed && (startContainer.nodeType === 1) &&
34418
+ startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
34419
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
34420
+ if (isCursorAtStart) {
34421
+ return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
34422
+ }
34423
+ else {
34424
+ return { start: false, startNodeName: '' };
34425
+ }
34426
+ };
34427
+ EnterKeyAction.prototype.isTableOrImageEnd = function () {
34428
+ var customHandlerElements = ['IMG', 'TABLE'];
34429
+ var startContainer = this.range.startContainer;
34430
+ var startOffset = this.range.startOffset;
34431
+ var isCursorAtEnd = this.range.collapsed && (startContainer.nodeType === 1) &&
34432
+ startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
34433
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
34434
+ if (isCursorAtEnd) {
34435
+ return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
34436
+ }
34437
+ else {
34438
+ return { end: false, endNodeName: '' };
34439
+ }
34440
+ };
34441
+ EnterKeyAction.prototype.processedTableImageCursor = function () {
34442
+ var _a = this.isTableOrImageStart(), start = _a.start, startNodeName = _a.startNodeName;
34443
+ var _b = this.isTableOrImageEnd(), end = _b.end, endNodeName = _b.endNodeName;
34444
+ return { start: start, startName: startNodeName, end: end, endName: endNodeName };
34445
+ };
34169
34446
  return EnterKeyAction;
34170
34447
  }());
34171
34448
 
34172
- var __extends$4 = (undefined && undefined.__extends) || (function () {
34173
- var extendStatics = function (d, b) {
34174
- extendStatics = Object.setPrototypeOf ||
34175
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34176
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34177
- return extendStatics(d, b);
34178
- };
34179
- return function (d, b) {
34180
- extendStatics(d, b);
34181
- function __() { this.constructor = d; }
34182
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34183
- };
34184
- })();
34185
- var __assign = (undefined && undefined.__assign) || function () {
34186
- __assign = Object.assign || function(t) {
34187
- for (var s, i = 1, n = arguments.length; i < n; i++) {
34188
- s = arguments[i];
34189
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34190
- t[p] = s[p];
34191
- }
34192
- return t;
34193
- };
34194
- return __assign.apply(this, arguments);
34195
- };
34196
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34197
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34198
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34199
- 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;
34200
- return c > 3 && r && Object.defineProperty(target, key, r), r;
34201
- };
34449
+ var __extends$4 = (undefined && undefined.__extends) || (function () {
34450
+ var extendStatics = function (d, b) {
34451
+ extendStatics = Object.setPrototypeOf ||
34452
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34453
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
34454
+ return extendStatics(d, b);
34455
+ };
34456
+ return function (d, b) {
34457
+ extendStatics(d, b);
34458
+ function __() { this.constructor = d; }
34459
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34460
+ };
34461
+ })();
34462
+ var __assign = (undefined && undefined.__assign) || function () {
34463
+ __assign = Object.assign || function(t) {
34464
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
34465
+ s = arguments[i];
34466
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
34467
+ t[p] = s[p];
34468
+ }
34469
+ return t;
34470
+ };
34471
+ return __assign.apply(this, arguments);
34472
+ };
34473
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34474
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34475
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34476
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34477
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
34478
+ };
34202
34479
  /**
34203
34480
  * Represents the Rich Text Editor component.
34204
34481
  * ```html
@@ -34209,7 +34486,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
34209
34486
  * </script>
34210
34487
  * ```
34211
34488
  */
34212
- var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34489
+ var RichTextEditor = /** @class */ (function (_super) {
34213
34490
  __extends$4(RichTextEditor, _super);
34214
34491
  function RichTextEditor(options, element) {
34215
34492
  var _this = _super.call(this, options, element) || this;
@@ -34338,6 +34615,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
34338
34615
  this.persistData();
34339
34616
  setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
34340
34617
  attributes(this.element, { role: 'application', 'aria-label': 'Rich Text Editor' });
34618
+ this.beforeRenderClassValue = this.element.getAttribute('class');
34341
34619
  };
34342
34620
  RichTextEditor.prototype.persistData = function () {
34343
34621
  if (this.enablePersistence && this.originalElement.tagName === 'TEXTAREA') {
@@ -35210,6 +35488,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35210
35488
  if (this.isDestroyed || !this.isRendered) {
35211
35489
  return;
35212
35490
  }
35491
+ this.element.className = this.beforeRenderClassValue;
35492
+ this.removeHtmlAttributes();
35493
+ this.removeAttributes();
35494
+ this.beforeRenderClassValue = null;
35213
35495
  if (!isNullOrUndefined(this.timeInterval)) {
35214
35496
  clearInterval(this.timeInterval);
35215
35497
  this.timeInterval = null;
@@ -35277,8 +35559,6 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35277
35559
  }
35278
35560
  }
35279
35561
  }
35280
- this.removeHtmlAttributes();
35281
- this.removeAttributes();
35282
35562
  _super.prototype.destroy.call(this);
35283
35563
  this.isRendered = false;
35284
35564
  };
@@ -35309,6 +35589,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35309
35589
  this.element.removeAttribute('aria-disabled');
35310
35590
  this.element.removeAttribute('role');
35311
35591
  this.element.removeAttribute('tabindex');
35592
+ this.element.removeAttribute('aria-label');
35312
35593
  };
35313
35594
  RichTextEditor.prototype.destroyDependentModules = function () {
35314
35595
  /* destroy dependent modules */
@@ -35563,7 +35844,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35563
35844
  }
35564
35845
  };
35565
35846
  RichTextEditor.prototype.updatePanelValue = function () {
35566
- var value = this.value;
35847
+ var value = this.listOrderCorrection(this.value);
35567
35848
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
35568
35849
  var getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
35569
35850
  if (value) {
@@ -35607,6 +35888,17 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
35607
35888
  this.countModule.refresh();
35608
35889
  }
35609
35890
  };
35891
+ RichTextEditor.prototype.listOrderCorrection = function (value) {
35892
+ var valueElementWrapper = this.createElement('div');
35893
+ valueElementWrapper.innerHTML = value;
35894
+ var listElements = valueElementWrapper.querySelectorAll('UL, OL');
35895
+ for (var i = 0; i < listElements.length; i++) {
35896
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
35897
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
35898
+ }
35899
+ }
35900
+ return valueElementWrapper.innerHTML;
35901
+ };
35610
35902
  RichTextEditor.prototype.setHeight = function (height) {
35611
35903
  if (height !== 'auto') {
35612
35904
  this.element.style.height = formatUnit(height);