@syncfusion/ej2-richtexteditor 25.1.39 → 25.1.41-85815

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/.eslintrc.json +259 -259
  2. package/CHANGELOG.md +2067 -1961
  3. package/README.md +76 -76
  4. package/dist/ej2-richtexteditor.umd.min.js +1 -10
  5. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-richtexteditor.es2015.js +806 -311
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +909 -410
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/ej2-richtexteditor-component.sln +30 -0
  11. package/helpers/e2e/index.js +3 -3
  12. package/helpers/e2e/rte-helper.js +13 -13
  13. package/license +9 -9
  14. package/package.json +74 -74
  15. package/src/common/interface.d.ts +22 -8
  16. package/src/common/util.d.ts +8 -0
  17. package/src/common/util.js +56 -1
  18. package/src/editor-manager/base/classes.d.ts +1 -1
  19. package/src/editor-manager/base/classes.js +1 -1
  20. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  21. package/src/editor-manager/base/editor-manager.js +8 -6
  22. package/src/editor-manager/base/enum.d.ts +2 -2
  23. package/src/editor-manager/base/interface.d.ts +9 -9
  24. package/src/editor-manager/base/types.d.ts +1 -1
  25. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  26. package/src/editor-manager/plugin/alignments.js +5 -2
  27. package/src/editor-manager/plugin/audio.d.ts +3 -3
  28. package/src/editor-manager/plugin/audio.js +4 -4
  29. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  30. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  31. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  32. package/src/editor-manager/plugin/clearformat.js +1 -1
  33. package/src/editor-manager/plugin/dom-node.d.ts +54 -34
  34. package/src/editor-manager/plugin/dom-node.js +139 -36
  35. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  36. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  37. package/src/editor-manager/plugin/formats.d.ts +2 -2
  38. package/src/editor-manager/plugin/formats.js +8 -2
  39. package/src/editor-manager/plugin/image.d.ts +3 -3
  40. package/src/editor-manager/plugin/image.js +3 -3
  41. package/src/editor-manager/plugin/indents.d.ts +2 -2
  42. package/src/editor-manager/plugin/indents.js +5 -2
  43. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  44. package/src/editor-manager/plugin/insert-methods.js +4 -4
  45. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  46. package/src/editor-manager/plugin/insert-text.js +2 -2
  47. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  48. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  49. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  50. package/src/editor-manager/plugin/inserthtml.js +14 -5
  51. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  52. package/src/editor-manager/plugin/isformatted.js +8 -8
  53. package/src/editor-manager/plugin/link.d.ts +2 -2
  54. package/src/editor-manager/plugin/link.js +2 -2
  55. package/src/editor-manager/plugin/lists.d.ts +2 -2
  56. package/src/editor-manager/plugin/lists.js +84 -61
  57. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  58. package/src/editor-manager/plugin/ms-word-clean-up.js +4 -4
  59. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  60. package/src/editor-manager/plugin/nodecutter.js +8 -8
  61. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  62. package/src/editor-manager/plugin/selection-commands.js +1 -1
  63. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  64. package/src/editor-manager/plugin/selection-exec.js +2 -2
  65. package/src/editor-manager/plugin/table.d.ts +2 -2
  66. package/src/editor-manager/plugin/table.js +2 -2
  67. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  68. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  69. package/src/editor-manager/plugin/undo.d.ts +6 -6
  70. package/src/editor-manager/plugin/undo.js +9 -7
  71. package/src/editor-manager/plugin/video.d.ts +3 -3
  72. package/src/editor-manager/plugin/video.js +4 -4
  73. package/src/markdown-parser/base/interface.d.ts +10 -10
  74. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  75. package/src/markdown-parser/base/markdown-parser.js +3 -3
  76. package/src/markdown-parser/base/types.d.ts +1 -1
  77. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  78. package/src/markdown-parser/plugin/clearformat.js +2 -2
  79. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  80. package/src/markdown-parser/plugin/formats.js +2 -2
  81. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  82. package/src/markdown-parser/plugin/insert-text.js +2 -2
  83. package/src/markdown-parser/plugin/link.d.ts +2 -2
  84. package/src/markdown-parser/plugin/link.js +2 -2
  85. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  86. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  87. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  88. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  89. package/src/markdown-parser/plugin/table.d.ts +3 -3
  90. package/src/markdown-parser/plugin/table.js +3 -3
  91. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  92. package/src/markdown-parser/plugin/undo.js +6 -6
  93. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  94. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  95. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  96. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  97. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  98. package/src/rich-text-editor/actions/color-picker.js +2 -2
  99. package/src/rich-text-editor/actions/count.d.ts +3 -3
  100. package/src/rich-text-editor/actions/count.js +3 -3
  101. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  102. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  103. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  104. package/src/rich-text-editor/actions/emoji-picker.js +2 -2
  105. package/src/rich-text-editor/actions/enter-key.d.ts +6 -0
  106. package/src/rich-text-editor/actions/enter-key.js +142 -2
  107. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  108. package/src/rich-text-editor/actions/full-screen.js +3 -9
  109. package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
  110. package/src/rich-text-editor/actions/html-editor.js +106 -26
  111. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  112. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  113. package/src/rich-text-editor/actions/keyboard.js +20 -20
  114. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  115. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  116. package/src/rich-text-editor/actions/paste-clean-up.d.ts +2 -2
  117. package/src/rich-text-editor/actions/paste-clean-up.js +57 -40
  118. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  119. package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
  120. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  121. package/src/rich-text-editor/actions/toolbar.js +13 -13
  122. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  123. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  124. package/src/rich-text-editor/base/classes.d.ts +121 -121
  125. package/src/rich-text-editor/base/classes.js +121 -121
  126. package/src/rich-text-editor/base/constant.d.ts +158 -158
  127. package/src/rich-text-editor/base/constant.js +158 -158
  128. package/src/rich-text-editor/base/enum.d.ts +12 -1
  129. package/src/rich-text-editor/base/enum.js +13 -1
  130. package/src/rich-text-editor/base/interface.d.ts +59 -51
  131. package/src/rich-text-editor/base/interface.js +1 -1
  132. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  133. package/src/rich-text-editor/base/rich-text-editor.d.ts +65 -63
  134. package/src/rich-text-editor/base/rich-text-editor.js +89 -67
  135. package/src/rich-text-editor/base/util.d.ts +1 -1
  136. package/src/rich-text-editor/base/util.js +1 -1
  137. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  138. package/src/rich-text-editor/formatter/formatter.js +10 -9
  139. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  140. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  141. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  142. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  143. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  144. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  145. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  146. package/src/rich-text-editor/models/inline-mode.js +19 -19
  147. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  148. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  149. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  150. package/src/rich-text-editor/renderer/audio-module.js +7 -2
  151. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  152. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  153. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  154. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  155. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  156. package/src/rich-text-editor/renderer/iframe-content-renderer.js +18 -18
  157. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  158. package/src/rich-text-editor/renderer/image-module.js +13 -6
  159. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  160. package/src/rich-text-editor/renderer/link-module.js +4 -1
  161. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  162. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  163. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  164. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  165. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  166. package/src/rich-text-editor/renderer/render.js +2 -2
  167. package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
  168. package/src/rich-text-editor/renderer/table-module.js +6 -2
  169. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +11 -9
  170. package/src/rich-text-editor/renderer/toolbar-renderer.js +23 -19
  171. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  172. package/src/rich-text-editor/renderer/video-module.js +7 -2
  173. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  174. package/src/rich-text-editor/renderer/view-source.js +6 -6
  175. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  176. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  177. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  178. package/src/rich-text-editor/services/service-locator.js +3 -3
  179. package/src/selection/selection.d.ts +22 -22
  180. package/src/selection/selection.js +22 -22
  181. package/styles/_all.scss +1 -1
  182. package/styles/bootstrap-dark.css +739 -801
  183. package/styles/bootstrap-dark.scss +4 -1
  184. package/styles/bootstrap.css +723 -801
  185. package/styles/bootstrap.scss +4 -1
  186. package/styles/bootstrap4.css +726 -803
  187. package/styles/bootstrap4.scss +4 -1
  188. package/styles/bootstrap5-dark.css +750 -840
  189. package/styles/bootstrap5-dark.scss +4 -1
  190. package/styles/bootstrap5.css +749 -839
  191. package/styles/bootstrap5.scss +4 -1
  192. package/styles/fabric-dark.css +724 -797
  193. package/styles/fabric-dark.scss +4 -1
  194. package/styles/fabric.css +720 -797
  195. package/styles/fabric.scss +4 -1
  196. package/styles/fluent-dark.css +727 -820
  197. package/styles/fluent-dark.scss +4 -1
  198. package/styles/fluent.css +726 -819
  199. package/styles/fluent.scss +4 -1
  200. package/styles/fluent2.css +4255 -0
  201. package/styles/fluent2.scss +4 -0
  202. package/styles/highcontrast-light.css +695 -795
  203. package/styles/highcontrast-light.scss +4 -1
  204. package/styles/highcontrast.css +717 -797
  205. package/styles/highcontrast.scss +4 -1
  206. package/styles/material-dark.css +716 -798
  207. package/styles/material-dark.scss +4 -1
  208. package/styles/material.css +713 -800
  209. package/styles/material.scss +4 -1
  210. package/styles/material3-dark.css +751 -857
  211. package/styles/material3-dark.scss +4 -1
  212. package/styles/material3.css +751 -857
  213. package/styles/material3.scss +4 -1
  214. package/styles/rich-text-editor/_all.scss +2 -2
  215. package/styles/rich-text-editor/_bds-definition.scss +290 -285
  216. package/styles/rich-text-editor/_bigger.scss +610 -0
  217. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +291 -287
  218. package/styles/rich-text-editor/_bootstrap-definition.scss +349 -343
  219. package/styles/rich-text-editor/_bootstrap4-definition.scss +476 -470
  220. package/styles/rich-text-editor/_bootstrap5-definition.scss +278 -272
  221. package/styles/rich-text-editor/_bootstrap5.3-definition.scss +278 -0
  222. package/styles/rich-text-editor/_fabric-dark-definition.scss +275 -269
  223. package/styles/rich-text-editor/_fabric-definition.scss +273 -267
  224. package/styles/rich-text-editor/_fluent-definition.scss +279 -273
  225. package/styles/rich-text-editor/_fluent2-definition.scss +287 -0
  226. package/styles/rich-text-editor/_fusionnew-definition.scss +276 -271
  227. package/styles/rich-text-editor/_highcontrast-definition.scss +274 -267
  228. package/styles/rich-text-editor/_highcontrast-light-definition.scss +273 -267
  229. package/styles/rich-text-editor/_layout.scss +2175 -2268
  230. package/styles/rich-text-editor/_material-dark-definition.scss +278 -272
  231. package/styles/rich-text-editor/_material-definition.scss +276 -270
  232. package/styles/rich-text-editor/_material3-definition.scss +278 -272
  233. package/styles/rich-text-editor/_tailwind-definition.scss +273 -267
  234. package/styles/rich-text-editor/_tailwind4-definition.scss +278 -0
  235. package/styles/rich-text-editor/_theme.scss +844 -927
  236. package/styles/rich-text-editor/bootstrap-dark.css +739 -801
  237. package/styles/rich-text-editor/bootstrap.css +723 -801
  238. package/styles/rich-text-editor/bootstrap4.css +726 -803
  239. package/styles/rich-text-editor/bootstrap5-dark.css +750 -840
  240. package/styles/rich-text-editor/bootstrap5.css +749 -839
  241. package/styles/rich-text-editor/fabric-dark.css +724 -797
  242. package/styles/rich-text-editor/fabric.css +720 -797
  243. package/styles/rich-text-editor/fluent-dark.css +727 -820
  244. package/styles/rich-text-editor/fluent.css +726 -819
  245. package/styles/rich-text-editor/fluent2.css +4255 -0
  246. package/styles/rich-text-editor/fluent2.scss +4 -0
  247. package/styles/rich-text-editor/highcontrast-light.css +695 -795
  248. package/styles/rich-text-editor/highcontrast.css +717 -797
  249. package/styles/rich-text-editor/icons/_bds.scss +372 -351
  250. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +373 -352
  251. package/styles/rich-text-editor/icons/_bootstrap.scss +373 -352
  252. package/styles/rich-text-editor/icons/_bootstrap4.scss +373 -352
  253. package/styles/rich-text-editor/icons/_bootstrap5.3.scss +372 -0
  254. package/styles/rich-text-editor/icons/_bootstrap5.scss +372 -351
  255. package/styles/rich-text-editor/icons/_fabric-dark.scss +373 -352
  256. package/styles/rich-text-editor/icons/_fabric.scss +373 -352
  257. package/styles/rich-text-editor/icons/_fluent.scss +372 -351
  258. package/styles/rich-text-editor/icons/_fluent2.scss +369 -0
  259. package/styles/rich-text-editor/icons/_fusionnew.scss +357 -348
  260. package/styles/rich-text-editor/icons/_highcontrast-light.scss +361 -352
  261. package/styles/rich-text-editor/icons/_highcontrast.scss +373 -352
  262. package/styles/rich-text-editor/icons/_material-dark.scss +373 -352
  263. package/styles/rich-text-editor/icons/_material.scss +373 -352
  264. package/styles/rich-text-editor/icons/_material3.scss +372 -351
  265. package/styles/rich-text-editor/icons/_tailwind.scss +372 -351
  266. package/styles/rich-text-editor/icons/_tailwind4.scss +372 -0
  267. package/styles/rich-text-editor/material-dark.css +716 -798
  268. package/styles/rich-text-editor/material.css +713 -800
  269. package/styles/rich-text-editor/material3-dark.css +751 -857
  270. package/styles/rich-text-editor/material3-dark.scss +1 -1
  271. package/styles/rich-text-editor/material3.css +751 -857
  272. package/styles/rich-text-editor/material3.scss +1 -1
  273. package/styles/rich-text-editor/tailwind-dark.css +740 -829
  274. package/styles/rich-text-editor/tailwind.css +740 -829
  275. package/styles/tailwind-dark.css +740 -829
  276. package/styles/tailwind-dark.scss +4 -1
  277. package/styles/tailwind.css +740 -829
  278. package/styles/tailwind.scss +4 -1
  279. package/dist/ej2-richtexteditor.min.js +0 -10
  280. package/dist/global/ej2-richtexteditor.min.js +0 -11
  281. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  282. package/dist/global/index.d.ts +0 -14
  283. package/tslint.json +0 -111
