@syncfusion/ej2-richtexteditor 18.1.57 → 18.2.44-4568

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 (177) hide show
  1. package/CHANGELOG.md +614 -600
  2. package/README.md +67 -67
  3. package/dist/ej2-richtexteditor.umd.min.js +1 -10
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +231 -106
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +236 -111
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/license +9 -9
  10. package/package.json +50 -73
  11. package/src/common/interface.d.ts +6 -6
  12. package/src/editor-manager/base/classes.d.ts +1 -1
  13. package/src/editor-manager/base/classes.js +1 -1
  14. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  15. package/src/editor-manager/base/editor-manager.js +3 -3
  16. package/src/editor-manager/base/interface.d.ts +7 -7
  17. package/src/editor-manager/base/types.d.ts +1 -1
  18. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  19. package/src/editor-manager/plugin/alignments.js +2 -2
  20. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  21. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  22. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  23. package/src/editor-manager/plugin/clearformat.js +1 -1
  24. package/src/editor-manager/plugin/dom-node.d.ts +34 -34
  25. package/src/editor-manager/plugin/dom-node.js +34 -34
  26. package/src/editor-manager/plugin/formats.d.ts +2 -2
  27. package/src/editor-manager/plugin/formats.js +2 -2
  28. package/src/editor-manager/plugin/image.d.ts +3 -3
  29. package/src/editor-manager/plugin/image.js +3 -3
  30. package/src/editor-manager/plugin/indents.d.ts +2 -2
  31. package/src/editor-manager/plugin/indents.js +2 -2
  32. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  33. package/src/editor-manager/plugin/insert-methods.js +4 -4
  34. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  35. package/src/editor-manager/plugin/insert-text.js +2 -2
  36. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  37. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  38. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  39. package/src/editor-manager/plugin/inserthtml.js +2 -2
  40. package/src/editor-manager/plugin/isformatted.d.ts +8 -8
  41. package/src/editor-manager/plugin/isformatted.js +8 -8
  42. package/src/editor-manager/plugin/link.d.ts +2 -2
  43. package/src/editor-manager/plugin/link.js +2 -2
  44. package/src/editor-manager/plugin/lists.d.ts +2 -2
  45. package/src/editor-manager/plugin/lists.js +4 -14
  46. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  47. package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
  48. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  49. package/src/editor-manager/plugin/nodecutter.js +6 -6
  50. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  51. package/src/editor-manager/plugin/selection-commands.js +1 -1
  52. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  53. package/src/editor-manager/plugin/selection-exec.js +2 -2
  54. package/src/editor-manager/plugin/table.d.ts +2 -2
  55. package/src/editor-manager/plugin/table.js +2 -2
  56. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  57. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  58. package/src/editor-manager/plugin/undo.d.ts +6 -6
  59. package/src/editor-manager/plugin/undo.js +6 -6
  60. package/src/markdown-parser/base/interface.d.ts +10 -10
  61. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  62. package/src/markdown-parser/base/markdown-parser.js +3 -3
  63. package/src/markdown-parser/base/types.d.ts +1 -1
  64. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  65. package/src/markdown-parser/plugin/clearformat.js +2 -2
  66. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  67. package/src/markdown-parser/plugin/formats.js +2 -2
  68. package/src/markdown-parser/plugin/link.d.ts +2 -2
  69. package/src/markdown-parser/plugin/link.js +2 -2
  70. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  71. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  72. package/src/markdown-parser/plugin/md-selection-formats.d.ts +2 -2
  73. package/src/markdown-parser/plugin/md-selection-formats.js +2 -2
  74. package/src/markdown-parser/plugin/table.d.ts +3 -3
  75. package/src/markdown-parser/plugin/table.js +3 -3
  76. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  77. package/src/markdown-parser/plugin/undo.js +6 -6
  78. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  79. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  80. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  81. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  82. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  83. package/src/rich-text-editor/actions/color-picker.js +2 -2
  84. package/src/rich-text-editor/actions/count.d.ts +3 -3
  85. package/src/rich-text-editor/actions/count.js +3 -3
  86. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  87. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  88. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  89. package/src/rich-text-editor/actions/full-screen.js +3 -3
  90. package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
  91. package/src/rich-text-editor/actions/html-editor.js +3 -3
  92. package/src/rich-text-editor/actions/keyboard-model.d.ts +13 -13
  93. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  94. package/src/rich-text-editor/actions/keyboard.js +1 -1
  95. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  96. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  97. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
  98. package/src/rich-text-editor/actions/paste-clean-up.js +24 -3
  99. package/src/rich-text-editor/actions/quick-toolbar.d.ts +19 -9
  100. package/src/rich-text-editor/actions/quick-toolbar.js +17 -7
  101. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  102. package/src/rich-text-editor/actions/toolbar.js +13 -13
  103. package/src/rich-text-editor/base/classes.d.ts +102 -102
  104. package/src/rich-text-editor/base/classes.js +102 -102
  105. package/src/rich-text-editor/base/constant.d.ts +107 -102
  106. package/src/rich-text-editor/base/constant.js +107 -102
  107. package/src/rich-text-editor/base/enum.d.ts +1 -1
  108. package/src/rich-text-editor/base/enum.js +1 -1
  109. package/src/rich-text-editor/base/interface.d.ts +41 -40
  110. package/src/rich-text-editor/base/interface.js +1 -1
  111. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +659 -651
  112. package/src/rich-text-editor/base/rich-text-editor.d.ts +71 -48
  113. package/src/rich-text-editor/base/rich-text-editor.js +90 -35
  114. package/src/rich-text-editor/base/util.d.ts +1 -1
  115. package/src/rich-text-editor/base/util.js +1 -1
  116. package/src/rich-text-editor/formatter/formatter.d.ts +9 -8
  117. package/src/rich-text-editor/formatter/formatter.js +10 -8
  118. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  119. package/src/rich-text-editor/formatter/html-formatter.js +2 -2
  120. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  121. package/src/rich-text-editor/formatter/markdown-formatter.js +2 -2
  122. package/src/rich-text-editor/models/iframe-settings-model.d.ts +21 -21
  123. package/src/rich-text-editor/models/inline-mode-model.d.ts +9 -9
  124. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +228 -228
  125. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  126. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  127. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  128. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  129. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  130. package/src/rich-text-editor/renderer/iframe-content-renderer.js +4 -4
  131. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  132. package/src/rich-text-editor/renderer/image-module.js +56 -14
  133. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  134. package/src/rich-text-editor/renderer/link-module.js +1 -1
  135. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  136. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  137. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  138. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  139. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  140. package/src/rich-text-editor/renderer/render.js +2 -2
  141. package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
  142. package/src/rich-text-editor/renderer/table-module.js +1 -1
  143. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +8 -8
  144. package/src/rich-text-editor/renderer/toolbar-renderer.js +8 -8
  145. package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
  146. package/src/rich-text-editor/renderer/view-source.js +6 -6
  147. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  148. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  149. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  150. package/src/rich-text-editor/services/service-locator.js +3 -3
  151. package/src/selection/selection.d.ts +22 -22
  152. package/src/selection/selection.js +22 -22
  153. package/styles/_all.scss +2 -2
  154. package/styles/rich-text-editor/_all.scss +2 -2
  155. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +151 -151
  156. package/styles/rich-text-editor/_bootstrap-definition.scss +184 -184
  157. package/styles/rich-text-editor/_bootstrap4-definition.scss +307 -307
  158. package/styles/rich-text-editor/_fabric-dark-definition.scss +150 -150
  159. package/styles/rich-text-editor/_fabric-definition.scss +148 -148
  160. package/styles/rich-text-editor/_highcontrast-definition.scss +148 -148
  161. package/styles/rich-text-editor/_highcontrast-light-definition.scss +148 -148
  162. package/styles/rich-text-editor/_layout.scss +1332 -1332
  163. package/styles/rich-text-editor/_material-dark-definition.scss +151 -151
  164. package/styles/rich-text-editor/_material-definition.scss +150 -150
  165. package/styles/rich-text-editor/_theme.scss +484 -484
  166. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +285 -285
  167. package/styles/rich-text-editor/icons/_bootstrap.scss +284 -284
  168. package/styles/rich-text-editor/icons/_bootstrap4.scss +284 -284
  169. package/styles/rich-text-editor/icons/_fabric-dark.scss +284 -284
  170. package/styles/rich-text-editor/icons/_fabric.scss +284 -284
  171. package/styles/rich-text-editor/icons/_highcontrast-light.scss +284 -284
  172. package/styles/rich-text-editor/icons/_highcontrast.scss +284 -284
  173. package/styles/rich-text-editor/icons/_material-dark.scss +284 -284
  174. package/styles/rich-text-editor/icons/_material.scss +284 -284
  175. package/dist/global/ej2-richtexteditor.min.js +0 -11
  176. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  177. package/dist/global/index.d.ts +0 -14
