@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.41-569421

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 (272) hide show
  1. package/.eslintrc.json +259 -259
  2. package/CHANGELOG.md +1953 -1749
  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 +9971 -8025
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +8445 -6498
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/helpers/e2e/index.js +3 -3
  11. package/helpers/e2e/rte-helper.js +13 -13
  12. package/license +9 -9
  13. package/package.json +74 -74
  14. package/src/common/config.d.ts +7 -0
  15. package/src/common/config.js +12 -1
  16. package/src/common/constant.d.ts +6 -0
  17. package/src/common/constant.js +6 -0
  18. package/src/common/interface.d.ts +19 -7
  19. package/src/common/types.d.ts +6 -0
  20. package/src/common/util.d.ts +6 -0
  21. package/src/common/util.js +61 -20
  22. package/src/editor-manager/base/classes.d.ts +1 -1
  23. package/src/editor-manager/base/classes.js +1 -1
  24. package/src/editor-manager/base/constant.d.ts +6 -0
  25. package/src/editor-manager/base/constant.js +6 -0
  26. package/src/editor-manager/base/editor-manager.d.ts +8 -3
  27. package/src/editor-manager/base/editor-manager.js +62 -3
  28. package/src/editor-manager/base/enum.d.ts +2 -2
  29. package/src/editor-manager/base/interface.d.ts +17 -9
  30. package/src/editor-manager/base/types.d.ts +1 -1
  31. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  32. package/src/editor-manager/plugin/alignments.js +2 -2
  33. package/src/editor-manager/plugin/audio.d.ts +3 -3
  34. package/src/editor-manager/plugin/audio.js +16 -6
  35. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  36. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  37. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  38. package/src/editor-manager/plugin/clearformat.js +1 -1
  39. package/src/editor-manager/plugin/dom-node.d.ts +39 -35
  40. package/src/editor-manager/plugin/dom-node.js +203 -62
  41. package/src/editor-manager/plugin/format-painter-actions.d.ts +2 -1
  42. package/src/editor-manager/plugin/format-painter-actions.js +20 -2
  43. package/src/editor-manager/plugin/formats.d.ts +3 -2
  44. package/src/editor-manager/plugin/formats.js +40 -5
  45. package/src/editor-manager/plugin/image.d.ts +3 -3
  46. package/src/editor-manager/plugin/image.js +41 -18
  47. package/src/editor-manager/plugin/indents.d.ts +2 -2
  48. package/src/editor-manager/plugin/indents.js +3 -3
  49. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  50. package/src/editor-manager/plugin/insert-methods.js +4 -4
  51. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  52. package/src/editor-manager/plugin/insert-text.js +2 -2
  53. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  54. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  55. package/src/editor-manager/plugin/inserthtml.d.ts +3 -2
  56. package/src/editor-manager/plugin/inserthtml.js +85 -22
  57. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  58. package/src/editor-manager/plugin/isformatted.js +8 -8
  59. package/src/editor-manager/plugin/link.d.ts +2 -2
  60. package/src/editor-manager/plugin/link.js +10 -5
  61. package/src/editor-manager/plugin/lists.d.ts +2 -2
  62. package/src/editor-manager/plugin/lists.js +161 -72
  63. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +4 -1
  64. package/src/editor-manager/plugin/ms-word-clean-up.js +216 -86
  65. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  66. package/src/editor-manager/plugin/nodecutter.js +11 -8
  67. package/src/editor-manager/plugin/selection-commands.d.ts +3 -1
  68. package/src/editor-manager/plugin/selection-commands.js +249 -5
  69. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  70. package/src/editor-manager/plugin/selection-exec.js +2 -2
  71. package/src/editor-manager/plugin/table.d.ts +6 -3
  72. package/src/editor-manager/plugin/table.js +97 -51
  73. package/src/editor-manager/plugin/toolbar-status.d.ts +4 -4
  74. package/src/editor-manager/plugin/toolbar-status.js +22 -12
  75. package/src/editor-manager/plugin/undo.d.ts +7 -6
  76. package/src/editor-manager/plugin/undo.js +27 -7
  77. package/src/editor-manager/plugin/video.d.ts +3 -3
  78. package/src/editor-manager/plugin/video.js +3 -3
  79. package/src/global.d.ts +1 -0
  80. package/src/markdown-parser/base/interface.d.ts +10 -10
  81. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  82. package/src/markdown-parser/base/markdown-parser.js +3 -3
  83. package/src/markdown-parser/base/types.d.ts +1 -1
  84. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  85. package/src/markdown-parser/plugin/clearformat.js +2 -2
  86. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  87. package/src/markdown-parser/plugin/formats.js +2 -2
  88. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  89. package/src/markdown-parser/plugin/insert-text.js +2 -2
  90. package/src/markdown-parser/plugin/link.d.ts +2 -2
  91. package/src/markdown-parser/plugin/link.js +2 -2
  92. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  93. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  94. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  95. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  96. package/src/markdown-parser/plugin/table.d.ts +3 -3
  97. package/src/markdown-parser/plugin/table.js +3 -3
  98. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  99. package/src/markdown-parser/plugin/undo.js +6 -6
  100. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +13 -12
  101. package/src/rich-text-editor/actions/base-quick-toolbar.js +70 -23
  102. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  103. package/src/rich-text-editor/actions/base-toolbar.js +36 -37
  104. package/src/rich-text-editor/actions/color-picker.d.ts +3 -2
  105. package/src/rich-text-editor/actions/color-picker.js +15 -5
  106. package/src/rich-text-editor/actions/count.d.ts +3 -3
  107. package/src/rich-text-editor/actions/count.js +4 -4
  108. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +3 -2
  109. package/src/rich-text-editor/actions/dropdown-buttons.js +13 -7
  110. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  111. package/src/rich-text-editor/actions/emoji-picker.js +17 -8
  112. package/src/rich-text-editor/actions/enter-key.js +10 -5
  113. package/src/rich-text-editor/actions/file-manager.js +1 -1
  114. package/src/rich-text-editor/actions/format-painter.js +5 -2
  115. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  116. package/src/rich-text-editor/actions/full-screen.js +8 -7
  117. package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
  118. package/src/rich-text-editor/actions/html-editor.js +134 -22
  119. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  120. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  121. package/src/rich-text-editor/actions/keyboard.js +23 -21
  122. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  123. package/src/rich-text-editor/actions/markdown-editor.js +5 -3
  124. package/src/rich-text-editor/actions/paste-clean-up.d.ts +6 -1
  125. package/src/rich-text-editor/actions/paste-clean-up.js +157 -29
  126. package/src/rich-text-editor/actions/quick-toolbar.d.ts +17 -9
  127. package/src/rich-text-editor/actions/quick-toolbar.js +68 -21
  128. package/src/rich-text-editor/actions/resize.js +2 -1
  129. package/src/rich-text-editor/actions/toolbar-action.js +1 -1
  130. package/src/rich-text-editor/actions/toolbar.d.ts +16 -16
  131. package/src/rich-text-editor/actions/toolbar.js +48 -109
  132. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  133. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  134. package/src/rich-text-editor/base/classes.d.ts +125 -125
  135. package/src/rich-text-editor/base/classes.js +125 -125
  136. package/src/rich-text-editor/base/constant.d.ts +195 -150
  137. package/src/rich-text-editor/base/constant.js +364 -150
  138. package/src/rich-text-editor/base/enum.d.ts +1 -1
  139. package/src/rich-text-editor/base/enum.js +1 -1
  140. package/src/rich-text-editor/base/interface.d.ts +96 -52
  141. package/src/rich-text-editor/base/interface.js +1 -1
  142. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  143. package/src/rich-text-editor/base/rich-text-editor.d.ts +76 -64
  144. package/src/rich-text-editor/base/rich-text-editor.js +247 -160
  145. package/src/rich-text-editor/base/util.d.ts +1 -1
  146. package/src/rich-text-editor/base/util.js +23 -5
  147. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  148. package/src/rich-text-editor/formatter/formatter.js +24 -12
  149. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  150. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  151. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  152. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  153. package/src/rich-text-editor/models/default-locale.js +31 -25
  154. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  155. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  156. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  157. package/src/rich-text-editor/models/inline-mode.js +19 -19
  158. package/src/rich-text-editor/models/items.js +3 -3
  159. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  160. package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
  161. package/src/rich-text-editor/models/toolbar-settings.js +20 -20
  162. package/src/rich-text-editor/renderer/audio-module.d.ts +2 -1
  163. package/src/rich-text-editor/renderer/audio-module.js +23 -5
  164. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  165. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  166. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +4 -2
  167. package/src/rich-text-editor/renderer/dialog-renderer.js +24 -4
  168. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  169. package/src/rich-text-editor/renderer/iframe-content-renderer.js +19 -18
  170. package/src/rich-text-editor/renderer/image-module.d.ts +10 -2
  171. package/src/rich-text-editor/renderer/image-module.js +265 -221
  172. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  173. package/src/rich-text-editor/renderer/link-module.js +54 -25
  174. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  175. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  176. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  177. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  178. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  179. package/src/rich-text-editor/renderer/render.js +2 -2
  180. package/src/rich-text-editor/renderer/table-module.d.ts +11 -2
  181. package/src/rich-text-editor/renderer/table-module.js +344 -169
  182. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +12 -15
  183. package/src/rich-text-editor/renderer/toolbar-renderer.js +115 -110
  184. package/src/rich-text-editor/renderer/video-module.d.ts +4 -1
  185. package/src/rich-text-editor/renderer/video-module.js +83 -42
  186. package/src/rich-text-editor/renderer/view-source.d.ts +7 -6
  187. package/src/rich-text-editor/renderer/view-source.js +21 -11
  188. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  189. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  190. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  191. package/src/rich-text-editor/services/service-locator.js +3 -3
  192. package/src/selection/selection.d.ts +22 -22
  193. package/src/selection/selection.js +25 -22
  194. package/styles/_all.scss +1 -1
  195. package/styles/bootstrap-dark.css +353 -103
  196. package/styles/bootstrap.css +357 -112
  197. package/styles/bootstrap4.css +338 -96
  198. package/styles/bootstrap5-dark.css +344 -97
  199. package/styles/bootstrap5.css +344 -97
  200. package/styles/fabric-dark.css +332 -90
  201. package/styles/fabric.css +333 -91
  202. package/styles/fluent-dark.css +360 -98
  203. package/styles/fluent.css +360 -98
  204. package/styles/highcontrast-light.css +332 -90
  205. package/styles/highcontrast.css +336 -91
  206. package/styles/material-dark.css +339 -92
  207. package/styles/material.css +339 -92
  208. package/styles/material3-dark.css +348 -100
  209. package/styles/material3-dark.scss +1 -1
  210. package/styles/material3.css +348 -100
  211. package/styles/material3.scss +1 -1
  212. package/styles/rich-text-editor/_all.scss +2 -2
  213. package/styles/rich-text-editor/_bds-definition.scss +279 -0
  214. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +281 -277
  215. package/styles/rich-text-editor/_bootstrap-definition.scss +337 -334
  216. package/styles/rich-text-editor/_bootstrap4-definition.scss +464 -460
  217. package/styles/rich-text-editor/_bootstrap5-definition.scss +266 -262
  218. package/styles/rich-text-editor/_fabric-dark-definition.scss +263 -259
  219. package/styles/rich-text-editor/_fabric-definition.scss +261 -257
  220. package/styles/rich-text-editor/_fluent-definition.scss +267 -263
  221. package/styles/rich-text-editor/_fusionnew-definition.scss +265 -261
  222. package/styles/rich-text-editor/_highcontrast-definition.scss +261 -257
  223. package/styles/rich-text-editor/_highcontrast-light-definition.scss +261 -257
  224. package/styles/rich-text-editor/_layout.scss +2249 -2072
  225. package/styles/rich-text-editor/_material-dark-definition.scss +266 -262
  226. package/styles/rich-text-editor/_material-definition.scss +264 -260
  227. package/styles/rich-text-editor/_material3-definition.scss +266 -262
  228. package/styles/rich-text-editor/_tailwind-definition.scss +261 -257
  229. package/styles/rich-text-editor/_theme.scss +926 -837
  230. package/styles/rich-text-editor/bootstrap-dark.css +353 -103
  231. package/styles/rich-text-editor/bootstrap.css +357 -112
  232. package/styles/rich-text-editor/bootstrap4.css +338 -96
  233. package/styles/rich-text-editor/bootstrap5-dark.css +344 -97
  234. package/styles/rich-text-editor/bootstrap5.css +344 -97
  235. package/styles/rich-text-editor/fabric-dark.css +332 -90
  236. package/styles/rich-text-editor/fabric.css +333 -91
  237. package/styles/rich-text-editor/fluent-dark.css +360 -98
  238. package/styles/rich-text-editor/fluent.css +360 -98
  239. package/styles/rich-text-editor/highcontrast-light.css +332 -90
  240. package/styles/rich-text-editor/highcontrast.css +336 -91
  241. package/styles/rich-text-editor/icons/_bds.scss +348 -0
  242. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
  243. package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
  244. package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
  245. package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
  246. package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
  247. package/styles/rich-text-editor/icons/_fabric.scss +349 -349
  248. package/styles/rich-text-editor/icons/_fluent.scss +348 -348
  249. package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
  250. package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
  251. package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
  252. package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
  253. package/styles/rich-text-editor/icons/_material.scss +349 -349
  254. package/styles/rich-text-editor/icons/_material3.scss +348 -348
  255. package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
  256. package/styles/rich-text-editor/material-dark.css +339 -92
  257. package/styles/rich-text-editor/material.css +339 -92
  258. package/styles/rich-text-editor/material3-dark.css +348 -100
  259. package/styles/rich-text-editor/material3-dark.scss +1 -1
  260. package/styles/rich-text-editor/material3.css +348 -100
  261. package/styles/rich-text-editor/material3.scss +1 -1
  262. package/styles/rich-text-editor/tailwind-dark.css +383 -113
  263. package/styles/rich-text-editor/tailwind.css +383 -113
  264. package/styles/tailwind-dark.css +383 -113
  265. package/styles/tailwind.css +383 -113
  266. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
  267. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
  268. package/dist/ej2-richtexteditor.min.js +0 -10
  269. package/dist/global/ej2-richtexteditor.min.js +0 -11
  270. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  271. package/dist/global/index.d.ts +0 -14
  272. package/tslint.json +0 -111
