@syncfusion/ej2-richtexteditor 25.1.40 → 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 -1973
  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 +760 -307
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +861 -405
  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 +3 -3
  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 +3 -3
  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 +13 -4
  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 +3 -3
  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 +5 -0
  106. package/src/rich-text-editor/actions/enter-key.js +107 -13
  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 -1
  117. package/src/rich-text-editor/actions/paste-clean-up.js +57 -16
  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 +5 -5
  129. package/src/rich-text-editor/base/enum.js +10 -10
  130. package/src/rich-text-editor/base/interface.d.ts +53 -53
  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 +63 -61
  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 +8 -8
  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 -8
  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
@@ -1,4 +1,4 @@
1
- import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from '@syncfusion/ej2-base';import { Base, EmitType } from '@syncfusion/ej2-base';import { KeyboardEventsModel } from '@syncfusion/ej2-base';
1
+ import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event } from '@syncfusion/ej2-base';
2
2
  import {KeyboardEventArgs} from "./keyboard";
3
3
 
4
4
  /**
@@ -7,24 +7,24 @@ import {KeyboardEventArgs} from "./keyboard";
7
7
  export interface KeyboardEventsModel {
8
8
 
9
9
  /**
10
- * Specifies key combination and it respective action name.
11
- *
12
- * @default null
13
- */
14
- keyConfigs?: { [key: string]: string };
10
+ * Specifies key combination and it respective action name.
11
+ *
12
+ * @default null
13
+ */
14
+ keyConfigs?: { [key: string]: string };
15
15
 
16
16
  /**
17
- * Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
18
- *
19
- * @default 'keyup'
20
- */
21
- eventName?: string;
17
+ * Specifies on which event keyboardEvents class should listen for key press. For ex., `keyup`, `keydown` or `keypress`
18
+ *
19
+ * @default 'keyup'
20
+ */
21
+ eventName?: string;
22
22
 
23
23
  /**
24
- * Specifies the listener when keyboard actions is performed.
25
- *
26
- * @event 'keyAction'
27
- */
28
- keyAction?: EmitType<KeyboardEventArgs>;
24
+ * Specifies the listener when keyboard actions is performed.
25
+ *
26
+ * @event 'keyAction'
27
+ */
28
+ keyAction?: EmitType<KeyboardEventArgs>;
29
29
 
30
30
  }