@@ -72,17 +72,17 @@ var RichTextEditor = /** @class */ (function (_super) {
72
72
  _this.defaultResetValue = null;
73
73
  /**
74
74
  * @hidden
75
-
75
+ * @deprecated
76
76
  */
77
77
  _this.isFocusOut = false;
78
78
  /**
79
79
  * @hidden
80
-
80
+ * @deprecated
81
81
  */
82
82
  _this.isRTE = false;
83
83
  /**
84
84
  * @hidden
85
-
85
+ * @deprecated
86
86
  */
87
87
  _this.isBlur = true;
88
88
  _this.needsID = true;
@@ -92,7 +92,7 @@ var RichTextEditor = /** @class */ (function (_super) {
92
92
  * To provide the array of modules needed for component rendering
93
93
  * @return {ModuleDeclaration[]}
94
94
  * @hidden
95
-
95
+ * @deprecated
96
96
  */
97
97
  RichTextEditor.prototype.requiredModules = function () {
98
98
  var modules = [];
@@ -154,7 +154,7 @@ var RichTextEditor = /** @class */ (function (_super) {
154
154
  /**
155
155
  * setEnable method
156
156
  * @hidden
157
-
157
+ * @deprecated
158
158
  */
159
159
  RichTextEditor.prototype.setEnable = function () {
160
160
  this.updateEnable();
@@ -247,7 +247,7 @@ var RichTextEditor = /** @class */ (function (_super) {
247
247
  /**
248
248
  * getPersistData method
249
249
  * @hidden
250
-
250
+ * @deprecated
251
251
  */
252
252
  RichTextEditor.prototype.getPersistData = function () {
253
253
  return this.addOnPersist(['value']);
@@ -332,6 +332,7 @@ var RichTextEditor = /** @class */ (function (_super) {
332
332
  this.formatter.enableUndo(this);
333
333
  }
334
334
  this.setPlaceHolder();
335
+ this.notify(events.contentChanged, {});
335
336
  };
336
337
  RichTextEditor.prototype.htmlPurifier = function (command, value) {
337
338
  if (this.editorMode === 'HTML') {
@@ -404,7 +405,7 @@ var RichTextEditor = /** @class */ (function (_super) {
404
405
  /**
405
406
  * For internal use only - To Initialize the component rendering.
406
407
  * @private
407
-
408
+ * @deprecated
408
409
  */
409
410
  RichTextEditor.prototype.render = function () {
410
411
  if (this.value && !this.valueTemplate) {
@@ -436,7 +437,7 @@ var RichTextEditor = /** @class */ (function (_super) {
436
437
  /**
437
438
  * For internal use only - Initialize the event handler
438
439
  * @private
439
-
440
+ * @deprecated
440
441
  */
441
442
  RichTextEditor.prototype.eventInitializer = function () {
442
443
  this.wireEvents();
@@ -444,7 +445,7 @@ var RichTextEditor = /** @class */ (function (_super) {
444
445
  /**
445
446
  * For internal use only - keydown the event handler;
446
447
  * @private
447
-
448
+ * @deprecated
448
449
  */
449
450
  RichTextEditor.prototype.keyDown = function (e) {
450
451
  this.notify(events.keyDown, { member: 'keydown', args: e });
@@ -533,7 +534,7 @@ var RichTextEditor = /** @class */ (function (_super) {
533
534
  };
534
535
  /**
535
536
  * @hidden
536
-
537
+ * @deprecated
537
538
  */
538
539
  RichTextEditor.prototype.serializeValue = function (value) {
539
540
  if (this.editorMode === 'HTML' && !isNOU(value)) {
@@ -559,7 +560,7 @@ var RichTextEditor = /** @class */ (function (_super) {
559
560
  /**
560
561
  * updateValue method
561
562
  * @hidden
562
-
563
+ * @deprecated
563
564
  */
564
565
  RichTextEditor.prototype.updateValue = function (value) {
565
566
  if (isNOU(value)) {
@@ -606,28 +607,28 @@ var RichTextEditor = /** @class */ (function (_super) {
606
607
  };
607
608
  /**
608
609
  * @hidden
609
-
610
+ * @deprecated
610
611
  */
611
612
  RichTextEditor.prototype.ensureModuleInjected = function (module) {
612
613
  return this.getInjectedModules().indexOf(module) >= 0;
613
614
  };
614
615
  /**
615
616
  * @hidden
616
-
617
+ * @deprecated
617
618
  */
618
619
  RichTextEditor.prototype.onCopy = function () {
619
620
  this.contentModule.getDocument().execCommand('copy', false, null);
620
621
  };
621
622
  /**
622
623
  * @hidden
623
-
624
+ * @deprecated
624
625
  */
625
626
  RichTextEditor.prototype.onCut = function () {
626
627
  this.contentModule.getDocument().execCommand('cut', false, null);
627
628
  };
628
629
  /**
629
630
  * @hidden
630
-
631
+ * @deprecated
631
632
  */
632
633
  RichTextEditor.prototype.onPaste = function (e) {
633
634
  var _this = this;
@@ -642,6 +643,12 @@ var RichTextEditor = /** @class */ (function (_super) {
642
643
  var pastedContentLength = (isNOU(e) || isNOU(e.clipboardData))
643
644
  ? 0 : e.clipboardData.getData('text/plain').length;
644
645
  var totalLength = (currentLength - selectionLength) + pastedContentLength;
646
+ if (_this.editorMode === 'Markdown') {
647
+ if (!(_this.maxLength === -1 || totalLength < _this.maxLength)) {
648
+ e.preventDefault();
649
+ }
650
+ return;
651
+ }
645
652
  if (!pasteArgs.cancel && _this.inputElement.contentEditable === 'true' &&
646
653
  (_this.maxLength === -1 || totalLength < _this.maxLength)) {
647
654
  if (!isNOU(_this.pasteCleanupModule)) {
@@ -672,7 +679,7 @@ var RichTextEditor = /** @class */ (function (_super) {
672
679
  };
673
680
  /**
674
681
  * @hidden
675
-
682
+ * @deprecated
676
683
  */
677
684
  RichTextEditor.prototype.clipboardAction = function (action, event) {
678
685
  switch (action.toLowerCase()) {
@@ -830,10 +837,29 @@ var RichTextEditor = /** @class */ (function (_super) {
830
837
  }
831
838
  return wrapperElm.innerHTML;
832
839
  };
840
+ /**
841
+ * It shows the inline quick toolbar
842
+ */
843
+ RichTextEditor.prototype.showInlineToolbar = function () {
844
+ if (this.inlineMode.enable) {
845
+ var currentRange = this.getRange();
846
+ var targetElm = currentRange.endContainer.nodeName === '#text' ?
847
+ currentRange.endContainer.parentElement : currentRange.endContainer;
848
+ var x = currentRange.getClientRects()[0].left;
849
+ var y = currentRange.getClientRects()[0].top;
850
+ this.quickToolbarModule.showInlineQTBar(x, y, targetElm);
851
+ }
852
+ };
853
+ /**
854
+ * It hides the inline quick toolbar
855
+ */
856
+ RichTextEditor.prototype.hideInlineToolbar = function () {
857
+ this.quickToolbarModule.hideInlineQTBar();
858
+ };
833
859
  /**
834
860
  * For internal use only - Get the module name.
835
861
  * @private
836
-
862
+ * @deprecated
837
863
  */
838
864
  RichTextEditor.prototype.getModuleName = function () {
839
865
  return 'richtexteditor';
@@ -841,7 +867,7 @@ var RichTextEditor = /** @class */ (function (_super) {
841
867
  /**
842
868
  * Called internally if any of the property value changed.
843
869
  * @hidden
844
-
870
+ * @deprecated
845
871
  */
846
872
  RichTextEditor.prototype.onPropertyChanged = function (newProp, oldProp) {
847
873
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
@@ -967,7 +993,7 @@ var RichTextEditor = /** @class */ (function (_super) {
967
993
  };
968
994
  /**
969
995
  * @hidden
970
-
996
+ * @deprecated
971
997
  */
972
998
  RichTextEditor.prototype.updateValueData = function () {
973
999
  if (this.enableHtmlEncode) {
@@ -989,7 +1015,11 @@ var RichTextEditor = /** @class */ (function (_super) {
989
1015
  RichTextEditor.prototype.updatePanelValue = function () {
990
1016
  var value = this.value;
991
1017
  value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
1018
+ var getTextArea = this.element.querySelector('.e-rte-srctextarea');
992
1019
  if (value) {
1020
+ if (getTextArea && getTextArea.style.display === 'block') {
1021
+ getTextArea.value = this.value;
1022
+ }
993
1023
  if (this.valueContainer) {
994
1024
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
995
1025
  }
@@ -1002,6 +1032,9 @@ var RichTextEditor = /** @class */ (function (_super) {
1002
1032
  }
1003
1033
  }
1004
1034
  else {
1035
+ if (getTextArea && getTextArea.style.display === 'block') {
1036
+ getTextArea.value = '';
1037
+ }
1005
1038
  if (this.editorMode === 'HTML') {
1006
1039
  this.inputElement.innerHTML = '<p><br/></p>';
1007
1040
  }
@@ -1027,7 +1060,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1027
1060
  /**
1028
1061
  * setPlaceHolder method
1029
1062
  * @hidden
1030
-
1063
+ * @deprecated
1031
1064
  */
1032
1065
  RichTextEditor.prototype.setPlaceHolder = function () {
1033
1066
  if (this.inputElement && this.placeholder && this.iframeSettings.enable !== true) {
@@ -1084,7 +1117,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1084
1117
  /**
1085
1118
  * setReadOnly method
1086
1119
  * @hidden
1087
-
1120
+ * @deprecated
1088
1121
  */
1089
1122
  RichTextEditor.prototype.setReadOnly = function (initial) {
1090
1123
  this.updateReadOnly();
@@ -1171,7 +1204,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1171
1204
  /**
1172
1205
  * Get the selected range from the RichTextEditor's content.
1173
1206
  * @public
1174
-
1207
+ * @deprecated
1175
1208
  */
1176
1209
  RichTextEditor.prototype.getRange = function () {
1177
1210
  return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
@@ -1288,7 +1321,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1288
1321
  /**
1289
1322
  * setContentHeight method
1290
1323
  * @hidden
1291
-
1324
+ * @deprecated
1292
1325
  */
1293
1326
  RichTextEditor.prototype.setContentHeight = function (target, isExpand) {
1294
1327
  var heightValue;
@@ -1367,7 +1400,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1367
1400
  };
1368
1401
  /**
1369
1402
  * @hidden
1370
-
1403
+ * @deprecated
1371
1404
  */
1372
1405
  RichTextEditor.prototype.getBaseToolbarObject = function () {
1373
1406
  var tbObj;
@@ -1381,14 +1414,14 @@ var RichTextEditor = /** @class */ (function (_super) {
1381
1414
  };
1382
1415
  /**
1383
1416
  * @hidden
1384
-
1417
+ * @deprecated
1385
1418
  */
1386
1419
  RichTextEditor.prototype.getToolbar = function () {
1387
1420
  return this.toolbarModule ? this.toolbarModule.getToolbarElement() : null;
1388
1421
  };
1389
1422
  /**
1390
1423
  * @hidden
1391
-
1424
+ * @deprecated
1392
1425
  */
1393
1426
  RichTextEditor.prototype.getToolbarElement = function () {
1394
1427
  return this.toolbarModule && this.toolbarModule.getToolbarElement();
@@ -1396,7 +1429,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1396
1429
  /**
1397
1430
  * getID method
1398
1431
  * @hidden
1399
-
1432
+ * @deprecated
1400
1433
  */
1401
1434
  RichTextEditor.prototype.getID = function () {
1402
1435
  return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
@@ -1416,7 +1449,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1416
1449
  /**
1417
1450
  * preventDefaultResize method
1418
1451
  * @hidden
1419
-
1452
+ * @deprecated
1420
1453
  */
1421
1454
  RichTextEditor.prototype.preventDefaultResize = function (e) {
1422
1455
  if (Browser.info.name === 'msie') {
@@ -1481,8 +1514,8 @@ var RichTextEditor = /** @class */ (function (_super) {
1481
1514
  }
1482
1515
  this.preventDefaultResize(e);
1483
1516
  this.trigger('focus', { event: e, isInteracted: Object.keys(e).length === 0 ? false : true });
1484
- if (!isNOU(this.saveInterval) && this.saveInterval > 0) {
1485
- this.timeInterval = setInterval(this.updateIntervalValue.bind(this), this.saveInterval);
1517
+ if (!isNOU(this.saveInterval) && this.saveInterval > 0 && !this.autoSaveOnIdle) {
1518
+ this.timeInterval = setInterval(this.updateValueOnIdle.bind(this), this.saveInterval);
1486
1519
  }
1487
1520
  EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
1488
1521
  }
@@ -1510,11 +1543,15 @@ var RichTextEditor = /** @class */ (function (_super) {
1510
1543
  }
1511
1544
  return value;
1512
1545
  };
1513
- RichTextEditor.prototype.updateIntervalValue = function () {
1546
+ RichTextEditor.prototype.updateValueOnIdle = function () {
1514
1547
  this.setProperties({ value: this.getUpdatedValue() }, true);
1515
1548
  this.valueContainer.value = this.value;
1516
1549
  this.invokeChangeEvent();
1517
1550
  };
1551
+ RichTextEditor.prototype.updateIntervalValue = function () {
1552
+ clearTimeout(this.idleInterval);
1553
+ this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
1554
+ };
1518
1555
  RichTextEditor.prototype.onDocumentClick = function (e) {
1519
1556
  var target = e.target;
1520
1557
  var rteElement = closest(target, '.' + classes.CLS_RTE);
@@ -1568,7 +1605,20 @@ var RichTextEditor = /** @class */ (function (_super) {
1568
1605
  /**
1569
1606
  * invokeChangeEvent method
1570
1607
  * @hidden
1571
-
1608
+ * @deprecated
1609
+ */
1610
+ RichTextEditor.prototype.contentChanged = function () {
1611
+ if (this.autoSaveOnIdle) {
1612
+ if (!isNOU(this.saveInterval)) {
1613
+ clearTimeout(this.timeInterval);
1614
+ this.timeInterval = setTimeout(this.updateIntervalValue.bind(this), this.saveInterval);
1615
+ }
1616
+ }
1617
+ };
1618
+ /**
1619
+ * invokeChangeEvent method
1620
+ * @hidden
1621
+ * @deprecated
1572
1622
  */
1573
1623
  RichTextEditor.prototype.invokeChangeEvent = function () {
1574
1624
  var eventArgs = {
@@ -1581,7 +1631,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1581
1631
  };
1582
1632
  /**
1583
1633
  * @hidden
1584
-
1634
+ * @deprecated
1585
1635
  */
1586
1636
  RichTextEditor.prototype.wireScrollElementsEvents = function () {
1587
1637
  this.scrollParentElements = getScrollableParent(this.element);
@@ -1609,7 +1659,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1609
1659
  };
1610
1660
  /**
1611
1661
  * @hidden
1612
-
1662
+ * @deprecated
1613
1663
  */
1614
1664
  RichTextEditor.prototype.unWireScrollElementsEvents = function () {
1615
1665
  this.scrollParentElements = getScrollableParent(this.element);
@@ -1638,7 +1688,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1638
1688
  };
1639
1689
  /**
1640
1690
  * @hidden
1641
-
1691
+ * @deprecated
1642
1692
  */
1643
1693
  RichTextEditor.prototype.autoResize = function () {
1644
1694
  var _this = this;
@@ -1666,6 +1716,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1666
1716
  RichTextEditor.prototype.wireEvents = function () {
1667
1717
  this.element.addEventListener('focusin', this.onFocusHandler, true);
1668
1718
  this.element.addEventListener('focusout', this.onBlurHandler, true);
1719
+ this.on(events.contentChanged, this.contentChanged, this);
1669
1720
  if (this.readonly && this.enabled) {
1670
1721
  return;
1671
1722
  }
@@ -1740,6 +1791,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1740
1791
  RichTextEditor.prototype.unWireEvents = function () {
1741
1792
  this.element.removeEventListener('focusin', this.onFocusHandler, true);
1742
1793
  this.element.removeEventListener('focusout', this.onBlurHandler, true);
1794
+ this.off(events.contentChanged, this.contentChanged);
1743
1795
  if (this.readonly && this.enabled) {
1744
1796
  return;
1745
1797
  }
@@ -1809,6 +1861,9 @@ var RichTextEditor = /** @class */ (function (_super) {
1809
1861
  __decorate([
1810
1862
  Property(null)
1811
1863
  ], RichTextEditor.prototype, "placeholder", void 0);
1864
+ __decorate([
1865
+ Property(false)
1866
+ ], RichTextEditor.prototype, "autoSaveOnIdle", void 0);
1812
1867
  __decorate([
1813
1868
  Property(false)
1814
1869
  ], RichTextEditor.prototype, "readonly", void 0);
@@ -18,7 +18,7 @@ export declare function updateUndoRedoStatus(baseToolbar: BaseToolbar, undoRedoS
18
18
  /**
19
19
  * To dispatch the event manually
20
20
  * @hidden
21
-
21
+ * @deprecated
22
22
  */
23
23
  export declare function dispatchEvent(element: Element | HTMLDocument, type: string): void;
24
24
  export declare function parseHtml(value: string): DocumentFragment;
@@ -233,7 +233,7 @@ export function updateUndoRedoStatus(baseToolbar, undoRedoStatus) {
233
233
  /**
234
234
  * To dispatch the event manually
235
235
  * @hidden
236
-
236
+ * @deprecated
237
237
  */
238
238
  export function dispatchEvent(element, type) {
239
239
  var evt = document.createEvent('HTMLEvents');
@@ -6,10 +6,11 @@ import { IHtmlUndoRedoData } from '../../editor-manager/base/interface';
6
6
  /**
7
7
  * Formatter
8
8
  * @hidden
9
-
9
+ * @deprecated
10
10
  */
11
11
  export declare class Formatter {
12
12
  editorManager: IEditorModel;
13
+ private timeInterval;
13
14
  /**
14
15
  * To execute the command
15
16
  * @param {IRichTextEditor} self
@@ -17,32 +18,32 @@ export declare class Formatter {
17
18
  * @param {MouseEvent|KeyboardEvent} event
18
19
  * @param {IItemCollectionArgs} value
19
20
  * @hidden
20
-
21
+ * @deprecated
21
22
  */
22
23
  process(self: IRichTextEditor, args: ActionBeginEventArgs, event: MouseEvent | KeyboardEvent, value: IItemCollectionArgs): void;
23
24
  private getAncestorNode;
24
25
  /**
25
26
  * onKeyHandler method
26
27
  * @hidden
27
-
28
+ * @deprecated
28
29
  */
29
30
  onKeyHandler(self: IRichTextEditor, e: KeyboardEvent): void;
30
31
  /**
31
32
  * onSuccess method
32
33
  * @hidden
33
-
34
+ * @deprecated
34
35
  */
35
36
  onSuccess(self: IRichTextEditor, events: IMarkdownFormatterCallBack | IHtmlFormatterCallBack): void;
36
37
  /**
37
38
  * Save the data for undo and redo action.
38
39
  * @hidden
39
-
40
+ * @deprecated
40
41
  */
41
42
  saveData(e?: KeyboardEvent | MouseEvent | IUndoCallBack): void;
42
43
  /**
43
44
  * getUndoStatus method
44
45
  * @hidden
45
-
46
+ * @deprecated
46
47
  */
47
48
  getUndoStatus(): {
48
49
  [key: string]: boolean;
@@ -50,13 +51,13 @@ export declare class Formatter {
50
51
  /**
51
52
  * getUndoRedoStack method
52
53
  * @hidden
53
-
54
+ * @deprecated
54
55
  */
55
56
  getUndoRedoStack(): IHtmlUndoRedoData[] | MarkdownUndoRedoData[];
56
57
  /**
57
58
  * enableUndo method
58
59
  * @hidden
59
-
60
+ * @deprecated
60
61
  */
61
62
  enableUndo(self: IRichTextEditor): void;
62
63
  }
@@ -5,7 +5,7 @@ import { KEY_DOWN, KEY_UP } from './../../common/constant';
5
5
  /**
6
6
  * Formatter
7
7
  * @hidden
8
-
8
+ * @deprecated
9
9
  */
10
10
  var Formatter = /** @class */ (function () {
11
11
  function Formatter() {
@@ -17,7 +17,7 @@ var Formatter = /** @class */ (function () {
17
17
  * @param {MouseEvent|KeyboardEvent} event
18
18
  * @param {IItemCollectionArgs} value
19
19
  * @hidden
20
-
20
+ * @deprecated
21
21
  */
22
22
  Formatter.prototype.process = function (self, args, event, value) {
23
23
  var _this = this;
@@ -117,12 +117,13 @@ var Formatter = /** @class */ (function () {
117
117
  /**
118
118
  * onKeyHandler method
119
119
  * @hidden
120
-
120
+ * @deprecated
121
121
  */
122
122
  Formatter.prototype.onKeyHandler = function (self, e) {
123
123
  var _this = this;
124
124
  this.editorManager.observer.notify(KEY_UP, {
125
125
  event: e, callBack: function () {
126
+ self.notify(CONSTANT.contentChanged, {});
126
127
  _this.enableUndo(self);
127
128
  }
128
129
  });
@@ -130,9 +131,10 @@ var Formatter = /** @class */ (function () {
130
131
  /**
131
132
  * onSuccess method
132
133
  * @hidden
133
-
134
+ * @deprecated
134
135
  */
135
136
  Formatter.prototype.onSuccess = function (self, events) {
137
+ self.notify(CONSTANT.contentChanged, {});
136
138
  if (isNullOrUndefined(events.event) || (events && events.event.action !== 'copy')) {
137
139
  this.enableUndo(self);
138
140
  self.notify(CONSTANT.execCommandCallBack, events);
@@ -157,7 +159,7 @@ var Formatter = /** @class */ (function () {
157
159
  /**
158
160
  * Save the data for undo and redo action.
159
161
  * @hidden
160
-
162
+ * @deprecated
161
163
  */
162
164
  Formatter.prototype.saveData = function (e) {
163
165
  this.editorManager.undoRedoManager.saveData(e);
@@ -165,7 +167,7 @@ var Formatter = /** @class */ (function () {
165
167
  /**
166
168
  * getUndoStatus method
167
169
  * @hidden
168
-
170
+ * @deprecated
169
171
  */
170
172
  Formatter.prototype.getUndoStatus = function () {
171
173
  return this.editorManager.undoRedoManager.getUndoStatus();
@@ -173,7 +175,7 @@ var Formatter = /** @class */ (function () {
173
175
  /**
174
176
  * getUndoRedoStack method
175
177
  * @hidden
176
-
178
+ * @deprecated
177
179
  */
178
180
  Formatter.prototype.getUndoRedoStack = function () {
179
181
  return this.editorManager.undoRedoManager.undoRedoStack;
@@ -181,7 +183,7 @@ var Formatter = /** @class */ (function () {
181
183
  /**
182
184
  * enableUndo method
183
185
  * @hidden
184
-
186
+ * @deprecated
185
187
  */
186
188
  Formatter.prototype.enableUndo = function (self) {
187
189
  var status = this.getUndoStatus();
@@ -3,7 +3,7 @@ import { IEditorModel, IHtmlFormatterModel } from './../base/interface';
3
3
  /**
4
4
  * HTML adapter
5
5
  * @hidden
6
-
6
+ * @deprecated
7
7
  */
8
8
  export declare class HTMLFormatter extends Formatter {
9
9
  keyConfig: {
@@ -20,7 +20,7 @@ export declare class HTMLFormatter extends Formatter {
20
20
  * @param {Element} editElement
21
21
  * @param {Document} doc
22
22
  * @hidden
23
-
23
+ * @deprecated
24
24
  */
25
25
  updateFormatter(editElement: Element, doc?: Document, options?: {
26
26
  [key: string]: number;
@@ -18,7 +18,7 @@ import { htmlKeyConfig } from './../../common/config';
18
18
  /**
19
19
  * HTML adapter
20
20
  * @hidden
21
-
21
+ * @deprecated
22
22
  */
23
23
  var HTMLFormatter = /** @class */ (function (_super) {
24
24
  __extends(HTMLFormatter, _super);
@@ -39,7 +39,7 @@ var HTMLFormatter = /** @class */ (function (_super) {
39
39
  * @param {Element} editElement
40
40
  * @param {Document} doc
41
41
  * @hidden
42
-
42
+ * @deprecated
43
43
  */
44
44
  HTMLFormatter.prototype.updateFormatter = function (editElement, doc, options) {
45
45
  if (editElement && doc) {
@@ -3,7 +3,7 @@ import { IEditorModel, IMarkdownFormatterModel } from './../base/interface';
3
3
  /**
4
4
  * Markdown adapter
5
5
  * @hidden
6
-
6
+ * @deprecated
7
7
  */
8
8
  export declare class MarkdownFormatter extends Formatter {
9
9
  keyConfig: {
@@ -27,7 +27,7 @@ export declare class MarkdownFormatter extends Formatter {
27
27
  * @param {Element} editElement
28
28
  * @param {Document} doc
29
29
  * @hidden
30
-
30
+ * @deprecated
31
31
  */
32
32
  updateFormatter(editElement: Element, doc?: Document, options?: {
33
33
  [key: string]: number;
@@ -18,7 +18,7 @@ import { markdownKeyConfig, markdownListsTags, markdownFormatTags, markdownSelec
18
18
  /**
19
19
  * Markdown adapter
20
20
  * @hidden
21
-
21
+ * @deprecated
22
22
  */
23
23
  var MarkdownFormatter = /** @class */ (function (_super) {
24
24
  __extends(MarkdownFormatter, _super);
@@ -42,7 +42,7 @@ var MarkdownFormatter = /** @class */ (function (_super) {
42
42
  * @param {Element} editElement
43
43
  * @param {Document} doc
44
44
  * @hidden
45
-
45
+ * @deprecated
46
46
  */
47
47
  MarkdownFormatter.prototype.updateFormatter = function (editElement, doc, options) {
48
48
  if (editElement) {