@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41

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 (259) hide show
  1. package/.eslintrc.json +260 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +40 -40
  3. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +27 -27
  4. package/CHANGELOG.md +1775 -1751
  5. package/README.md +76 -76
  6. package/dist/ej2-richtexteditor.min.js +10 -0
  7. package/dist/ej2-richtexteditor.umd.min.js +10 -1
  8. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  9. package/dist/es6/ej2-richtexteditor.es2015.js +682 -434
  10. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  11. package/dist/es6/ej2-richtexteditor.es5.js +791 -543
  12. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  13. package/dist/global/ej2-richtexteditor.min.js +11 -0
  14. package/dist/global/ej2-richtexteditor.min.js.map +1 -0
  15. package/dist/global/index.d.ts +14 -0
  16. package/helpers/e2e/index.js +3 -3
  17. package/helpers/e2e/rte-helper.js +13 -13
  18. package/license +9 -9
  19. package/package.json +74 -74
  20. package/src/common/config.js +1 -1
  21. package/src/common/interface.d.ts +7 -7
  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/editor-manager.d.ts +3 -3
  25. package/src/editor-manager/base/editor-manager.js +3 -3
  26. package/src/editor-manager/base/enum.d.ts +2 -2
  27. package/src/editor-manager/base/interface.d.ts +9 -9
  28. package/src/editor-manager/base/types.d.ts +1 -1
  29. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  30. package/src/editor-manager/plugin/alignments.js +2 -2
  31. package/src/editor-manager/plugin/audio.d.ts +3 -3
  32. package/src/editor-manager/plugin/audio.js +16 -6
  33. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  34. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  35. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  36. package/src/editor-manager/plugin/clearformat.js +1 -1
  37. package/src/editor-manager/plugin/dom-node.d.ts +34 -34
  38. package/src/editor-manager/plugin/dom-node.js +35 -48
  39. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  40. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  41. package/src/editor-manager/plugin/formats.d.ts +2 -2
  42. package/src/editor-manager/plugin/formats.js +2 -2
  43. package/src/editor-manager/plugin/image.d.ts +3 -3
  44. package/src/editor-manager/plugin/image.js +33 -6
  45. package/src/editor-manager/plugin/indents.d.ts +2 -2
  46. package/src/editor-manager/plugin/indents.js +2 -2
  47. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  48. package/src/editor-manager/plugin/insert-methods.js +4 -4
  49. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  50. package/src/editor-manager/plugin/insert-text.js +2 -2
  51. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  52. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  53. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  54. package/src/editor-manager/plugin/inserthtml.js +7 -4
  55. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  56. package/src/editor-manager/plugin/isformatted.js +8 -8
  57. package/src/editor-manager/plugin/link.d.ts +2 -2
  58. package/src/editor-manager/plugin/link.js +2 -2
  59. package/src/editor-manager/plugin/lists.d.ts +2 -2
  60. package/src/editor-manager/plugin/lists.js +2 -2
  61. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  62. package/src/editor-manager/plugin/ms-word-clean-up.js +5 -2
  63. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  64. package/src/editor-manager/plugin/nodecutter.js +7 -7
  65. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  66. package/src/editor-manager/plugin/selection-commands.js +40 -1
  67. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  68. package/src/editor-manager/plugin/selection-exec.js +2 -2
  69. package/src/editor-manager/plugin/table.d.ts +2 -2
  70. package/src/editor-manager/plugin/table.js +2 -2
  71. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  72. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  73. package/src/editor-manager/plugin/undo.d.ts +6 -6
  74. package/src/editor-manager/plugin/undo.js +6 -6
  75. package/src/editor-manager/plugin/video.d.ts +3 -3
  76. package/src/editor-manager/plugin/video.js +3 -3
  77. package/src/markdown-parser/base/interface.d.ts +10 -10
  78. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  79. package/src/markdown-parser/base/markdown-parser.js +3 -3
  80. package/src/markdown-parser/base/types.d.ts +1 -1
  81. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  82. package/src/markdown-parser/plugin/clearformat.js +2 -2
  83. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  84. package/src/markdown-parser/plugin/formats.js +2 -2
  85. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  86. package/src/markdown-parser/plugin/insert-text.js +2 -2
  87. package/src/markdown-parser/plugin/link.d.ts +2 -2
  88. package/src/markdown-parser/plugin/link.js +2 -2
  89. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  90. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  91. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  92. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  93. package/src/markdown-parser/plugin/table.d.ts +3 -3
  94. package/src/markdown-parser/plugin/table.js +3 -3
  95. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  96. package/src/markdown-parser/plugin/undo.js +6 -6
  97. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  98. package/src/rich-text-editor/actions/base-quick-toolbar.js +27 -13
  99. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  100. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  101. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  102. package/src/rich-text-editor/actions/color-picker.js +5 -5
  103. package/src/rich-text-editor/actions/count.d.ts +3 -3
  104. package/src/rich-text-editor/actions/count.js +3 -3
  105. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  106. package/src/rich-text-editor/actions/dropdown-buttons.js +6 -4
  107. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  108. package/src/rich-text-editor/actions/emoji-picker.js +13 -4
  109. package/src/rich-text-editor/actions/enter-key.js +2 -1
  110. package/src/rich-text-editor/actions/file-manager.js +1 -1
  111. package/src/rich-text-editor/actions/format-painter.js +1 -1
  112. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  113. package/src/rich-text-editor/actions/full-screen.js +5 -5
  114. package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
  115. package/src/rich-text-editor/actions/html-editor.js +32 -6
  116. package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
  117. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  118. package/src/rich-text-editor/actions/keyboard.js +20 -20
  119. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  120. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  121. package/src/rich-text-editor/actions/paste-clean-up.d.ts +3 -1
  122. package/src/rich-text-editor/actions/paste-clean-up.js +73 -20
  123. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  124. package/src/rich-text-editor/actions/quick-toolbar.js +33 -14
  125. package/src/rich-text-editor/actions/toolbar.d.ts +14 -13
  126. package/src/rich-text-editor/actions/toolbar.js +31 -23
  127. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  128. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  129. package/src/rich-text-editor/base/classes.d.ts +126 -121
  130. package/src/rich-text-editor/base/classes.js +126 -121
  131. package/src/rich-text-editor/base/constant.d.ts +155 -150
  132. package/src/rich-text-editor/base/constant.js +155 -150
  133. package/src/rich-text-editor/base/enum.d.ts +1 -1
  134. package/src/rich-text-editor/base/enum.js +1 -1
  135. package/src/rich-text-editor/base/interface.d.ts +59 -49
  136. package/src/rich-text-editor/base/interface.js +1 -1
  137. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
  138. package/src/rich-text-editor/base/rich-text-editor.d.ts +69 -60
  139. package/src/rich-text-editor/base/rich-text-editor.js +143 -80
  140. package/src/rich-text-editor/base/util.d.ts +1 -1
  141. package/src/rich-text-editor/base/util.js +12 -3
  142. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  143. package/src/rich-text-editor/formatter/formatter.js +9 -9
  144. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  145. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  146. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  147. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  148. package/src/rich-text-editor/models/default-locale.js +2 -0
  149. package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
  150. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  151. package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
  152. package/src/rich-text-editor/models/inline-mode.js +19 -19
  153. package/src/rich-text-editor/models/items.js +1 -1
  154. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
  155. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  156. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  157. package/src/rich-text-editor/renderer/audio-module.js +1 -1
  158. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  159. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  160. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  161. package/src/rich-text-editor/renderer/dialog-renderer.js +12 -3
  162. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  163. package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
  164. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  165. package/src/rich-text-editor/renderer/image-module.js +53 -53
  166. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  167. package/src/rich-text-editor/renderer/link-module.js +44 -24
  168. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  169. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  170. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  171. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  172. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  173. package/src/rich-text-editor/renderer/render.js +2 -2
  174. package/src/rich-text-editor/renderer/table-module.d.ts +3 -1
  175. package/src/rich-text-editor/renderer/table-module.js +44 -31
  176. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -15
  177. package/src/rich-text-editor/renderer/toolbar-renderer.js +22 -102
  178. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  179. package/src/rich-text-editor/renderer/video-module.js +1 -1
  180. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  181. package/src/rich-text-editor/renderer/view-source.js +9 -7
  182. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  183. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  184. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  185. package/src/rich-text-editor/services/service-locator.js +3 -3
  186. package/src/selection/selection.d.ts +22 -22
  187. package/src/selection/selection.js +22 -22
  188. package/styles/_all.scss +1 -1
  189. package/styles/bootstrap-dark.css +194 -52
  190. package/styles/bootstrap.css +197 -53
  191. package/styles/bootstrap4.css +194 -52
  192. package/styles/bootstrap5-dark.css +195 -53
  193. package/styles/bootstrap5.css +195 -53
  194. package/styles/fabric-dark.css +194 -52
  195. package/styles/fabric.css +194 -52
  196. package/styles/fluent-dark.css +197 -53
  197. package/styles/fluent.css +197 -53
  198. package/styles/highcontrast-light.css +194 -52
  199. package/styles/highcontrast.css +194 -52
  200. package/styles/material-dark.css +196 -53
  201. package/styles/material.css +196 -53
  202. package/styles/material3-dark.css +194 -52
  203. package/styles/material3-dark.scss +1 -1
  204. package/styles/material3.css +194 -52
  205. package/styles/material3.scss +1 -1
  206. package/styles/rich-text-editor/_all.scss +2 -2
  207. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +277 -277
  208. package/styles/rich-text-editor/_bootstrap-definition.scss +334 -334
  209. package/styles/rich-text-editor/_bootstrap4-definition.scss +460 -460
  210. package/styles/rich-text-editor/_bootstrap5-definition.scss +262 -262
  211. package/styles/rich-text-editor/_fabric-dark-definition.scss +259 -259
  212. package/styles/rich-text-editor/_fabric-definition.scss +257 -257
  213. package/styles/rich-text-editor/_fluent-definition.scss +263 -263
  214. package/styles/rich-text-editor/_fusionnew-definition.scss +261 -261
  215. package/styles/rich-text-editor/_highcontrast-definition.scss +257 -257
  216. package/styles/rich-text-editor/_highcontrast-light-definition.scss +257 -257
  217. package/styles/rich-text-editor/_layout.scss +2147 -2072
  218. package/styles/rich-text-editor/_material-dark-definition.scss +262 -262
  219. package/styles/rich-text-editor/_material-definition.scss +260 -260
  220. package/styles/rich-text-editor/_material3-definition.scss +262 -262
  221. package/styles/rich-text-editor/_tailwind-definition.scss +257 -257
  222. package/styles/rich-text-editor/_theme.scss +837 -837
  223. package/styles/rich-text-editor/bootstrap-dark.css +194 -52
  224. package/styles/rich-text-editor/bootstrap.css +197 -53
  225. package/styles/rich-text-editor/bootstrap4.css +194 -52
  226. package/styles/rich-text-editor/bootstrap5-dark.css +195 -53
  227. package/styles/rich-text-editor/bootstrap5.css +195 -53
  228. package/styles/rich-text-editor/fabric-dark.css +194 -52
  229. package/styles/rich-text-editor/fabric.css +194 -52
  230. package/styles/rich-text-editor/fluent-dark.css +197 -53
  231. package/styles/rich-text-editor/fluent.css +197 -53
  232. package/styles/rich-text-editor/highcontrast-light.css +194 -52
  233. package/styles/rich-text-editor/highcontrast.css +194 -52
  234. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
  235. package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
  236. package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
  237. package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
  238. package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
  239. package/styles/rich-text-editor/icons/_fabric.scss +349 -349
  240. package/styles/rich-text-editor/icons/_fluent.scss +348 -348
  241. package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
  242. package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
  243. package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
  244. package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
  245. package/styles/rich-text-editor/icons/_material.scss +349 -349
  246. package/styles/rich-text-editor/icons/_material3.scss +348 -348
  247. package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
  248. package/styles/rich-text-editor/material-dark.css +196 -53
  249. package/styles/rich-text-editor/material.css +196 -53
  250. package/styles/rich-text-editor/material3-dark.css +194 -52
  251. package/styles/rich-text-editor/material3-dark.scss +1 -1
  252. package/styles/rich-text-editor/material3.css +194 -52
  253. package/styles/rich-text-editor/material3.scss +1 -1
  254. package/styles/rich-text-editor/tailwind-dark.css +194 -52
  255. package/styles/rich-text-editor/tailwind.css +194 -52
  256. package/styles/tailwind-dark.css +194 -52
  257. package/styles/tailwind.css +194 -52
  258. package/tslint.json +111 -0
  259. package/src/global.d.ts +0 -1
