@syncfusion/ej2-richtexteditor 24.1.47 → 24.2.3

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 (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/ej2-richtexteditor.min.js +2 -2
  3. package/dist/ej2-richtexteditor.umd.min.js +2 -2
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +748 -167
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +756 -166
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-richtexteditor.min.js +2 -2
  10. package/dist/global/ej2-richtexteditor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +12 -12
  13. package/src/common/constant.d.ts +6 -0
  14. package/src/common/constant.js +6 -0
  15. package/src/common/util.js +31 -20
  16. package/src/editor-manager/base/constant.d.ts +6 -0
  17. package/src/editor-manager/base/constant.js +6 -0
  18. package/src/editor-manager/base/editor-manager.d.ts +5 -0
  19. package/src/editor-manager/base/editor-manager.js +59 -0
  20. package/src/editor-manager/base/interface.d.ts +8 -0
  21. package/src/editor-manager/plugin/dom-node.js +3 -1
  22. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  23. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -0
  24. package/src/editor-manager/plugin/ms-word-clean-up.js +39 -10
  25. package/src/editor-manager/plugin/selection-commands.js +16 -0
  26. package/src/editor-manager/plugin/table.d.ts +0 -1
  27. package/src/editor-manager/plugin/table.js +14 -26
  28. package/src/editor-manager/plugin/undo.d.ts +1 -0
  29. package/src/editor-manager/plugin/undo.js +21 -1
  30. package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -0
  31. package/src/rich-text-editor/actions/base-toolbar.js +8 -4
  32. package/src/rich-text-editor/actions/count.js +1 -1
  33. package/src/rich-text-editor/actions/dropdown-buttons.js +21 -2
  34. package/src/rich-text-editor/actions/emoji-picker.js +1 -1
  35. package/src/rich-text-editor/actions/full-screen.js +1 -0
  36. package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
  37. package/src/rich-text-editor/actions/html-editor.js +88 -4
  38. package/src/rich-text-editor/actions/keyboard.js +3 -1
  39. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
  40. package/src/rich-text-editor/actions/paste-clean-up.js +32 -4
  41. package/src/rich-text-editor/actions/toolbar.d.ts +2 -1
  42. package/src/rich-text-editor/base/constant.d.ts +25 -0
  43. package/src/rich-text-editor/base/constant.js +194 -0
  44. package/src/rich-text-editor/base/interface.d.ts +6 -1
  45. package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
  46. package/src/rich-text-editor/base/rich-text-editor.js +30 -60
  47. package/src/rich-text-editor/base/util.d.ts +4 -0
  48. package/src/rich-text-editor/base/util.js +35 -1
  49. package/src/rich-text-editor/formatter/formatter.js +15 -4
  50. package/src/rich-text-editor/models/default-locale.js +12 -12
  51. package/src/rich-text-editor/models/items.js +2 -2
  52. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -0
  53. package/src/rich-text-editor/renderer/audio-module.js +13 -0
  54. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -0
  55. package/src/rich-text-editor/renderer/dialog-renderer.js +7 -0
  56. package/src/rich-text-editor/renderer/image-module.d.ts +1 -0
  57. package/src/rich-text-editor/renderer/image-module.js +20 -2
  58. package/src/rich-text-editor/renderer/link-module.js +10 -1
  59. package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
  60. package/src/rich-text-editor/renderer/table-module.js +22 -2
  61. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +1 -0
  62. package/src/rich-text-editor/renderer/toolbar-renderer.js +25 -3
  63. package/src/rich-text-editor/renderer/video-module.d.ts +1 -0
  64. package/src/rich-text-editor/renderer/video-module.js +21 -4
  65. package/styles/bootstrap-dark.css +44 -6
  66. package/styles/bootstrap.css +44 -6
  67. package/styles/bootstrap4.css +44 -6
  68. package/styles/bootstrap5-dark.css +44 -6
  69. package/styles/bootstrap5.css +44 -6
  70. package/styles/fabric-dark.css +44 -6
  71. package/styles/fabric.css +44 -6
  72. package/styles/fluent-dark.css +44 -6
  73. package/styles/fluent.css +44 -6
  74. package/styles/highcontrast-light.css +44 -6
  75. package/styles/highcontrast.css +44 -6
  76. package/styles/material-dark.css +44 -6
  77. package/styles/material.css +44 -6
  78. package/styles/material3-dark.css +51 -13
  79. package/styles/material3.css +51 -13
  80. package/styles/rich-text-editor/_layout.scss +36 -1
  81. package/styles/rich-text-editor/_material-definition.scss +0 -1
  82. package/styles/rich-text-editor/_material3-definition.scss +7 -7
  83. package/styles/rich-text-editor/_theme.scss +9 -5
  84. package/styles/rich-text-editor/bootstrap-dark.css +44 -6
  85. package/styles/rich-text-editor/bootstrap.css +44 -6
  86. package/styles/rich-text-editor/bootstrap4.css +44 -6
  87. package/styles/rich-text-editor/bootstrap5-dark.css +44 -6
  88. package/styles/rich-text-editor/bootstrap5.css +44 -6
  89. package/styles/rich-text-editor/fabric-dark.css +44 -6
  90. package/styles/rich-text-editor/fabric.css +44 -6
  91. package/styles/rich-text-editor/fluent-dark.css +44 -6
  92. package/styles/rich-text-editor/fluent.css +44 -6
  93. package/styles/rich-text-editor/highcontrast-light.css +44 -6
  94. package/styles/rich-text-editor/highcontrast.css +44 -6
  95. package/styles/rich-text-editor/material-dark.css +44 -6
  96. package/styles/rich-text-editor/material.css +44 -6
  97. package/styles/rich-text-editor/material3-dark.css +51 -13
  98. package/styles/rich-text-editor/material3.css +51 -13
  99. package/styles/rich-text-editor/tailwind-dark.css +44 -6
  100. package/styles/rich-text-editor/tailwind.css +44 -6
  101. package/styles/tailwind-dark.css +44 -6
  102. package/styles/tailwind.css +44 -6
@@ -749,11 +749,21 @@ const hidePopup = 'hidePopup';
749
749
  * @deprecated
750
750
  */
751
751
  const cleanupResizeElements = 'cleanupResizeElements';
752
+ /**
753
+ * @hidden
754
+ * @deprecated
755
+ */
756
+ const afterKeyDown = 'afterKeyDown';
752
757
  /**
753
758
  * @hidden
754
759
  * @deprecated
755
760
  */
756
761
  const updateValueOnIdle = 'updateValueOnIdle';
762
+ /**
763
+ * @hidden
764
+ * @deprecated
765
+ */
766
+ const documentClickClosedBy = 'documentClickClosedBy';
757
767
  /**
758
768
  * @hidden
759
769
  * @deprecated
@@ -771,6 +781,190 @@ canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn
771
781
  ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
772
782
  q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
773
783
  template:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty`;
784
+ /**
785
+ * @hidden
786
+ * @deprecated
787
+ */
788
+ const supportedUnits = ['px', 'em', 'rem', 'pt', 'cm', 'mm', 'in', 'pc', 'vw', 'vh', 'vmin', 'vmax'];
789
+ /**
790
+ * @hidden
791
+ * @deprecated
792
+ */
793
+ const conversionFactors = {
794
+ 'px': {
795
+ 'px': 1,
796
+ 'em': 0.0625,
797
+ 'rem': 0.0625,
798
+ 'pt': 0.75,
799
+ 'cm': 0.0264583,
800
+ 'mm': 0.0026458,
801
+ 'in': 0.0104167,
802
+ 'pc': 0.0625,
803
+ 'vw': 0.00625,
804
+ 'vh': 0.00625,
805
+ 'vmin': 0.00625,
806
+ 'vmax': 0.00625
807
+ },
808
+ 'em': {
809
+ 'px': 16,
810
+ 'em': 1,
811
+ 'rem': 1,
812
+ 'pt': 12,
813
+ 'cm': 0.423333,
814
+ 'mm': 0.0423333,
815
+ 'in': 0.166667,
816
+ 'pc': 0.0625,
817
+ 'vw': 1,
818
+ 'vh': 1,
819
+ 'vmin': 1,
820
+ 'vmax': 1
821
+ },
822
+ 'rem': {
823
+ 'px': 16,
824
+ 'em': 1,
825
+ 'rem': 1,
826
+ 'pt': 12,
827
+ 'cm': 0.423333,
828
+ 'mm': 0.0423333,
829
+ 'in': 0.166667,
830
+ 'pc': 0.0625,
831
+ 'vw': 1,
832
+ 'vh': 1,
833
+ 'vmin': 1,
834
+ 'vmax': 1
835
+ },
836
+ 'pt': {
837
+ 'px': 1.33333,
838
+ 'em': 0.0833333,
839
+ 'rem': 0.0833333,
840
+ 'pt': 1,
841
+ 'cm': 0.0352778,
842
+ 'mm': 0.0035278,
843
+ 'in': 0.0138889,
844
+ 'pc': 0.0416667,
845
+ 'vw': 0.00416667,
846
+ 'vh': 0.00416667,
847
+ 'vmin': 0.00416667,
848
+ 'vmax': 0.00416667
849
+ },
850
+ 'cm': {
851
+ 'px': 37.7953,
852
+ 'em': 2.3622,
853
+ 'rem': 2.3622,
854
+ 'pt': 28.3465,
855
+ 'cm': 1,
856
+ 'mm': 0.1,
857
+ 'in': 0.393701,
858
+ 'pc': 0.148148,
859
+ 'vw': 0.0377953,
860
+ 'vh': 0.0377953,
861
+ 'vmin': 0.0377953,
862
+ 'vmax': 0.0377953
863
+ },
864
+ 'mm': {
865
+ 'px': 3.77953,
866
+ 'em': 0.23622,
867
+ 'rem': 0.23622,
868
+ 'pt': 2.83465,
869
+ 'cm': 10,
870
+ 'mm': 1,
871
+ 'in': 0.0393701,
872
+ 'pc': 0.0148148,
873
+ 'vw': 0.00377953,
874
+ 'vh': 0.00377953,
875
+ 'vmin': 0.00377953,
876
+ 'vmax': 0.00377953
877
+ },
878
+ 'in': {
879
+ 'px': 96,
880
+ 'em': 6,
881
+ 'rem': 6,
882
+ 'pt': 72,
883
+ 'cm': 2.54,
884
+ 'mm': 25.4,
885
+ 'in': 1,
886
+ 'pc': 0.375,
887
+ 'vw': 0.09375,
888
+ 'vh': 0.09375,
889
+ 'vmin': 0.09375,
890
+ 'vmax': 0.09375
891
+ },
892
+ 'pc': {
893
+ 'px': 16,
894
+ 'em': 1,
895
+ 'rem': 1,
896
+ 'pt': 12,
897
+ 'cm': 0.423333,
898
+ 'mm': 0.0423333,
899
+ 'in': 0.166667,
900
+ 'pc': 1,
901
+ 'vw': 0.0625,
902
+ 'vh': 0.0625,
903
+ 'vmin': 0.0625,
904
+ 'vmax': 0.0625
905
+ },
906
+ 'vw': {
907
+ 'px': 160,
908
+ 'em': 10,
909
+ 'rem': 10,
910
+ 'pt': 120,
911
+ 'cm': 4.23333,
912
+ 'mm': 0.423333,
913
+ 'in': 1.66667,
914
+ 'pc': 0.625,
915
+ 'vw': 1,
916
+ 'vh': 1,
917
+ 'vmin': 1,
918
+ 'vmax': 1
919
+ },
920
+ 'vh': {
921
+ 'px': 160,
922
+ 'em': 10,
923
+ 'rem': 10,
924
+ 'pt': 120,
925
+ 'cm': 4.23333,
926
+ 'mm': 0.423333,
927
+ 'in': 1.66667,
928
+ 'pc': 0.625,
929
+ 'vw': 1,
930
+ 'vh': 1,
931
+ 'vmin': 1,
932
+ 'vmax': 1
933
+ },
934
+ 'vmin': {
935
+ 'px': 160,
936
+ 'em': 10,
937
+ 'rem': 10,
938
+ 'pt': 120,
939
+ 'cm': 4.23333,
940
+ 'mm': 0.423333,
941
+ 'in': 1.66667,
942
+ 'pc': 0.625,
943
+ 'vw': 1,
944
+ 'vh': 1,
945
+ 'vmin': 1,
946
+ 'vmax': 1
947
+ },
948
+ 'vmax': {
949
+ 'px': 160,
950
+ 'em': 10,
951
+ 'rem': 10,
952
+ 'pt': 120,
953
+ 'cm': 4.23333,
954
+ 'mm': 0.423333,
955
+ 'in': 1.66667,
956
+ 'pc': 0.625,
957
+ 'vw': 1,
958
+ 'vh': 1,
959
+ 'vmin': 1,
960
+ 'vmax': 1
961
+ }
962
+ };
963
+ /**
964
+ * @hidden
965
+ * @deprecated
966
+ */
967
+ const onHandleFontsizeChange = 'onHandleFontsizeChange';
774
968
 
775
969
  /**
776
970
  * Rich Text Editor classes defined here.
@@ -1909,14 +2103,14 @@ let tools = {
1909
2103
  'sourcecode': {
1910
2104
  'id': 'SourceCode',
1911
2105
  'icon': 'e-source-code',
1912
- 'tooltip': 'Source Code',
2106
+ 'tooltip': 'Code View (Ctrl+Shift+H)',
1913
2107
  'command': 'SourceCode',
1914
2108
  'subCommand': 'SourceCode'
1915
2109
  },
1916
2110
  'preview': {
1917
2111
  'id': 'Preview',
1918
2112
  'icon': 'e-preview',
1919
- 'tooltip': 'Preview',
2113
+ 'tooltip': 'Preview (Ctrl+Shift+H)',
1920
2114
  'command': 'Preview',
1921
2115
  'subCommand': 'Preview'
1922
2116
  },
@@ -2478,7 +2672,7 @@ let defaultLocale = {
2478
2672
  'remove': 'Remove',
2479
2673
  'insertLink': 'Insert Link',
2480
2674
  'display': 'Display',
2481
- 'altText': 'Alternative Text',
2675
+ 'altText': 'Alternative text',
2482
2676
  'dimension': 'Change Size',
2483
2677
  'fullscreen': 'Maximize',
2484
2678
  'maximize': 'Maximize',
@@ -2491,12 +2685,12 @@ let defaultLocale = {
2491
2685
  'preview': 'Preview',
2492
2686
  'viewside': 'ViewSide',
2493
2687
  'insertCode': 'Insert Code',
2494
- 'linkText': 'Display Text',
2688
+ 'linkText': 'Display text',
2495
2689
  'linkTooltipLabel': 'Title',
2496
- 'linkWebUrl': 'Web Address',
2690
+ 'linkWebUrl': 'Web address',
2497
2691
  'linkTitle': 'Enter a title',
2498
2692
  'linkurl': 'http://example.com',
2499
- 'linkOpenInNewWindow': 'Open Link in New Window',
2693
+ 'linkOpenInNewWindow': 'Open link in new window',
2500
2694
  'linkHeader': 'Insert Link',
2501
2695
  'dialogInsert': 'Insert',
2502
2696
  'dialogCancel': 'Cancel',
@@ -2530,8 +2724,8 @@ let defaultLocale = {
2530
2724
  'imageWidth': 'Width',
2531
2725
  'videoHeight': 'Height',
2532
2726
  'videoWidth': 'Width',
2533
- 'textPlaceholder': 'Enter Text',
2534
- 'inserttablebtn': 'Insert Table',
2727
+ 'textPlaceholder': 'Enter text',
2728
+ 'inserttablebtn': 'Insert table',
2535
2729
  'tabledialogHeader': 'Insert Table',
2536
2730
  'tableWidth': 'Width',
2537
2731
  'cellpadding': 'Cell Padding',
@@ -2541,7 +2735,7 @@ let defaultLocale = {
2541
2735
  'tableRows': 'Table Rows',
2542
2736
  'tableColumns': 'Table Columns',
2543
2737
  'tableCellHorizontalAlign': 'Table Cell Horizontal Align',
2544
- 'tableCellVerticalAlign': 'Table Cell Vertical Align',
2738
+ 'tableCellVerticalAlign': 'Table Vertical Align',
2545
2739
  'createTable': 'Create Table',
2546
2740
  'removeTable': 'Remove Table',
2547
2741
  'tableHeader': 'Table Header',
@@ -2619,8 +2813,8 @@ let defaultLocale = {
2619
2813
  'bulletFormatListNone': 'None',
2620
2814
  'formatPainter': 'Format Painter',
2621
2815
  'emojiPicker': 'Emoji Picker',
2622
- 'embeddedCode': 'Embedded Code',
2623
- 'pasteEmbeddedCodeHere': 'Paste Embedded Code here',
2816
+ 'embeddedCode': 'Embedded code',
2817
+ 'pasteEmbeddedCodeHere': 'Paste embedded code here',
2624
2818
  'emojiPickerTypeToFind': 'Type to find',
2625
2819
  'emojiPickerNoResultFound': 'No results found',
2626
2820
  'emojiPickerTrySomethingElse': 'Try something else',
@@ -2680,7 +2874,7 @@ let toolsLocale = {
2680
2874
  'remove': 'remove',
2681
2875
  'insertlink': 'insertLink',
2682
2876
  'display': 'display',
2683
- 'alttext': 'altText',
2877
+ 'alttext': 'alternateHeader',
2684
2878
  'dimension': 'dimension',
2685
2879
  'fullscreen': 'fullscreen',
2686
2880
  'maximize': 'maximize',
@@ -2715,8 +2909,8 @@ let toolsLocale = {
2715
2909
  'deleterow': 'deleteRow',
2716
2910
  'formatpainter': 'formatPainter',
2717
2911
  'emojipicker': 'emojiPicker',
2718
- 'embeddedCode': 'Embedded Code',
2719
- 'pasteEmbeddedCodeHere': 'Paste Embedded Code here',
2912
+ 'embeddedCode': 'Embedded code',
2913
+ 'pasteEmbeddedCodeHere': 'Paste embedded code here',
2720
2914
  'emojiPickerTypeToFind': 'Type to find',
2721
2915
  'emojiPickerNoResultFound': 'No results found',
2722
2916
  'emojiPickerTrySomethingElse': 'Try something else',
@@ -2886,6 +3080,40 @@ function getTooltipText(item, serviceLocator) {
2886
3080
  const tooltipText = i10n.getConstant(itemLocale);
2887
3081
  return tooltipText;
2888
3082
  }
3083
+ function getTooltipTextDropdownItems(item, serviceLocator, localeItems, rteObj) {
3084
+ if (localeItems) {
3085
+ const i10n = serviceLocator.getService('rteLocale');
3086
+ for (let i = 0; i < localeItems.length; i++) {
3087
+ const itemLocale = localeItems[i].value.toLocaleLowerCase();
3088
+ const numberValue = localeItems[i].locale;
3089
+ const numberLocale = defaultLocale[`${numberValue}`].toLocaleLowerCase();
3090
+ if (item === itemLocale || item === numberLocale) {
3091
+ const tooltipText = localeItems[i].locale;
3092
+ return i10n.getConstant(tooltipText);
3093
+ }
3094
+ }
3095
+ }
3096
+ else {
3097
+ const fontsize = rteObj.fontSize.items;
3098
+ for (let i = 0; i < fontsize.length; i++) {
3099
+ if (item === rteObj.fontSize.items[i].value) {
3100
+ const fontSize$$1 = rteObj.fontSize.items[i].text;
3101
+ return fontSize$$1;
3102
+ }
3103
+ }
3104
+ }
3105
+ return '';
3106
+ }
3107
+ function getQuickToolbarTooltipText(item) {
3108
+ const keys = Object.keys(defaultLocale);
3109
+ for (let i = 0; i < keys.length; i++) {
3110
+ const tooltipText = defaultLocale[`${keys[i]}`];
3111
+ if (item === tooltipText) {
3112
+ return tooltipText;
3113
+ }
3114
+ }
3115
+ return '';
3116
+ }
2889
3117
  /**
2890
3118
  * @param {ISetToolbarStatusArgs} e - specifies the e element
2891
3119
  * @param {boolean} isPopToolbar - specifies the boolean value
@@ -3400,6 +3628,7 @@ class ToolbarRenderer {
3400
3628
  }
3401
3629
  dropDownSelected(args) {
3402
3630
  this.parent.notify(dropDownSelect, args);
3631
+ this.destroyTooltip();
3403
3632
  }
3404
3633
  beforeDropDownItemRender(args) {
3405
3634
  if (this.parent.readonly || !this.parent.enabled) {
@@ -3427,12 +3656,18 @@ class ToolbarRenderer {
3427
3656
  if (args.element.parentElement.getAttribute('id').indexOf('TableCell') > -1 && !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-merge')) &&
3428
3657
  (!isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-horizontal-split')) || !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-vertical-split')))) {
3429
3658
  const listEle = args.element.querySelectorAll('li');
3430
- if (this.parent.inputElement.querySelectorAll('.e-cell-select').length === 1) {
3659
+ const selectedEles = this.parent.inputElement.querySelectorAll('.e-cell-select');
3660
+ if (selectedEles.length === 1) {
3431
3661
  addClass([listEle[0]], 'e-disabled');
3432
3662
  removeClass([listEle[1], listEle[2]], 'e-disabled');
3433
3663
  }
3434
- else if (this.parent.inputElement.querySelectorAll('.e-cell-select').length > 1) {
3435
- removeClass([listEle[0]], 'e-disabled');
3664
+ else if (selectedEles.length > 1) {
3665
+ if (!Array.from(selectedEles).every((element) => element.tagName.toLowerCase() === selectedEles[0].tagName.toLowerCase())) {
3666
+ addClass([listEle[0]], 'e-disabled');
3667
+ }
3668
+ else {
3669
+ removeClass([listEle[0]], 'e-disabled');
3670
+ }
3436
3671
  addClass([listEle[1], listEle[2]], 'e-disabled');
3437
3672
  }
3438
3673
  }
@@ -3480,6 +3715,19 @@ class ToolbarRenderer {
3480
3715
  });
3481
3716
  this.tooltip.appendTo(args.target);
3482
3717
  }
3718
+ if (this.parent.showTooltip) {
3719
+ this.dropdownTooltip = new Tooltip({
3720
+ target: '[aria-owns="' + this.parent.getID() + '"].e-rte-elements [title]',
3721
+ showTipPointer: true,
3722
+ openDelay: 400,
3723
+ opensOn: 'Hover',
3724
+ beforeRender: this.tooltipBeforeRender.bind(this),
3725
+ cssClass: this.parent.getCssClass(),
3726
+ windowCollision: true,
3727
+ position: 'BottomCenter'
3728
+ });
3729
+ this.dropdownTooltip.appendTo(document.body);
3730
+ }
3483
3731
  }
3484
3732
  /**
3485
3733
  * renderDropDownButton method
@@ -4092,10 +4340,14 @@ class BaseToolbar {
4092
4340
  this.parent.formatter.saveData();
4093
4341
  }
4094
4342
  callback.call(this);
4095
- const currentContentElem = this.parent.createElement('div');
4096
- currentContentElem.appendChild(this.parent.formatter.getUndoRedoStack()[this.parent.formatter.getUndoRedoStack().length - 1].text);
4097
- if (currentContentElem.innerHTML.trim() === this.parent.inputElement.innerHTML.trim()) {
4098
- return;
4343
+ if (this.parent.formatter.getUndoRedoStack().length > 0) {
4344
+ const currentContentElem = this.parent.createElement('div');
4345
+ let stackItem = this.parent.formatter.getUndoRedoStack()[this.parent.formatter.getUndoRedoStack().length - 1];
4346
+ let clonedItem = (stackItem.text).cloneNode(true);
4347
+ currentContentElem.appendChild(clonedItem);
4348
+ if (currentContentElem.innerHTML.trim() === this.parent.inputElement.innerHTML.trim()) {
4349
+ return;
4350
+ }
4099
4351
  }
4100
4352
  if (proxy.undo) {
4101
4353
  this.parent.formatter.saveData();
@@ -4163,10 +4415,28 @@ class DropDownButtons {
4163
4415
  if (item.cssClass) {
4164
4416
  addClass([args.element], item.cssClass);
4165
4417
  }
4418
+ if (item.command === 'Images' || item.command === 'Videos' || item.command === 'Audios' || item.command === 'Table') {
4419
+ args.element.setAttribute('title', getQuickToolbarTooltipText(item.text));
4420
+ }
4166
4421
  if (item.command === 'Alignments' || item.subCommand === 'JustifyLeft'
4167
4422
  || item.subCommand === 'JustifyRight' || item.subCommand === 'JustifyCenter') {
4168
4423
  args.element.setAttribute('title', getTooltipText(item.subCommand.toLocaleLowerCase(), this.locator));
4169
4424
  }
4425
+ if (item.command === 'Formats') {
4426
+ args.element.setAttribute('title', getTooltipTextDropdownItems(item.subCommand.toLocaleLowerCase(), this.locator, formatsLocale));
4427
+ }
4428
+ if (item.command === 'Font') {
4429
+ args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), this.locator, fontNameLocale));
4430
+ }
4431
+ if (item.subCommand === 'BulletFormatList') {
4432
+ args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), this.locator, bulletFormatListLocale));
4433
+ }
4434
+ if (item.subCommand === 'NumberFormatList') {
4435
+ args.element.setAttribute('title', getTooltipTextDropdownItems(item.text.replace(/\s/g, '').toLocaleLowerCase(), this.locator, numberFormatListLocale));
4436
+ }
4437
+ if (item.subCommand === 'FontSize') {
4438
+ args.element.setAttribute('title', getTooltipTextDropdownItems(item.value.toLocaleLowerCase(), null, null, this.parent));
4439
+ }
4170
4440
  }
4171
4441
  dropdownContent(width, type, content) {
4172
4442
  return ('<span style="display: inline-flex;' + 'width:' + ((type === 'quick') ? 'auto' : width) + '" >' +
@@ -4272,7 +4542,7 @@ class DropDownButtons {
4272
4542
  if (isNullOrUndefined(targetElement) || targetElement.classList.contains(CLS_DROPDOWN_BTN)) {
4273
4543
  return;
4274
4544
  }
4275
- const fontsize = this.parent.fontSize.items.slice();
4545
+ const fontsize = !isNullOrUndefined(this.fontSizeDropDown) && !isNullOrUndefined(this.fontSizeDropDown.items) && this.fontSizeDropDown.items.length > 0 ? this.fontSizeDropDown.items : JSON.parse(JSON.stringify(this.parent.fontSize.items.slice()));
4276
4546
  fontsize.forEach((item) => {
4277
4547
  Object.defineProperties(item, {
4278
4548
  command: { value: 'Font', enumerable: true }, subCommand: { value: 'FontSize', enumerable: true }
@@ -5586,7 +5856,9 @@ const keyCode = {
5586
5856
  'singlequote': 222,
5587
5857
  ']': 221,
5588
5858
  '[': 219,
5589
- '=': 187
5859
+ '=': 187,
5860
+ '<': 188,
5861
+ '>': 190
5590
5862
  };
5591
5863
  /**
5592
5864
  * KeyboardEvents class enables you to bind key action desired key combinations for ex., Ctrl+A, Delete, Alt+Space etc.
@@ -6289,6 +6561,9 @@ class BaseQuickToolbar {
6289
6561
  this.parent.enableToolbarItem(this.parent.toolbarSettings.items);
6290
6562
  }
6291
6563
  }
6564
+ if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
6565
+ this.parent.notify(destroyTooltip, { args: event });
6566
+ }
6292
6567
  this.removeEleFromDOM();
6293
6568
  this.isDOMElement = false;
6294
6569
  }
@@ -7109,7 +7384,7 @@ class Count {
7109
7384
  }
7110
7385
  appendCount() {
7111
7386
  const htmlText = this.parent.editorMode === 'Markdown' ? this.editPanel.value :
7112
- this.editPanel.textContent;
7387
+ (this.parent.getText().replace(/(\r\n|\n|\r|\t)/gm, ''));
7113
7388
  if (this.parent.editorMode !== 'Markdown' && htmlText.indexOf('\u200B') !== -1) {
7114
7389
  this.htmlLength = htmlText.replace(/\u200B/g, '').length;
7115
7390
  }
@@ -7499,30 +7774,41 @@ function updateTextNode$1(value, enterAction) {
7499
7774
  }
7500
7775
  const tableElm = resultElm.querySelectorAll('table');
7501
7776
  for (let i = 0; i < tableElm.length; i++) {
7502
- if (tableElm[i].getAttribute('border') === '0') {
7503
- tableElm[i].removeAttribute('border');
7504
- }
7505
- const tdElm = tableElm[i].querySelectorAll('td');
7506
- for (let j = 0; j < tdElm.length; j++) {
7507
- if (tdElm[j].style.borderLeft === 'none') {
7508
- tdElm[j].style.removeProperty('border-left');
7509
- }
7510
- if (tdElm[j].style.borderRight === 'none') {
7511
- tdElm[j].style.removeProperty('border-right');
7512
- }
7513
- if (tdElm[j].style.borderBottom === 'none') {
7514
- tdElm[j].style.removeProperty('border-bottom');
7515
- }
7516
- if (tdElm[j].style.borderTop === 'none') {
7517
- tdElm[j].style.removeProperty('border-top');
7777
+ if (tableElm[i].classList.length > 0 && !tableElm[i].classList.contains('e-rte-table')) {
7778
+ tableElm[i].classList.add('e-rte-paste-table');
7779
+ if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
7780
+ tableElm[i].classList.remove('e-rte-paste-word-table');
7781
+ continue; // Sking the removal of the border if the source is from word.
7782
+ }
7783
+ else if (tableElm[i].classList.contains('e-rte-paste-excel-table')) {
7784
+ tableElm[i].classList.remove('e-rte-paste-excel-table');
7785
+ if (tableElm[i].getAttribute('border') === '0') {
7786
+ tableElm[i].removeAttribute('border');
7787
+ }
7788
+ const tdElm = tableElm[i].querySelectorAll('td');
7789
+ for (let j = 0; j < tdElm.length; j++) {
7790
+ if (tdElm[j].style.borderLeft === 'none') {
7791
+ tdElm[j].style.removeProperty('border-left');
7792
+ }
7793
+ if (tdElm[j].style.borderRight === 'none') {
7794
+ tdElm[j].style.removeProperty('border-right');
7795
+ }
7796
+ if (tdElm[j].style.borderBottom === 'none') {
7797
+ tdElm[j].style.removeProperty('border-bottom');
7798
+ }
7799
+ if (tdElm[j].style.borderTop === 'none') {
7800
+ tdElm[j].style.removeProperty('border-top');
7801
+ }
7802
+ if (tdElm[j].style.border === 'none') {
7803
+ tdElm[j].style.removeProperty('border');
7804
+ }
7805
+ }
7518
7806
  }
7519
- if (tdElm[j].style.border === 'none') {
7520
- tdElm[j].style.removeProperty('border');
7807
+ else if (tableElm[i].classList.contains('e-rte-paste-onenote-table')) {
7808
+ tableElm[i].classList.remove('e-rte-paste-onenote-table');
7809
+ continue;
7521
7810
  }
7522
7811
  }
7523
- if (!tableElm[i].classList.contains('e-rte-table')) {
7524
- tableElm[i].classList.add('e-rte-table');
7525
- }
7526
7812
  }
7527
7813
  const imageElm = resultElm.querySelectorAll('img');
7528
7814
  for (let i = 0; i < imageElm.length; i++) {
@@ -7838,6 +8124,12 @@ const FORMAT_PAINTER_ACTIONS = 'format_painter_actions';
7838
8124
  * @hidden
7839
8125
  */
7840
8126
  const EMOJI_PICKER_ACTIONS = 'emoji_picker_actions';
8127
+ /**
8128
+ * Mouse down event constant
8129
+ *
8130
+ * @hidden
8131
+ */
8132
+ const MOUSE_DOWN = 'mouseDown';
7841
8133
 
7842
8134
  /**
7843
8135
  * Formatter
@@ -7861,12 +8153,21 @@ class Formatter {
7861
8153
  const selection = self.contentModule.getDocument().getSelection();
7862
8154
  const range = (selection.rangeCount > 0) ? selection.getRangeAt(selection.rangeCount - 1) : null;
7863
8155
  let saveSelection;
8156
+ let newRange;
8157
+ if (!isNullOrUndefined(value) && !isNullOrUndefined(value.selection)) {
8158
+ newRange = value.selection.range;
8159
+ }
7864
8160
  const isKeyboardVideoInsert = (!isNullOrUndefined(value) && !isNullOrUndefined(value.cssClass) &&
7865
8161
  value.cssClass !== 'e-video-inline');
7866
8162
  if (self.editorMode === 'HTML') {
7867
8163
  if (!isNullOrUndefined(args) && !isKeyboardVideoInsert) {
7868
8164
  if (isNullOrUndefined(args.name) || (!isNullOrUndefined(args.name) && args.name !== 'showDialog')) {
7869
- saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
8165
+ if (newRange) {
8166
+ saveSelection = this.editorManager.nodeSelection.save(newRange, self.contentModule.getDocument());
8167
+ }
8168
+ else {
8169
+ saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
8170
+ }
7870
8171
  }
7871
8172
  }
7872
8173
  }
@@ -7894,7 +8195,7 @@ class Formatter {
7894
8195
  if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
7895
8196
  currentInsertContentLength = 1;
7896
8197
  }
7897
- const currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
8198
+ const currentLength = self.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
7898
8199
  const selectionLength = self.getSelection().length;
7899
8200
  const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
7900
8201
  if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
@@ -7958,7 +8259,9 @@ class Formatter {
7958
8259
  this.saveData();
7959
8260
  }
7960
8261
  self.isBlur = false;
7961
- self.contentModule.getEditPanel().focus();
8262
+ if (isNullOrUndefined(saveSelection) || isNullOrUndefined(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
8263
+ self.contentModule.getEditPanel().focus();
8264
+ }
7962
8265
  if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
7963
8266
  if (isNullOrUndefined(args.selectType) || (!isNullOrUndefined(args.selectType) && args.selectType !== 'showDialog')) {
7964
8267
  saveSelection.restore();
@@ -10422,6 +10725,12 @@ const CLEAR_TYPE = 'clear-type';
10422
10725
  * @hidden
10423
10726
  */
10424
10727
  const SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'param', 'source', 'track', 'wbr', 'iframe', 'td', 'table'];