@@ -778,18 +778,18 @@ const closeTooltip = 'closeTooltip';
778
778
  * @hidden
779
779
  * @deprecated
780
780
  */
781
- const blockEmptyNodes = `address:empty, article:empty, aside:empty, blockquote:empty,
782
- details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,
783
- h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,
781
+ const blockEmptyNodes = `address:empty, article:empty, aside:empty, blockquote:empty,
782
+ details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,
783
+ h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,
784
784
  noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty`;
785
785
  /**
786
786
  * @hidden
787
787
  * @deprecated
788
788
  */
789
- const inlineEmptyNodes = `a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,
790
- canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,
791
- ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
792
- q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
789
+ const inlineEmptyNodes = `a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,
790
+ canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,
791
+ ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
792
+ q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
793
793
  template:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty`;
794
794
  /**
795
795
  * @hidden
@@ -1648,6 +1648,18 @@ var DialogType;
1648
1648
  DialogType["InsertTable"] = "InsertTable";
1649
1649
  /* eslint-enable */
1650
1650
  })(DialogType || (DialogType = {}));
1651
+ /**
1652
+ * Defines types to be used as inserted image.
1653
+ */
1654
+ var ImageInputSource;
1655
+ (function (ImageInputSource) {
1656
+ /** Defines ImageInputSource as Uploaded */
1657
+ ImageInputSource["Uploaded"] = "Uploaded";
1658
+ /** Defines ImageInputSource as Dropped */
1659
+ ImageInputSource["Dropped"] = "Dropped";
1660
+ /** Defines ImageInputSource as Pasted */
1661
+ ImageInputSource["Pasted"] = "Pasted";
1662
+ })(ImageInputSource || (ImageInputSource = {}));
1651
1663
 
1652
1664
  /* eslint-disable */
1653
1665
  /**
@@ -4465,6 +4477,10 @@ function updateTextNode$1(value, enterAction) {
4465
4477
  tableElm[i].classList.remove('e-rte-paste-onenote-table');
4466
4478
  continue;
4467
4479
  }
4480
+ else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
4481
+ tableElm[i].classList.remove('e-rte-paste-html-table');
4482
+ continue;
4483
+ }
4468
4484
  }
4469
4485
  }
4470
4486
  const imageElm = resultElm.querySelectorAll('img');
@@ -4558,17 +4574,68 @@ function nestedListCleanUp(range) {
4558
4574
  item.remove();
4559
4575
  });
4560
4576
  }
4577
+ else {
4578
+ break;
4579
+ }
4561
4580
  }
4562
4581
  let liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
4563
4582
  if (liElem.length > 0) {
4564
4583
  liElem.forEach((item) => {
4565
- if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
4584
+ if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL")) {
4566
4585
  item.style.listStyleType = "none";
4567
4586
  }
4568
4587
  });
4569
4588
  }
4570
4589
  }
4571
4590
  }
4591
+ /**
4592
+ * Method to scroll the content to the cursor position
4593
+ *
4594
+ * @param {Document} document - specifies the document.
4595
+ * @param {HTMLElement | HTMLBodyElement} inputElement - specifies the input element.
4596
+ * @returns {void}
4597
+ */
4598
+ function scrollToCursor(document, inputElement) {
4599
+ const rootElement = inputElement.nodeName === 'BODY' ?
4600
+ inputElement.ownerDocument.defaultView.frameElement.closest('.e-richtexteditor') :
4601
+ inputElement.closest('.e-richtexteditor');
4602
+ const height = rootElement.style.height;
4603
+ if (document.getSelection().rangeCount === 0) {
4604
+ return;
4605
+ }
4606
+ const range = document.getSelection().getRangeAt(0);
4607
+ const finalFocusElement = range.startContainer.nodeName === '#text' ? range.startContainer.parentElement :
4608
+ range.startContainer;
4609
+ const rect = finalFocusElement.getBoundingClientRect();
4610
+ const cursorTop = rect.top;
4611
+ const cursorBottom = rect.bottom;
4612
+ const rootRect = rootElement.getBoundingClientRect();
4613
+ const hasMargin = rootElement.querySelectorAll('.e-count-enabled, .e-resize-enabled').length > 0;
4614
+ if (inputElement.nodeName === 'BODY') {
4615
+ if (height === 'auto') {
4616
+ if (window.innerHeight < cursorTop) {
4617
+ finalFocusElement.scrollIntoView(false);
4618
+ }
4619
+ }
4620
+ else {
4621
+ if (cursorTop > inputElement.getBoundingClientRect().height) {
4622
+ finalFocusElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
4623
+ }
4624
+ }
4625
+ }
4626
+ else {
4627
+ if (height === 'auto') {
4628
+ if (window.innerHeight < cursorTop) {
4629
+ finalFocusElement.scrollIntoView({ block: 'end', inline: 'nearest' });
4630
+ }
4631
+ }
4632
+ else {
4633
+ if (cursorBottom > rootRect.bottom) {
4634
+ rootElement.querySelector('.e-rte-content').scrollTop += (cursorBottom - rootRect.bottom) + (hasMargin ? 20 : 0);
4635
+ }
4636
+ }
4637
+ }
4638
+ }
4572
4639
 