@@ -27,7 +27,7 @@ export interface KeyboardEventArgs extends KeyboardEvent {
27
27
  * ```
28
28
  *
29
29
  * @hidden
30
-
30
+ * @deprecated
31
31
  */
32
32
  export declare class KeyboardEvents extends Base<HTMLElement> implements INotifyPropertyChanged {
33
33
  /**
@@ -1,22 +1,22 @@
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
- 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;
18
- return c > 3 && r && Object.defineProperty(target, key, r), r;
19
- };
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
20
  import { Property, NotifyPropertyChanges, Event } from '@syncfusion/ej2-base';
21
21
  import { Base } from '@syncfusion/ej2-base';
22
22
  var keyCode = {
@@ -86,7 +86,7 @@ var keyCode = {
86
86
  * ```
87
87
  *
88
88
  * @hidden
89
-
89
+ * @deprecated
90
90
  */
91
91
  var KeyboardEvents = /** @class */ (function (_super) {
92
92
  __extends(KeyboardEvents, _super);
@@ -19,7 +19,7 @@ export declare class MarkdownEditor {
19
19
  * @function destroy
20
20
  * @returns {void}
21
21
  * @hidden
22
-
22
+ * @deprecated
23
23
  */
24
24
  destroy(): void;
25
25
  private moduleDestroy;
@@ -37,7 +37,7 @@ export declare class MarkdownEditor {
37
37
  * @param {RichTextEditorModel} e - specifies the editor model
38
38
  * @returns {void}
39
39
  * @hidden
40
-
40
+ * @deprecated
41
41
  */
42
42
  protected onPropertyChanged(e: {
43
43
  [key: string]: RichTextEditorModel;
@@ -22,7 +22,7 @@ var MarkdownEditor = /** @class */ (function () {
22
22
  * @function destroy
23
23
  * @returns {void}
24
24
  * @hidden
25
-
25
+ * @deprecated
26
26
  */
27
27
  MarkdownEditor.prototype.destroy = function () {
28
28
  if (isNullOrUndefined(this.parent)) {
@@ -149,7 +149,7 @@ var MarkdownEditor = /** @class */ (function () {
149
149
  * @param {RichTextEditorModel} e - specifies the editor model
150
150
  * @returns {void}
151
151
  * @hidden
152
-
152
+ * @deprecated
153
153
  */
154
154
  MarkdownEditor.prototype.onPropertyChanged = function (e) {
155
155
  // On property code change here
@@ -46,7 +46,7 @@ export declare class PasteCleanup {
46
46
  * @param {Element []} imgElement - specifies the array elements.
47
47
  * @returns {void}
48
48
  * @hidden
49
-
49
+ * @deprecated
50
50
  */
51
51
  private imageFormatting;
52
52
  private radioRender;
@@ -58,6 +58,7 @@ export declare class PasteCleanup {
58
58
  private docClick;
59
59
  private cleanAppleClass;
60
60
  private formatting;
61
+ private convertBlobToBase64;
61
62
  private cropImageHandler;
62
63
  private addTableClass;
63
64
  private setImageProperties;
@@ -9,10 +9,11 @@ import { CLS_RTE_IMAGE, CLS_IMGINLINE, CLS_IMGBREAK } from '../base/classes';
9
9
  import { pasteCleanupGroupingTags } from '../../common/config';
10
10
  import { NodeSelection } from '../../selection/selection';
11
11
  import * as EVENTS from './../../common/constant';
12
- import { RenderType, UploadRequest } from '../base/enum';
12
+ import { RenderType, ImageInputSource } from '../base/enum';
13
13
  import { Uploader } from '@syncfusion/ej2-inputs';
14
14
  import * as classes from '../base/classes';
15
15
  import { sanitizeHelper, convertToBlob, getDefaultValue } from '../base/util';
16
+ import { scrollToCursor } from '../../common/util';
16
17
  /**
17
18
  * PasteCleanup module called when pasting content in RichTextEditor
18
19
  */
@@ -404,13 +405,15 @@ var PasteCleanup = /** @class */ (function () {
404
405
  popupObj.close();
405
406
  }
406
407
  this.parent.trigger(events.imageUploadFailed, e);
407
- uploadObj.destroy();
408
+ if (uploadObj && document.body.contains(uploadObj.element)) {
409
+ uploadObj.destroy();
410
+ }
408
411
  };
409
412
  PasteCleanup.prototype.popupClose = function (popupObj, uploadObj, imgElem, e) {
410
413
  var _this = this;
411
414
  this.parent.inputElement.contentEditable = 'true';
412
415
  e.element = imgElem;
413
- e.requestType = UploadRequest.Pasted;
416
+ e.detectImageSource = ImageInputSource.Pasted;
414
417
  this.parent.trigger(events.imageUploadSuccess, e, function (e) {
415
418
  if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
416
419
  var url = _this.parent.insertImageSettings.path + e.file.name;
@@ -420,7 +423,7 @@ var PasteCleanup = /** @class */ (function () {
420
423
  });
421
424
  popupObj.close();
422
425
  imgElem.style.opacity = '1';
423
- if (!uploadObj.isDestroyed) {
426
+ if (uploadObj && document.body.contains(uploadObj.element)) {
424
427
  uploadObj.destroy();
425
428
  }
426
429
  this.toolbarEnableDisable(false);
@@ -467,7 +470,7 @@ var PasteCleanup = /** @class */ (function () {
467
470
  * @param {Element []} imgElement - specifies the array elements.
468
471
  * @returns {void}
469
472
  * @hidden
470
-
473
+ * @deprecated
471
474
  */
472
475
  PasteCleanup.prototype.imageFormatting = function (pasteArgs, imgElement) {
473
476
  if (!isNOU(imgElement.elements[0].getAttribute('src'))) {
@@ -671,7 +674,8 @@ var PasteCleanup = /** @class */ (function () {
671
674
  clipBoardElem = this.allowedStyle(clipBoardElem);
672
675
  }
673
676
  this.saveSelection.restore();
674
- clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
677
+ var newText = clipBoardElem.innerHTML.split("&").join("&amp;");
678
+ clipBoardElem.innerHTML = this.sanitizeHelper(newText);
675
679
  var allImg = clipBoardElem.querySelectorAll('img');
676
680
  for (var i = 0; i < allImg.length; i++) {
677
681
  if (!isNOU(allImg[i].getAttribute('src'))) {
@@ -720,16 +724,42 @@ var PasteCleanup = /** @class */ (function () {
720
724
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
721
725
  _this.parent.formatter.onSuccess(_this.parent, args);
722
726
  }, clipBoardElem, null, null, this.parent.enterKey);
727
+ scrollToCursor(this.parent.contentModule.getDocument(), this.parent.inputElement);
723
728
  this.removeTempClass();
724
729
  this.parent.notify(events.toolbarRefresh, {});
725
730
  this.cropImageHandler(this.parent.inputElement);
726
731
  }
727
732
  };
733
+ PasteCleanup.prototype.convertBlobToBase64 = function (element) {
734
+ var imgElem = element.querySelectorAll('img');
735
+ var _loop_1 = function (i) {
736
+ if (imgElem[i].getAttribute('src') &&
737
+ imgElem[i].getAttribute('src').startsWith("blob")) {
738
+ var blobImageUrl = imgElem[i].getAttribute('src');
739
+ var img_1 = new Image();
740
+ var onImageLoadEvent_1 = function () {
741
+ var canvas = document.createElement('canvas');
742
+ var ctx = canvas.getContext('2d');
743
+ canvas.width = img_1.width;
744
+ canvas.height = img_1.height;
745
+ ctx.drawImage(img_1, 0, 0);
746
+ var base64String = canvas.toDataURL('image/png');
747
+ imgElem[i].src = base64String;
748
+ img_1.removeEventListener('load', onImageLoadEvent_1);
749
+ };
750
+ img_1.src = blobImageUrl;
751
+ img_1.addEventListener('load', onImageLoadEvent_1);
752
+ }
753
+ };
754
+ for (var i = 0; i < imgElem.length; i++) {
755
+ _loop_1(i);
756
+ }
757
+ };
728
758
  PasteCleanup.prototype.cropImageHandler = function (element) {
729
759
  var _this = this;
730
760
  var allImgElm = element.querySelectorAll('.e-img-cropped');
731
761
  if (allImgElm.length > 0) {
732
- var _loop_1 = function (i) {
762
+ var _loop_2 = function (i) {
733
763
  if (allImgElm[i].getAttribute('src').split(',')[0].indexOf('base64') >= 0) {
734
764
  var image_1 = new Image();
735
765
  image_1.src = allImgElm[i].getAttribute('src');
@@ -763,26 +793,37 @@ var PasteCleanup = /** @class */ (function () {
763
793
  }
764
794
  };
765
795
  for (var i = 0; i < allImgElm.length; i++) {
766
- _loop_1(i);
796
+ _loop_2(i);
767
797
  }
768
798
  }
769
799
  else {
770
- this.imgUploading(this.parent.inputElement);
771
- if (this.parent.iframeSettings.enable) {
772
- this.parent.updateValue();
800
+ 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")) {
801
+ this.convertBlobToBase64(this.parent.inputElement);
802
+ setTimeout(function () {
803
+ _this.imgUploading(_this.parent.inputElement);
804
+ if (_this.parent.iframeSettings.enable) {
805
+ _this.parent.updateValue();
806
+ }
807
+ }, 20);
808
+ }
809
+ else {
810
+ this.imgUploading(this.parent.inputElement);
811
+ if (this.parent.iframeSettings.enable) {
812
+ this.parent.updateValue();
813
+ }
773
814
  }
774
815
  }
775
816
  };
776
817
  PasteCleanup.prototype.addTableClass = function (element, source) {
777
- source = isNOU(source) ? '' : source;
778
818
  var tableElement = element.querySelectorAll('table');
779
819
  for (var i = 0; i < tableElement.length; i++) {
780
- if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
781
- tableElement[i].classList.add('e-rte-table');
782
- }
783
- else if (source && source !== 'html') {
820
+ var isMSTeamsTable = tableElement[i].parentElement.nodeName === 'FIGURE';
821
+ if (this.parent.pasteCleanupSettings.keepFormat && source && !isMSTeamsTable) {
784
822
  tableElement[i].classList.add('e-rte-paste-' + source + '-table');
785
823
  }
824
+ else if (!tableElement[i].classList.contains('e-rte-table')) {
825
+ tableElement[i].classList.add('e-rte-table');
826
+ }
786
827
  }
787
828
  return element;
788
829
  };
@@ -36,7 +36,7 @@ export declare class QuickToolbar {
36
36
  * @param {RenderType} type - specifies the render type.
37
37
  * @returns {BaseQuickToolbar} - specifies the quick toolbar
38
38
  * @hidden
39
-
39
+ * @deprecated
40
40
  */
41
41
  createQTBar(popupType: string, mode: string, items: (string | IToolbarItems)[], type: RenderType): BaseQuickToolbar;
42
42
  private initializeQuickToolbars;
@@ -52,7 +52,7 @@ export declare class QuickToolbar {
52
52
  * @param {HTMLElement} target - specifies the target element.
53
53
  * @returns {void}
54
54
  * @hidden
55
-
55
+ * @deprecated
56
56
  */
57
57
  showInlineQTBar(x: number, y: number, target: HTMLElement): void;
58
58
  /**
@@ -60,7 +60,7 @@ export declare class QuickToolbar {
60
60
  *
61
61
  * @returns {void}
62
62
  * @hidden
63
-
63
+ * @deprecated
64
64
  */
65
65
  hideInlineQTBar(): void;
66
66
  /**
@@ -68,7 +68,7 @@ export declare class QuickToolbar {
68
68
  *
69
69
  * @returns {void}
70
70
  * @hidden
71
-
71
+ * @deprecated
72
72
  */
73
73
  hideQuickToolbars(): void;
74
74
  private deBounce;
@@ -84,7 +84,7 @@ export declare class QuickToolbar {
84
84
  *
85
85
  * @returns {void}
86
86
  * @hidden
87
-
87
+ * @deprecated
88
88
  */
89
89
  getInlineBaseToolbar(): BaseToolbar;
90
90
  /**
@@ -93,7 +93,7 @@ export declare class QuickToolbar {
93
93
  * @function destroy
94
94
  * @returns {void}
95
95
  * @hidden
96
-
96
+ * @deprecated
97
97
  */
98
98
  destroy(): void;
99
99
  private moduleDestroy;
@@ -105,7 +105,7 @@ export declare class QuickToolbar {
105
105
  *
106
106
  * @returns {void}
107
107
  * @hidden
108
-
108
+ * @deprecated
109
109
  */
110
110
  addEventListener(): void;
111
111
  private onKeyDown;
@@ -118,7 +118,7 @@ export declare class QuickToolbar {
118
118
  *
119
119
  * @returns {void}
120
120
  * @hidden
121
-
121
+ * @deprecated
122
122
  */
123
123
  removeEventListener(): void;
124
124
  /**
@@ -127,7 +127,7 @@ export declare class QuickToolbar {
127
127
  * @param {RichTextEditorModel} e - specifies the element.
128
128
  * @returns {void}
129
129
  * @hidden
130
-
130
+ * @deprecated
131
131
  */
132
132
  protected onPropertyChanged(e: {
133
133
  [key: string]: RichTextEditorModel;
@@ -60,7 +60,7 @@ var QuickToolbar = /** @class */ (function () {
60
60
  * @param {RenderType} type - specifies the render type.
61
61
  * @returns {BaseQuickToolbar} - specifies the quick toolbar
62
62
  * @hidden
63
-
63
+ * @deprecated
64
64
  */
65
65
  QuickToolbar.prototype.createQTBar = function (popupType, mode, items, type) {
66
66
  if (items.length < 1) {
@@ -147,7 +147,7 @@ var QuickToolbar = /** @class */ (function () {
147
147
  * @param {HTMLElement} target - specifies the target element.
148
148
  * @returns {void}
149
149
  * @hidden
150
-
150
+ * @deprecated
151
151
  */
152
152
  QuickToolbar.prototype.showInlineQTBar = function (x, y, target) {
153
153
  if (isNOU(this.parent) || this.parent.readonly || target.tagName.toLowerCase() === 'img' || this.inlineQTBar.element.querySelector('.e-rte-color-content')) {
@@ -160,7 +160,7 @@ var QuickToolbar = /** @class */ (function () {
160
160
  *
161
161
  * @returns {void}
162
162
  * @hidden
163
-
163
+ * @deprecated
164
164
  */
165
165
  QuickToolbar.prototype.hideInlineQTBar = function () {
166
166
  if (this.inlineQTBar && !hasClass(this.inlineQTBar.element, 'e-popup-close')) {
@@ -172,7 +172,7 @@ var QuickToolbar = /** @class */ (function () {
172
172
  *
173
173
  * @returns {void}
174
174
  * @hidden
175
-
175
+ * @deprecated
176
176
  */
177
177
  QuickToolbar.prototype.hideQuickToolbars = function () {
178
178
  if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close') && document.body.contains(this.linkQTBar.element)) {
@@ -340,7 +340,7 @@ var QuickToolbar = /** @class */ (function () {
340
340
  *
341
341
  * @returns {void}
342
342
  * @hidden
343
-
343
+ * @deprecated
344
344
  */
345
345
  QuickToolbar.prototype.getInlineBaseToolbar = function () {
346
346
  return this.inlineQTBar && this.inlineQTBar.quickTBarObj;
@@ -351,7 +351,7 @@ var QuickToolbar = /** @class */ (function () {
351
351
  * @function destroy
352
352
  * @returns {void}
353
353
  * @hidden
354
-
354
+ * @deprecated
355
355
  */
356
356
  QuickToolbar.prototype.destroy = function () {
357
357
  if (isNOU(this.parent)) {
@@ -441,7 +441,7 @@ var QuickToolbar = /** @class */ (function () {
441
441
  *
442
442
  * @returns {void}
443
443
  * @hidden
444
-
444
+ * @deprecated
445
445
  */
446
446
  QuickToolbar.prototype.addEventListener = function () {
447
447
  if (this.parent.isDestroyed) {
@@ -535,7 +535,7 @@ var QuickToolbar = /** @class */ (function () {
535
535
  *
536
536
  * @returns {void}
537
537
  * @hidden
538
-
538
+ * @deprecated
539
539
  */
540
540
  QuickToolbar.prototype.removeEventListener = function () {
541
541
  if (this.deBouncer) {
@@ -568,7 +568,7 @@ var QuickToolbar = /** @class */ (function () {
568
568
  * @param {RichTextEditorModel} e - specifies the element.
569
569
  * @returns {void}
570
570
  * @hidden
571
-
571
+ * @deprecated
572
572
  */
573
573
  QuickToolbar.prototype.onPropertyChanged = function (e) {
574
574
  if (!isNullOrUndefined(e.newProp.quickToolbarSettings)) {
@@ -43,7 +43,7 @@ export declare class Toolbar {
43
43
  *
44
44
  * @returns {void}
45
45
  * @hidden
46
-
46
+ * @deprecated
47
47
  */
48
48
  addFixedTBarClass(): void;
49
49
  /**
@@ -51,7 +51,7 @@ export declare class Toolbar {
51
51
  *
52
52
  * @returns {void}
53
53
  * @hidden
54
-
54
+ * @deprecated
55
55
  */
56
56
  removeFixedTBarClass(): void;
57
57
  private showFixedTBar;
@@ -62,7 +62,7 @@ export declare class Toolbar {
62
62
  * @param {IUpdateItemsModel} args - specifies the arguments.
63
63
  * @returns {void}
64
64
  * @hidden
65
-
65
+ * @deprecated
66
66
  */
67
67
  updateItem(args: IUpdateItemsModel): void;
68
68
  private updateToolbarStatus;
@@ -73,7 +73,7 @@ export declare class Toolbar {
73
73
  *
74
74
  * @returns {void}
75
75
  * @hidden
76
-
76
+ * @deprecated
77
77
  */
78
78
  getBaseToolbar(): BaseToolbar;
79
79
  /**
@@ -83,7 +83,7 @@ export declare class Toolbar {
83
83
  * @param {number} index - specifies the index value.
84
84
  * @returns {void}
85
85
  * @hidden
86
-
86
+ * @deprecated
87
87
  */
88
88
  addTBarItem(args: IUpdateItemsModel, index: number): void;
89
89
  /**
@@ -95,7 +95,7 @@ export declare class Toolbar {
95
95
  * @param {boolean} muteToolbarUpdate - specifies the toolbar.
96
96
  * @returns {void}
97
97
  * @hidden
98
-
98
+ * @deprecated
99
99
  */
100
100
  enableTBarItems(baseToolbar: BaseToolbar, items: string | string[], isEnable: boolean, muteToolbarUpdate?: boolean): void;
101
101
  /**
@@ -104,7 +104,7 @@ export declare class Toolbar {
104
104
  * @param {string} items - specifies the string value.
105
105
  * @returns {void}
106
106
  * @hidden
107
-
107
+ * @deprecated
108
108
  */
109
109
  removeTBarItems(items: string | string[]): void;
110
110
  /**
@@ -112,7 +112,7 @@ export declare class Toolbar {
112
112
  *
113
113
  * @returns {void}
114
114
  * @hidden
115
-
115
+ * @deprecated
116
116
  */
117
117
  getExpandTBarPopHeight(): number;
118
118
  /**
@@ -120,7 +120,7 @@ export declare class Toolbar {
120
120
  *
121
121
  * @returns {void}
122
122
  * @hidden
123
-
123
+ * @deprecated
124
124
  */
125
125
  getToolbarHeight(): number;
126
126
  /**
@@ -128,7 +128,7 @@ export declare class Toolbar {
128
128
  *
129
129
  * @returns {void}
130
130
  * @hidden
131
-
131
+ * @deprecated
132
132
  */
133
133
  getToolbarElement(): Element;
134
134
  /**
@@ -136,7 +136,7 @@ export declare class Toolbar {
136
136
  *
137
137
  * @returns {void}
138
138
  * @hidden
139
-
139
+ * @deprecated
140
140
  */
141
141
  refreshToolbarOverflow(): void;
142
142
  private isToolbarDestroyed;
@@ -147,7 +147,7 @@ export declare class Toolbar {
147
147
  * @function destroy
148
148
  * @returns {void}
149
149
  * @hidden
150
-
150
+ * @deprecated
151
151
  */
152
152
  destroy(): void;
153
153
  private moduleDestroy;
@@ -169,7 +169,7 @@ export declare class Toolbar {
169
169
  * @param {RichTextEditorModel} e - specifies the string value
170
170
  * @returns {void}
171
171
  * @hidden
172
-
172
+ * @deprecated
173
173
  */
174
174
  protected onPropertyChanged(e: {
175
175
  [key: string]: RichTextEditorModel;