10728
+ /**
10729
+ * Source
10730
+ *
10731
+ * @hidden
10732
+ */
10733
+ const PASTE_SOURCE = ['word', 'excel', 'onenote'];
10425
10734
 
10426
10735
  /**
10427
10736
  * `Selection` module is used to handle RTE Selections.
@@ -11435,7 +11744,9 @@ class DOMNode {
11435
11744
  else if (start.tagName === 'BR') {
11436
11745
  this.replaceWith(start, this.marker(className, this.encode(start.textContent)));
11437
11746
  const markerStart = range.startContainer.querySelector('.' + className);
11438
- markerStart.parentElement.appendChild(start);
11747
+ if (markerStart) {
11748
+ markerStart.parentElement.appendChild(start);
11749
+ }
11439
11750
  }
11440
11751
  else {
11441
11752
  if (start.tagName === 'IMG') {
@@ -15068,7 +15379,6 @@ class TableCommand {
15068
15379
  table.appendChild(tblBody);
15069
15380
  e.item.selection.restore();
15070
15381
  InsertHtml.Insert(this.parent.currentDocument, table, this.parent.editableElement);
15071
- this.removeEmptyNode();
15072
15382
  e.item.selection.setSelectionText(this.parent.currentDocument, table.querySelector('td'), table.querySelector('td'), 0, 0);
15073
15383
  if (table.nextElementSibling === null) {
15074
15384
  let insertElem;
@@ -15112,24 +15422,6 @@ class TableCommand {
15112
15422
  }
15113
15423
  return styleValue;
15114
15424
  }
15115
- removeEmptyNode() {
15116
- const emptyUl = this.parent.editableElement.querySelectorAll('ul:empty, ol:empty');
15117
- for (let i = 0; i < emptyUl.length; i++) {
15118
- detach(emptyUl[i]);
15119
- }
15120
- let emptyLiChild = this.parent.editableElement.querySelectorAll('li *:empty:not(img)');
15121
- for (let i = 0; i < emptyLiChild.length; i++) {
15122
- detach(emptyLiChild[i]);
15123
- if (emptyLiChild.length === i + 1) {
15124
- emptyLiChild = this.parent.editableElement.querySelectorAll('li *:empty:not(img)');
15125
- i = -1;
15126
- }
15127
- }
15128
- const emptyLi = this.parent.editableElement.querySelectorAll('li:empty');
15129
- for (let i = 0; i < emptyLi.length; i++) {
15130
- detach(emptyLi[i]);
15131
- }
15132
- }
15133
15425
  insertAfter(newNode, referenceNode) {
15134
15426
  referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
15135
15427
  }
@@ -15477,14 +15769,21 @@ class TableCommand {
15477
15769
  }
15478
15770
  }
15479
15771
  tableVerticalAlign(e) {
15480
- if (e.item.subCommand === 'AlignTop') {
15481
- e.item.tableCell.style.verticalAlign = 'top';
15482
- }
15483
- else if (e.item.subCommand === 'AlignMiddle') {
15484
- e.item.tableCell.style.verticalAlign = 'middle';
15772
+ let value = '';
15773
+ switch (e.item.subCommand) {
15774
+ case 'AlignTop':
15775
+ value = 'top';
15776
+ break;
15777
+ case 'AlignMiddle':
15778
+ value = 'middle';
15779
+ break;
15780
+ case 'AlignBottom':
15781
+ value = 'bottom';
15782
+ break;
15485
15783
  }
15486
- else {
15487
- e.item.tableCell.style.verticalAlign = 'bottom';
15784
+ e.item.tableCell.style.verticalAlign = value;
15785
+ if (value && value !== '' && e.item.tableCell.getAttribute('valign')) {
15786
+ e.item.tableCell.removeAttribute('valign');
15488
15787
  }
15489
15788
  if (e.callBack) {
15490
15789
  e.callBack({
@@ -16233,6 +16532,22 @@ class SelectionCommands {
16233
16532
  const nodeCutter = new NodeCutter();
16234
16533
  const isFormatted = new IsFormatted();
16235
16534
  let range = domSelection.getRange(docElement);
16535
+ if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer === range.endContainer && !isNullOrUndefined(endNode) && range.startContainer === endNode) {
16536
+ const startChildNodes = range.startContainer.childNodes;
16537
+ const startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) :
16538
+ range.startOffset]) || range.startContainer);
16539
+ const endNode = (range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) :
16540
+ range.endOffset] || range.endContainer);
16541
+ let lastSelectionNode = (endNode.lastChild.nodeName === 'BR' ? (isNullOrUndefined(endNode.lastChild.previousSibling) ? endNode
16542
+ : endNode.lastChild.previousSibling) : endNode.firstChild);
16543
+ while (!isNullOrUndefined(lastSelectionNode) && lastSelectionNode.nodeName !== '#text' && lastSelectionNode.nodeName !== 'IMG' &&
16544
+ lastSelectionNode.nodeName !== 'BR' && lastSelectionNode.nodeName !== 'HR') {
16545
+ lastSelectionNode = lastSelectionNode.lastChild;
16546
+ }
16547
+
16548
+ domSelection.setSelectionText(docElement, startNode, lastSelectionNode, 0, 0);
16549
+ range = domSelection.getRange(docElement);
16550
+ }
16236
16551
  const save = domSelection.save(range, docElement);
16237
16552
  const nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
16238
16553
  domSelection.getSelectionNodeCollectionBr(range);
@@ -17452,6 +17767,25 @@ class UndoRedoManager {
17452
17767
  }
17453
17768
  return textContent;
17454
17769
  }
17770
+ isElementStructureEqual(previousFragment, currentFragment) {
17771
+ if (previousFragment.childNodes.length !== currentFragment.childNodes.length) {
17772
+ return false;
17773
+ }
17774
+ for (let i = 0; i < previousFragment.childNodes.length; i++) {
17775
+ const previousFragmentNode = previousFragment.childNodes[i];
17776
+ const currentFragmentNode = currentFragment.childNodes[i];
17777
+ if (!previousFragmentNode || !currentFragmentNode) {
17778
+ return false;
17779
+ }
17780
+ if (previousFragmentNode.nodeType !== currentFragmentNode.nodeType) {
17781
+ return false;
17782
+ }
17783
+ if (previousFragmentNode.outerHTML !== currentFragmentNode.outerHTML) {
17784
+ return false;
17785
+ }
17786
+ }
17787
+ return true;
17788
+ }
17455
17789
  /**
17456
17790
  * RTE collection stored html format.
17457
17791
  *
@@ -17488,7 +17822,8 @@ class UndoRedoManager {
17488
17822
  (this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
17489
17823
  (this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
17490
17824
  (this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
17491
- this.getTextContentFromFragment(changEle.text).trim())) {
17825
+ this.getTextContentFromFragment(changEle.text).trim()) &&
17826
+ this.isElementStructureEqual(this.undoRedoStack[this.undoRedoStack.length - 1].text, changEle.text)) {
17492
17827
  return;
17493
17828
  }
17494
17829
  this.undoRedoStack.push(changEle);
@@ -17650,6 +17985,7 @@ class MsWordPaste {
17650
17985
  const pattern4 = /style='mso-width-source:/i;
17651
17986
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
17652
17987
  pattern4.test(tempHTMLContent)) {
17988
+ const source = this.findSource(elm);
17653
17989
  this.imageConversion(elm, rtfData);
17654
17990
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
17655
17991
  this.addListClass(elm);
@@ -17670,16 +18006,8 @@ class MsWordPaste {
17670
18006
  if (pattern4.test(tempHTMLContent)) {
17671
18007
  this.addTableBorderClass(elm);
17672
18008
  }
17673
- // Removing the margin for list items
17674
- const liChildren = elm.querySelectorAll('li');
17675
- if (liChildren.length > 0) {
17676
- for (let i = 0; i < liChildren.length; i++) {
17677
- if (!isNullOrUndefined(liChildren[i].style.marginLeft)) {
17678
- liChildren[i].style.marginLeft = '';
17679
- }
17680
- }
17681
- }
17682
- e.callBack(elm.innerHTML, this.cropImageDimensions);
18009
+ this.processMargin(elm);
18010
+ e.callBack(elm.innerHTML, this.cropImageDimensions, source);
17683
18011
  }
17684
18012
  else {
17685
18013
  e.callBack(elm.innerHTML);
@@ -18513,6 +18841,25 @@ class MsWordPaste {
18513
18841
  }
18514
18842
  this.listContents.push(elem.innerHTML);
18515
18843
  }
18844
+ processMargin(element) {
18845
+ const liChildren = element.querySelectorAll('li');
18846
+ if (liChildren.length > 0) {
18847
+ for (let i = 0; i < liChildren.length; i++) {
18848
+ if (!isNullOrUndefined((liChildren[i]).style.marginLeft)) {
18849
+ (liChildren[i]).style.marginLeft = '';
18850
+ }
18851
+ }
18852
+ }
18853
+ const tableChildren = element.querySelectorAll('table');
18854
+ if (tableChildren.length > 0) {
18855
+ for (let i = 0; i < tableChildren.length; i++) {
18856
+ if (!isNullOrUndefined((tableChildren[i]).style.marginLeft) &&
18857
+ (tableChildren[i]).style.marginLeft.indexOf('-') >= 0) {
18858
+ (tableChildren[i]).style.marginLeft = '';
18859
+ }
18860
+ }
18861
+ }
18862
+ }
18516
18863
  removeEmptyAnchorTag(element) {
18517
18864
  const removableElement = element.querySelectorAll('a:not([href])');
18518
18865
  for (let j = removableElement.length - 1; j >= 0; j--) {
@@ -18523,6 +18870,22 @@ class MsWordPaste {
18523
18870
  parentElem.removeChild(removableElement[j]);
18524
18871
  }
18525
18872
  }
18873
+ findSource(element) {
18874
+ const metaNodes = element.querySelectorAll('meta');
18875
+ for (let i = 0; i < metaNodes.length; i++) {
18876
+ const metaNode = metaNodes[i];
18877
+ const content = metaNode.getAttribute('content');
18878
+ const name = metaNode.getAttribute('name');
18879
+ if (name && name.toLowerCase().indexOf('generator') >= 0 && content && content.toLowerCase().indexOf('microsoft') >= 0) {
18880
+ for (let j = 0; j < PASTE_SOURCE.length; j++) {
18881
+ if (content.toLowerCase().indexOf(PASTE_SOURCE[j]) >= 0) {
18882
+ return PASTE_SOURCE[j];
18883
+ }
18884
+ }
18885
+ }
18886
+ }
18887
+ return 'html';
18888
+ }
18526
18889
  }
18527
18890
 
18528
18891
  /**
@@ -19156,7 +19519,7 @@ class FormatPainterActions {
19156
19519
  }
19157
19520
  copyAction() {
19158
19521
  const copyCollection = [];
19159
- const range = this.parent.nodeSelection.getRange(document);
19522
+ const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
19160
19523
  const domSelection = this.parent.nodeSelection;
19161
19524
  let nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
19162
19525
  domSelection.getSelectionNodeCollectionBr(range);
@@ -19648,6 +20011,7 @@ class EditorManager {
19648
20011
  this.observer.on(MODEL_CHANGED, this.onPropertyChanged, this);
19649
20012
  this.observer.on(MS_WORD_CLEANUP, this.onWordPaste, this);
19650
20013
  this.observer.on(ON_BEGIN, this.onBegin, this);
20014
+ this.observer.on(MOUSE_DOWN, this.editorMouseDown, this);
19651
20015
  }
19652
20016
  onWordPaste(e) {
19653
20017
  this.observer.notify(MS_WORD_CLEANUP_PLUGIN, e);
@@ -19791,6 +20155,64 @@ class EditorManager {
19791
20155
  event: event, callBack: callBack });
19792
20156
  }
19793
20157
  }
20158
+ editorMouseDown(e) {
20159
+ if (e.args.detail === 3) {
20160
+ this.tripleClickSelection(e.args);
20161
+ }
20162
+ }
20163
+ tripleClickSelection(e) {
20164
+ const range = this.nodeSelection.getRange(this.currentDocument);
20165
+ const selection = this.nodeSelection.get(this.currentDocument);
20166
+ if (selection.rangeCount > 0 && selection.toString() !== '') {
20167
+ const startBlockNode = this.getParentBlockNode(range.startContainer);
20168
+ const endBlockNode = this.getParentBlockNode(range.endContainer);
20169
+ if (startBlockNode && endBlockNode && startBlockNode === endBlockNode) {
20170
+ const newRange = this.currentDocument.createRange();
20171
+ const startTextNode = this.getFirstTextNode(startBlockNode);
20172
+ const endTextNode = this.getLastTextNode(endBlockNode);
20173
+ if (startTextNode && endTextNode) {
20174
+ newRange.setStart(startTextNode, 0);
20175
+ newRange.setEnd(endTextNode, endTextNode.textContent.length);
20176
+ this.nodeSelection.setRange(this.currentDocument, newRange);
20177
+ e.preventDefault();
20178
+ }
20179
+ }
20180
+ }
20181
+ }
20182
+ getParentBlockNode(node) {
20183
+ let treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
20184
+ NodeFilter.SHOW_ELEMENT, // whatToShow
20185
+ {
20186
+ acceptNode: function (currentNode) {
20187
+ // Check if the node is a block element
20188
+ let displayStyle = window.getComputedStyle(currentNode).display;
20189
+ if (displayStyle.indexOf('inline') < 0) {
20190
+ return NodeFilter.FILTER_ACCEPT;
20191
+ }
20192
+ else {
20193
+ return NodeFilter.FILTER_SKIP;
20194
+ }
20195
+ }
20196
+ });
20197
+ treeWalker.currentNode = node;
20198
+ let blockParent = treeWalker.parentNode();
20199
+ return blockParent;
20200
+ }
20201
+ getLastTextNode(node) {
20202
+ let treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
20203
+ let lastTextNode = null;
20204
+ let currentNode = treeWalker.nextNode();
20205
+ while (currentNode) {
20206
+ lastTextNode = currentNode;
20207
+ currentNode = treeWalker.nextNode();
20208
+ }
20209
+ return lastTextNode;
20210
+ }
20211
+ getFirstTextNode(node) {
20212
+ let treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
20213
+ let firstTextNode = treeWalker.nextNode();
20214
+ return firstTextNode;
20215
+ }
19794
20216
  }
19795
20217
 
19796
20218
  /**
@@ -20364,6 +20786,7 @@ class HtmlEditor {
20364
20786
  this.parent.on(readOnlyMode, this.updateReadOnly, this);
20365
20787
  this.parent.on(paste, this.onPaste, this);
20366
20788
  this.parent.on(tableclass, this.isTableClassAdded, this);
20789
+ this.parent.on(onHandleFontsizeChange, this.onHandleFontsizeChange, this);
20367
20790
  }
20368
20791
  updateReadOnly() {
20369
20792
  if (this.parent.readonly) {
@@ -20382,7 +20805,9 @@ class HtmlEditor {
20382
20805
  }
20383
20806
  onSelectionRestore(e) {
20384
20807
  this.parent.isBlur = false;
20385
- this.contentRenderer.getEditPanel().focus();
20808
+ if (isNullOrUndefined(this.saveSelection) || isNullOrUndefined(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
20809
+ this.contentRenderer.getEditPanel().focus();
20810
+ }
20386
20811
  if (isNullOrUndefined(e.items) || e.items) {
20387
20812
  this.saveSelection.restore();
20388
20813
  }
@@ -20390,11 +20815,85 @@ class HtmlEditor {
20390
20815
  isTableClassAdded() {
20391
20816
  const tableElement = this.parent.inputElement.querySelectorAll('table');
20392
20817
  for (let i = 0; i < tableElement.length; i++) {
20393
- if (!tableElement[i].classList.contains('e-rte-table')) {
20818
+ if (!tableElement[i].classList.contains('e-rte-table') && !tableElement[i].classList.contains('e-rte-paste-table')) {
20394
20819
  tableElement[i].classList.add('e-rte-table');
20395
20820
  }
20396
20821
  }
20397
20822
  }
20823
+ onHandleFontsizeChange(e) {
20824
+ const keyboardArgs = e.args;
20825
+ const args = { name: 'dropDownSelect' };
20826
+ args.item = {
20827
+ command: 'Font',
20828
+ subCommand: 'FontSize'
20829
+ };
20830
+ const items = this.parent.fontSize.items;
20831
+ let activeElem;
20832
+ if (this.parent.toolbarModule && this.parent.toolbarModule.dropDownModule &&
20833
+ this.parent.toolbarModule.dropDownModule.fontSizeDropDown && !isNullOrUndefined(this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent) && this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent !== '') {
20834
+ activeElem = this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent;
20835
+ }
20836
+ else {
20837
+ let fontSizeValue;
20838
+ const selection = this.parent.contentModule.getDocument().getSelection();
20839
+ if (selection && selection.focusNode && selection.focusNode.parentElement) {
20840
+ fontSizeValue = document.defaultView.getComputedStyle(selection.focusNode.parentElement, null).getPropertyValue('font-size');
20841
+ }
20842
+ else {
20843
+ fontSizeValue = this.parent.fontSize.width;
20844
+ }
20845
+ fontSizeValue = isNullOrUndefined(fontSizeValue) ? this.parent.fontSize.width : fontSizeValue;
20846
+ const actualTxtFontValues = fontSizeValue.match(/^([\d.]+)(\D+)$/);
20847
+ const size = parseInt(actualTxtFontValues[1], 10);
20848
+ const unit = actualTxtFontValues[2];
20849
+ const defaultFontValues = items[0].value.match(/^([\d.]+)(\D+)$/);
20850
+ if (defaultFontValues[2] === unit) {
20851
+ const index = items.findIndex(({ value }) => parseInt(value, 10) >= size);
20852
+ activeElem = items[index].text;
20853
+ }
20854
+ else {
20855
+ const convertedSize = this.convertFontSize(size, unit, defaultFontValues[2]);
20856
+ const index = items.findIndex(({ value }) => parseInt(value, 10) >= convertedSize);
20857
+ activeElem = items[index].text;
20858
+ }
20859
+ }
20860
+ const fontIndex = items.findIndex((size) => size.text === activeElem);
20861
+ if (keyboardArgs.action === 'increase-fontsize' && fontIndex !== -1) {
20862
+ if (fontIndex >= items.length - 1) {
20863
+ const fontValues = items[fontIndex].value.match(/^([\d.]+)(\D+)$/);
20864
+ if (fontValues) {
20865
+ const size = parseInt(fontValues[1], 10);
20866
+ const unit = fontValues[2];
20867
+ const roundedSize = size % 10 === 0 ? Math.ceil((size + 1) / 10) * 10 : Math.ceil(size / 10) * 10;
20868
+ args.item.value = roundedSize.toLocaleString() + unit;
20869
+ args.item.text = roundedSize.toLocaleString() + ' ' + unit;
20870
+ }
20871
+ this.parent.fontSize.items.push(args.item);
20872
+ }
20873
+ else {
20874
+ args.item.value = items[fontIndex + 1].value;
20875
+ args.item.text = items[fontIndex + 1].text;
20876
+ }
20877
+ }
20878
+ else if (keyboardArgs.action === 'decrease-fontsize' && fontIndex !== -1 && fontIndex > 0) {
20879
+ args.item.value = items[fontIndex - 1].value;
20880
+ args.item.text = items[fontIndex - 1].text;
20881
+ }
20882
+ else {
20883
+ if (fontIndex >= 0 && fontIndex < items.length && items[fontIndex]) {
20884
+ args.item.value = items[fontIndex].value;
20885
+ args.item.text = items[fontIndex].text;
20886
+ }
20887
+ }
20888
+ this.parent.formatter.process(this.parent, args, keyboardArgs);
20889
+ }
20890
+ convertFontSize(value, originalUnit, targetUnit) {
20891
+ if (supportedUnits.indexOf(originalUnit) !== -1 || supportedUnits.indexOf(targetUnit) !== -1) {
20892
+ originalUnit = 'px';
20893
+ }
20894
+ const convertedValue = value * conversionFactors[originalUnit][targetUnit];
20895
+ return convertedValue;
20896
+ }
20398
20897
  onKeyUp(e) {
20399
20898
  const args = e.args;
20400
20899
  const restrictKeys = [8, 9, 13, 16, 17, 18, 20, 27, 37, 38, 39, 40, 44, 45, 46, 91,
@@ -20515,7 +21014,7 @@ class HtmlEditor {
20515
21014
  e.args.keyCode === 13) {
20516
21015
  this.spaceLink(e.args);
20517
21016
  if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
20518
- const currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
21017
+ const currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
20519
21018
  const selectionLength = this.parent.getSelection().length;
20520
21019
  const totalLength = (currentLength - selectionLength) + 1;
20521
21020
  if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
@@ -20677,7 +21176,7 @@ class HtmlEditor {
20677
21176
  let liElement;
20678
21177
  let rootElement;
20679
21178
  if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
20680
- this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
21179
+ this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
20681
21180
  currentRange.startContainer.parentElement.tagName !== 'TH') {
20682
21181
  this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
20683
21182
  if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
@@ -21277,7 +21776,8 @@ class PasteCleanup {
21277
21776
  args: e.args,
21278
21777
  text: e.text,
21279
21778
  allowedStylePropertiesArray: this.parent.pasteCleanupSettings.allowedStyleProps,
21280
- callBack: (a, cropImageData) => {
21779
+ callBack: (a, cropImageData, pasteTableSource) => {
21780
+ args.pasteTableSource = pasteTableSource;
21281
21781
  value = a.trim();
21282
21782
  this.cropImageData = cropImageData;
21283
21783
  }
@@ -21847,10 +22347,24 @@ class PasteCleanup {
21847
22347
  }
21848
22348
  this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, (updatedArgs) => { value = updatedArgs.value; });
21849
22349
  clipBoardElem.innerHTML = this.parent.addAnchorAriaLabel(value);
21850
- clipBoardElem = this.addTableClass(clipBoardElem);
22350
+ clipBoardElem = this.addTableClass(clipBoardElem, args.pasteTableSource);
21851
22351
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
21852
22352
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
21853
22353
  this.parent.formatter.onSuccess(this.parent, args);
22354
+ if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem)) {
22355
+ const pasteContent = returnArgs.elements;
22356
+ const imageContent = returnArgs.imgElem;
22357
+ const lastElementChild = this.findLastElement(pasteContent[pasteContent.length - 1]);
22358
+ const isImageAtLast = !isNullOrUndefined(lastElementChild) ? lastElementChild.nodeName === 'IMG' : false;
22359
+ if (isImageAtLast || pasteContent[pasteContent.length - 1] === imageContent[imageContent.length - 1]) {
22360
+ this.parent.notify(insertCompleted, {
22361
+ args: args.event,
22362
+ type: 'Images',
22363
+ isNotify: true,
22364
+ elements: imageContent[imageContent.length - 1]
22365
+ });
22366
+ }
22367
+ }
21854
22368
  }, clipBoardElem, null, null, this.parent.enterKey);
21855
22369
  this.removeTempClass();
21856
22370
  this.parent.notify(toolbarRefresh, {});
@@ -21901,12 +22415,15 @@ class PasteCleanup {
21901
22415
  }
21902
22416
  }
21903
22417
  }
21904
- addTableClass(element) {
22418
+ addTableClass(element, source) {
21905
22419
  const tableElement = element.querySelectorAll('table');
21906
22420
  for (let i = 0; i < tableElement.length; i++) {
21907
- if (!tableElement[i].classList.contains('e-rte-table')) {
22421
+ if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
21908
22422
  tableElement[i].classList.add('e-rte-table');
21909
22423
  }
22424
+ else if (source && source !== 'html') {
22425
+ tableElement[i].classList.add('e-rte-paste-' + source + '-table');
22426
+ }
21910
22427
  }
21911
22428
  return element;
21912
22429
  }
@@ -22243,6 +22760,16 @@ class PasteCleanup {
22243
22760
  }
22244
22761
  return clipBoardElem;
22245
22762
  }
22763
+ findLastElement(element) {
22764
+ if (!isNullOrUndefined(element) && !isNullOrUndefined(element.lastElementChild)) {
22765
+ let lastChild = element.lastElementChild;
22766
+ while (lastChild && lastChild.lastElementChild) {
22767
+ lastChild = lastChild.lastElementChild;
22768
+ }
22769
+ return lastChild;
22770
+ }
22771
+ return null;
22772
+ }
22246
22773
  /**
22247
22774
  * For internal use only - Get the module name.
22248
22775
  *
@@ -22738,6 +23265,7 @@ class FullScreen {
22738
23265
  this.parent.toolbarModule.addFixedTBarClass();
22739
23266
  }
22740
23267
  }
23268
+ this.parent.refreshUI();
22741
23269
  this.parent.trigger(actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
22742
23270
  }
22743
23271
  });
@@ -23651,7 +24179,7 @@ class EmojiPicker {
23651
24179
  noEmojiObj.style.margin = '55px';
23652
24180
  emojipickerAll.appendChild(noEmojiObj);
23653
24181
  }
23654
- else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':')) {
24182
+ else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':') || (inputValue === '' && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'))) {
23655
24183
  emojipickerAll.removeChild(this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'));
23656
24184
  }
23657
24185
  emojipickerAll.appendChild(emojiBtnDiv);
@@ -24301,12 +24829,20 @@ class Link {
24301
24829
  }
24302
24830
  const target = (this.selfLink.checkBoxObj.checked) ? '_blank' : null;
24303
24831
  const linkLabel = (this.selfLink.checkBoxObj.checked) ? this.selfLink.i10n.getConstant('linkAriaLabel') : null;
24832
+ if (this.selfLink.parent.editorMode === 'Markdown' && linkUrl === '') {
24833
+ linkUrl = 'http://';
24834
+ }
24304
24835
  if (linkUrl === '') {
24305
24836
  this.selfLink.checkUrl(true);
24306
24837
  return;
24307
24838
  }
24308
24839
  if (!this.selfLink.isUrl(linkUrl)) {
24309
- linkText = (linkText === '') ? linkUrl : linkText;
24840
+ if (this.selfLink.parent.editorMode === 'Markdown') {
24841
+ linkText = (linkText !== '') ? linkText : '';
24842
+ }
24843
+ else {
24844
+ linkText = (linkText === '') ? linkUrl : linkText;
24845
+ }
24310
24846
  if (!this.selfLink.parent.enableAutoUrl) {
24311
24847
  linkUrl = linkUrl.indexOf('http') > -1 ? linkUrl : 'http://' + linkUrl;
24312
24848
  }
@@ -24447,6 +24983,7 @@ class Link {
24447
24983
  this.parent.inlineMode.enable && !closest(target, '#' + this.dialogObj.element.id)) &&
24448
24984
  !closest(target, '#' + this.parent.getID() + '_toolbar_CreateLink') &&
24449
24985
  !target.querySelector('#' + this.parent.getID() + '_toolbar_CreateLink')))) {
24986
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
24450
24987
  this.dialogObj.hide({ returnValue: true });
24451
24988
  EventHandler.remove(this.parent.element.ownerDocument, 'mousedown', this.onDocumentClick);
24452
24989
  this.parent.isBlur = true;
@@ -25195,6 +25732,14 @@ class Image$1 {
25195
25732
  originalEvent.preventDefault();
25196
25733
  break;
25197
25734
  }
25735
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
25736
+ this.handleSelectAll();
25737
+ }
25738
+ }
25739
+ handleSelectAll() {
25740
+ this.cancelResizeAction();
25741
+ const imgFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_IMG_FOCUS);
25742
+ removeClass(imgFocusNodes, CLS_IMG_FOCUS);
25198
25743
  }
25199
25744
  openDialog(isInternal, event, selection, ele, parentEle) {
25200
25745
  let range;
@@ -25363,10 +25908,12 @@ class Image$1 {
25363
25908
  this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());
25364
25909
  this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(), target);
25365
25910
  this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
25911
+ this.resizeStart(e.args, target);
25366
25912
  }, 400);
25367
25913
  }
25368
25914
  else {
25369
- this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
25915
+ const coordinates = target.getBoundingClientRect();
25916
+ this.quickToolObj.imageQTBar.showPopup(coordinates.left, coordinates.top, target, 'Image');
25370
25917
  }
25371
25918
  }
25372
25919
  }
@@ -25826,7 +26373,7 @@ class Image$1 {
25826
26373
  isModal: Browser.isDevice,
25827
26374
  buttons: [{
25828
26375
  click: this.insertImageUrl.bind(selectObj),
25829
- buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
26376
+ buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: this.parent.editorMode === 'Markdown' ? false : true }
25830
26377
  },
25831
26378
  {
25832
26379
  click: (e) => {
@@ -25932,6 +26479,7 @@ class Image$1 {
25932
26479
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
25933
26480
  }
25934
26481
  else {
26482
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
25935
26483
  this.dialogObj.hide({ returnValue: true });
25936
26484
  this.parent.isBlur = true;
25937
26485
  dispatchEvent(this.parent.element, 'focusout');
@@ -25992,6 +26540,10 @@ class Image$1 {
25992
26540
  }
25993
26541
  }
25994
26542
  });
26543
+ if (e.selectNode && e.selectNode[0].nodeName === 'IMG') {
26544
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
26545
+ this.inputUrl.value = e.selectNode[0].src.match(regex) ? e.selectNode[0].src : '';
26546
+ }
25995
26547
  imgUrl.appendChild(this.inputUrl);
25996
26548
  return imgUrl;
25997
26549
  }
@@ -25999,7 +26551,10 @@ class Image$1 {
25999
26551
  insertImageUrl(e) {
26000
26552
  const proxy = this.selfImage;
26001
26553
  proxy.isImgUploaded = false;
26002
- const url = proxy.inputUrl.value;
26554
+ let url = proxy.inputUrl.value;
26555
+ if (proxy.parent.editorMode === 'Markdown' && url === '') {
26556
+ url = 'http://';
26557
+ }
26003
26558
  if (proxy.parent.formatter.getUndoRedoStack().length === 0) {
26004
26559
  proxy.parent.formatter.saveData();
26005
26560
  }
@@ -26989,6 +27544,13 @@ class Audio {
26989
27544
  originalEvent.preventDefault();
26990
27545
  break;
26991
27546
  }
27547
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
27548
+ this.handleSelectAll();
27549
+ }
27550
+ }
27551
+ handleSelectAll() {
27552
+ const audioFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_AUD_FOCUS);
27553
+ removeClass(audioFocusNodes, CLS_AUD_FOCUS);
26992
27554
  }
26993
27555
  openDialog(isInternal, event, selection, ele, parentEle) {
26994
27556
  let range;
@@ -27129,6 +27691,7 @@ class Audio {
27129
27691
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
27130
27692
  }
27131
27693
  else {
27694
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
27132
27695
  this.dialogObj.hide({ returnValue: true });
27133
27696
  this.parent.isBlur = true;
27134
27697
  dispatchEvent(this.parent.element, 'focusout');
@@ -27387,6 +27950,11 @@ class Audio {
27387
27950
  }
27388
27951
  }
27389
27952
  });
27953
+ if (e.selectNode && this.isAudioElem(e.selectNode[0])) {
27954
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
27955
+ const sourceElement = e.selectNode[0].querySelector('source');
27956
+ this.inputUrl.value = sourceElement.src.match(regex) ? sourceElement.src : '';
27957
+ }
27390
27958
  audioUrl.appendChild(this.inputUrl);
27391
27959
  return audioUrl;
27392
27960
  }
@@ -28277,6 +28845,14 @@ class Video {
28277
28845
  originalEvent.preventDefault();
28278
28846
  break;
28279
28847
  }
28848
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
28849
+ this.handleSelectAll();
28850
+ }
28851
+ }
28852
+ handleSelectAll() {
28853
+ this.cancelResizeAction();
28854
+ const videoFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_VID_FOCUS);
28855
+ removeClass(videoFocusNodes, CLS_VID_FOCUS);
28280
28856
  }
28281
28857
  openDialog(isInternal, event, selection, ele, parentEle) {
28282
28858
  let range;
@@ -28454,6 +29030,7 @@ class Video {
28454
29030
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
28455
29031
  }
28456
29032
  else {
29033
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
28457
29034
  this.dialogObj.hide({ returnValue: true });
28458
29035
  this.parent.isBlur = true;
28459
29036
  dispatchEvent(this.parent.element, 'focusout');
@@ -28740,6 +29317,15 @@ class Video {
28740
29317
  }
28741
29318
  }
28742
29319
  });
29320
+ if (e.selectNode && ((e.selectNode[0] && e.selectNode[0].nodeType !== 3 &&
29321
+ e.selectNode[0].nodeName !== 'BR' &&
29322
+ (e.selectNode[0].classList &&
29323
+ e.selectNode[0].classList.contains(CLS_VID_CLICK_ELEM))) ||
29324
+ e.selectNode[0].nodeName === 'IFRAME' || e.selectNode[0].nodeName === 'VIDEO')) {
29325
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
29326
+ const sourceElement = e.selectNode[0].querySelector('source');
29327
+ this.inputUrl.value = sourceElement.src.match(regex) ? sourceElement.src : '';
29328
+ }
28743
29329
  const embedUrlBtn = new RadioButton({
28744
29330
  label: this.i10n.getConstant('embeddedCode'),
28745
29331
  checked: true,
@@ -28749,7 +29335,6 @@ class Video {
28749
29335
  },
28750
29336
  change: () => {
28751
29337
  urlContent.innerHTML = '';
28752
- this.inputUrl.value = '';
28753
29338
  urlContent.appendChild(this.embedInputUrl);
28754
29339
  }
28755
29340
  });
@@ -28759,7 +29344,6 @@ class Video {
28759
29344
  name: 'URL',
28760
29345
  change: () => {
28761
29346
  urlContent.innerHTML = '';
28762
- this.embedInputUrl.value = '';
28763
29347
  urlContent.appendChild(this.inputUrl);
28764
29348
  }
28765
29349
  });
@@ -28949,10 +29533,11 @@ class Video {
28949
29533
  this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
28950
29534
  this.selectParent = proxy.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
28951
29535
  }
28952
- const name = url !== '' ? url.split('/')[url.split('/').length - 1] : embedUrl;
29536
+ const webUrlBtn = document.getElementById('webURL');
29537
+ const name = webUrlBtn.checked ? url.split('/')[url.split('/').length - 1] : embedUrl;
28953
29538
  const value = {
28954
29539
  cssClass: (proxy.parent.insertVideoSettings.layoutOption === 'Inline' ? CLS_VIDEOINLINE : CLS_VIDEOBREAK),
28955
- url: url, selection: this.selection, fileName: name, isEmbedUrl: embedUrl !== '' ? true : false,
29540
+ url: url, selection: this.selection, fileName: name, isEmbedUrl: !webUrlBtn.checked,
28956
29541
  selectParent: this.selectParent, width: {
28957
29542
  width: proxy.parent.insertVideoSettings.width, minWidth: proxy.parent.insertVideoSettings.minWidth,
28958
29543
  maxWidth: proxy.parent.getInsertImgMaxWidth()
@@ -29309,6 +29894,7 @@ class Table {
29309
29894
  this.parent.on(bindCssClass, this.setCssClass, this);
29310
29895
  this.parent.on(destroy, this.destroy, this);
29311
29896
  this.parent.on(moduleDestroy, this.moduleDestroy, this);
29897
+ this.parent.on(afterKeyDown, this.afterKeyDown, this);
29312
29898
  }
29313
29899
  removeEventListener() {
29314
29900
  if (this.parent.isDestroyed) {
@@ -29334,6 +29920,7 @@ class Table {
29334
29920
  this.parent.off(bindCssClass, this.setCssClass);
29335
29921
  this.parent.off(destroy, this.destroy);
29336
29922
  this.parent.off(moduleDestroy, this.moduleDestroy);
29923
+ this.parent.off(afterKeyDown, this.afterKeyDown);
29337
29924
  if (!Browser.isDevice && this.parent.tableSettings.resize) {
29338
29925
  EventHandler.remove(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper);
29339
29926
  }
@@ -29491,6 +30078,14 @@ class Table {
29491
30078
  }
29492
30079
  }
29493
30080
  }
30081
+ if (event.ctrlKey && event.key === 'a') {
30082
+ this.handleSelectAll();
30083
+ }
30084
+ }
30085
+ handleSelectAll() {
30086
+ this.cancelResizeAction();
30087
+ const selectedCells = this.parent.inputElement.querySelectorAll('.' + CLS_TABLE_SEL);
30088
+ removeClass(selectedCells, CLS_TABLE_SEL);
29494
30089
  }
29495
30090
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
29496
30091
  tableModulekeyUp(e) {
@@ -29524,7 +30119,6 @@ class Table {
29524
30119
  name: !isInternal ? 'showDialog' : null
29525
30120
  };
29526
30121
  this.insertTableDialog({ self: this, args: args, selection: selection });
29527
- this.parent.formatter.editorManager.nodeSelection.restore();
29528
30122
  }
29529
30123
  }
29530
30124
  showDialog() {
@@ -29869,7 +30463,7 @@ class Table {
29869
30463
  return;
29870
30464
  }
29871
30465
  const target = e.target || e.targetTouches[0].target;
29872
- const closestTable = closest(target, 'table.e-rte-table');
30466
+ const closestTable = closest(target, 'table.e-rte-table, table.e-rte-paste-table');
29873
30467
  if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable &&
29874
30468
  this.parent.contentModule.getEditPanel().contains(closestTable)) {
29875
30469
  this.removeResizeElement();
@@ -30506,6 +31100,7 @@ class Table {
30506
31100
  this.popupObj.hide();
30507
31101
  }
30508
31102
  if (this.editdlgObj) {
31103
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
30509
31104
  this.editdlgObj.hide();
30510
31105
  }
30511
31106
  this.parent.isBlur = true;
@@ -30814,6 +31409,15 @@ class Table {
30814
31409
  getModuleName() {
30815
31410
  return 'table';
30816
31411
  }
31412
+ afterKeyDown(e) {
31413
+ if (this.curTable) {
31414
+ setTimeout(() => {
31415
+ const mouseOverEvent = document.createEvent('MouseEvents');
31416
+ mouseOverEvent.initEvent('mouseover', true, true);
31417
+ this.curTable.dispatchEvent(mouseOverEvent);
31418
+ }, 1);
31419
+ }
31420
+ }
30817
31421
  }
30818
31422
 
30819
31423
  /**
@@ -30830,6 +31434,7 @@ class DialogRenderer {
30830
31434
  }
30831
31435
  this.parent.on(moduleDestroy, this.moduleDestroy, this);
30832
31436
  this.parent.on(destroy, this.removeEventListener, this);
31437
+ this.parent.on(documentClickClosedBy, this.documentClickClosedBy, this);
30833
31438
  }
30834
31439
  removeEventListener() {
30835
31440
  if (this.parent.isDestroyed) {
@@ -30837,6 +31442,7 @@ class DialogRenderer {
30837
31442
  }
30838
31443
  this.parent.off(destroy, this.removeEventListener);
30839
31444
  this.parent.off(moduleDestroy, this.moduleDestroy);
31445
+ this.parent.off(documentClickClosedBy, this.documentClickClosedBy);
30840
31446
  }
30841
31447
  /**
30842
31448
  * dialog render method
@@ -30883,10 +31489,14 @@ class DialogRenderer {
30883
31489
  open(args) {
30884
31490
  this.parent.trigger(dialogOpen, args);
30885
31491
  }
31492
+ documentClickClosedBy(args) {
31493
+ this.outsideClickClosedBy = args.closedBy;
31494
+ }
30886
31495
  beforeClose(args) {
30887
31496
  if (this.dialogEle) {
30888
31497
  this.dialogEle.removeEventListener('keydown', this.handleEnterKeyDown);
30889
31498
  }
31499
+ args.closedBy = this.outsideClickClosedBy === 'outside click' ? this.outsideClickClosedBy : args.closedBy;
30890
31500
  this.parent.trigger(beforeDialogClose, args, (closeArgs) => {
30891
31501
  if (!closeArgs.cancel) {
30892
31502
  if (closeArgs.container.classList.contains('e-popup-close')) {
@@ -30894,6 +31504,7 @@ class DialogRenderer {
30894
31504
  }
30895
31505
  }
30896
31506
  });
31507
+ this.outsideClickClosedBy = "";
30897
31508
  }
30898
31509
  getDialogPosition() {
30899
31510
  let distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
@@ -32399,7 +33010,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32399
33010
  if (tool.command === 'InsertText') {
32400
33011
  currentInsertContentLength = value.length;
32401
33012
  }
32402
- const currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
33013
+ const currentLength = this.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
32403
33014
  const selectionLength = this.getSelection().length;
32404
33015
  const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
32405
33016
  if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
@@ -32773,7 +33384,12 @@ let RichTextEditor = class RichTextEditor extends Component {
32773
33384
  FormatPainterEscapeAction = this.formatPainterModule.previousAction === 'escape';
32774
33385
  }
32775
33386
  if (!FormatPainterEscapeAction) {
32776
- this.formatter.process(this, null, e);
33387
+ if (this.editorMode === 'HTML' && (e.action === 'increase-fontsize' || e.action === 'decrease-fontsize')) {
33388
+ this.notify(onHandleFontsizeChange, { member: 'onHandleFontsizeChange', args: e });
33389
+ }
33390
+ else {
33391
+ this.formatter.process(this, null, e);
33392
+ }
32777
33393
  }
32778
33394
  switch (e.action) {
32779
33395
  case 'toolbar-focus':
@@ -32799,6 +33415,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32799
33415
  this.setPlaceHolder();
32800
33416
  }
32801
33417
  }
33418
+ this.notify(afterKeyDown, { member: 'afterKeyDown', args: e });
32802
33419
  this.autoResize();
32803
33420
  }
32804
33421
  keyUp(e) {
@@ -32825,7 +33442,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32825
33442
  const formatPainterCopy = e.key === 'C' && e.altKey && e.shiftKey;
32826
33443
  const formatPainterPaste = e.key === 'V' && e.altKey && e.shiftKey;
32827
33444
  if ((!formatPainterCopy && !formatPainterPaste) && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys) || (this.editorMode === 'Markdown'
32828
- && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) && !this.inlineMode.enable) {
33445
+ && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) || (this.autoSaveOnIdle && Browser.isDevice) && !this.inlineMode.enable) {
32829
33446
  this.formatter.onKeyHandler(this, e);
32830
33447
  }
32831
33448
  if (this.inputElement && this.inputElement.textContent.length !== 0
@@ -32921,60 +33538,6 @@ let RichTextEditor = class RichTextEditor extends Component {
32921
33538
  return;
32922
33539
  }
32923
33540
  }
32924
- if (e.detail === 3) {
32925
- const range = this.getRange();
32926
- const selection = this.formatter.editorManager.domNode.getSelection();
32927
- // To handle the triple click node selection improper range due to browser behavior.
32928
- if (selection.rangeCount > 0 && !isNullOrUndefined(range.startContainer.parentElement) && (!isNullOrUndefined(range.startContainer.parentElement.nextSibling) &&
32929
- (range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
32930
- /\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
32931
- || range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
32932
- const newRange = new Range();
32933
- let start = range.startContainer;
32934
- let end = range.endContainer;
32935
- let isInvalid = false;
32936
- const isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
32937
- || range.commonAncestorContainer.nodeName === 'LI';
32938
- if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
32939
- end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
32940
- }
32941
- else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
32942
- if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
32943
- end = end.previousElementSibling.lastElementChild;
32944
- }
32945
- else {
32946
- end = closest(end.parentElement, 'li');
32947
- if (end && end.nodeName === 'LI') {
32948
- end = end.previousElementSibling;
32949
- }
32950
- }
32951
- }
32952
- else {
32953
- if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
32954
- end.previousElementSibling.textContent.trim().length > 0) {
32955
- end = end.previousElementSibling.lastChild;
32956
- }
32957
- else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
32958
- end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
32959
- }
32960
- }
32961
- if (!end || end === this.inputElement) {
32962
- end = start;
32963
- isInvalid = true;
32964
- }
32965
- while (end.nodeName !== '#text' && !isInvalid) {
32966
- if (end.lastElementChild) {
32967
- end = end.lastElementChild;
32968
- }
32969
- else {
32970
- end = end.lastChild;
32971
- }
32972
- }
32973
- newRange.setStart(start, 0);
32974
- newRange.setEnd(end, end.textContent.length);
32975
- this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
32976
- }
32977
- }
32978
33541
  this.notifyMouseUp(e);
32979
33542
  }
32980
33543
  /**
@@ -33015,10 +33578,10 @@ let RichTextEditor = class RichTextEditor extends Component {
33015
33578
  requestType: 'Paste'
33016
33579
  };
33017
33580
  this.trigger(actionBegin, evenArgs, (pasteArgs) => {
33018
- const currentLength = this.inputElement.textContent.length;
33581
+ const currentLength = this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
33019
33582
  const selectionLength = this.getSelection().length;
33020
33583
  const pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
33021
- ? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
33584
+ ? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
33022
33585
  const totalLength = (currentLength - selectionLength) + pastedContentLength;
33023
33586
  if (this.editorMode === 'Markdown') {
33024
33587
  const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
@@ -34093,6 +34656,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34093
34656
  addClass([this.element], [CLS_FOCUS]);
34094
34657
  this.preventDefaultResize(e);
34095
34658
  this.notify(mouseDown, { args: e });
34659
+ this.formatter.editorManager.observer.notify(mouseDown, { args: e });
34096
34660
  this.clickPoints = { clientX: touch.clientX, clientY: touch.clientY };
34097
34661
  }
34098
34662
  preventImgResize(e) {
@@ -34254,6 +34818,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34254
34818
  detach(item[i]);
34255
34819
  }
34256
34820
  }
34821
+ this.removeSelectionClassStates(valueElementWrapper);
34257
34822
  return valueElementWrapper.innerHTML;
34258
34823
  }
34259
34824
  updateStatus(e) {
@@ -34301,6 +34866,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34301
34866
  }
34302
34867
  if (this.isBlur && isNullOrUndefined(trg)) {
34303
34868
  removeClass([this.element], [CLS_FOCUS]);
34869
+ this.removeSelectionClassStates(this.inputElement);
34304
34870
  this.notify(focusChange, {});
34305
34871
  const value = this.getUpdatedValue();
34306
34872
  this.setProperties({ value: value });
@@ -34473,7 +35039,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34473
35039
  restrict(e) {
34474
35040
  if (this.maxLength >= 0) {
34475
35041
  const element = this.editorMode === 'Markdown' ? this.contentModule.getText() :
34476
- (e && e.currentTarget.textContent);
35042
+ (this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, ''));
34477
35043
  if (!element) {
34478
35044
  return;
34479
35045
  }
@@ -34623,6 +35189,21 @@ let RichTextEditor = class RichTextEditor extends Component {
34623
35189
  }
34624
35190
  }
34625
35191
  }
35192
+ removeSelectionClassStates(element) {
35193
+ const classNames = [CLS_IMG_FOCUS, CLS_TABLE_SEL, CLS_VID_FOCUS, CLS_AUD_FOCUS];
35194
+ for (let i = 0; i < classNames.length; i++) {
35195
+ const item = element.querySelectorAll('.' + classNames[i]);
35196
+ removeClass(item, classNames[i]);
35197
+ if (item.length === 0) {
35198
+ continue;
35199
+ }
35200
+ for (let j = 0; j < item.length; j++) {
35201
+ if (item[j].classList.length === 0) {
35202
+ item[j].removeAttribute('class');
35203
+ }
35204
+ }
35205
+ }
35206
+ }
34626
35207
  };
34627
35208
  __decorate$1([
34628
35209
  Complex({}, ToolbarSettings$1)
@@ -34926,5 +35507,5 @@ RichTextEditor = __decorate$1([
34926
35507
  * Rich Text Editor component exported items
34927
35508
  */
34928
35509
 
34929
- export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, updateValueOnIdle, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS };
35510
+ export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, getTooltipTextDropdownItems, getQuickToolbarTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
34930
35511
  //# sourceMappingURL=ej2-richtexteditor.es2015.js.map