4573
4640
  /**
4574
4641
  * Update Toolbar Status
@@ -5079,6 +5146,7 @@ class ToolbarRenderer {
5079
5146
  openDelay: 400,
5080
5147
  opensOn: 'Hover',
5081
5148
  beforeRender: this.tooltipBeforeRender.bind(this),
5149
+ beforeOpen: this.tooltipBeforeOpen.bind(this),
5082
5150
  cssClass: this.parent.getCssClass(),
5083
5151
  windowCollision: true,
5084
5152
  position: 'BottomCenter'
@@ -5200,7 +5268,7 @@ class ToolbarRenderer {
5200
5268
  if ((divNode.textContent.trim() !== ''
5201
5269
  && args.element.childNodes[index].textContent.trim() === divNode.textContent.trim()) ||
5202
5270
  ((args.items[0].command === 'Formats' && !isNullOrUndefined(toolbarStatus.formats) && this.parent.format.types[index].value.toLowerCase() === toolbarStatus.formats.toLowerCase() && args.element.childNodes[index].classList.contains(this.parent.format.types[index].cssClass))
5203
- || (args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(this.parent.fontFamily.items[index].cssClass)))) {
5271
+ || (args.items[0].subCommand === 'FontName' && args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && !isNullOrUndefined(this.parent.fontFamily.items[index]) && this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(this.parent.fontFamily.items[index].cssClass)))) {
5204
5272
  if (!args.element.childNodes[index].classList.contains('e-active')) {
5205
5273
  addClass([args.element.childNodes[index]], 'e-active');
5206
5274
  }
@@ -5384,8 +5452,6 @@ class ToolbarRenderer {
5384
5452
  target: colorPicker.element.parentElement, cssClass: css,
5385
5453
  enablePersistence: this.parent.enablePersistence, enableRtl: this.parent.enableRtl,
5386
5454
  beforeOpen: (dropDownArgs) => {
5387
- colorPicker.inline = true;
5388
- colorPicker.dataBind();
5389
5455
  if (proxy.parent.readonly || !proxy.parent.enabled) {
5390
5456
  dropDownArgs.cancel = true;
5391
5457
  return;
@@ -5523,14 +5589,18 @@ class ToolbarRenderer {
5523
5589
  const colorPicker = new ColorPicker({
5524
5590
  enablePersistence: this.parent.enablePersistence,
5525
5591
  enableRtl: this.parent.enableRtl,
5526
- inline: false,
5527
- value: '#fff',
5592
+ inline: true,
5593
+ value: null,
5594
+ cssClass: ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass + ' ' + 'e-rte-picker-init',
5528
5595
  created: () => {
5529
5596
  const value = (item === 'backgroundcolor') ? proxy.parent.backgroundColor.default : proxy.parent.fontColor.default;
5530
- colorPicker.setProperties({ value: value });
5597
+ colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5598
+ colorPicker.value = value;
5531
5599
  },
5532
5600
  mode: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.mode : proxy.parent.fontColor.mode),
5533
5601
  modeSwitcher: ((item === 'backgroundcolor') ? proxy.parent.backgroundColor.modeSwitcher : proxy.parent.fontColor.modeSwitcher),
5602
+ presetColors: (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode : this.parent.fontColor.colorCode,
5603
+ columns: (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns,
5534
5604
  beforeTileRender: (args) => {
5535
5605
  args.element.classList.add(CLS_COLOR_PALETTE);
5536
5606
  args.element.classList.add(CLS_CUSTOM_TILE);
@@ -5575,14 +5645,15 @@ class ToolbarRenderer {
5575
5645
  }
5576
5646
  });
5577
5647
  colorPicker.isStringTemplate = true;
5578
- colorPicker.columns = (item === 'backgroundcolor') ? this.parent.backgroundColor.columns : this.parent.fontColor.columns;
5579
- colorPicker.presetColors = (item === 'backgroundcolor') ? this.parent.backgroundColor.colorCode :
5580
- this.parent.fontColor.colorCode;
5581
- colorPicker.cssClass = ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_PICKER : CLS_FONT_COLOR_PICKER) + ' ' + args.cssClass;
5582
5648
  colorPicker.createElement = this.parent.createElement;
5583
5649
  colorPicker.appendTo(document.getElementById(args.target));
5584
5650
  return colorPicker;
5585
5651
  }
5652
+ tooltipBeforeOpen(args) {
5653
+ if (args.element) {
5654
+ args.element.setAttribute('data-rte-id', this.parent.getID());
5655
+ }
5656
+ }
5586
5657
  /**
5587
5658
  * The function is used to render Rich Text Editor toolbar
5588
5659
  *
@@ -7140,12 +7211,12 @@ class Toolbar$2 {
7140
7211
  }
7141
7212
  }
7142
7213
 
7143
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7144
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7145
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7146
- 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;
7147
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7148
- };
7214
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7215
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7216
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7217
+ 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;
7218
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7219
+ };
7149
7220
  var KeyboardEvents_1;
7150
7221
  const keyCode = {
7151
7222
  'backspace': 8,
@@ -9516,7 +9587,8 @@ class Formatter {
9516
9587
  event: e, callBack: () => {
9517
9588
  self.notify(contentChanged, {});
9518
9589
  this.enableUndo(self);
9519
- }
9590
+ },
9591
+ enterAction: self.enterKey
9520
9592
  });
9521
9593
  }
9522
9594
  /**
@@ -12179,7 +12251,7 @@ class DOMNode {
12179
12251
  unWrap(element) {
12180
12252
  const parent = element.parentNode;
12181
12253
  let unWrapNode = [];
12182
- while (element.firstChild) {
12254
+ while (element.firstChild && (element.previousSibling !== this.parent.querySelector('.e-mention-chip') || element.textContent !== ' ')) {
12183
12255
  unWrapNode.push(element.firstChild);
12184
12256
  parent.insertBefore(element.firstChild, element);
12185
12257
  }
@@ -12529,6 +12601,109 @@ class DOMNode {
12529
12601
  }
12530
12602
  return null;
12531
12603
  }
12604
+ /**
12605
+ * Method to wrap the inline and text node with block node.
12606
+ *
12607
+ * @param {HTMLElement} node - specifies the element sent to wrap the node around it with block nodes.
12608
+ * @param {string} wrapperElement - specifies which block nodes to wrap around.
12609
+ * @returns {HTMLElement} - returns the wrapped element.
12610
+ * @hidden
12611
+ * @deprecated
12612
+ */
12613
+ gatherElementsAround(node, wrapperElement) {
12614
+ const newWrapElem = createElement(wrapperElement);
12615
+ // Insert the new div element before the current node.
12616
+ let currentNode = node.previousSibling;
12617
+ const currentNodeParent = node.parentElement;
12618
+ if (currentNodeParent.className === 'e-editor-select-start') {
12619
+ currentNodeParent.parentNode.insertBefore(newWrapElem, currentNodeParent);
12620
+ }
12621
+ else if (currentNodeParent) {
12622
+ currentNodeParent.insertBefore(newWrapElem, node);
12623
+ }
12624
+ let i = 0;
12625
+ while (currentNode !== null && currentNode.nodeName !== 'BR' &&
12626
+ !this.isBlockNode(currentNode)) {
12627
+ const prevSibling = currentNode.previousSibling;
12628
+ if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
12629
+ if (i === 0) {
12630
+ newWrapElem.appendChild(currentNode);
12631
+ }
12632
+ else {
12633
+ newWrapElem.insertBefore(currentNode, newWrapElem.firstChild);
12634
+ }
12635
+ }
12636
+ currentNode = prevSibling;
12637
+ i++;
12638
+ }
12639
+ // Add the current node to the new div
12640
+ newWrapElem.appendChild(node);
12641
+ // Gather text and inline elements after the currentNode
12642
+ currentNode = newWrapElem.nextSibling ? newWrapElem.nextSibling :
12643
+ newWrapElem.parentElement.nextSibling;
12644
+ while (currentNode !== null && currentNode.nodeName !== 'BR' &&
12645
+ !this.isBlockNode(currentNode)) {
12646
+ const nextSibling = currentNode.nextSibling ?
12647
+ currentNode.nextSibling : currentNode.parentElement.nextSibling;
12648
+ if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
12649
+ newWrapElem.appendChild(currentNode);
12650
+ }
12651
+ currentNode = nextSibling;
12652
+ }
12653
+ return newWrapElem;
12654
+ }
12655
+ /**
12656
+ * Method to convert all the inline nodes between the selection to block nodes.
12657
+ *
12658
+ * @param {Node[]} selectedNodes - specifies the nodes of the start and end selection.
12659
+ * @param {boolean} fromList - specifies if the method is called from list module.
12660
+ * @returns {Node[]} - returns the selected list of elements as block nodes.
12661
+ * @hidden
12662
+ * @deprecated
12663
+ */
12664
+ convertToBlockNodes(selectedNodes, fromList) {
12665
+ if (selectedNodes.length > 1) {
12666
+ let i = 0;
12667
+ let currentSelectedNode = selectedNodes[0];
12668
+ while (!isNullOrUndefined(currentSelectedNode)) {
12669
+ if (currentSelectedNode.nodeName === 'BR') {
12670
+ const nextNode = currentSelectedNode.nextSibling;
12671
+ detach(currentSelectedNode);
12672
+ currentSelectedNode = nextNode;
12673
+ }
12674
+ if (!isNullOrUndefined(currentSelectedNode)) {
12675
+ if (fromList) {
12676
+ selectedNodes[i] = currentSelectedNode.nodeName === 'LI' || this.isBlockNode(currentSelectedNode) ?
12677
+ currentSelectedNode :
12678
+ this.gatherElementsAround(currentSelectedNode, (fromList ? 'p' : 'div'));
12679
+ }
12680
+ else {
12681
+ selectedNodes[i] = !this.isBlockNode(selectedNodes[i]) ?
12682
+ this.gatherElementsAround(currentSelectedNode, (fromList ? 'p' : 'div')) :
12683
+ selectedNodes[i];
12684
+ }
12685
+ const currentProcessNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
12686
+ const currentElementCheckNode = currentProcessNode.nodeName === '#text' ? currentProcessNode.parentElement : currentProcessNode;
12687
+ currentSelectedNode = !isNullOrUndefined(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
12688
+ !isNullOrUndefined(closest(currentSelectedNode, '.e-editor-select-end')) ?
12689
+ null : currentProcessNode.nextSibling;
12690
+ if (currentSelectedNode === null && !isNullOrUndefined(currentProcessNode.nextSibling) && currentProcessNode.nextSibling.nodeName === 'BR') {
12691
+ detach(currentProcessNode.nextSibling);
12692
+ }
12693
+ }
12694
+ i++;
12695
+ }
12696
+ }
12697
+ else {
12698
+ if (!this.isBlockNode(selectedNodes[0])) {
12699
+ selectedNodes[0] = this.gatherElementsAround(selectedNodes[0], (fromList ? 'p' : 'div'));
12700
+ if (!isNullOrUndefined(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
12701
+ detach(selectedNodes[0].nextSibling);
12702
+ }
12703
+ }
12704
+ }
12705
+ return selectedNodes;
12706
+ }
12532
12707
  /**
12533
12708
  * blockNodes method
12534
12709
  *
@@ -13036,7 +13211,7 @@ class Lists {
13036
13211
  e.event.preventDefault();
13037
13212
  }
13038
13213
  }
13039
- onKeyUp() {
13214
+ onKeyUp(e) {
13040
13215
  if (!isNullOrUndefined(this.commonLIParent) && !isNullOrUndefined(this.commonLIParent.querySelector('.removeList'))) {
13041
13216
  const currentLIElem = this.commonLIParent.querySelector('.removeList');
13042
13217
  while (!isNullOrUndefined(currentLIElem.firstChild)) {
@@ -13044,6 +13219,14 @@ class Lists {
13044
13219
  }
13045
13220
  detach(currentLIElem);
13046
13221
  }
13222
+ if (e.event.keyCode === 13) {
13223
+ const listElements = this.parent.editableElement.querySelectorAll('UL, OL');
13224
+ for (let i = 0; i < listElements.length; i++) {
13225
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
13226
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
13227
+ }
13228
+ }
13229
+ }
13047
13230
  }
13048
13231
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13049
13232
  firstListBackSpace(range, _e) {
@@ -13285,6 +13468,8 @@ class Lists {
13285
13468
  else {
13286
13469
  if (prevSibling.tagName === 'LI') {
13287
13470
  const nestedElement = createElement(elements[i].parentNode.tagName);
13471
+ nestedElement.style.listStyleType =
13472
+ elements[i].parentNode.style.listStyleType;
13288
13473
  append([nestedElement], prevSibling);
13289
13474
  append([elements[i]], nestedElement);
13290
13475
  }
@@ -13334,61 +13519,7 @@ class Lists {
13334
13519
  let listsNodes = this.domNode.blockNodes(true);
13335
13520
  if (e.enterAction === 'BR') {
13336
13521
  this.setSelectionBRConfig();
13337
- const allSelectedNode = this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument);
13338
- const selectedNodes = this.parent.nodeSelection.getSelectionNodes(allSelectedNode);
13339
- const currentFormatNodes = [];
13340
- if (selectedNodes.length === 0) {
13341
- selectedNodes.push(listsNodes[0]);
13342
- }
13343
- for (let i = 0; i < selectedNodes.length; i++) {
13344
- let currentNode = selectedNodes[i];
13345
- let previousCurrentNode;
13346
- while (!this.parent.domNode.isBlockNode(currentNode) && currentNode !== this.parent.editableElement) {
13347
- previousCurrentNode = currentNode;
13348
- currentNode = currentNode.parentElement;
13349
- }
13350
- if (this.parent.domNode.isBlockNode(currentNode) && currentNode === this.parent.editableElement) {
13351
- currentFormatNodes.push(previousCurrentNode);
13352
- }
13353
- }
13354
- for (let i = 0; i < currentFormatNodes.length; i++) {
13355
- if (!this.parent.domNode.isBlockNode(currentFormatNodes[i])) {
13356
- let currentNode = currentFormatNodes[i];
13357
- let previousNode = currentNode;
13358
- while (currentNode === this.parent.editableElement) {
13359
- previousNode = currentNode;
13360
- currentNode = currentNode.parentElement;
13361
- }
13362
- let tempElem;
13363
- if (this.parent.domNode.isBlockNode(previousNode.parentElement) &&
13364
- previousNode.parentElement === this.parent.editableElement) {
13365
- tempElem = createElement('p');
13366
- previousNode.parentElement.insertBefore(tempElem, previousNode);
13367
- tempElem.appendChild(previousNode);
13368
- }
13369
- else {
13370
- tempElem = previousNode;
13371
- }
13372
- let preNode = tempElem.previousSibling;
13373
- while (!isNullOrUndefined(preNode) && preNode.nodeName !== 'BR' &&
13374
- !this.parent.domNode.isBlockNode(preNode)) {
13375
- tempElem.firstChild.parentElement.insertBefore(preNode, tempElem.firstChild);
13376
- preNode = tempElem.previousSibling;
13377
- }
13378
- if (!isNullOrUndefined(preNode) && preNode.nodeName === 'BR') {
13379
- detach(preNode);
13380
- }
13381
- let postNode = tempElem.nextSibling;
13382
- while (!isNullOrUndefined(postNode) && postNode.nodeName !== 'BR' &&
13383
- !this.parent.domNode.isBlockNode(postNode)) {
13384
- tempElem.appendChild(postNode);
13385
- postNode = tempElem.nextSibling;
13386
- }
13387
- if (!isNullOrUndefined(postNode) && postNode.nodeName === 'BR') {
13388
- detach(postNode);
13389
- }
13390
- }
13391
- }
13522
+ this.parent.domNode.convertToBlockNodes(this.parent.domNode.blockNodes(), true);
13392
13523
  this.setSelectionBRConfig();
13393
13524
  listsNodes = this.parent.domNode.blockNodes();
13394
13525
  }
@@ -13445,7 +13576,7 @@ class Lists {
13445
13576
  }
13446
13577
  let elemAtt;
13447
13578
  elements[i].style.removeProperty('margin-left');
13448
- elemAtt = elements[i].tagName === 'IMG' ? '' : this.domNode.attributes(elements[i]);
13579
+ elemAtt = elements[i].tagName === 'IMG' || elements[i].classList.contains('e-editor-select-start') ? '' : this.domNode.attributes(elements[i]);
13449
13580
  if (elements[i].getAttribute('contenteditable') === 'true'
13450
13581
  && elements[i].childNodes.length === 1 && elements[i].childNodes[0].nodeName === 'TABLE') {
13451
13582
  const listEle = document.createElement(type);
@@ -13487,6 +13618,16 @@ class Lists {
13487
13618
  }
13488
13619
  }
13489
13620
  this.cleanNode();
13621
+ if (e.enterAction === 'BR') {
13622
+ const spansToRemove = document.querySelectorAll('span#removeSpan');
13623
+ spansToRemove.forEach((span) => {
13624
+ const fragment = document.createDocumentFragment();
13625
+ while (span.firstChild) {
13626
+ fragment.appendChild(span.firstChild);
13627
+ }
13628
+ span.parentNode.replaceChild(fragment, span);
13629
+ });
13630
+ }
13490
13631
  this.parent.editableElement.focus();
13491
13632
  if (isIDevice$1()) {
13492
13633
  setEditFrameFocus(this.parent.editableElement, selector);
@@ -13556,6 +13697,13 @@ class Lists {
13556
13697
  for (let c = 0; c < liParents.length; c++) {
13557
13698
  const node = liParents[c];
13558
13699
  let toFindtopOlUl = true;
13700
+ let containsListElements = node;
13701
+ while (containsListElements.parentElement) {
13702
+ if (containsListElements.parentElement && containsListElements.parentElement.tagName !== 'LI' && containsListElements.parentElement.tagName !== 'OL' && containsListElements.parentElement.tagName !== 'UL') {
13703
+ break;
13704
+ }
13705
+ containsListElements = containsListElements.parentElement;
13706
+ }
13559
13707
  if (toFindtopOlUl && (liParents[c].parentElement.parentElement.nodeName === 'OL' || liParents[c].parentElement.parentElement.nodeName === 'UL')) {
13560
13708
  toFindtopOlUl = false;
13561
13709
  const preElement = liParents[c].parentElement.parentElement;
@@ -13575,9 +13723,43 @@ class Lists {
13575
13723
  node.previousElementSibling.lastChild.append(node);
13576
13724
  }
13577
13725
  }
13726
+ 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'))) {
13727
+ const contentNodes = this.domNode.contents(node);
13728
+ for (let f = 0; f < contentNodes.length; f++) {
13729
+ node.previousElementSibling.appendChild(contentNodes[f]);
13730
+ }
13731
+ node.parentNode.removeChild(node);
13732
+ }
13578
13733
  }
13579
13734
  if (firstNodeOL) {
13580
13735
  firstNodeOL.style.listStyleType = listStyleType;
13736
+ const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
13737
+ let listOlUlElements = [];
13738
+ if (range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'OL') {
13739
+ if (range.commonAncestorContainer instanceof Element) {
13740
+ listOlUlElements.push(range.commonAncestorContainer);
13741
+ }
13742
+ listOlUlElements = listOlUlElements.concat(Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul')));
13743
+ }
13744
+ else {
13745
+ listOlUlElements = Array.from(range.commonAncestorContainer.querySelectorAll('ol, ul'));
13746
+ }
13747
+ for (let k = 0; k < listOlUlElements.length; k++) {
13748
+ let listStyle;
13749
+ let listElements = listOlUlElements[k];
13750
+ while (listElements) {
13751
+ if (listElements.nodeName === 'OL' || listElements.nodeName === 'OL') {
13752
+ if (listElements.style.listStyleType !== '' && listElements.style.listStyleType !== 'none' && listElements.nodeName !== 'LI') {
13753
+ listStyle = listElements.style.listStyleType;
13754
+ }
13755
+ else if (!isNullOrUndefined(listStyle) && (listElements.style.listStyleType === '' || listElements.style.listStyleType === 'none') &&
13756
+ listElements.nodeName !== 'LI' && (listElements.nodeName === 'UL' || listElements.nodeName === 'OL')) {
13757
+ listElements.style.listStyleType = listStyle;
13758
+ }
13759
+ }
13760
+ listElements = listElements.querySelector('UL,OL');
13761
+ }
13762
+ }
13581
13763
  }
13582
13764
  }
13583
13765
  findUnSelected(temp, elements) {
@@ -13680,10 +13862,16 @@ class Lists {
13680
13862
  parentNode.removeAttribute("style");
13681
13863
  }
13682
13864
  }
13683
- const wrapper = '<' + DEFAULT_TAG + wrapperclass + this.domNode.attributes(element) + '></' + DEFAULT_TAG + '>';
13865
+ const wrapper = '<' + e.enterAction + wrapperclass + this.domNode.attributes(element) + '></' + e.enterAction + '>';
13684
13866
  if (e.enterAction !== 'BR') {
13685
13867
  this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
13686
13868
  }
13869
+ else {
13870
+ const wrapperSpan = '<span class=e-rte-wrap-inner id=removeSpan></span>';
13871
+ const br = document.createElement('br');
13872
+ this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapperSpan));
13873
+ element.appendChild(br);
13874
+ }
13687
13875
  }
13688
13876
  else if (this.domNode.contents(element)[0].nodeType === 3) {
13689
13877
  const replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
@@ -13696,8 +13884,18 @@ class Lists {
13696
13884
  }
13697
13885
  else {
13698
13886
  const childNode = element.firstChild;
13887
+ if (childNode) {
13888
+ const attributes$$1 = element.parentElement.attributes;
13889
+ if (attributes$$1.length > 0) {
13890
+ for (let d = 0; d < attributes$$1.length; d++) {
13891
+ const e = attributes$$1[d];
13892
+ const existingValue = childNode.getAttribute(e.nodeName);
13893
+ const parentValue = (element.parentElement).getAttribute(e.nodeName);
13894
+ childNode.setAttribute(e.nodeName, existingValue ? parentValue + ' ' + existingValue : parentValue);
13895
+ }
13896
+ }
13897
+ }
13699
13898
  className = childNode.getAttribute('class');
13700
- attributes(childNode, this.domNode.rawAttributes(parentNode));
13701
13899
  if (className && childNode.getAttribute('class')) {
13702
13900
  attributes(childNode, { 'class': className + ' ' + childNode.getAttribute('class') });
13703
13901
  }
@@ -13862,7 +14060,7 @@ class NodeCutter {
13862
14060
  fragment = this.spliceEmptyNode(fragment, false);
13863
14061
  if (fragment && fragment.childNodes.length > 0) {
13864
14062
  const isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0)
13865
- && this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
14063
+ && this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
13866
14064
  if (!isEmpty) {
13867
14065
  if (node) {
13868
14066
  InsertMethods.AppendBefore(fragment, node);
@@ -13883,7 +14081,7 @@ class NodeCutter {
13883
14081
  fragment = this.spliceEmptyNode(fragment, true);
13884
14082
  if (fragment && fragment.childNodes.length > 0) {
13885
14083
  const isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
13886
- && this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
14084
+ && this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
13887
14085
  if (!isEmpty) {
13888
14086
  if (node) {
13889
14087
  InsertMethods.AppendBefore(fragment, node, true);
@@ -14072,6 +14270,12 @@ class Formats {
14072
14270
  }
14073
14271
  }
14074
14272
  }
14273
+ 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) {
14274
+ const pTag = createElement(e.enterAction);
14275
+ range.startContainer.parentElement.insertBefore(pTag, range.startContainer);
14276
+ pTag.appendChild(range.startContainer);
14277
+ this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument, pTag, 1);
14278
+ }
14075
14279
  }
14076
14280
  getBlockParent(node, endNode) {
14077
14281
  let currentParent;
@@ -14479,11 +14683,14 @@ class InsertHtml {
14479
14683
  range.startContainer === range.endContainer;
14480
14684
  const isCollapsed = range.collapsed;
14481
14685
  const nodes = this.getNodeCollection(range, nodeSelection, node);
14482
- const closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
14686
+ const closestParentNode = (node.nodeName.toLowerCase() === 'table') ? (!isNullOrUndefined(nodes[0]) ? this.closestEle(nodes[0].parentNode, editNode) : range.startContainer) : nodes[0];
14483
14687
  if (closestParentNode && closestParentNode.nodeName === 'LI' && node.nodeName.toLowerCase() === 'table') {
14484
14688
  this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
14485
14689
  return;
14486
14690
  }
14691
+ 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) {
14692
+ range.startContainer.innerHTML = '';
14693
+ }
14487
14694
  if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
14488
14695
  node.classList.contains('pasteContent'))) {
14489
14696
  this.pasteInsertHTML(nodes, node, range, nodeSelection, nodeCutter, docElement, isCollapsed, closestParentNode, editNode, enterAction);
@@ -14524,7 +14731,7 @@ class InsertHtml {
14524
14731
  nodes[index].parentNode.removeChild(nodes[index]);
14525
14732
  }
14526
14733
  }
14527
- if (sibNode) {
14734
+ if (!isNullOrUndefined(sibNode) && !isNullOrUndefined(sibNode.parentNode)) {
14528
14735
  InsertMethods.AppendBefore(node, sibNode, true);
14529
14736
  }
14530
14737
  else {
@@ -14681,7 +14888,7 @@ class InsertHtml {
14681
14888
  range.deleteContents();
14682
14889
  range.setStart(startContainerParent, startIndex);
14683
14890
  range.setEnd(startContainerParent, startIndex);
14684
- if (!isNullOrUndefined(lasNode)) {
14891
+ if (!isNullOrUndefined(lasNode) && lasNode !== editNode) {
14685
14892
  detach(lasNode);
14686
14893
  }
14687
14894
  // eslint-disable-next-line
@@ -14775,6 +14982,12 @@ class InsertHtml {
14775
14982
  node.parentNode.replaceChild(fragment, node);
14776
14983
  }
14777
14984
  }
14985
+ if (lastSelectionNode.nodeName === 'TABLE') {
14986
+ const pTag = createElement('p');
14987
+ pTag.appendChild(createElement('br'));
14988
+ lastSelectionNode.parentElement.insertBefore(pTag, lastSelectionNode.nextSibling);
14989
+ lastSelectionNode = pTag;
14990
+ }
14778
14991
  if (lastSelectionNode.nodeName === '#text') {
14779
14992
  this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
14780
14993
  }
@@ -15401,7 +15614,10 @@ class Alignments {
15401
15614
  let save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
15402
15615
  if (!isTableAlign) {
15403
15616
  this.parent.domNode.setMarker(save);
15404
- const alignmentNodes = this.parent.domNode.blockNodes();
15617
+ let alignmentNodes = this.parent.domNode.blockNodes();
15618
+ if (e.enterAction === 'BR') {
15619
+ alignmentNodes = this.parent.domNode.convertToBlockNodes(alignmentNodes, false);
15620
+ }
15405
15621
  for (let i = 0; i < alignmentNodes.length; i++) {
15406
15622
  const parentNode = alignmentNodes[i];
15407
15623
  setStyleAttribute(parentNode, { 'text-align': this.alignments[e.subCommand] });
@@ -15483,7 +15699,10 @@ class Indents {
15483
15699
  const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
15484
15700
  let save = this.parent.nodeSelection.save(range, this.parent.currentDocument);
15485
15701
  this.parent.domNode.setMarker(save);
15486
- const indentsNodes = this.parent.domNode.blockNodes();
15702
+ let indentsNodes = this.parent.domNode.blockNodes();
15703
+ if (e.enterAction === 'BR') {
15704
+ indentsNodes = this.parent.domNode.convertToBlockNodes(indentsNodes, false);
15705
+ }
15487
15706
  const parentNodes = indentsNodes.slice();
15488
15707
  const listsNodes = [];
15489
15708
  for (let i = 0; i < parentNodes.length; i++) {
@@ -16032,7 +16251,7 @@ class AudioCommand {
16032
16251
  isReplaced = true;
16033
16252
  }
16034
16253
  else {
16035
- wrapElement = createElement('span', { className: CLASS_AUDIO_WRAP, attrs: { contentEditable: 'false', title: e.item.fileName } });
16254
+ wrapElement = createElement('span', { className: CLASS_AUDIO_WRAP, attrs: { contentEditable: 'false', title: ((!isNullOrUndefined(e.item.title)) ? e.item.title : (!isNullOrUndefined(e.item.fileName) ? e.item.fileName : '')) } });
16036
16255
  const audElement = createElement('audio', { className: CLASS_AUDIO + ' ' + CLASS_AUDIO_INLINE, attrs: { controls: '' } });
16037
16256
  const sourceElement = createElement('source');
16038
16257
  const clickElement = createElement('span', { className: CLASS_CLICK_ELEM });
@@ -16226,7 +16445,7 @@ class VideoCommand {
16226
16445
  }
16227
16446
  else {
16228
16447
  if (!e.item.isEmbedUrl) {
16229
- wrapElement = createElement('span', { className: CLASS_VIDEO_WRAP, attrs: { contentEditable: 'false', title: e.item.fileName } });
16448
+ wrapElement = createElement('span', { className: CLASS_VIDEO_WRAP, attrs: { contentEditable: 'false', title: ((!isNullOrUndefined(e.item.title)) ? e.item.title : (!isNullOrUndefined(e.item.fileName) ? e.item.fileName : '')) } });
16230
16449
  vidElement = createElement('video', { className: CLASS_VIDEO + ' ' + CLASS_VIDEO_INLINE, attrs: { controls: '' } });
16231
16450
  sourceElement = createElement('source');
16232
16451
  this.setStyle(sourceElement, e, vidElement);
@@ -18876,6 +19095,7 @@ class UndoRedoManager {
18876
19095
  this.parent.editableElement.innerHTML = '';
18877
19096
  this.parent.editableElement.appendChild(removedContent.cloneNode(true));
18878
19097
  this.parent.editableElement.focus();
19098
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
18879
19099
  if (isIDevice$1()) {
18880
19100
  setEditFrameFocus(this.parent.editableElement, e.selector);
18881
19101
  }
@@ -18908,6 +19128,7 @@ class UndoRedoManager {
18908
19128
  this.parent.editableElement.innerHTML = '';
18909
19129
  this.parent.editableElement.appendChild(addedContent.cloneNode(true));
18910
19130
  this.parent.editableElement.focus();
19131
+ scrollToCursor(this.parent.currentDocument, this.parent.editableElement);
18911
19132
  if (isIDevice$1()) {
18912
19133
  setEditFrameFocus(this.parent.editableElement, e.selector);
18913
19134
  }
@@ -19008,9 +19229,9 @@ class MsWordPaste {
19008
19229
  const patern2 = /class="?Mso|style="[^ ]*\bmso-/i;
19009
19230
  const patern3 = /(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi;
19010
19231
  const pattern4 = /style='mso-width-source:/i;
19232
+ const source = this.findSource(elm);
19011
19233
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
19012
19234
  pattern4.test(tempHTMLContent)) {
19013
- const source = this.findSource(elm);
19014
19235
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
19015
19236
  this.addListClass(elm);
19016
19237
  listNodes = this.cleanUp(elm, listNodes);
@@ -19035,7 +19256,7 @@ class MsWordPaste {
19035
19256
  e.callBack(elm.innerHTML, this.cropImageDimensions, source);
19036
19257
  }
19037
19258
  else {
19038
- e.callBack(elm.innerHTML);
19259
+ e.callBack(elm.innerHTML, null, source);
19039
19260
  }
19040
19261
  }
19041
19262
  addDoubleBr(elm) {
@@ -19763,7 +19984,7 @@ class MsWordPaste {
19763
19984
  !isNormalList) {
19764
19985
  prevList = null;
19765
19986
  }
19766
- const pElement = createElement('p', { className: 'MsoNormal' });
19987
+ const pElement = createElement('p', { className: 'MsoNoSpacing' });
19767
19988
  pElement.innerHTML = collection[index].content.join(' ');
19768
19989
  if ((collection[index].nestedLevel === 1) &&
19769
19990
  (listCount === 0 || lfo !== collection[index].listFormatOverride) &&
@@ -20839,12 +21060,14 @@ class EditorManager {
20839
21060
  case 'alignments':
20840
21061
  this.observer.notify(ALIGNMENT_TYPE, {
20841
21062
  subCommand: value, event: event, callBack: callBack,
20842
- selector: selector,
20843
- value: exeValue
21063
+ selector: selector, value: exeValue, enterAction: enterAction
20844
21064
  });
20845
21065
  break;
20846
21066
  case 'indents':
20847
- this.observer.notify(INDENT_TYPE, { subCommand: value, event: event, callBack: callBack, selector: selector });
21067
+ this.observer.notify(INDENT_TYPE, {
21068
+ subCommand: value, event: event, callBack: callBack,
21069
+ selector: selector, enterAction: enterAction
21070
+ });
20848
21071
  break;
20849
21072
  case 'links':
20850
21073
  this.observer.notify(LINK, { command: command, value: value, item: exeValue, event: event, callBack: callBack });
@@ -21173,115 +21396,116 @@ class ContentRender {
21173
21396
  }
21174
21397
  }
21175
21398
 
21176
- const IFRAMEHEADER = `
21177
- <!DOCTYPE html>
21178
- <html>
21179
- <head>
21180
- <meta charset='utf-8' />
21181
- <style>
21182
- @charset "UTF-8";
21183
- body {
21184
- font-family: "Roboto", sans-serif;
21185
- font-size: 14px;
21186
- }
21187
- html, body{height: 100%;margin: 0;}
21188
- body.e-cursor{cursor:default}
21189
- span.e-selected-node {background-color: #939393;color: white;}
21190
- span.e-selected-node.e-highlight {background-color: #1d9dd8;}
21191
- body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
21192
- .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:
21193
- block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21194
- .e-rte-audio {border: 0;cursor: pointer;display:
21195
- block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
21196
- .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;
21197
- margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}
21198
- .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;}
21199
- .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}
21200
- .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}
21201
- .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
21202
- .e-img-caption.e-caption-inline {display: inline-block;float: none;
21203
- margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
21204
- position: relativetext-align: center;vertical-align: bottom;}
21205
- .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}
21206
- .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}
21207
- .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}
21208
- .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}
21209
- .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
21210
- margin: auto;opacity: .9;text-align: center;width: 100%;}
21211
- .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
21212
- .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}
21213
- .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}
21214
- .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21215
- .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
21216
- .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
21217
- max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
21218
- .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;
21219
- display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21220
- .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;}
21221
- img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
21222
- span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;
21223
- background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
21224
- .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; }
21225
- .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;
21226
- border-radius: 15px; height: 20px; width: 20px; }
21227
- .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; }
21228
- .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
21229
- .e-img-caption .e-img-inner { outline: 0; }
21230
- .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }
21231
- .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }
21232
- .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }
21233
- .e-img-caption a:focus-visible { outline: none; }
21234
- .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }
21235
- .e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }
21236
- body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
21237
- overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
21238
- p{margin: 0 0 10px;margin-bottom: 10px;}
21239
- li{margin-bottom: 10px;}
21240
- h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
21241
- h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
21242
- h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
21243
- h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
21244
- h5{font-size: 00.8em;font-weight: 400;margin: 0;}
21245
- h6{font-size: 00.65em;font-weight: 400;margin: 0;}
21246
- blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
21247
- pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
21248
- font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
21249
- white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
21250
- strong, b{font-weight: 700;}
21251
- a{text-decoration: none;user-select: auto;}
21252
- a:hover{text-decoration: underline;};
21253
- p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
21254
- h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
21255
- ul:last-child{margin-bottom: 0;}
21256
- table { border-collapse: collapse; empty-cells: show;}
21257
- table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}
21258
- table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
21259
- table th {background-color: #E0E0E0;}
21260
- table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
21261
- table .e-cell-select {border: 1px double #4a90e2;}
21262
- span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
21263
- span.e-table-box.e-rmob {height: 14px;width: 14px;}
21264
- .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
21265
- bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
21266
- .e-row-resize { cursor: row-resize; height: 1px;}
21267
- .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
21268
- .e-table-rhelper.e-column-helper { width: 1px; }
21269
- .e-table-rhelper.e-row-helper {height: 1px;}
21270
- .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
21271
- border-top: 6px solid transparent; content: ''; display: block; height: 0;
21272
- position: absolute; right: 4px; top: 4px; width: 20px; }
21273
- .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
21274
- border-top: 6px solid transparent; content: ''; display: block;
21275
- height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
21276
- .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
21277
- .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
21278
- span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
21279
- span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
21280
- .e-table-rhelper { background-color: #4a90e2;}
21281
- .e-rtl { direction: rtl; }
21282
- .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; }
21283
- li ol, li ul { margin-block-start: 10px;}
21284
- </style>
21399
+ const IFRAMEHEADER = `
21400
+ <!DOCTYPE html>
21401
+ <html>
21402
+ <head>
21403
+ <meta charset='utf-8' />
21404
+ <style>
21405
+ @charset "UTF-8";
21406
+ body {
21407
+ font-family: "Roboto", sans-serif;
21408
+ font-size: 14px;
21409
+ }
21410
+ html, body{height: 100%;margin: 0;}
21411
+ body.e-cursor{cursor:default}
21412
+ span.e-selected-node {background-color: #939393;color: white;}
21413
+ span.e-selected-node.e-highlight {background-color: #1d9dd8;}
21414
+ body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
21415
+ .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:
21416
+ block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21417
+ .e-rte-audio {border: 0;cursor: pointer;display:
21418
+ block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
21419
+ .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;
21420
+ margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}
21421
+ .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;}
21422
+ .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}
21423
+ .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}
21424
+ .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
21425
+ .e-img-caption.e-caption-inline {display: inline-block;float: none;
21426
+ margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
21427
+ position: relativetext-align: center;vertical-align: bottom;}
21428
+ .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}
21429
+ .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}
21430
+ .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}
21431
+ .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}
21432
+ .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
21433
+ margin: auto;opacity: .9;text-align: center;width: 100%;}
21434
+ .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
21435
+ .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}
21436
+ .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}
21437
+ .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21438
+ .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
21439
+ .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
21440
+ max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
21441
+ .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;
21442
+ display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
21443
+ .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;}
21444
+ img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
21445
+ span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;
21446
+ background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
21447
+ .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; }
21448
+ .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;
21449
+ border-radius: 15px; height: 20px; width: 20px; }
21450
+ .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; }
21451
+ .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
21452
+ .e-img-caption .e-img-inner { outline: 0; }
21453
+ .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }
21454
+ .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }
21455
+ .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }
21456
+ .e-img-caption a:focus-visible { outline: none; }
21457
+ .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }
21458
+ .e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }
21459
+ body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
21460
+ overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
21461
+ p{margin: 0 0 10px;margin-bottom: 10px;}
21462
+ li{margin-bottom: 10px;}
21463
+ table{margin-bottom: 10px;}
21464
+ h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
21465
+ h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
21466
+ h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
21467
+ h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
21468
+ h5{font-size: 00.8em;font-weight: 400;margin: 0;}
21469
+ h6{font-size: 00.65em;font-weight: 400;margin: 0;}
21470
+ blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
21471
+ pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
21472
+ font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
21473
+ white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
21474
+ strong, b{font-weight: 700;}
21475
+ a{text-decoration: none;user-select: auto;}
21476
+ a:hover{text-decoration: underline;};
21477
+ p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
21478
+ h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
21479
+ ul:last-child{margin-bottom: 0;}
21480
+ table { border-collapse: collapse; empty-cells: show;}
21481
+ table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}
21482
+ table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
21483
+ table th {background-color: #E0E0E0;}
21484
+ table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
21485
+ table .e-cell-select {border: 1px double #4a90e2;}
21486
+ span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
21487
+ span.e-table-box.e-rmob {height: 14px;width: 14px;}
21488
+ .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
21489
+ bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
21490
+ .e-row-resize { cursor: row-resize; height: 1px;}
21491
+ .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
21492
+ .e-table-rhelper.e-column-helper { width: 1px; }
21493
+ .e-table-rhelper.e-row-helper {height: 1px;}
21494
+ .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
21495
+ border-top: 6px solid transparent; content: ''; display: block; height: 0;
21496
+ position: absolute; right: 4px; top: 4px; width: 20px; }
21497
+ .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
21498
+ border-top: 6px solid transparent; content: ''; display: block;
21499
+ height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
21500
+ .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
21501
+ .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
21502
+ span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
21503
+ span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
21504
+ .e-table-rhelper { background-color: #4a90e2;}
21505
+ .e-rtl { direction: rtl; }
21506
+ .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; }
21507
+ li ol, li ul { margin-block-start: 10px;}
21508
+ </style>
21285
21509
  </head>`;
21286
21510
  /**
21287
21511
  * Content module is used to render Rich Text Editor content
@@ -21719,8 +21943,14 @@ class HtmlEditor {
21719
21943
  range.insertNode(tempSpan);
21720
21944
  }
21721
21945
  let currentChild = this.parent.inputElement.firstChild;
21722
- while (!isNullOrUndefined(currentChild) && currentChild.textContent.replace(regEx, '').trim().length > 0) {
21723
- currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
21946
+ while (!isNullOrUndefined(currentChild)) {
21947
+ if (currentChild.nodeName === '#text') {
21948
+ currentChild = currentChild.nextElementSibling;
21949
+ continue;
21950
+ }
21951
+ if (currentChild.textContent.replace(regEx, '').trim().length > 0) {
21952
+ currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
21953
+ }
21724
21954
  currentChild = currentChild.nextElementSibling;
21725
21955
  }
21726
21956
  let tempSpanToRemove = this.parent.inputElement.querySelector('.tempSpan');
@@ -21783,25 +22013,54 @@ class HtmlEditor {
21783
22013
  this.deleteCleanup(e, currentRange);
21784
22014
  }
21785
22015
  if (args.keyCode === 9 && this.parent.enableTabKey) {
22016
+ this.parent.formatter.saveData(e);
21786
22017
  if (!isNullOrUndefined(args.target) && isNullOrUndefined(closest(args.target, '.e-rte-toolbar'))) {
21787
22018
  const range = this.nodeSelectionObj.getRange(this.contentRenderer.getDocument());
21788
22019
  const parentNode = this.nodeSelectionObj.getParentNodeCollection(range);
21789
22020
  if (!((parentNode[0].nodeName === 'LI' || closest(parentNode[0], 'li') ||
21790
- closest(parentNode[0], 'table')) && range.startOffset === 0)) {
22021
+ closest(parentNode[0], 'table')))) {
21791
22022
  args.preventDefault();
21792
- if (!args.shiftKey) {
21793
- InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
21794
- this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22023
+ const selection = this.contentRenderer.getDocument().getSelection().getRangeAt(0);
22024
+ let alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
22025
+ if (this.parent.enterKey === 'BR') {
22026
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
22027
+ let save = this.nodeSelectionObj.save(range, this.contentRenderer.getDocument());
22028
+ this.parent.formatter.editorManager.domNode.setMarker(save);
22029
+ alignmentNodes = this.parent.formatter.editorManager.domNode.blockNodes();
22030
+ this.parent.formatter.editorManager.domNode.convertToBlockNodes(alignmentNodes, false);
22031
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22032
+ save = this.parent.formatter.editorManager.domNode.saveMarker(save);
22033
+ save.restore();
22034
+ }
22035
+ else {
22036
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
22037
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22038
+ }
21795
22039
  }
21796
- else if (this.rangeCollection.length > 0 &&
21797
- this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
21798
- const textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
21799
- this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
21800
- InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
21801
- this.rangeCollection.pop();
22040
+ else {
22041
+ if (!args.shiftKey) {
22042
+ if (selection.startOffset !== selection.endOffset && selection.startOffset === 0) {
22043
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22044
+ }
22045
+ else {
22046
+ InsertHtml.Insert(this.contentRenderer.getDocument(), '&nbsp;&nbsp;&nbsp;&nbsp;');
22047
+ this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()));
22048
+ }
22049
+ }
22050
+ else if (this.rangeCollection.length > 0 &&
22051
+ this.rangeCollection[this.rangeCollection.length - 1].startContainer.textContent.length === 4) {
22052
+ const textCont = this.rangeCollection[this.rangeCollection.length - 1].startContainer;
22053
+ this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(), textCont, textCont, 0, textCont.textContent.length);
22054
+ InsertHtml.Insert(this.contentRenderer.getDocument(), document.createTextNode(''));
22055
+ this.rangeCollection.pop();
22056
+ }
22057
+ else {
22058
+ this.marginTabAdd(args.shiftKey, alignmentNodes);
22059
+ }
21802
22060
  }
21803
22061
  }
21804
22062
  }
22063
+ this.parent.formatter.saveData(e);
21805
22064
  }
21806
22065
  if (e.args.action === 'space' ||
21807
22066
  e.args.action === 'enter' ||
@@ -21818,15 +22077,7 @@ class HtmlEditor {
21818
22077
  }
21819
22078
  else {
21820
22079
  this.parent.notify(enterHandler, { args: e.args });
21821
- const newRange = this.parent.getRange();
21822
- if (!isNullOrUndefined(newRange.startContainer) && this.parent.height !== 'auto' && newRange.startContainer.nodeName !== '#text'
21823
- && !this.parent.iframeSettings.enable && newRange.startContainer.getBoundingClientRect().bottom > this.parent.element.getBoundingClientRect().bottom) {
21824
- this.parent.element.querySelector('.e-rte-content').scrollTop += newRange.startContainer.getBoundingClientRect().bottom - this.parent.element.getBoundingClientRect().bottom;
21825
- }
21826
- else if (!isNullOrUndefined(newRange.startContainer) && this.parent.height === 'auto' && newRange.startContainer.nodeName !== '#text'
21827
- && !this.parent.iframeSettings.enable && window.innerHeight < newRange.startContainer.getBoundingClientRect().top) {
21828
- newRange.startContainer.scrollIntoView({ block: 'end', inline: 'nearest' });
21829
- }
22080
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
21830
22081
  }
21831
22082
  }
21832
22083
  }
@@ -21835,7 +22086,11 @@ class HtmlEditor {
21835
22086
  const editorValue = currentRange.startContainer.textContent.slice(0, currentRange.startOffset);
21836
22087
  const orderedList = this.isOrderedList(editorValue);
21837
22088
  const unOrderedList = this.isUnOrderedList(editorValue);
21838
- if (orderedList && !unOrderedList || unOrderedList && !orderedList) {
22089
+ let hasSplitedText = false;
22090
+ if (orderedList || unOrderedList) {
22091
+ hasSplitedText = this.hasMultipleTextNode(currentRange);
22092
+ }
22093
+ if (!hasSplitedText && (orderedList && !unOrderedList || unOrderedList && !orderedList)) {
21839
22094
  const eventArgs = {
21840
22095
  callBack: null,
21841
22096
  event: e.args,
@@ -21900,6 +22155,31 @@ class HtmlEditor {
21900
22155
  }
21901
22156
  return false;
21902
22157
  }
22158
+ hasMultipleTextNode(range) {
22159
+ if (range && range.startContainer && range.startContainer.parentNode) {
22160
+ const parentNode = range.startContainer.parentNode;
22161
+ if (range.startContainer.previousElementSibling &&
22162
+ range.startContainer.previousElementSibling.classList.contains('e-mention-chip')
22163
+ && !range.startContainer.previousElementSibling.isContentEditable) {
22164
+ return true;
22165
+ }
22166
+ if (this.parent.enterKey === 'BR' || closest(parentNode, 'table')) {
22167
+ return false;
22168
+ }
22169
+ const childNodes = parentNode.childNodes;
22170
+ const textNodes = [];
22171
+ for (let i = 0; i < childNodes.length; i++) {
22172
+ const node = childNodes[i];
22173
+ if (node && node.nodeType === Node.TEXT_NODE) {
22174
+ textNodes.push(node);
22175
+ if (textNodes.length > 1) {
22176
+ return true;
22177
+ }
22178
+ }
22179
+ }
22180
+ }
22181
+ return false;
22182
+ }
21903
22183
  backSpaceCleanup(e, currentRange) {
21904
22184
  let isLiElement = false;
21905
22185
  let isPreviousNotContentEditable = true;
@@ -22471,6 +22751,30 @@ class HtmlEditor {
22471
22751
  getSelectedHtml(e) {
22472
22752
  e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString());
22473
22753
  }
22754
+ marginTabAdd(val, alignmentNodes) {
22755
+ for (let index = 0; index < alignmentNodes.length; index++) {
22756
+ const element = alignmentNodes[index];
22757
+ if (element.closest('li')) {
22758
+ continue;
22759
+ }
22760
+ if (element.style.marginLeft) {
22761
+ let count$$1 = parseInt(element.style.marginLeft, 10);
22762
+ if (val) {
22763
+ count$$1 -= 20;
22764
+ }
22765
+ else {
22766
+ count$$1 += 20;
22767
+ }
22768
+ element.style.marginLeft = count$$1.toString() + 'px';
22769
+ if (element.style.marginLeft === '0px') {
22770
+ element.removeAttribute('style');
22771
+ }
22772
+ }
22773
+ else if (!val) {
22774
+ element.style.marginLeft = '20px';
22775
+ }
22776
+ }
22777
+ }
22474
22778
  }
22475
22779
 
22476
22780
  /**
@@ -22858,11 +23162,14 @@ class PasteCleanup {
22858
23162
  popupObj.close();
22859
23163
  }
22860
23164
  this.parent.trigger(imageUploadFailed, e);
22861
- uploadObj.destroy();
23165
+ if (uploadObj && document.body.contains(uploadObj.element)) {
23166
+ uploadObj.destroy();
23167
+ }
22862
23168
  }
22863
23169
  popupClose(popupObj, uploadObj, imgElem, e) {
22864
23170
  this.parent.inputElement.contentEditable = 'true';
22865
23171
  e.element = imgElem;
23172
+ e.detectImageSource = ImageInputSource.Pasted;
22866
23173
  this.parent.trigger(imageUploadSuccess, e, (e) => {
22867
23174
  if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
22868
23175
  const url = this.parent.insertImageSettings.path + e.file.name;
@@ -22872,7 +23179,7 @@ class PasteCleanup {
22872
23179
  });
22873
23180
  popupObj.close();
22874
23181
  imgElem.style.opacity = '1';
22875
- if (!uploadObj.isDestroyed) {
23182
+ if (uploadObj && document.body.contains(uploadObj.element)) {
22876
23183
  uploadObj.destroy();
22877
23184
  }
22878
23185
  this.toolbarEnableDisable(false);
@@ -23121,7 +23428,8 @@ class PasteCleanup {
23121
23428
  clipBoardElem = this.allowedStyle(clipBoardElem);
23122
23429
  }
23123
23430
  this.saveSelection.restore();
23124
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
23431
+ const newText = clipBoardElem.innerHTML.split("&").join("&amp;");
23432
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
23125
23433
  const allImg = clipBoardElem.querySelectorAll('img');
23126
23434
  for (let i = 0; i < allImg.length; i++) {
23127
23435
  if (!isNullOrUndefined(allImg[i].getAttribute('src'))) {
@@ -23169,27 +23477,35 @@ class PasteCleanup {
23169
23477
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
23170
23478
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
23171
23479
  this.parent.formatter.onSuccess(this.parent, args);
23172
- if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem) &&
23173
- returnArgs.imgElem.length > 0) {
23174
- const pasteContent = returnArgs.elements;
23175
- const imageContent = returnArgs.imgElem;
23176
- const lastElementChild = this.findLastElement(pasteContent[pasteContent.length - 1]);
23177
- const isImageAtLast = !isNullOrUndefined(lastElementChild) ? lastElementChild.nodeName === 'IMG' : false;
23178
- if (isImageAtLast || pasteContent[pasteContent.length - 1] === imageContent[imageContent.length - 1]) {
23179
- this.parent.notify(insertCompleted, {
23180
- args: args.event,
23181
- type: 'Images',
23182
- isNotify: true,
23183
- elements: imageContent[imageContent.length - 1]
23184
- });
23185
- }
23186
- }
23187
23480
  }, clipBoardElem, null, null, this.parent.enterKey);
23481
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
23188
23482
  this.removeTempClass();
23189
23483
  this.parent.notify(toolbarRefresh, {});
23190
23484
  this.cropImageHandler(this.parent.inputElement);
23191
23485
  }
23192
23486
  }
23487
+ convertBlobToBase64(element) {
23488
+ const imgElem = element.querySelectorAll('img');
23489
+ for (let i = 0; i < imgElem.length; i++) {
23490
+ if (imgElem[i].getAttribute('src') &&
23491
+ imgElem[i].getAttribute('src').startsWith("blob")) {
23492
+ let blobImageUrl = imgElem[i].getAttribute('src');
23493
+ let img = new Image();
23494
+ const onImageLoadEvent = () => {
23495
+ let canvas = document.createElement('canvas');
23496
+ let ctx = canvas.getContext('2d');
23497
+ canvas.width = img.width;
23498
+ canvas.height = img.height;
23499
+ ctx.drawImage(img, 0, 0);
23500
+ let base64String = canvas.toDataURL('image/png');
23501
+ imgElem[i].src = base64String;
23502
+ img.removeEventListener('load', onImageLoadEvent);
23503
+ };
23504
+ img.src = blobImageUrl;
23505
+ img.addEventListener('load', onImageLoadEvent);
23506
+ }
23507
+ }
23508
+ }
23193
23509
  cropImageHandler(element) {
23194
23510
  const allImgElm = element.querySelectorAll('.e-img-cropped');
23195
23511
  if (allImgElm.length > 0) {
@@ -23228,22 +23544,33 @@ class PasteCleanup {
23228
23544
  }
23229
23545
  }
23230
23546
  else {
23231
- this.imgUploading(this.parent.inputElement);
23232
- if (this.parent.iframeSettings.enable) {
23233
- this.parent.updateValue();
23547
+ 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")) {
23548
+ this.convertBlobToBase64(this.parent.inputElement);
23549
+ setTimeout(() => {
23550
+ this.imgUploading(this.parent.inputElement);
23551
+ if (this.parent.iframeSettings.enable) {
23552
+ this.parent.updateValue();
23553
+ }
23554
+ }, 20);
23555
+ }
23556
+ else {
23557
+ this.imgUploading(this.parent.inputElement);
23558
+ if (this.parent.iframeSettings.enable) {
23559
+ this.parent.updateValue();
23560
+ }
23234
23561
  }
23235
23562
  }
23236
23563
  }
23237
23564
  addTableClass(element, source) {
23238
- source = isNullOrUndefined(source) ? '' : source;
23239
23565
  const tableElement = element.querySelectorAll('table');
23240
23566
  for (let i = 0; i < tableElement.length; i++) {
23241
- if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
23242
- tableElement[i].classList.add('e-rte-table');
23243
- }
23244
- else if (source && source !== 'html') {
23567
+ const isMSTeamsTable = tableElement[i].parentElement.nodeName === 'FIGURE';
23568
+ if (this.parent.pasteCleanupSettings.keepFormat && source && !isMSTeamsTable) {
23245
23569
  tableElement[i].classList.add('e-rte-paste-' + source + '-table');
23246
23570
  }
23571
+ else if (!tableElement[i].classList.contains('e-rte-table')) {
23572
+ tableElement[i].classList.add('e-rte-table');
23573
+ }
23247
23574
  }
23248
23575
  return element;
23249
23576
  }
@@ -23580,16 +23907,6 @@ class PasteCleanup {
23580
23907
  }
23581
23908
  return clipBoardElem;
23582
23909
  }
23583
- findLastElement(element) {
23584
- if (!isNullOrUndefined(element) && !isNullOrUndefined(element.lastElementChild)) {
23585
- let lastChild = element.lastElementChild;
23586
- while (lastChild && lastChild.lastElementChild) {
23587
- lastChild = lastChild.lastElementChild;
23588
- }
23589
- return lastChild;
23590
- }
23591
- return null;
23592
- }
23593
23910
  processPictureElement(clipBoardElem) {
23594
23911
  const pictureElems = clipBoardElem.querySelectorAll('picture');
23595
23912
  for (let i = 0; i < pictureElems.length; i++) {
@@ -24020,9 +24337,6 @@ class FullScreen {
24020
24337
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24021
24338
  this.parent.quickToolbarModule.hideQuickToolbars();
24022
24339
  }
24023
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24024
- this.parent.notify(destroyTooltip, { args: event });
24025
- }
24026
24340
  this.scrollableParent = getScrollableParent(this.parent.element);
24027
24341
  if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24028
24342
  const evenArgs = {
@@ -24074,9 +24388,6 @@ class FullScreen {
24074
24388
  && !isNullOrUndefined(this.parent.quickToolbarModule)) {
24075
24389
  this.parent.quickToolbarModule.hideQuickToolbars();
24076
24390
  }
24077
- if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
24078
- this.parent.notify(destroyTooltip, { args: event });
24079
- }
24080
24391
  if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
24081
24392
  const evenArgs = {
24082
24393
  cancel: false,
@@ -25147,7 +25458,7 @@ class EmojiPicker {
25147
25458
  const popupHeight = 330;
25148
25459
  let popupTop = cursorTop;
25149
25460
  const popupLeft = cursorLeft + rect.width;
25150
- if (rteEle.getBoundingClientRect().top < 0) {
25461
+ if (rteEle.getBoundingClientRect().top < 0 && !this.parent.inlineMode.enable) {
25151
25462
  popupTop = popupTop + rteContent.getBoundingClientRect().top - toolbarHeight;
25152
25463
  }
25153
25464
  if (rect.top < popupHeight) {
@@ -25814,7 +26125,10 @@ class Link {
25814
26125
  this.selection.restore();
25815
26126
  }
25816
26127
  else {
26128
+ const x = window.scrollX;
26129
+ const y = window.scrollY;
25817
26130
  this.selfLink.parent.contentModule.getEditPanel().focus();
26131
+ window.scrollTo(x, y);
25818
26132
  }
25819
26133
  }
25820
26134
  onDocumentClick(e) {
@@ -26474,13 +26788,13 @@ class Image$1 {
26474
26788
  selectParentEle = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
26475
26789
  if (!originalEvent.ctrlKey && originalEvent.key && (originalEvent.key.length === 1 || originalEvent.action === 'enter') &&
26476
26790
  (!isNullOrUndefined(selectParentEle[0]) && selectParentEle[0].tagName === 'IMG') && selectParentEle[0].parentElement) {
26477
- const prev = selectParentEle[0].parentElement.childNodes[0];
26478
26791
  if (this.contentModule.getEditPanel().querySelector('.e-img-resize')) {
26479
26792
  this.removeResizeEle();
26480
26793
  }
26481
- this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), prev, prev, prev.textContent.length, prev.textContent.length);
26482
26794
  removeClass([selectParentEle[0]], 'e-img-focus');
26483
- this.quickToolObj.imageQTBar.hidePopup();
26795
+ if (this.quickToolObj && this.quickToolObj.imageQTBar) {
26796
+ this.quickToolObj.imageQTBar.hidePopup();
26797
+ }
26484
26798
  }
26485
26799
  }
26486
26800
  if (originalEvent.ctrlKey && (originalEvent.keyCode === 89 || originalEvent.keyCode === 90)) {
@@ -27241,7 +27555,12 @@ class Image$1 {
27241
27555
  animationSettings: { effect: 'None' },
27242
27556
  close: (event) => {
27243
27557
  if (this.isImgUploaded) {
27244
- this.uploadObj.remove();
27558
+ if (this.dialogObj.element.querySelector('.e-file-abort-btn')) {
27559
+ this.dialogObj.element.querySelector('.e-file-abort-btn').click();
27560
+ }
27561
+ else {
27562
+ this.uploadObj.remove();
27563
+ }
27245
27564
  }
27246
27565
  this.parent.isBlur = false;
27247
27566
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -27639,6 +27958,7 @@ class Image$1 {
27639
27958
  }
27640
27959
  },
27641
27960
  success: (e) => {
27961
+ e.detectImageSource = ImageInputSource.Uploaded;
27642
27962
  this.parent.trigger(imageUploadSuccess, e, (e) => {
27643
27963
  if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
27644
27964
  const url = this.parent.insertImageSettings.path + e.file.name;
@@ -28078,6 +28398,7 @@ class Image$1 {
28078
28398
  imageElement.style.opacity = '1';
28079
28399
  imageElement.classList.add(CLS_IMG_FOCUS);
28080
28400
  e.element = imageElement;
28401
+ e.detectImageSource = ImageInputSource.Dropped;
28081
28402
  this.parent.trigger(imageUploadSuccess, e, (e) => {
28082
28403
  if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
28083
28404
  const url = this.parent.insertImageSettings.path + e.file.name;
@@ -28746,7 +29067,12 @@ class Audio {
28746
29067
  animationSettings: { effect: 'None' },
28747
29068
  close: (event) => {
28748
29069
  if (this.isAudioUploaded) {
28749
- this.uploadObj.removing();
29070
+ if (this.dialogObj.element.querySelector('.e-file-abort-btn')) {
29071
+ this.dialogObj.element.querySelector('.e-file-abort-btn').click();
29072
+ }
29073
+ else {
29074
+ this.uploadObj.remove();
29075
+ }
28750
29076
  }
28751
29077
  this.parent.isBlur = false;
28752
29078
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -30097,7 +30423,12 @@ class Video {
30097
30423
  animationSettings: { effect: 'None' },
30098
30424
  close: (event) => {
30099
30425
  if (this.isVideoUploaded) {
30100
- this.uploadObj.removing();
30426
+ if (this.dialogObj.element.querySelector('.e-file-abort-btn')) {
30427
+ this.dialogObj.element.querySelector('.e-file-abort-btn').click();
30428
+ }
30429
+ else {
30430
+ this.uploadObj.remove();
30431
+ }
30101
30432
  }
30102
30433
  this.parent.isBlur = false;
30103
30434
  if (event && !isNullOrUndefined(event.event) && event.event.returnValue) {
@@ -31344,8 +31675,11 @@ class Table {
31344
31675
  if (proxy.editdlgObj) {
31345
31676
  proxy.editdlgObj.hide();
31346
31677
  }
31678
+ const x = window.scrollX;
31679
+ const y = window.scrollY;
31347
31680
  proxy.parent.formatter.process(proxy.parent, selectionObj.args, selectionObj.args.originalEvent, value);
31348
31681
  proxy.contentModule.getEditPanel().focus();
31682
+ window.scrollTo(x, y);
31349
31683
  proxy.parent.on(mouseDown, proxy.cellSelect, proxy);
31350
31684
  }
31351
31685
  cellSelect(e) {
@@ -32321,7 +32655,8 @@ class Table {
32321
32655
  const argument = ((Browser.isDevice || (!isNullOrUndefined(args.args)
32322
32656
  && !isNullOrUndefined(args.args.originalEvent) &&
32323
32657
  args.args.originalEvent.action === 'insert-table')
32324
- || proxy.parent.inlineMode.enable || !isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) ? args :
32658
+ || proxy.parent.inlineMode.enable || ((!isNullOrUndefined(proxy.parent.quickToolbarSettings.text)) &&
32659
+ !(args instanceof PointerEvent))) ? args :
32325
32660
  this);
32326
32661
  proxy.tableInsert(proxy.rowTextBox.value, proxy.columnTextBox.value, e, argument);
32327
32662
  }
@@ -32770,12 +33105,12 @@ const executeGroup = {
32770
33105
  }
32771
33106
  };
32772
33107
 
32773
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32774
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32775
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
32776
- 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;
32777
- return c > 3 && r && Object.defineProperty(target, key, r), r;
32778
- };
33108
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33109
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33110
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33111
+ 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;
33112
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33113
+ };
32779
33114
  /**
32780
33115
  * Configures the toolbar settings of the RichTextEditor.
32781
33116
  */
@@ -33165,12 +33500,12 @@ __decorate$2([
33165
33500
  Property(bulletFormatList)
33166
33501
  ], BulletFormatList.prototype, "types", void 0);
33167
33502
 
33168
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33169
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33170
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33171
- 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;
33172
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33173
- };
33503
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33504
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33505
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33506
+ 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;
33507
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33508
+ };
33174
33509
  /**
33175
33510
  * Objects used for configuring the iframe resources properties.
33176
33511
  */