@@ -1,34 +1,34 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
26
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28
- 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;
29
- return c > 3 && r && Object.defineProperty(target, key, r), r;
30
- };
31
- import { Component, EventHandler, Complex, Browser, addClass, select, detach } from '@syncfusion/ej2-base';
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __assign = (this && this.__assign) || function () {
15
+ __assign = Object.assign || function(t) {
16
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17
+ s = arguments[i];
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
+ t[p] = s[p];
20
+ }
21
+ return t;
22
+ };
23
+ return __assign.apply(this, arguments);
24
+ };
25
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
26
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28
+ 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;
29
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30
+ };
31
+ import { Component, EventHandler, Complex, Browser, addClass, detach } from '@syncfusion/ej2-base';
32
32
  import { Property, NotifyPropertyChanges, formatUnit, L10n, closest } from '@syncfusion/ej2-base';
33
33
  import { setStyleAttribute, Event, removeClass, print as printWindow, attributes } from '@syncfusion/ej2-base';
34
34
  import { isNullOrUndefined as isNOU, compile, append, extend, debounce } from '@syncfusion/ej2-base';
@@ -79,7 +79,7 @@ var RichTextEditor = /** @class */ (function (_super) {
79
79
  *
80
80
  * @returns {ModuleDeclaration[]} - specifies the declaration.
81
81
  * @hidden
82
-
82
+ * @deprecated
83
83
  */
84
84
  RichTextEditor.prototype.requiredModules = function () {
85
85
  var modules = [];
@@ -97,6 +97,14 @@ var RichTextEditor = /** @class */ (function (_super) {
97
97
  member: 'image',
98
98
  args: [this, this.serviceLocator]
99
99
  });
100
+ modules.push({
101
+ member: 'audio',
102
+ args: [this, this.serviceLocator]
103
+ });
104
+ modules.push({
105
+ member: 'video',
106
+ args: [this, this.serviceLocator]
107
+ });
100
108
  if (this.quickToolbarSettings.enable) {
101
109
  modules.push({ member: 'quickToolbar', args: [this, this.serviceLocator] });
102
110
  }
@@ -110,14 +118,6 @@ var RichTextEditor = /** @class */ (function (_super) {
110
118
  if (this.editorMode === 'HTML') {
111
119
  modules.push({ member: 'htmlEditor', args: [this, this.serviceLocator] });
112
120
  modules.push({ member: 'pasteCleanup', args: [this, this.serviceLocator] });
113
- modules.push({
114
- member: 'audio',
115
- args: [this, this.serviceLocator]
116
- });
117
- modules.push({
118
- member: 'video',
119
- args: [this, this.serviceLocator]
120
- });
121
121
  modules.push({
122
122
  member: 'formatPainter',
123
123
  args: [this]
@@ -149,7 +149,7 @@ var RichTextEditor = /** @class */ (function (_super) {
149
149
  else {
150
150
  if (this.getToolbar()) {
151
151
  removeClass(this.getToolbar().querySelectorAll('.' + classes.CLS_ACTIVE), classes.CLS_ACTIVE);
152
- removeClass([this.getToolbar()], [classes.CLS_TB_FLOAT, classes.CLS_TB_ABS_FLOAT]);
152
+ removeClass([this.getToolbar().parentElement], [classes.CLS_TB_FLOAT]);
153
153
  }
154
154
  addClass([this.element], classes.CLS_DISABLED);
155
155
  this.element.tabIndex = -1;
@@ -162,7 +162,7 @@ var RichTextEditor = /** @class */ (function (_super) {
162
162
  *
163
163
  * @returns {void}
164
164
  * @hidden
165
-
165
+ * @deprecated
166
166
  */
167
167
  RichTextEditor.prototype.setEnable = function () {
168
168
  this.updateEnable();
@@ -260,7 +260,7 @@ var RichTextEditor = /** @class */ (function (_super) {
260
260
  *
261
261
  * @returns {void}
262
262
  * @hidden
263
-
263
+ * @deprecated
264
264
  */
265
265
  RichTextEditor.prototype.getPersistData = function () {
266
266
  return this.addOnPersist(['value']);
@@ -390,7 +390,7 @@ var RichTextEditor = /** @class */ (function (_super) {
390
390
  if (tool.command === 'InsertText') {
391
391
  currentInsertContentLength = value.length;
392
392
  }
393
- var currentLength = this.getText().trim().length;
393
+ var currentLength = this.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
394
394
  var selectionLength = this.getSelection().length;
395
395
  var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
396
396
  if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
@@ -548,9 +548,10 @@ var RichTextEditor = /** @class */ (function (_super) {
548
548
  *
549
549
  * @returns {void}
550
550
  * @private
551
-
551
+ * @deprecated
552
552
  */
553
553
  RichTextEditor.prototype.render = function () {
554
+ this.value = (!(this.editorMode === 'Markdown') && !isNOU(this.value)) ? this.addAnchorAriaLabel(this.value) : this.value;
554
555
  if (this.value && !this.valueTemplate) {
555
556
  this.setProperties({ value: this.serializeValue(this.value) }, true);
556
557
  }
@@ -565,17 +566,17 @@ var RichTextEditor = /** @class */ (function (_super) {
565
566
  if (this.enableXhtml) {
566
567
  this.setProperties({ value: this.getXhtml() }, true);
567
568
  }
568
- if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNOU(this.getToolbar()) &&
569
+ if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNOU(this.getToolbar()) &&
569
570
  (this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
570
571
  this.disableToolbarItem(['Undo', 'Redo']);
571
572
  }
572
- this.setContentHeight();
573
+ this.setContentHeight('Init');
573
574
  if (this.value !== null) {
574
575
  this.valueContainer.defaultValue = this.value;
575
576
  }
576
577
  // eslint-disable-next-line
577
578
  (this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
578
- this.notify(events.bindCssClass, { cssClass: this.cssClass });
579
+ this.notify(events.bindCssClass, { cssClass: this.getCssClass() });
579
580
  this.addAudioVideoWrapper();
580
581
  this.notify(events.tableclass, {});
581
582
  this.renderComplete();
@@ -585,7 +586,7 @@ var RichTextEditor = /** @class */ (function (_super) {
585
586
  *
586
587
  * @returns {void}
587
588
  * @hidden
588
-
589
+ * @deprecated
589
590
  */
590
591
  RichTextEditor.prototype.addAudioVideoWrapper = function () {
591
592
  var _this = this;
@@ -647,7 +648,7 @@ var RichTextEditor = /** @class */ (function (_super) {
647
648
  *
648
649
  * @returns {void}
649
650
  * @private
650
-
651
+ * @deprecated
651
652
  * @hidden
652
653
  */
653
654
  RichTextEditor.prototype.eventInitializer = function () {
@@ -666,7 +667,13 @@ var RichTextEditor = /** @class */ (function (_super) {
666
667
  range.endContainer;
667
668
  var closestLI = closest(endNode, 'LI');
668
669
  var isDetached = false;
669
- if (!isNOU(closestLI) && endNode.textContent.length === range.endOffset &&
670
+ var currentRangeEndOffset = range.endOffset;
671
+ if (currentEndContainer.nodeType === Node.TEXT_NODE) {
672
+ if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
673
+ currentRangeEndOffset--;
674
+ }
675
+ }
676
+ if (!isNOU(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
670
677
  !range.collapsed && isNOU(endNode.nextElementSibling)) {
671
678
  for (var i = 0; i < closestLI.childNodes.length; i++) {
672
679
  if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
@@ -692,7 +699,7 @@ var RichTextEditor = /** @class */ (function (_super) {
692
699
  * @param {KeyboardEvent} e - specifies the event.
693
700
  * @returns {void}
694
701
  * @private
695
-
702
+ * @deprecated
696
703
  * @hidden
697
704
  */
698
705
  RichTextEditor.prototype.keyDown = function (e) {
@@ -745,12 +752,12 @@ var RichTextEditor = /** @class */ (function (_super) {
745
752
  }
746
753
  var notFormatPainterCopy = isNOU(e.action) ? true : (e.action !== 'format-copy' ? true : false);
747
754
  if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
748
- !(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which === 67))) {
755
+ !(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
749
756
  this.formatter.saveData();
750
757
  }
751
- if (e.action !== 'insert-link' &&
752
- e.action !== 'format-copy' && e.action !== 'format-paste' &&
753
- (!e.target || !(e.target.classList.contains('e-mention') && e.code === 'Tab')) &&
758
+ var keyboardEventAction = ['insert-link', 'format-copy', 'format-paste', 'insert-image', 'insert-table', 'insert-audio', 'insert-video'];
759
+ if (keyboardEventAction.indexOf(e.action) === -1 &&
760
+ (!e.target || !(e.target.classList.contains('e-mention') && !isNOU(document.querySelector('#' + e.target.id + '_popup.e-popup-open')) && e.code === 'Tab')) &&
754
761
  (e.action && e.action !== 'paste' && e.action !== 'space'
755
762
  || e.which === 9 || (e.code === 'Backspace' && e.which === 8))) {
756
763
  var FormatPainterEscapeAction = false;
@@ -758,14 +765,26 @@ var RichTextEditor = /** @class */ (function (_super) {
758
765
  FormatPainterEscapeAction = this.formatPainterModule.previousAction === 'escape';
759
766
  }
760
767
  if (!FormatPainterEscapeAction) {
761
- this.formatter.process(this, null, e);
768
+ if (this.editorMode === 'HTML' && (e.action === 'increase-fontsize' || e.action === 'decrease-fontsize')) {
769
+ this.notify(events.onHandleFontsizeChange, { member: 'onHandleFontsizeChange', args: e });
770
+ }
771
+ else {
772
+ this.formatter.process(this, null, e);
773
+ }
762
774
  }
763
775
  switch (e.action) {
764
776
  case 'toolbar-focus':
765
777
  if (this.toolbarSettings.enable && this.getToolbarElement()) {
766
778
  var firstActiveItem = this.getToolbarElement().querySelector('.e-toolbar-item:not(.e-overlay)[title]');
767
- firstActiveItem.firstElementChild.removeAttribute('tabindex');
768
- firstActiveItem.firstElementChild.focus();
779
+ var quickToolbarElem = this.getRenderedQuickToolbarElem();
780
+ if (quickToolbarElem) {
781
+ firstActiveItem = quickToolbarElem.querySelector('.e-toolbar-item:not(.e-overlay)[title]');
782
+ }
783
+ if (firstActiveItem) {
784
+ var firstChild = firstActiveItem.firstElementChild;
785
+ firstChild.removeAttribute('tabindex');
786
+ firstChild.focus();
787
+ }
769
788
  }
770
789
  break;
771
790
  case 'escape':
@@ -784,11 +803,22 @@ var RichTextEditor = /** @class */ (function (_super) {
784
803
  this.setPlaceHolder();
785
804
  }
786
805
  }
806
+ this.notify(events.afterKeyDown, { member: 'afterKeyDown', args: e });
787
807
  this.autoResize();
788
808
  };
789
809
  RichTextEditor.prototype.keyUp = function (e) {
790
810
  if (this.editorMode === 'HTML') {
791
811
  var range = this.getRange();
812
+ if (!isNOU(e) && !isNOU(e.code) && (e.code === 'Backspace' || e.code === 'Delete')) {
813
+ // To prevent the reformatting the content removed browser behavior.
814
+ var currentRange = this.getRange();
815
+ var selection = this.iframeSettings.enable ? this.contentModule.getPanel().ownerDocument.getSelection() :
816
+ this.contentModule.getDocument().getSelection();
817
+ if (selection.rangeCount > 0) {
818
+ selection.removeAllRanges();
819
+ selection.addRange(currentRange);
820
+ }
821
+ }
792
822
  if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer.nodeName === '#text' &&
793
823
  range.startContainer.parentElement === this.inputElement && this.enterKey !== 'BR') {
794
824
  var range_1 = this.getRange();
@@ -810,11 +840,11 @@ var RichTextEditor = /** @class */ (function (_super) {
810
840
  var formatPainterCopy = e.key === 'C' && e.altKey && e.shiftKey;
811
841
  var formatPainterPaste = e.key === 'V' && e.altKey && e.shiftKey;
812
842
  if ((!formatPainterCopy && !formatPainterPaste) && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys) || (this.editorMode === 'Markdown'
813
- && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) && !this.inlineMode.enable) {
843
+ && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) || (this.autoSaveOnIdle && Browser.isDevice) && !this.inlineMode.enable) {
814
844
  this.formatter.onKeyHandler(this, e);
815
845
  }
816
846
  if (this.inputElement && this.inputElement.textContent.length !== 0
817
- || this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
847
+ || this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
818
848
  this.notify(events.toolbarRefresh, { args: e });
819
849
  }
820
850
  if (!isNOU(this.placeholder)) {
@@ -828,7 +858,7 @@ var RichTextEditor = /** @class */ (function (_super) {
828
858
  * @param {string} value - specifies the value.
829
859
  * @returns {void}
830
860
  * @hidden
831
-
861
+ * @deprecated
832
862
  */
833
863
  RichTextEditor.prototype.serializeValue = function (value) {
834
864
  if (this.editorMode === 'HTML' && !isNOU(value)) {
@@ -859,7 +889,7 @@ var RichTextEditor = /** @class */ (function (_super) {
859
889
  * @param {string} value - specifies the string value.
860
890
  * @returns {void}
861
891
  * @hidden
862
-
892
+ * @deprecated
863
893
  */
864
894
  RichTextEditor.prototype.updateValue = function (value) {
865
895
  if (isNOU(value)) {
@@ -888,11 +918,14 @@ var RichTextEditor = /** @class */ (function (_super) {
888
918
  clientX: touch.clientX, clientY: touch.clientY }
889
919
  });
890
920
  if (this.inputElement && ((this.editorMode === 'HTML' && this.inputElement.textContent.length !== 0) ||
891
- (this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) || (e.target && (e.target.nodeName === 'VIDEO'
892
- || e.target.querySelectorAll('.' + classes.CLS_VIDEOWRAP).length > 0) || (e.target && e.target.nodeName !== 'BR' &&
893
- (e.target.classList.contains(classes.CLS_AUDIOWRAP) ||
894
- e.target.classList.contains(classes.CLS_CLICKELEM) ||
895
- e.target.classList.contains(classes.CLS_VID_CLICK_ELEM))))) {
921
+ (this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) ||
922
+ (e.target && !isNOU(closest(e.target, 'table'))) ||
923
+ (e.target && (e.target.nodeName === 'VIDEO' ||
924
+ e.target.querySelectorAll('.' + classes.CLS_VIDEOWRAP).length > 0) ||
925
+ (e.target && e.target.nodeName !== 'BR' &&
926
+ (e.target.classList.contains(classes.CLS_AUDIOWRAP) ||
927
+ e.target.classList.contains(classes.CLS_CLICKELEM) ||
928
+ e.target.classList.contains(classes.CLS_VID_CLICK_ELEM))))) {
896
929
  this.notify(events.toolbarRefresh, { args: e });
897
930
  }
898
931
  this.triggerEditArea(e);
@@ -907,25 +940,12 @@ var RichTextEditor = /** @class */ (function (_super) {
907
940
  }
908
941
  }
909
942
  this.notifyMouseUp(e);
910
- if (e.detail === 3) {
911
- var range = this.getRange();
912
- var selection = this.formatter.editorManager.domNode.getSelection();
913
- if (/\s+$/.test(selection.toString())) {
914
- if (!isNOU(range.startContainer.parentElement) && (!isNOU(range.startContainer.parentElement.nextSibling) &&
915
- (range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
916
- /\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
917
- || range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
918
- range.setStart(range.startContainer, range.startOffset);
919
- range.setEnd(range.startContainer, range.startContainer.textContent.length);
920
- }
921
- }
922
- }
923
943
  };
924
944
  /**
925
945
  * @param {Function} module - specifies the module function.
926
946
  * @returns {void}
927
947
  * @hidden
928
-
948
+ * @deprecated
929
949
  */
930
950
  RichTextEditor.prototype.ensureModuleInjected = function (module) {
931
951
  return this.getInjectedModules().indexOf(module) >= 0;
@@ -933,7 +953,7 @@ var RichTextEditor = /** @class */ (function (_super) {
933
953
  /**
934
954
  * @returns {void}
935
955
  * @hidden
936
-
956
+ * @deprecated
937
957
  */
938
958
  RichTextEditor.prototype.onCopy = function () {
939
959
  this.contentModule.getDocument().execCommand('copy', false, null);
@@ -941,7 +961,7 @@ var RichTextEditor = /** @class */ (function (_super) {
941
961
  /**
942
962
  * @returns {void}
943
963
  * @hidden
944
-
964
+ * @deprecated
945
965
  */
946
966
  RichTextEditor.prototype.onCut = function () {
947
967
  this.contentModule.getDocument().execCommand('cut', false, null);
@@ -950,7 +970,7 @@ var RichTextEditor = /** @class */ (function (_super) {
950
970
  * @param {KeyboardEvent} e - specifies the keyboard event.
951
971
  * @returns {void}
952
972
  * @hidden
953
-
973
+ * @deprecated
954
974
  */
955
975
  RichTextEditor.prototype.onPaste = function (e) {
956
976
  var _this = this;
@@ -960,10 +980,10 @@ var RichTextEditor = /** @class */ (function (_super) {
960
980
  requestType: 'Paste'
961
981
  };
962
982
  this.trigger(events.actionBegin, evenArgs, function (pasteArgs) {
963
- var currentLength = _this.inputElement.textContent.length;
983
+ var currentLength = _this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
964
984
  var selectionLength = _this.getSelection().length;
965
985
  var pastedContentLength = (isNOU(e) || isNOU(e.clipboardData))
966
- ? 0 : e.clipboardData.getData('text/plain').length;
986
+ ? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
967
987
  var totalLength = (currentLength - selectionLength) + pastedContentLength;
968
988
  if (_this.editorMode === 'Markdown') {
969
989
  var args_1 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
@@ -981,6 +1001,7 @@ var RichTextEditor = /** @class */ (function (_super) {
981
1001
  _this.notify(events.pasteClean, { args: e });
982
1002
  }
983
1003
  else {
1004
+ console.warn('[WARNING] :: Module "pasteCleanup" is not available in RichTextEditor component! You either misspelled the module name or forgot to load it.');
984
1005
  var args_2 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
985
1006
  var value = null;
986
1007
  var htmlValue = false;
@@ -1013,7 +1034,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1013
1034
  * @param {MouseEvent} event - specifies the event.
1014
1035
  * @returns {void}
1015
1036
  * @hidden
1016
-
1037
+ * @deprecated
1017
1038
  */
1018
1039
  RichTextEditor.prototype.clipboardAction = function (action, event) {
1019
1040
  switch (action.toLowerCase()) {
@@ -1206,7 +1227,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1206
1227
  *
1207
1228
  * @returns {void}
1208
1229
  * @private
1209
-
1230
+ * @deprecated
1210
1231
  */
1211
1232
  RichTextEditor.prototype.getModuleName = function () {
1212
1233
  return 'richtexteditor';
@@ -1218,7 +1239,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1218
1239
  * @param {RichTextEditorModel} oldProp - specifies the old property.
1219
1240
  * @returns {void}
1220
1241
  * @hidden
1221
-
1242
+ * @deprecated
1222
1243
  */
1223
1244
  /* eslint-disable */
1224
1245
  RichTextEditor.prototype.onPropertyChanged = function (newProp, oldProp) {
@@ -1275,7 +1296,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1275
1296
  break;
1276
1297
  case 'height':
1277
1298
  this.setHeight(newProp[prop]);
1278
- this.setContentHeight();
1299
+ this.setContentHeight('Init');
1279
1300
  this.autoResize();
1280
1301
  break;
1281
1302
  case 'readonly':
@@ -1322,11 +1343,11 @@ var RichTextEditor = /** @class */ (function (_super) {
1322
1343
  break;
1323
1344
  case 'inlineMode':
1324
1345
  this.notify(events.modelChanged, { module: 'quickToolbar', newProp: newProp, oldProp: oldProp });
1325
- this.setContentHeight();
1346
+ this.setContentHeight('Init');
1326
1347
  break;
1327
1348
  case 'toolbarSettings':
1328
1349
  this.notify(events.modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
1329
- this.setContentHeight();
1350
+ this.setContentHeight('Init');
1330
1351
  break;
1331
1352
  case 'maxLength':
1332
1353
  if (this.showCharCount) {
@@ -1373,7 +1394,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1373
1394
  /**
1374
1395
  * @hidden
1375
1396
  * @returns {void}
1376
-
1397
+ * @deprecated
1377
1398
  */
1378
1399
  RichTextEditor.prototype.updateValueData = function () {
1379
1400
  if (this.enableHtmlEncode) {
@@ -1395,7 +1416,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1395
1416
  RichTextEditor.prototype.updatePanelValue = function () {
1396
1417
  var value = this.value;
1397
1418
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
1398
- var getTextArea = this.element.querySelector('.e-rte-srctextarea');
1419
+ var getTextArea = this.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
1399
1420
  if (value) {
1400
1421
  if (getTextArea && getTextArea.style.display === 'block') {
1401
1422
  getTextArea.value = this.value;
@@ -1403,7 +1424,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1403
1424
  if (this.valueContainer) {
1404
1425
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
1405
1426
  }
1406
- if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.replace('&amp;', '&').trim() !== value.trim()) {
1427
+ if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.trim() !== value.trim()) {
1407
1428
  this.inputElement.innerHTML = value;
1408
1429
  }
1409
1430
  else if (this.editorMode === 'Markdown' && this.inputElement
@@ -1424,9 +1445,6 @@ var RichTextEditor = /** @class */ (function (_super) {
1424
1445
  }
1425
1446
  else {
1426
1447
  this.inputElement.innerHTML = '<p><br/></p>';
1427
- if (value === '' && this.formatter && this.inputElement) {
1428
- this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), this.inputElement.firstElementChild, this.inputElement.firstElementChild.childElementCount);
1429
- }
1430
1448
  }
1431
1449
  }
1432
1450
  else {
@@ -1460,7 +1478,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1460
1478
  *
1461
1479
  * @returns {void}
1462
1480
  * @hidden
1463
-
1481
+ * @deprecated
1464
1482
  */
1465
1483
  RichTextEditor.prototype.setPlaceHolder = function () {
1466
1484
  if (this.inputElement && this.placeholder && this.iframeSettings.enable !== true) {
@@ -1488,7 +1506,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1488
1506
  this.inputElement.setAttribute('placeholder', this.placeholder);
1489
1507
  }
1490
1508
  }
1491
- if (this.placeholder && this.iframeSettings.enable) {
1509
+ if (this.placeholder && this.iframeSettings.enable && this.inputElement) {
1492
1510
  if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNOU(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
1493
1511
  ((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNOU(this.inputElement.firstChild.firstChild) &&
1494
1512
  this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
@@ -1538,7 +1556,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1538
1556
  * @param {boolean} initial - specifies the boolean value
1539
1557
  * @returns {void}
1540
1558
  * @hidden
1541
-
1559
+ * @deprecated
1542
1560
  */
1543
1561
  RichTextEditor.prototype.setReadOnly = function (initial) {
1544
1562
  this.updateReadOnly();
@@ -1639,7 +1657,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1639
1657
  *
1640
1658
  * @returns {void}
1641
1659
  * @public
1642
-
1660
+ * @deprecated
1643
1661
  */
1644
1662
  RichTextEditor.prototype.getRange = function () {
1645
1663
  return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
@@ -1675,10 +1693,10 @@ var RichTextEditor = /** @class */ (function (_super) {
1675
1693
  if (this.iframeSettings.resources) {
1676
1694
  var styleSrc = this.iframeSettings.resources.styles;
1677
1695
  var scriptSrc = this.iframeSettings.resources.scripts;
1678
- if (this.iframeSettings.resources.scripts.length > 0) {
1696
+ if (!isNOU(this.iframeSettings.resources.scripts) && this.iframeSettings.resources.scripts.length > 0) {
1679
1697
  this.InjectSheet(true, scriptSrc);
1680
1698
  }
1681
- if (this.iframeSettings.resources.styles.length > 0) {
1699
+ if (!isNOU(this.iframeSettings.resources.styles) && this.iframeSettings.resources.styles.length > 0) {
1682
1700
  this.InjectSheet(false, styleSrc);
1683
1701
  }
1684
1702
  }
@@ -1784,7 +1802,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1784
1802
  *
1785
1803
  * @returns {void}
1786
1804
  * @hidden
1787
-
1805
+ * @deprecated
1788
1806
  */
1789
1807
  RichTextEditor.prototype.getInsertImgMaxWidth = function () {
1790
1808
  var maxWidth = this.insertImageSettings.maxWidth;
@@ -1792,6 +1810,13 @@ var RichTextEditor = /** @class */ (function (_super) {
1792
1810
  var imgPadding = 12;
1793
1811
  var imgResizeBorder = 2;
1794
1812
  var editEle = this.contentModule.getEditPanel();
1813
+ if (this.editorMode === "HTML" && !isNOU(this.formatter.editorManager.nodeSelection) && !isNOU(this.formatter.editorManager.nodeSelection.range)) {
1814
+ var currentRange = this.formatter.editorManager.nodeSelection.range;
1815
+ if (currentRange.startContainer.nodeType !== 3 && currentRange.startContainer.closest &&
1816
+ !isNOU(currentRange.startContainer.closest('TD'))) {
1817
+ editEle = currentRange.startContainer;
1818
+ }
1819
+ }
1795
1820
  var eleStyle = window.getComputedStyle(editEle);
1796
1821
  var editEleMaxWidth = editEle.offsetWidth - (imgPadding + imgResizeBorder +
1797
1822
  parseFloat(eleStyle.paddingLeft.split('px')[0]) + parseFloat(eleStyle.paddingRight.split('px')[0]) +
@@ -1803,7 +1828,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1803
1828
  *
1804
1829
  * @returns {void}
1805
1830
  * @hidden
1806
-
1831
+ * @deprecated
1807
1832
  */
1808
1833
  RichTextEditor.prototype.getInsertVidMaxWidth = function () {
1809
1834
  var maxWidth = this.insertVideoSettings.maxWidth;
@@ -1824,16 +1849,13 @@ var RichTextEditor = /** @class */ (function (_super) {
1824
1849
  * @param {boolean} isExpand - specifies the bollean value.
1825
1850
  * @returns {void}
1826
1851
  * @hidden
1827
-
1852
+ * @deprecated
1828
1853
  */
1829
1854
  RichTextEditor.prototype.setContentHeight = function (target, isExpand) {
1830
1855
  var heightValue;
1831
- var topValue = 0;
1832
1856
  var rteHeightPercent;
1833
1857
  var heightPercent = typeof (this.height) === 'string' && this.height.indexOf('%') > -1;
1834
- var cntEle = (this.sourceCodeModule.getPanel() &&
1835
- this.sourceCodeModule.getPanel().parentElement.style.display === 'block') ? this.sourceCodeModule.getPanel().parentElement :
1836
- this.contentModule.getPanel();
1858
+ var cntEle = this.contentModule.getPanel();
1837
1859
  var rteHeight = this.element.offsetHeight;
1838
1860
  if (rteHeight === 0 && this.height !== 'auto' && !this.getToolbar()) {
1839
1861
  rteHeight = parseInt(this.height, 10);
@@ -1845,39 +1867,36 @@ var RichTextEditor = /** @class */ (function (_super) {
1845
1867
  var rzHandle = this.element.querySelector('.' + classes.CLS_RTE_RES_HANDLE);
1846
1868
  var rzHeight = this.enableResize ? (!isNOU(rzHandle) ? (rzHandle.offsetHeight + 8) : 0) : 0;
1847
1869
  var expandPopHeight = this.getToolbar() ? this.toolbarModule.getExpandTBarPopHeight() : 0;
1848
- if (this.toolbarSettings.type === ToolbarType.Expand && isExpand) {
1849
- heightValue = (this.height === 'auto' && rzHeight === 0) ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
1850
- topValue = (!this.toolbarSettings.enableFloating) ? expandPopHeight : 0;
1870
+ if (target && target !== 'Toolbar' && expandPopHeight && this.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0) {
1871
+ tbHeight = tbHeight - expandPopHeight;
1851
1872
  }
1852
- else {
1853
- if (this.height === 'auto' && !(this.element.classList.contains('e-rte-full-screen')) && !this.isResizeInitialized) {
1854
- heightValue = 'auto';
1873
+ if (this.toolbarSettings.type === ToolbarType.Expand) {
1874
+ if (isExpand) {
1875
+ heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
1855
1876
  }
1856
1877
  else {
1857
- heightValue = heightPercent && rteHeightPercent ? rteHeightPercent : rteHeight - (tbHeight + rzHeight) + 'px';
1878
+ heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - (tbHeight - expandPopHeight + rzHeight) + 'px';
1858
1879
  }
1859
1880
  }
1860
- if (target !== 'windowResize' || heightPercent) {
1861
- if (this.iframeSettings.enable) {
1862
- if (heightValue !== 'auto') {
1863
- setStyleAttribute(cntEle, { height: heightValue, marginTop: topValue + 'px' });
1881
+ else {
1882
+ heightValue = (this.height === 'auto' && this.element.style.height === 'auto') ? 'auto' : rteHeight - tbHeight + 'px';
1883
+ }
1884
+ var finalHeight = heightPercent && rteHeightPercent ? rteHeightPercent : heightValue;
1885
+ switch (target) {
1886
+ case 'Init':
1887
+ case 'Toolbar':
1888
+ case 'WindowResize':
1889
+ case 'Refresh':
1890
+ if (this.element.querySelectorAll('.e-source-content').length > 0 && this.element.querySelector('.e-source-content').style.display === 'block') {
1891
+ setStyleAttribute(this.element.querySelector('.e-source-content'), { height: finalHeight });
1864
1892
  }
1865
- }
1866
- else {
1867
- if (target === 'windowResize' && heightPercent) {
1868
- //cntEle hide the borderBottom of RichTextEditor. so removed the 2px of cntEle height.
1869
- heightValue = parseInt(heightValue, 10) - 2 + 'px';
1893
+ else {
1894
+ setStyleAttribute(cntEle, { height: finalHeight });
1870
1895
  }
1871
- setStyleAttribute(cntEle, { height: heightValue, marginTop: topValue + 'px' });
1872
- }
1873
- }
1874
- if (this.iframeSettings.enable && target === 'sourceCode') {
1875
- var codeElement = select('.' + classes.CLS_RTE_CONTENT, this.element);
1876
- setStyleAttribute(codeElement, { height: heightValue, marginTop: topValue + 'px' });
1877
- }
1878
- if (this.toolbarSettings.enableFloating && this.getToolbar() && !this.inlineMode.enable) {
1879
- var tbWrapHeight = (isExpand ? (tbHeight + expandPopHeight) : tbHeight) + 'px';
1880
- setStyleAttribute(this.getToolbar().parentElement, { height: tbWrapHeight });
1896
+ break;
1897
+ case 'Resize':
1898
+ setStyleAttribute(cntEle, { height: finalHeight });
1899
+ break;
1881
1900
  }
1882
1901
  if (rzHeight === 0) {
1883
1902
  this.autoResize();
@@ -1988,7 +2007,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1988
2007
  /**
1989
2008
  * @returns {void}
1990
2009
  * @hidden
1991
-
2010
+ * @deprecated
1992
2011
  */
1993
2012
  RichTextEditor.prototype.getBaseToolbarObject = function () {
1994
2013
  var tbObj;
@@ -2003,7 +2022,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2003
2022
  /**
2004
2023
  * @returns {void}
2005
2024
  * @hidden
2006
-
2025
+ * @deprecated
2007
2026
  */
2008
2027
  RichTextEditor.prototype.getToolbar = function () {
2009
2028
  return this.toolbarModule ? this.toolbarModule.getToolbarElement() : null;
@@ -2011,7 +2030,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2011
2030
  /**
2012
2031
  * @returns {void}
2013
2032
  * @hidden
2014
-
2033
+ * @deprecated
2015
2034
  */
2016
2035
  RichTextEditor.prototype.getToolbarElement = function () {
2017
2036
  return this.toolbarModule && this.toolbarModule.getToolbarElement();
@@ -2021,16 +2040,27 @@ var RichTextEditor = /** @class */ (function (_super) {
2021
2040
  * getID method
2022
2041
  *
2023
2042
  * @hidden
2024
-
2043
+ * @deprecated
2025
2044
  */
2026
2045
  RichTextEditor.prototype.getID = function () {
2027
2046
  return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
2028
2047
  };
2048
+ /**
2049
+ * @returns {void}
2050
+ * getCssClass method
2051
+ *
2052
+ * @hidden
2053
+ * @deprecated
2054
+ */
2055
+ RichTextEditor.prototype.getCssClass = function (isSpace) {
2056
+ return (isNOU(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
2057
+ };
2029
2058
  RichTextEditor.prototype.mouseDownHandler = function (e) {
2030
2059
  var touch = (e.touches ? e.changedTouches[0] : e);
2031
2060
  addClass([this.element], [classes.CLS_FOCUS]);
2032
2061
  this.preventDefaultResize(e);
2033
2062
  this.notify(events.mouseDown, { args: e });
2063
+ this.formatter.editorManager.observer.notify(events.mouseDown, { args: e });
2034
2064
  this.clickPoints = { clientX: touch.clientX, clientY: touch.clientY };
2035
2065
  };
2036
2066
  RichTextEditor.prototype.preventImgResize = function (e) {
@@ -2044,7 +2074,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2044
2074
  * @param {FocusEvent} e - specifies the event.
2045
2075
  * @returns {void}
2046
2076
  * @hidden
2047
-
2077
+ * @deprecated
2048
2078
  */
2049
2079
  // eslint-disable-next-line
2050
2080
  RichTextEditor.prototype.preventDefaultResize = function (e) {
@@ -2069,18 +2099,14 @@ var RichTextEditor = /** @class */ (function (_super) {
2069
2099
  RichTextEditor.prototype.resizeHandler = function () {
2070
2100
  var isExpand = false;
2071
2101
  if (!document.body.contains(this.element)) {
2072
- document.defaultView.removeEventListener('resize', this.onResizeHandler, true);
2102
+ document.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
2073
2103
  return;
2074
2104
  }
2075
2105
  if (this.toolbarSettings.enable && !this.inlineMode.enable) {
2076
2106
  this.toolbarModule.refreshToolbarOverflow();
2077
2107
  isExpand = this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(classes.CLS_EXPAND_OPEN);
2078
2108
  }
2079
- if (this.iframeSettings.enable !== true) {
2080
- // When resize the window,border bottom of cntEle and this.element border visible separatly.so none the cntEle borderBottom.
2081
- this.contentModule.getPanel().style.borderBottom = 'none';
2082
- }
2083
- this.setContentHeight('windowResize', isExpand);
2109
+ this.setContentHeight('WindowResize', isExpand);
2084
2110
  this.notify(events.windowResize, null);
2085
2111
  };
2086
2112
  RichTextEditor.prototype.scrollHandler = function (e) {
@@ -2137,7 +2163,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2137
2163
  };
2138
2164
  RichTextEditor.prototype.getUpdatedValue = function () {
2139
2165
  var value;
2140
- var getTextArea = this.element.querySelector('.e-rte-srctextarea');
2166
+ var getTextArea = this.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
2141
2167
  if (this.editorMode === 'HTML') {
2142
2168
  value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
2143
2169
  this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
@@ -2168,6 +2194,21 @@ var RichTextEditor = /** @class */ (function (_super) {
2168
2194
  clearTimeout(this.idleInterval);
2169
2195
  this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
2170
2196
  };
2197
+ RichTextEditor.prototype.cleanupResizeElements = function (args) {
2198
+ var value = this.removeResizeElement(args.value);
2199
+ args.callBack(value);
2200
+ };
2201
+ RichTextEditor.prototype.addAnchorAriaLabel = function (value) {
2202
+ var valueElementWrapper = document.createElement("div");
2203
+ valueElementWrapper.innerHTML = value;
2204
+ var item = valueElementWrapper.querySelectorAll("a");
2205
+ if (item.length > 0) {
2206
+ for (var i = 0; i < item.length; i++) {
2207
+ (item[i].hasAttribute("target") && item[i].getAttribute("target") === '_blank') ? item[i].setAttribute("aria-label", this.serviceLocator.getService('rteLocale').getConstant("linkAriaLabel")) : item[i];
2208
+ }
2209
+ }
2210
+ return valueElementWrapper.innerHTML;
2211
+ };
2171
2212
  RichTextEditor.prototype.removeResizeElement = function (value) {
2172
2213
  var valueElementWrapper = document.createElement("div");
2173
2214
  valueElementWrapper.innerHTML = value;
@@ -2177,6 +2218,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2177
2218
  detach(item[i]);
2178
2219
  }
2179
2220
  }
2221
+ this.removeSelectionClassStates(valueElementWrapper);
2180
2222
  return valueElementWrapper.innerHTML;
2181
2223
  };
2182
2224
  RichTextEditor.prototype.updateStatus = function (e) {
@@ -2200,6 +2242,10 @@ var RichTextEditor = /** @class */ (function (_super) {
2200
2242
  this.isRTE = false;
2201
2243
  }
2202
2244
  this.notify(events.docClick, { args: e });
2245
+ var hideQuickToolbarChecker = this.quickToolbarModule && !this.inlineMode.enable && isNOU(this.quickToolbarModule.inlineQTBar);
2246
+ if ((hideQuickToolbarChecker && !isNOU(closest(target, '.' + 'e-toolbar-wrapper'))) || (hideQuickToolbarChecker && (!isNOU(closest(target, '.e-rte-table-resize')) || !isNOU(closest(target, '.e-table-box'))))) {
2247
+ this.quickToolbarModule.hideQuickToolbars();
2248
+ }
2203
2249
  if (Browser.info.name !== 'msie' && e.detail > 3) {
2204
2250
  e.preventDefault();
2205
2251
  }
@@ -2208,6 +2254,12 @@ var RichTextEditor = /** @class */ (function (_super) {
2208
2254
  var trg = e.relatedTarget;
2209
2255
  if (trg) {
2210
2256
  var rteElement = closest(trg, '.' + classes.CLS_RTE);
2257
+ if (!rteElement && this.iframeSettings.enable) {
2258
+ var iframeElement = this.element.querySelector('#' + this.getID() + '_rte-view');
2259
+ if (iframeElement && iframeElement.contentWindow.document.body.contains(trg)) {
2260
+ rteElement = closest(iframeElement, '.' + classes.CLS_RTE);
2261
+ }
2262
+ }
2211
2263
  if (rteElement && rteElement === this.element) {
2212
2264
  this.isBlur = false;
2213
2265
  if (trg === this.getToolbarElement()) {
@@ -2224,6 +2276,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2224
2276
  }
2225
2277
  if (this.isBlur && isNOU(trg)) {
2226
2278
  removeClass([this.element], [classes.CLS_FOCUS]);
2279
+ this.removeSelectionClassStates(this.inputElement);
2227
2280
  this.notify(events.focusChange, {});
2228
2281
  var value = this.getUpdatedValue();
2229
2282
  this.setProperties({ value: value });
@@ -2257,7 +2310,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2257
2310
  *
2258
2311
  * @returns {void}
2259
2312
  * @hidden
2260
-
2313
+ * @deprecated
2261
2314
  */
2262
2315
  RichTextEditor.prototype.contentChanged = function () {
2263
2316
  if (this.autoSaveOnIdle) {
@@ -2272,7 +2325,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2272
2325
  *
2273
2326
  * @returns {void}
2274
2327
  * @hidden
2275
-
2328
+ * @deprecated
2276
2329
  */
2277
2330
  RichTextEditor.prototype.invokeChangeEvent = function () {
2278
2331
  var currentValue;
@@ -2294,7 +2347,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2294
2347
  /**
2295
2348
  * @returns {void}
2296
2349
  * @hidden
2297
-
2350
+ * @deprecated
2298
2351
  */
2299
2352
  RichTextEditor.prototype.wireScrollElementsEvents = function () {
2300
2353
  this.scrollParentElements = getScrollableParent(this.element);
@@ -2324,7 +2377,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2324
2377
  /**
2325
2378
  * @returns {void}
2326
2379
  * @hidden
2327
-
2380
+ * @deprecated
2328
2381
  */
2329
2382
  RichTextEditor.prototype.unWireScrollElementsEvents = function () {
2330
2383
  this.scrollParentElements = getScrollableParent(this.element);
@@ -2342,9 +2395,10 @@ var RichTextEditor = /** @class */ (function (_super) {
2342
2395
  this.triggerEditArea(e.originalEvent);
2343
2396
  };
2344
2397
  RichTextEditor.prototype.contextHandler = function (e) {
2345
- var closestElem = closest(e.target, 'a, table, img');
2398
+ var closestElem = closest(e.target, 'a, table, img, video, audio');
2346
2399
  if (this.inlineMode.onSelection === false || (!isNOU(closestElem) && this.inputElement.contains(closestElem)
2347
- && (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A'))) {
2400
+ && (closestElem.tagName === 'IMG' || closestElem.tagName === 'TABLE' || closestElem.tagName === 'A' ||
2401
+ closestElem.tagName.toLowerCase() === 'video' || closestElem.tagName.toLowerCase() === 'audio'))) {
2348
2402
  e.preventDefault();
2349
2403
  }
2350
2404
  };
@@ -2355,7 +2409,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2355
2409
  /**
2356
2410
  * @returns {void}
2357
2411
  * @hidden
2358
-
2412
+ * @deprecated
2359
2413
  */
2360
2414
  RichTextEditor.prototype.autoResize = function () {
2361
2415
  var _this = this;
@@ -2389,6 +2443,8 @@ var RichTextEditor = /** @class */ (function (_super) {
2389
2443
  this.on(events.contentChanged, this.contentChanged, this);
2390
2444
  this.on(events.resizeInitialized, this.updateResizeFlag, this);
2391
2445
  this.on(events.updateTbItemsStatus, this.updateStatus, this);
2446
+ this.on(events.cleanupResizeElements, this.cleanupResizeElements, this);
2447
+ this.on(events.updateValueOnIdle, this.updateValueOnIdle, this);
2392
2448
  if (this.readonly && this.enabled) {
2393
2449
  return;
2394
2450
  }
@@ -2397,7 +2453,7 @@ var RichTextEditor = /** @class */ (function (_super) {
2397
2453
  RichTextEditor.prototype.restrict = function (e) {
2398
2454
  if (this.maxLength >= 0) {
2399
2455
  var element = this.editorMode === 'Markdown' ? this.contentModule.getText() :
2400
- (e && e.currentTarget.textContent);
2456
+ (this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, ''));
2401
2457
  if (!element) {
2402
2458
  return;
2403
2459
  }
@@ -2429,11 +2485,12 @@ var RichTextEditor = /** @class */ (function (_super) {
2429
2485
  }
2430
2486
  EventHandler.add(this.inputElement, 'keyup', this.keyUp, this);
2431
2487
  EventHandler.add(this.inputElement, 'paste', this.onPaste, this);
2488
+ EventHandler.add(this.inputElement, 'content-changed', this.contentChanged, this);
2432
2489
  EventHandler.add(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30), this);
2433
2490
  EventHandler.add(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler, this);
2434
2491
  this.wireContextEvent();
2435
2492
  this.formatter.editorManager.observer.on(CONSTANT.KEY_DOWN_HANDLER, this.editorKeyDown, this);
2436
- this.element.ownerDocument.defaultView.addEventListener('resize', this.onResizeHandler, true);
2493
+ this.element.ownerDocument.defaultView.addEventListener('resize', debounce(this.onResizeHandler, 10), true);
2437
2494
  if (this.iframeSettings.enable) {
2438
2495
  EventHandler.add(this.inputElement, 'focusin', this.focusHandler, this);
2439
2496
  EventHandler.add(this.inputElement, 'focusout', this.blurHandler, this);
@@ -2475,6 +2532,8 @@ var RichTextEditor = /** @class */ (function (_super) {
2475
2532
  this.off(events.contentChanged, this.contentChanged);
2476
2533
  this.off(events.resizeInitialized, this.updateResizeFlag);
2477
2534
  this.off(events.updateTbItemsStatus, this.updateStatus);
2535
+ this.off(events.cleanupResizeElements, this.cleanupResizeElements);
2536
+ this.off(events.updateValueOnIdle, this.updateValueOnIdle);
2478
2537
  if (this.readonly && this.enabled) {
2479
2538
  return;
2480
2539
  }
@@ -2490,13 +2549,14 @@ var RichTextEditor = /** @class */ (function (_super) {
2490
2549
  }
2491
2550
  EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
2492
2551
  EventHandler.remove(this.inputElement, 'paste', this.onPaste);
2552
+ EventHandler.remove(this.inputElement, 'content-changed', this.contentChanged);
2493
2553
  EventHandler.remove(this.inputElement, Browser.touchEndEvent, debounce(this.mouseUp, 30));
2494
2554
  EventHandler.remove(this.inputElement, Browser.touchStartEvent, this.mouseDownHandler);
2495
2555
  this.unWireContextEvent();
2496
2556
  if (this.formatter) {
2497
2557
  this.formatter.editorManager.observer.off(CONSTANT.KEY_DOWN_HANDLER, this.editorKeyDown);
2498
2558
  }
2499
- this.element.ownerDocument.defaultView.removeEventListener('resize', this.onResizeHandler, true);
2559
+ this.element.ownerDocument.defaultView.removeEventListener('resize', debounce(this.onResizeHandler, 10), true);
2500
2560
  if (this.iframeSettings.enable) {
2501
2561
  EventHandler.remove(this.inputElement, 'focusin', this.focusHandler);
2502
2562
  EventHandler.remove(this.inputElement, 'focusout', this.blurHandler);
@@ -2543,6 +2603,33 @@ var RichTextEditor = /** @class */ (function (_super) {
2543
2603
  }
2544
2604
  }
2545
2605
  };
2606
+ RichTextEditor.prototype.removeSelectionClassStates = function (element) {
2607
+ var classNames = [classes.CLS_IMG_FOCUS, classes.CLS_TABLE_SEL, classes.CLS_VID_FOCUS, classes.CLS_AUD_FOCUS];
2608
+ for (var i = 0; i < classNames.length; i++) {
2609
+ var item = element.querySelectorAll('.' + classNames[i]);
2610
+ removeClass(item, classNames[i]);
2611
+ if (item.length === 0) {
2612
+ continue;
2613
+ }
2614
+ for (var j = 0; j < item.length; j++) {
2615
+ if (item[j].classList.length === 0) {
2616
+ item[j].removeAttribute('class');
2617
+ }
2618
+ if (item[j].nodeName === 'IMG' && item[j].style.outline !== '') {
2619
+ item[j].style.outline = '';
2620
+ }
2621
+ }
2622
+ }
2623
+ };
2624
+ RichTextEditor.prototype.getRenderedQuickToolbarElem = function () {
2625
+ var quickToolbars = this.quickToolbarModule.getQuickToolbarInstance();
2626
+ for (var i = 0; i < quickToolbars.length; i++) {
2627
+ if (quickToolbars[i] && quickToolbars[i].isRendered) {
2628
+ return quickToolbars[i].element;
2629
+ }
2630
+ }
2631
+ return null;
2632
+ };
2546
2633
  __decorate([
2547
2634
  Complex({}, ToolbarSettings)
2548
2635
  ], RichTextEditor.prototype, "toolbarSettings", void 0);