@@ -19,7 +19,7 @@ export declare class MarkdownEditor {
19
19
  * @function destroy
20
20
  * @returns {void}
21
21
  * @hidden
22
- * @deprecated
22
+
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
- * @deprecated
40
+
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
- * @deprecated
25
+
26
26
  */
27
27
  MarkdownEditor.prototype.destroy = function () {
28
28
  if (isNullOrUndefined(this.parent)) {
@@ -147,7 +147,7 @@ var MarkdownEditor = /** @class */ (function () {
147
147
  * @param {RichTextEditorModel} e - specifies the editor model
148
148
  * @returns {void}
149
149
  * @hidden
150
- * @deprecated
150
+
151
151
  */
152
152
  MarkdownEditor.prototype.onPropertyChanged = function (e) {
153
153
  // 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
- * @deprecated
49
+
50
50
  */
51
51
  private imageFormatting;
52
52
  private radioRender;
@@ -64,6 +64,8 @@ export declare class PasteCleanup {
64
64
  private removeTempClass;
65
65
  private sanitizeHelper;
66
66
  private plainFormatting;
67
+ private removingComments;
68
+ private reframeToBrContent;
67
69
  private getTextContent;
68
70
  private detachInlineElements;
69
71
  private findDetachEmptyElem;
@@ -66,6 +66,7 @@ var PasteCleanup = /** @class */ (function () {
66
66
  event: e
67
67
  };
68
68
  var value = null;
69
+ var isClipboardHTMLDataNull = false;
69
70
  var imageproperties;
70
71
  if (e.args && !isNOU(e.args.clipboardData)) {
71
72
  value = e.args.clipboardData.getData('text/html');
@@ -104,6 +105,7 @@ var PasteCleanup = /** @class */ (function () {
104
105
  var divElement = this.parent.createElement('div');
105
106
  divElement.innerHTML = this.splitBreakLine(value);
106
107
  value = divElement.innerHTML;
108
+ isClipboardHTMLDataNull = true;
107
109
  }
108
110
  }
109
111
  else if (value.length > 0) {
@@ -125,10 +127,13 @@ var PasteCleanup = /** @class */ (function () {
125
127
  tempDivElem.innerHTML = value;
126
128
  var isValueNotEmpty = tempDivElem.textContent !== '' || !isNOU(tempDivElem.querySelector('img')) ||
127
129
  !isNOU(tempDivElem.querySelector('table'));
130
+ this.parent.trigger(events.cleanupResizeElements, { value: value }, function (args) {
131
+ value = args.value;
132
+ });
128
133
  if (this.parent.pasteCleanupSettings.prompt) {
129
134
  if (isValueNotEmpty) {
130
135
  e.args.preventDefault();
131
- this.pasteDialog(value, args);
136
+ this.pasteDialog(value, args, isClipboardHTMLDataNull);
132
137
  }
133
138
  else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNOU(file)) {
134
139
  this.fireFoxImageUpload();
@@ -140,7 +145,7 @@ var PasteCleanup = /** @class */ (function () {
140
145
  }
141
146
  else if (this.parent.pasteCleanupSettings.plainText) {
142
147
  e.args.preventDefault();
143
- this.plainFormatting(value, args);
148
+ this.plainFormatting(value, args, isClipboardHTMLDataNull);
144
149
  }
145
150
  else if (this.parent.pasteCleanupSettings.keepFormat) {
146
151
  e.args.preventDefault();
@@ -182,13 +187,17 @@ var PasteCleanup = /** @class */ (function () {
182
187
  PasteCleanup.prototype.splitBreakLine = function (value) {
183
188
  var enterSplitText = value.split('\n');
184
189
  var contentInnerElem = '';
190
+ var startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
191
+ var endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
185
192
  for (var i = 0; i < enterSplitText.length; i++) {
186
193
  if (enterSplitText[i].trim() === '') {
187
194
  contentInnerElem += getDefaultValue(this.parent);
188
195
  }
189
196
  else {
190
197
  var contentWithSpace = this.makeSpace(enterSplitText[i]);
191
- contentInnerElem += (i === 0 ? '<span>' : '<p>') + contentWithSpace.trim() + (i === 0 ? '</span>' : '</p>');
198
+ contentInnerElem += (i === 0 && this.parent.enterKey !== 'BR' ? '<span>' : startNode) +
199
+ (contentWithSpace.trim() === '' ? '<br>' : contentWithSpace.trim()) +
200
+ (enterSplitText.length - 1 === i && this.parent.enterKey === 'BR' ? '' : (i === 0 && this.parent.enterKey !== 'BR' ? '</span>' : endNode));
192
201
  }
193
202
  }
194
203
  return contentInnerElem;
@@ -443,7 +452,7 @@ var PasteCleanup = /** @class */ (function () {
443
452
  * @param {Element []} imgElement - specifies the array elements.
444
453
  * @returns {void}
445
454
  * @hidden
446
- * @deprecated
455
+
447
456
  */
448
457
  PasteCleanup.prototype.imageFormatting = function (pasteArgs, imgElement) {
449
458
  if (!isNOU(imgElement.elements[0].getAttribute('src'))) {
@@ -457,10 +466,10 @@ var PasteCleanup = /** @class */ (function () {
457
466
  var range = this.nodeSelectionObj.getRange(currentDocument);
458
467
  this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
459
468
  if (this.parent.pasteCleanupSettings.prompt) {
460
- this.pasteDialog(imageValue, pasteArgs);
469
+ this.pasteDialog(imageValue, pasteArgs, false);
461
470
  }
462
471
  else if (this.parent.pasteCleanupSettings.plainText) {
463
- this.plainFormatting(imageValue, pasteArgs);
472
+ this.plainFormatting(imageValue, pasteArgs, false);
464
473
  }
465
474
  else if (this.parent.pasteCleanupSettings.keepFormat) {
466
475
  this.formatting(imageValue, false, pasteArgs);
@@ -484,7 +493,7 @@ var PasteCleanup = /** @class */ (function () {
484
493
  var plainTextElement = this.parent.element.querySelector('#plainTextFormat');
485
494
  this.plainTextRadioButton.appendTo(plainTextElement);
486
495
  };
487
- PasteCleanup.prototype.selectFormatting = function (value, args, keepChecked, cleanChecked) {
496
+ PasteCleanup.prototype.selectFormatting = function (value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull) {
488
497
  if (keepChecked) {
489
498
  this.formatting(value, false, args);
490
499
  }
@@ -492,10 +501,10 @@ var PasteCleanup = /** @class */ (function () {
492
501
  this.formatting(value, true, args);
493
502
  }
494
503
  else {
495
- this.plainFormatting(value, args);
504
+ this.plainFormatting(value, args, isClipboardHTMLDataNull);
496
505
  }
497
506
  };
498
- PasteCleanup.prototype.pasteDialog = function (value, args) {
507
+ PasteCleanup.prototype.pasteDialog = function (value, args, isClipboardHTMLDataNull) {
499
508
  var _this = this;
500
509
  var isHeight = false;
501
510
  var preRTEHeight = this.parent.height;
@@ -512,7 +521,7 @@ var PasteCleanup = /** @class */ (function () {
512
521
  var argument = _this.dialogObj;
513
522
  _this.dialogRenderObj.close(argument);
514
523
  _this.dialogObj.destroy();
515
- _this.selectFormatting(value, args, keepChecked, cleanChecked);
524
+ _this.selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull);
516
525
  }
517
526
  },
518
527
  buttonModel: {
@@ -573,7 +582,7 @@ var PasteCleanup = /** @class */ (function () {
573
582
  isHeight = true;
574
583
  }
575
584
  this.dialogObj.show();
576
- this.setCssClass({ cssClass: this.parent.cssClass });
585
+ this.setCssClass({ cssClass: this.parent.getCssClass() });
577
586
  };
578
587
  PasteCleanup.prototype.updateCss = function (currentObj, e) {
579
588
  if (currentObj && e.cssClass) {
@@ -786,7 +795,7 @@ var PasteCleanup = /** @class */ (function () {
786
795
  return value;
787
796
  };
788
797
  //Plain Formatting
789
- PasteCleanup.prototype.plainFormatting = function (value, args) {
798
+ PasteCleanup.prototype.plainFormatting = function (value, args, isClipboardHTMLDataNull) {
790
799
  var _this = this;
791
800
  var clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
792
801
  clipBoardElem.innerHTML = value;
@@ -824,6 +833,13 @@ var PasteCleanup = /** @class */ (function () {
824
833
  this.saveSelection.restore();
825
834
  clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
826
835
  this.addTempClass(clipBoardElem);
836
+ this.removingComments(clipBoardElem);
837
+ if (this.parent.enterKey === 'BR' && !isClipboardHTMLDataNull) {
838
+ clipBoardElem = this.reframeToBrContent(clipBoardElem);
839
+ }
840
+ else if (this.parent.enterKey === 'DIV') {
841
+ clipBoardElem.innerHTML = clipBoardElem.innerHTML.replace(/<p class="pasteContent_RTE">/g, '<div>').replace(/<\/p>/g, '</div>');
842
+ }
827
843
  this.parent.trigger(events.afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: null }, function (updatedArgs) { value = updatedArgs.value; });
828
844
  clipBoardElem.innerHTML = value;
829
845
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
@@ -838,6 +854,41 @@ var PasteCleanup = /** @class */ (function () {
838
854
  this.parent.formatter.onSuccess(this.parent, args);
839
855
  }
840
856
  };
857
+ PasteCleanup.prototype.removingComments = function (elm) {
858
+ var innerElement = elm.innerHTML;
859
+ innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
860
+ elm.innerHTML = innerElement;
861
+ };
862
+ PasteCleanup.prototype.reframeToBrContent = function (clipBoardElem) {
863
+ var newClipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
864
+ while (!isNOU(clipBoardElem.firstChild)) {
865
+ var brElem = this.parent.createElement('br');
866
+ var currentFirstChild = clipBoardElem.firstChild;
867
+ if (currentFirstChild.nodeName === '#text') {
868
+ var isNextSibPresent = !isNOU(currentFirstChild.nextSibling);
869
+ newClipBoardElem.appendChild(currentFirstChild);
870
+ if (isNextSibPresent) {
871
+ newClipBoardElem.appendChild(brElem);
872
+ }
873
+ }
874
+ else {
875
+ var isCurrentNodeBRElm = currentFirstChild.nodeName === 'BR';
876
+ if (isCurrentNodeBRElm) {
877
+ newClipBoardElem.appendChild(currentFirstChild);
878
+ }
879
+ else {
880
+ newClipBoardElem.appendChild(currentFirstChild.childNodes[0]);
881
+ }
882
+ if (!isNOU(currentFirstChild) && !isNOU(currentFirstChild.nextSibling)) {
883
+ newClipBoardElem.appendChild(brElem);
884
+ }
885
+ if (!isCurrentNodeBRElm && !isNOU(currentFirstChild)) {
886
+ detach(currentFirstChild);
887
+ }
888
+ }
889
+ }
890
+ return newClipBoardElem;
891
+ };
841
892
  PasteCleanup.prototype.getTextContent = function (clipBoardElem) {
842
893
  for (var i = 0; i < this.blockNode.length; i++) {
843
894
  var inElem = clipBoardElem.querySelectorAll(this.blockNode[i]);
@@ -885,14 +936,16 @@ var PasteCleanup = /** @class */ (function () {
885
936
  for (var i = 0; i < this.inlineNode.length; i++) {
886
937
  var inElem = clipBoardElem.querySelectorAll(this.inlineNode[i]);
887
938
  for (var j = 0; j < inElem.length; j++) {
888
- var parElem = void 0;
889
- for (var k = 0; k < inElem[j].childNodes.length; k++) {
890
- parElem = inElem[j].childNodes[k].parentElement;
891
- inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
892
- k--;
893
- }
894
- if (!isNOU(parElem)) {
895
- detach(parElem);
939
+ if (!(inElem[j] === clipBoardElem.firstChild && inElem[j].nodeName === 'SPAN')) {
940
+ var parElem = void 0;
941
+ for (var k = 0; k < inElem[j].childNodes.length; k++) {
942
+ parElem = inElem[j].childNodes[k].parentElement;
943
+ inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
944
+ k--;
945
+ }
946
+ if (!isNOU(parElem)) {
947
+ detach(parElem);
948
+ }
896
949
  }
897
950
  }
898
951
  }
@@ -35,7 +35,7 @@ export declare class QuickToolbar {
35
35
  * @param {RenderType} type - specifies the render type.
36
36
  * @returns {BaseQuickToolbar} - specifies the quick toolbar
37
37
  * @hidden
38
- * @deprecated
38
+
39
39
  */
40
40
  createQTBar(popupType: string, mode: string, items: (string | IToolbarItems)[], type: RenderType): BaseQuickToolbar;
41
41
  private initializeQuickToolbars;
@@ -51,7 +51,7 @@ export declare class QuickToolbar {
51
51
  * @param {HTMLElement} target - specifies the target element.
52
52
  * @returns {void}
53
53
  * @hidden
54
- * @deprecated
54
+
55
55
  */
56
56
  showInlineQTBar(x: number, y: number, target: HTMLElement): void;
57
57
  /**
@@ -59,7 +59,7 @@ export declare class QuickToolbar {
59
59
  *
60
60
  * @returns {void}
61
61
  * @hidden
62
- * @deprecated
62
+
63
63
  */
64
64
  hideInlineQTBar(): void;
65
65
  /**
@@ -67,7 +67,7 @@ export declare class QuickToolbar {
67
67
  *
68
68
  * @returns {void}
69
69
  * @hidden
70
- * @deprecated
70
+
71
71
  */
72
72
  hideQuickToolbars(): void;
73
73
  private deBounce;
@@ -82,7 +82,7 @@ export declare class QuickToolbar {
82
82
  *
83
83
  * @returns {void}
84
84
  * @hidden
85
- * @deprecated
85
+
86
86
  */
87
87
  getInlineBaseToolbar(): BaseToolbar;
88
88
  /**
@@ -91,7 +91,7 @@ export declare class QuickToolbar {
91
91
  * @function destroy
92
92
  * @returns {void}
93
93
  * @hidden
94
- * @deprecated
94
+
95
95
  */
96
96
  destroy(): void;
97
97
  private moduleDestroy;
@@ -103,7 +103,7 @@ export declare class QuickToolbar {
103
103
  *
104
104
  * @returns {void}
105
105
  * @hidden
106
- * @deprecated
106
+
107
107
  */
108
108
  addEventListener(): void;
109
109
  private onKeyDown;
@@ -116,7 +116,7 @@ export declare class QuickToolbar {
116
116
  *
117
117
  * @returns {void}
118
118
  * @hidden
119
- * @deprecated
119
+
120
120
  */
121
121
  removeEventListener(): void;
122
122
  /**
@@ -125,7 +125,7 @@ export declare class QuickToolbar {
125
125
  * @param {RichTextEditorModel} e - specifies the element.
126
126
  * @returns {void}
127
127
  * @hidden
128
- * @deprecated
128
+
129
129
  */
130
130
  protected onPropertyChanged(e: {
131
131
  [key: string]: RichTextEditorModel;
@@ -47,7 +47,7 @@ var QuickToolbar = /** @class */ (function () {
47
47
  toolbarItems: items,
48
48
  mode: mode,
49
49
  renderType: type,
50
- cssClass: this.parent.cssClass
50
+ cssClass: this.parent.getCssClass()
51
51
  };
52
52
  };
53
53
  /**
@@ -59,7 +59,7 @@ var QuickToolbar = /** @class */ (function () {
59
59
  * @param {RenderType} type - specifies the render type.
60
60
  * @returns {BaseQuickToolbar} - specifies the quick toolbar
61
61
  * @hidden
62
- * @deprecated
62
+
63
63
  */
64
64
  QuickToolbar.prototype.createQTBar = function (popupType, mode, items, type) {
65
65
  if (items.length < 1) {
@@ -146,7 +146,7 @@ var QuickToolbar = /** @class */ (function () {
146
146
  * @param {HTMLElement} target - specifies the target element.
147
147
  * @returns {void}
148
148
  * @hidden
149
- * @deprecated
149
+
150
150
  */
151
151
  QuickToolbar.prototype.showInlineQTBar = function (x, y, target) {
152
152
  if (isNOU(this.parent) || this.parent.readonly || target.tagName.toLowerCase() === 'img') {
@@ -159,7 +159,7 @@ var QuickToolbar = /** @class */ (function () {
159
159
  *
160
160
  * @returns {void}
161
161
  * @hidden
162
- * @deprecated
162
+
163
163
  */
164
164
  QuickToolbar.prototype.hideInlineQTBar = function () {
165
165
  if (this.inlineQTBar && !hasClass(this.inlineQTBar.element, 'e-popup-close')) {
@@ -171,7 +171,7 @@ var QuickToolbar = /** @class */ (function () {
171
171
  *
172
172
  * @returns {void}
173
173
  * @hidden
174
- * @deprecated
174
+
175
175
  */
176
176
  QuickToolbar.prototype.hideQuickToolbars = function () {
177
177
  if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close') && document.body.contains(this.linkQTBar.element)) {
@@ -261,6 +261,9 @@ var QuickToolbar = /** @class */ (function () {
261
261
  && !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
262
262
  this.hideInlineQTBar();
263
263
  }
264
+ if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
265
+ this.textQTBar.hidePopup();
266
+ }
264
267
  };
265
268
  QuickToolbar.prototype.inlineQTBarMouseDownHandler = function () {
266
269
  if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
@@ -274,8 +277,8 @@ var QuickToolbar = /** @class */ (function () {
274
277
  }
275
278
  };
276
279
  QuickToolbar.prototype.keyUpHandler = function (e) {
280
+ var args = e.args;
277
281
  if (this.parent.inlineMode.enable && !Browser.isDevice) {
278
- var args = e.args;
279
282
  if (this.parent.inlineMode.onSelection) {
280
283
  if (this.parent.getSelection().length > 0) {
281
284
  if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
@@ -288,6 +291,13 @@ var QuickToolbar = /** @class */ (function () {
288
291
  }
289
292
  this.deBounce(this.offsetX, this.offsetY, args.target);
290
293
  }
294
+ if (this.parent.quickToolbarSettings.text && !Browser.isDevice) {
295
+ if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
296
+ args.keyCode === 35 || args.keyCode === 36 || args.keyCode === 37 || args.keyCode === 38 ||
297
+ args.keyCode === 39 || args.keyCode === 40))) {
298
+ this.textQTBar.showPopup(this.offsetX, this.offsetY, args.target, 'text');
299
+ }
300
+ }
291
301
  };
292
302
  QuickToolbar.prototype.selectionChangeHandler = function (e) {
293
303
  var _this = this;
@@ -310,7 +320,7 @@ var QuickToolbar = /** @class */ (function () {
310
320
  *
311
321
  * @returns {void}
312
322
  * @hidden
313
- * @deprecated
323
+
314
324
  */
315
325
  QuickToolbar.prototype.getInlineBaseToolbar = function () {
316
326
  return this.inlineQTBar && this.inlineQTBar.quickTBarObj;
@@ -321,7 +331,7 @@ var QuickToolbar = /** @class */ (function () {
321
331
  * @function destroy
322
332
  * @returns {void}
323
333
  * @hidden
324
- * @deprecated
334
+
325
335
  */
326
336
  QuickToolbar.prototype.destroy = function () {
327
337
  if (isNOU(this.parent)) {
@@ -411,7 +421,7 @@ var QuickToolbar = /** @class */ (function () {
411
421
  *
412
422
  * @returns {void}
413
423
  * @hidden
414
- * @deprecated
424
+
415
425
  */
416
426
  QuickToolbar.prototype.addEventListener = function () {
417
427
  if (this.parent.isDestroyed) {
@@ -447,6 +457,15 @@ var QuickToolbar = /** @class */ (function () {
447
457
  if (this.videoQTBar && !hasClass(this.videoQTBar.element, 'e-popup-close')) {
448
458
  this.videoQTBar.hidePopup();
449
459
  }
460
+ if (this.tableQTBar && !hasClass(this.tableQTBar.element, 'e-popup-close')) {
461
+ this.tableQTBar.hidePopup();
462
+ }
463
+ if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close')) {
464
+ this.linkQTBar.hidePopup();
465
+ }
466
+ if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
467
+ this.textQTBar.hidePopup();
468
+ }
450
469
  }
451
470
  };
452
471
  QuickToolbar.prototype.onIframeMouseDown = function () {
@@ -496,9 +515,12 @@ var QuickToolbar = /** @class */ (function () {
496
515
  *
497
516
  * @returns {void}
498
517
  * @hidden
499
- * @deprecated
518
+
500
519
  */
501
520
  QuickToolbar.prototype.removeEventListener = function () {
521
+ if (this.deBouncer) {
522
+ clearTimeout(this.deBouncer);
523
+ }
502
524
  if (this.parent.isDestroyed) {
503
525
  return;
504
526
  }
@@ -519,9 +541,6 @@ var QuickToolbar = /** @class */ (function () {
519
541
  this.parent.off(events.rtlMode, this.setRtl);
520
542
  this.parent.off(events.bindCssClass, this.setCssClass);
521
543
  this.parent.off(events.hidePopup, this.hideQuickToolbars);
522
- if (this.deBouncer) {
523
- clearTimeout(this.deBouncer);
524
- }
525
544
  };
526
545
  /**
527
546
  * Called internally if any of the property value changed.
@@ -529,7 +548,7 @@ var QuickToolbar = /** @class */ (function () {
529
548
  * @param {RichTextEditorModel} e - specifies the element.
530
549
  * @returns {void}
531
550
  * @hidden
532
- * @deprecated
551
+
533
552
  */
534
553
  QuickToolbar.prototype.onPropertyChanged = function (e) {
535
554
  if (!isNullOrUndefined(e.newProp.quickToolbarSettings)) {
@@ -42,7 +42,7 @@ export declare class Toolbar {
42
42
  *
43
43
  * @returns {void}
44
44
  * @hidden
45
- * @deprecated
45
+
46
46
  */
47
47
  addFixedTBarClass(): void;
48
48
  /**
@@ -50,7 +50,7 @@ export declare class Toolbar {
50
50
  *
51
51
  * @returns {void}
52
52
  * @hidden
53
- * @deprecated
53
+
54
54
  */
55
55
  removeFixedTBarClass(): void;
56
56
  private showFixedTBar;
@@ -61,7 +61,7 @@ export declare class Toolbar {
61
61
  * @param {IUpdateItemsModel} args - specifies the arguments.
62
62
  * @returns {void}
63
63
  * @hidden
64
- * @deprecated
64
+
65
65
  */
66
66
  updateItem(args: IUpdateItemsModel): void;
67
67
  private updateToolbarStatus;
@@ -72,7 +72,7 @@ export declare class Toolbar {
72
72
  *
73
73
  * @returns {void}
74
74
  * @hidden
75
- * @deprecated
75
+
76
76
  */
77
77
  getBaseToolbar(): BaseToolbar;
78
78
  /**
@@ -82,7 +82,7 @@ export declare class Toolbar {
82
82
  * @param {number} index - specifies the index value.
83
83
  * @returns {void}
84
84
  * @hidden
85
- * @deprecated
85
+
86
86
  */
87
87
  addTBarItem(args: IUpdateItemsModel, index: number): void;
88
88
  /**
@@ -94,7 +94,7 @@ export declare class Toolbar {
94
94
  * @param {boolean} muteToolbarUpdate - specifies the toolbar.
95
95
  * @returns {void}
96
96
  * @hidden
97
- * @deprecated
97
+
98
98
  */
99
99
  enableTBarItems(baseToolbar: BaseToolbar, items: string | string[], isEnable: boolean, muteToolbarUpdate?: boolean): void;
100
100
  /**
@@ -103,7 +103,7 @@ export declare class Toolbar {
103
103
  * @param {string} items - specifies the string value.
104
104
  * @returns {void}
105
105
  * @hidden
106
- * @deprecated
106
+
107
107
  */
108
108
  removeTBarItems(items: string | string[]): void;
109
109
  /**
@@ -111,7 +111,7 @@ export declare class Toolbar {
111
111
  *
112
112
  * @returns {void}
113
113
  * @hidden
114
- * @deprecated
114
+
115
115
  */
116
116
  getExpandTBarPopHeight(): number;
117
117
  /**
@@ -119,7 +119,7 @@ export declare class Toolbar {
119
119
  *
120
120
  * @returns {void}
121
121
  * @hidden
122
- * @deprecated
122
+
123
123
  */
124
124
  getToolbarHeight(): number;
125
125
  /**
@@ -127,7 +127,7 @@ export declare class Toolbar {
127
127
  *
128
128
  * @returns {void}
129
129
  * @hidden
130
- * @deprecated
130
+
131
131
  */
132
132
  getToolbarElement(): Element;
133
133
  /**
@@ -135,7 +135,7 @@ export declare class Toolbar {
135
135
  *
136
136
  * @returns {void}
137
137
  * @hidden
138
- * @deprecated
138
+
139
139
  */
140
140
  refreshToolbarOverflow(): void;
141
141
  private isToolbarDestroyed;
@@ -146,7 +146,7 @@ export declare class Toolbar {
146
146
  * @function destroy
147
147
  * @returns {void}
148
148
  * @hidden
149
- * @deprecated
149
+
150
150
  */
151
151
  destroy(): void;
152
152
  private moduleDestroy;
@@ -157,6 +157,7 @@ export declare class Toolbar {
157
157
  private dropDownBeforeOpenHandler;
158
158
  private tbFocusHandler;
159
159
  private toolbarClickHandler;
160
+ private adjustContentHeight;
160
161
  protected wireEvents(): void;
161
162
  protected unWireEvents(): void;
162
163
  protected addEventListener(): void;
@@ -169,7 +170,7 @@ export declare class Toolbar {
169
170
  * @param {RichTextEditorModel} e - specifies the string value
170
171
  * @returns {void}
171
172
  * @hidden
172
- * @deprecated
173
+
173
174
  */
174
175
  protected onPropertyChanged(e: {
175
176
  [key: string]: RichTextEditorModel;