@@ -33197,12 +33532,12 @@ __decorate$3([
33197
33532
  Complex({}, Resources)
33198
33533
  ], IFrameSettings.prototype, "resources", void 0);
33199
33534
 
33200
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33201
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33202
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33203
- 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;
33204
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33205
- };
33535
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33536
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33537
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33538
+ 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;
33539
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33540
+ };
33206
33541
  /**
33207
33542
  * Configures the inlineMode property of the RTE.
33208
33543
  */
@@ -33253,6 +33588,19 @@ class EnterKeyAction {
33253
33588
  this.getRangeNode();
33254
33589
  let isTableEnter = true;
33255
33590
  this.formatTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'];
33591
+ const tableImagCursor = this.processedTableImageCursor();
33592
+ if (tableImagCursor.start || tableImagCursor.end) {
33593
+ if (tableImagCursor.startName === 'TABLE' || tableImagCursor.endName === 'TABLE') { // Default browser action prevented and hanled manually.
33594
+ this.handleCursorAtTableSide(e, tableImagCursor.start, tableImagCursor.end);
33595
+ return;
33596
+ }
33597
+ }
33598
+ if (tableImagCursor.start || tableImagCursor.end || this.range.startContainer.nodeName === 'IMG') {
33599
+ if (this.parent.enterKey === 'BR' && (tableImagCursor.startName === 'IMG' || tableImagCursor.endName === 'IMG' || this.range.startContainer.nodeName === 'IMG')) { // Default browser action prevented and hanled manually.
33600
+ this.handleEnterKeyAtImageSide(e, tableImagCursor.start, tableImagCursor.end);
33601
+ return;
33602
+ }
33603
+ }
33256
33604
  if (!isNullOrUndefined(this.startNode.closest('TABLE')) && !isNullOrUndefined(this.endNode.closest('TABLE'))) {
33257
33605
  isTableEnter = false;
33258
33606
  let curElement = this.startNode;
@@ -33567,6 +33915,7 @@ class EnterKeyAction {
33567
33915
  else {
33568
33916
  currentParent = this.startNode;
33569
33917
  }
33918
+ const currentParentStyle = window.getComputedStyle(currentParent);
33570
33919
  this.removeBRElement(currentParent);
33571
33920
  let currentParentLastChild = currentParent.lastChild;
33572
33921
  while (!isNullOrUndefined(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text' || currentParentLastChild.nodeName === 'BR'
@@ -33618,7 +33967,6 @@ class EnterKeyAction {
33618
33967
  const outerBRElem = this.parent.createElement('br');
33619
33968
  if (this.range.startOffset === 0 && this.range.endOffset === 0 &&
33620
33969
  !isNullOrUndefined(currentParent.previousSibling) && currentParent.previousSibling.nodeName === 'BR' && currentParent.nodeName !== 'P' && currentParent.nodeName !== 'DIV') {
33621
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
33622
33970
  newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, currentParent, false).cloneNode(true);
33623
33971
  this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
33624
33972
  this.insertFocusContent();
@@ -33630,6 +33978,14 @@ class EnterKeyAction {
33630
33978
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33631
33979
 
33632
33980
  }
33981
+ else if (currentParent !== this.parent.inputElement &&
33982
+ (currentParentStyle.display === 'inline' || currentParentStyle.display === 'inline-block')) {
33983
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
33984
+ newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, currentParent, true).cloneNode(true);
33985
+ currentParent.parentElement.insertBefore(outerBRElem, currentParent);
33986
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), currentParent, 0);
33987
+ this.insertFocusContent();
33988
+ }
33633
33989
  else {
33634
33990
  this.insertBRElement();
33635
33991
  }
@@ -33640,7 +33996,7 @@ class EnterKeyAction {
33640
33996
  }
33641
33997
  e.args.preventDefault();
33642
33998
  }
33643
- this.parent.trigger(actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
33999
+ this.triggerActionComplete(e, shiftKey);
33644
34000
  }
33645
34001
  });
33646
34002
  }
@@ -33710,14 +34066,131 @@ class EnterKeyAction {
33710
34066
  }
33711
34067
  return insertElem;
33712
34068
  }
34069
+ triggerActionComplete(e, shiftKey) {
34070
+ this.parent.trigger(actionComplete, { requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction', args: e.args });
34071
+ }
34072
+ handleCursorAtTableSide(e, isStart, isEnd) {
34073
+ if (this.parent.enterKey !== 'BR') {
34074
+ const shiftKey = e.args.shiftKey;
34075
+ const actionBeginArgs = {
34076
+ cancel: false,
34077
+ name: actionBegin,
34078
+ requestType: shiftKey ? 'ShiftEnterAction' : 'EnterAction',
34079
+ originalEvent: e.args
34080
+ };
34081
+ this.parent.trigger(actionBegin, actionBeginArgs, (actionBeginArgs) => {
34082
+ if (!actionBeginArgs.cancel) {
34083
+ const newElement = this.parent.createElement(this.parent.enterKey);
34084
+ newElement.innerHTML = '<br>';
34085
+ let tableElement;
34086
+ if (isStart) {
34087
+ tableElement = this.range.startContainer.childNodes[this.range.startOffset];
34088
+ tableElement.parentElement.insertBefore(newElement, tableElement);
34089
+ }
34090
+ if (isEnd) {
34091
+ tableElement = this.range.startContainer.childNodes[this.range.startOffset - 1];
34092
+ if (!isNullOrUndefined(tableElement.nextSibling)) {
34093
+ tableElement.parentElement.insertBefore(newElement, tableElement.nextSibling);
34094
+ }
34095
+ else if (isNullOrUndefined(tableElement.nextSibling)) {
34096
+ tableElement.parentElement.appendChild(newElement);
34097
+ }
34098
+ }
34099
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), newElement, 0);
34100
+ e.args.preventDefault();
34101
+ this.triggerActionComplete(e, shiftKey);
34102
+ }
34103
+ });
34104
+ }
34105
+ }
34106
+ handleEnterKeyAtImageSide(e, isStart, isEnd) {
34107
+ const actionBeginArgs = {
34108
+ cancel: false,
34109
+ name: actionBegin,
34110
+ requestType: e.args.shiftKey ? 'ShiftEnterAction' : 'EnterAction',
34111
+ originalEvent: e.args
34112
+ };
34113
+ let directRange = false;
34114
+ if (this.range.startContainer.nodeName === 'IMG' && this.range.startOffset === 0) {
34115
+ directRange = true;
34116
+ }
34117
+ this.parent.trigger(actionBegin, actionBeginArgs, (actionBeginArgs) => {
34118
+ if (!actionBeginArgs.cancel) {
34119
+ if (this.parent.enterKey === 'BR') {
34120
+ const newElement = this.parent.createElement('BR');
34121
+ let imageElement;
34122
+ if (directRange) {
34123
+ imageElement = this.range.startContainer;
34124
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34125
+ this.parent.formatter.editorManager.nodeSelection.
34126
+ setCursorPoint(this.parent.contentModule.getDocument(), imageElement, 0);
34127
+ }
34128
+ if (isStart) {
34129
+ imageElement = this.range.startContainer.childNodes[this.range.startOffset];
34130
+ imageElement.parentElement.insertBefore(newElement, imageElement);
34131
+ this.parent.formatter.editorManager.nodeSelection.
34132
+ setCursorPoint(this.parent.contentModule.getDocument(), imageElement, 0);
34133
+ }
34134
+ if (isEnd) {
34135
+ imageElement = this.range.startContainer.childNodes[this.range.startOffset - 1];
34136
+ if (!isNullOrUndefined(imageElement.nextSibling)) {
34137
+ imageElement.parentElement.insertBefore(newElement, imageElement.nextSibling);
34138
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), newElement.nextSibling, 0);
34139
+ }
34140
+ else if (isNullOrUndefined(imageElement.nextSibling)) {
34141
+ imageElement.parentElement.appendChild(newElement);
34142
+ const brElement = this.parent.createElement('BR');
34143
+ imageElement.parentElement.appendChild(brElement);
34144
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), brElement, 0);
34145
+ }
34146
+ }
34147
+ e.args.preventDefault();
34148
+ this.triggerActionComplete(e, e.args.shiftKey);
34149
+ }
34150
+ }
34151
+ });
34152
+ }
34153
+ isTableOrImageStart() {
34154
+ const customHandlerElements = ['IMG', 'TABLE'];
34155
+ const startContainer = this.range.startContainer;
34156
+ const startOffset = this.range.startOffset;
34157
+ const isCursorAtStart = this.range.collapsed && (startContainer.nodeType === 1) &&
34158
+ startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
34159
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
34160
+ if (isCursorAtStart) {
34161
+ return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
34162
+ }
34163
+ else {
34164
+ return { start: false, startNodeName: '' };
34165
+ }
34166
+ }
34167
+ isTableOrImageEnd() {
34168
+ const customHandlerElements = ['IMG', 'TABLE'];
34169
+ const startContainer = this.range.startContainer;
34170
+ const startOffset = this.range.startOffset;
34171
+ const isCursorAtEnd = this.range.collapsed && (startContainer.nodeType === 1) &&
34172
+ startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
34173
+ (customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
34174
+ if (isCursorAtEnd) {
34175
+ return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
34176
+ }
34177
+ else {
34178
+ return { end: false, endNodeName: '' };
34179
+ }
34180
+ }
34181
+ processedTableImageCursor() {
34182
+ const { start, startNodeName } = this.isTableOrImageStart();
34183
+ const { end, endNodeName } = this.isTableOrImageEnd();
34184
+ return { start, startName: startNodeName, end, endName: endNodeName };
34185
+ }
33713
34186
  }
33714
34187
 
33715
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33716
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33717
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33718
- 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;
33719
- return c > 3 && r && Object.defineProperty(target, key, r), r;
33720
- };
34188
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
34189
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34190
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34191
+ 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;
34192
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
34193
+ };
33721
34194
  /**
33722
34195
  * Represents the Rich Text Editor component.
33723
34196
  * ```html
@@ -33855,6 +34328,7 @@ let RichTextEditor = class RichTextEditor extends Component {
33855
34328
  this.persistData();
33856
34329
  setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
33857
34330
  attributes(this.element, { role: 'application', 'aria-label': 'Rich Text Editor' });
34331
+ this.beforeRenderClassValue = this.element.getAttribute('class');
33858
34332
  }
33859
34333
  persistData() {
33860
34334
  if (this.enablePersistence && this.originalElement.tagName === 'TEXTAREA') {
@@ -34725,10 +35199,21 @@ let RichTextEditor = class RichTextEditor extends Component {
34725
35199
  if (this.isDestroyed || !this.isRendered) {
34726
35200
  return;
34727
35201
  }
35202
+ this.element.className = this.beforeRenderClassValue;
35203
+ this.removeHtmlAttributes();
35204
+ this.removeAttributes();
35205
+ this.beforeRenderClassValue = null;
34728
35206
  if (!isNullOrUndefined(this.timeInterval)) {
34729
35207
  clearInterval(this.timeInterval);
34730
35208
  this.timeInterval = null;
34731
35209
  }
35210
+ const tooltipElements = document.querySelectorAll('[data-rte-id="' + this.getID() + '"]');
35211
+ for (let i = 0; i < tooltipElements.length; i++) {
35212
+ const tooltipEle = tooltipElements[i];
35213
+ if (this.getID() === tooltipEle.getAttribute('data-rte-id')) {
35214
+ detach(tooltipEle);
35215
+ }
35216
+ }
34732
35217
  if (this.element.offsetParent === null) {
34733
35218
  if (!isNullOrUndefined(this.toolbarModule)) {
34734
35219
  this.toolbarModule.destroy();
@@ -34785,8 +35270,6 @@ let RichTextEditor = class RichTextEditor extends Component {
34785
35270
  }
34786
35271
  }
34787
35272
  }
34788
- this.removeHtmlAttributes();
34789
- this.removeAttributes();
34790
35273
  super.destroy();
34791
35274
  this.isRendered = false;
34792
35275
  }
@@ -34817,6 +35300,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34817
35300
  this.element.removeAttribute('aria-disabled');
34818
35301
  this.element.removeAttribute('role');
34819
35302
  this.element.removeAttribute('tabindex');
35303
+ this.element.removeAttribute('aria-label');
34820
35304
  }
34821
35305
  destroyDependentModules() {
34822
35306
  /* destroy dependent modules */
@@ -35070,7 +35554,7 @@ let RichTextEditor = class RichTextEditor extends Component {
35070
35554
  }
35071
35555
  }
35072
35556
  updatePanelValue() {
35073
- let value = this.value;
35557
+ let value = this.listOrderCorrection(this.value);
35074
35558
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
35075
35559
  const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
35076
35560
  if (value) {
@@ -35114,6 +35598,17 @@ let RichTextEditor = class RichTextEditor extends Component {
35114
35598
  this.countModule.refresh();
35115
35599
  }
35116
35600
  }
35601
+ listOrderCorrection(value) {
35602
+ const valueElementWrapper = this.createElement('div');
35603
+ valueElementWrapper.innerHTML = value;
35604
+ const listElements = valueElementWrapper.querySelectorAll('UL, OL');
35605
+ for (let i = 0; i < listElements.length; i++) {
35606
+ if (!isNullOrUndefined(listElements[i]) && !isNullOrUndefined(listElements[i].parentElement) && !isNullOrUndefined(listElements[i].previousElementSibling) && (listElements[i].parentElement.nodeName === 'UL' || listElements[i].parentElement.nodeName === 'OL')) {
35607
+ listElements[i].previousElementSibling.appendChild(listElements[i]);
35608
+ }
35609
+ }
35610
+ return valueElementWrapper.innerHTML;
35611
+ }
35117
35612
  setHeight(height) {
35118
35613
  if (height !== 'auto') {
35119
35614
  this.element.style.height = formatUnit(height);
@@ -36580,5 +37075,5 @@ RichTextEditor = __decorate$1([
36580
37075
  * Rich Text Editor component exported items
36581
37076
  */
36582
37077
 
36583
- export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
37078
+ export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, ImageInputSource, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
36584
37079
  //# sourceMappingURL=ej2-richtexteditor.es2015.js.map