@syncfusion/ej2-richtexteditor 24.1.47 → 24.2.4

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 (106) hide show
  1. package/CHANGELOG.md +30 -2
  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 +832 -209
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +835 -203
  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.d.ts +6 -0
  16. package/src/common/util.js +58 -20
  17. package/src/editor-manager/base/constant.d.ts +6 -0
  18. package/src/editor-manager/base/constant.js +6 -0
  19. package/src/editor-manager/base/editor-manager.d.ts +5 -0
  20. package/src/editor-manager/base/editor-manager.js +59 -0
  21. package/src/editor-manager/base/interface.d.ts +8 -0
  22. package/src/editor-manager/plugin/dom-node.js +3 -1
  23. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  24. package/src/editor-manager/plugin/inserthtml.js +7 -2
  25. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -0
  26. package/src/editor-manager/plugin/ms-word-clean-up.js +39 -10
  27. package/src/editor-manager/plugin/selection-commands.js +16 -0
  28. package/src/editor-manager/plugin/table.d.ts +0 -1
  29. package/src/editor-manager/plugin/table.js +14 -26
  30. package/src/editor-manager/plugin/undo.d.ts +1 -0
  31. package/src/editor-manager/plugin/undo.js +21 -1
  32. package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -0
  33. package/src/rich-text-editor/actions/base-toolbar.js +8 -4
  34. package/src/rich-text-editor/actions/count.js +1 -1
  35. package/src/rich-text-editor/actions/dropdown-buttons.js +21 -2
  36. package/src/rich-text-editor/actions/emoji-picker.js +1 -1
  37. package/src/rich-text-editor/actions/full-screen.js +1 -0
  38. package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
  39. package/src/rich-text-editor/actions/html-editor.js +88 -4
  40. package/src/rich-text-editor/actions/keyboard.js +3 -1
  41. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
  42. package/src/rich-text-editor/actions/paste-clean-up.js +32 -4
  43. package/src/rich-text-editor/actions/toolbar.d.ts +2 -1
  44. package/src/rich-text-editor/base/constant.d.ts +25 -0
  45. package/src/rich-text-editor/base/constant.js +194 -0
  46. package/src/rich-text-editor/base/interface.d.ts +6 -1
  47. package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
  48. package/src/rich-text-editor/base/rich-text-editor.js +34 -64
  49. package/src/rich-text-editor/base/util.d.ts +4 -0
  50. package/src/rich-text-editor/base/util.js +35 -1
  51. package/src/rich-text-editor/formatter/formatter.js +15 -4
  52. package/src/rich-text-editor/models/default-locale.js +17 -17
  53. package/src/rich-text-editor/models/items.js +2 -2
  54. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -0
  55. package/src/rich-text-editor/renderer/audio-module.js +13 -0
  56. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -0
  57. package/src/rich-text-editor/renderer/dialog-renderer.js +7 -0
  58. package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
  59. package/src/rich-text-editor/renderer/image-module.d.ts +1 -0
  60. package/src/rich-text-editor/renderer/image-module.js +20 -2
  61. package/src/rich-text-editor/renderer/link-module.js +10 -1
  62. package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
  63. package/src/rich-text-editor/renderer/table-module.js +22 -2
  64. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +1 -0
  65. package/src/rich-text-editor/renderer/toolbar-renderer.js +25 -3
  66. package/src/rich-text-editor/renderer/video-module.d.ts +3 -0
  67. package/src/rich-text-editor/renderer/video-module.js +54 -30
  68. package/src/selection/selection.js +3 -0
  69. package/styles/bootstrap-dark.css +44 -6
  70. package/styles/bootstrap.css +44 -6
  71. package/styles/bootstrap4.css +44 -6
  72. package/styles/bootstrap5-dark.css +44 -6
  73. package/styles/bootstrap5.css +44 -6
  74. package/styles/fabric-dark.css +44 -6
  75. package/styles/fabric.css +44 -6
  76. package/styles/fluent-dark.css +44 -6
  77. package/styles/fluent.css +44 -6
  78. package/styles/highcontrast-light.css +44 -6
  79. package/styles/highcontrast.css +44 -6
  80. package/styles/material-dark.css +44 -6
  81. package/styles/material.css +44 -6
  82. package/styles/material3-dark.css +58 -14
  83. package/styles/material3.css +58 -14
  84. package/styles/rich-text-editor/_layout.scss +39 -2
  85. package/styles/rich-text-editor/_material-definition.scss +0 -1
  86. package/styles/rich-text-editor/_material3-definition.scss +7 -7
  87. package/styles/rich-text-editor/_theme.scss +12 -5
  88. package/styles/rich-text-editor/bootstrap-dark.css +44 -6
  89. package/styles/rich-text-editor/bootstrap.css +44 -6
  90. package/styles/rich-text-editor/bootstrap4.css +44 -6
  91. package/styles/rich-text-editor/bootstrap5-dark.css +44 -6
  92. package/styles/rich-text-editor/bootstrap5.css +44 -6
  93. package/styles/rich-text-editor/fabric-dark.css +44 -6
  94. package/styles/rich-text-editor/fabric.css +44 -6
  95. package/styles/rich-text-editor/fluent-dark.css +44 -6
  96. package/styles/rich-text-editor/fluent.css +44 -6
  97. package/styles/rich-text-editor/highcontrast-light.css +44 -6
  98. package/styles/rich-text-editor/highcontrast.css +44 -6
  99. package/styles/rich-text-editor/material-dark.css +44 -6
  100. package/styles/rich-text-editor/material.css +44 -6
  101. package/styles/rich-text-editor/material3-dark.css +58 -14
  102. package/styles/rich-text-editor/material3.css +58 -14
  103. package/styles/rich-text-editor/tailwind-dark.css +44 -6
  104. package/styles/rich-text-editor/tailwind.css +44 -6
  105. package/styles/tailwind-dark.css +44 -6
  106. 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
  },
@@ -2474,11 +2668,11 @@ let defaultLocale = {
2474
2668
  'audioLayoutOption': 'Layout option',
2475
2669
  'videoLayoutOption': 'Layout option',
2476
2670
  'align': 'Align',
2477
- 'caption': 'Image Caption',
2671
+ 'caption': 'Caption',
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,22 +2724,22 @@ 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',
2538
2732
  'cellspacing': 'Cell Spacing',
2539
2733
  'columns': 'Number of columns',
2540
2734
  'rows': 'Number of rows',
2541
- 'tableRows': 'Table Rows',
2542
- 'tableColumns': 'Table Columns',
2735
+ 'tableRows': 'Row',
2736
+ 'tableColumns': 'Column',
2543
2737
  'tableCellHorizontalAlign': 'Table Cell Horizontal Align',
2544
- 'tableCellVerticalAlign': 'Table Cell Vertical Align',
2738
+ 'tableCellVerticalAlign': 'Vertical Align',
2545
2739
  'createTable': 'Create Table',
2546
2740
  'removeTable': 'Remove Table',
2547
- 'tableHeader': 'Table Header',
2548
- 'tableRemove': 'Table Remove',
2741
+ 'tableHeader': 'Header Row',
2742
+ 'tableRemove': 'Delete',
2549
2743
  'tableCellBackground': 'Table Cell Background',
2550
2744
  'tableEditProperties': 'Table Edit Properties',
2551
2745
  'styles': 'Styles',
@@ -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++) {
@@ -7596,6 +7882,33 @@ function getDefaultMDTbStatus() {
7596
7882
  formats: null
7597
7883
  };
7598
7884
  }
7885
+ /**
7886
+ * @param {Range} range - specifies the range
7887
+ * @returns {void}
7888
+ * @hidden
7889
+ */
7890
+ function nestedListCleanUp(range) {
7891
+ if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
7892
+ range.extractContents();
7893
+ while ((range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('li :empty').length > 0 ||
7894
+ (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('ol :empty').length > 0) {
7895
+ let emptyLI = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll('li :empty');
7896
+ if (emptyLI.length > 0) {
7897
+ emptyLI.forEach((item) => {
7898
+ item.remove();
7899
+ });
7900
+ }
7901
+ }
7902
+ let liElem = (range.startContainer.nodeName === "#text" ? range.startContainer.parentElement : range.startContainer).querySelectorAll("li");
7903
+ if (liElem.length > 0) {
7904
+ liElem.forEach((item) => {
7905
+ if (item.firstChild.nodeName === "OL" || item.firstChild.nodeName === "UL") {
7906
+ item.style.listStyleType = "none";
7907
+ }
7908
+ });
7909
+ }
7910
+ }
7911
+ }
7599
7912
 
7600
7913
  /**
7601
7914
  * MarkdownToolbarStatus module for refresh the toolbar status
@@ -7838,6 +8151,12 @@ const FORMAT_PAINTER_ACTIONS = 'format_painter_actions';
7838
8151
  * @hidden
7839
8152
  */
7840
8153
  const EMOJI_PICKER_ACTIONS = 'emoji_picker_actions';
8154
+ /**
8155
+ * Mouse down event constant
8156
+ *
8157
+ * @hidden
8158
+ */
8159
+ const MOUSE_DOWN = 'mouseDown';
7841
8160
 
7842
8161
  /**
7843
8162
  * Formatter
@@ -7861,12 +8180,21 @@ class Formatter {
7861
8180
  const selection = self.contentModule.getDocument().getSelection();
7862
8181
  const range = (selection.rangeCount > 0) ? selection.getRangeAt(selection.rangeCount - 1) : null;
7863
8182
  let saveSelection;
8183
+ let newRange;
8184
+ if (!isNullOrUndefined(value) && !isNullOrUndefined(value.selection)) {
8185
+ newRange = value.selection.range;
8186
+ }
7864
8187
  const isKeyboardVideoInsert = (!isNullOrUndefined(value) && !isNullOrUndefined(value.cssClass) &&
7865
8188
  value.cssClass !== 'e-video-inline');
7866
8189
  if (self.editorMode === 'HTML') {
7867
8190
  if (!isNullOrUndefined(args) && !isKeyboardVideoInsert) {
7868
8191
  if (isNullOrUndefined(args.name) || (!isNullOrUndefined(args.name) && args.name !== 'showDialog')) {
7869
- saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
8192
+ if (newRange) {
8193
+ saveSelection = this.editorManager.nodeSelection.save(newRange, self.contentModule.getDocument());
8194
+ }
8195
+ else {
8196
+ saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
8197
+ }
7870
8198
  }
7871
8199
  }
7872
8200
  }
@@ -7894,7 +8222,7 @@ class Formatter {
7894
8222
  if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
7895
8223
  currentInsertContentLength = 1;
7896
8224
  }
7897
- const currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
8225
+ const currentLength = self.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
7898
8226
  const selectionLength = self.getSelection().length;
7899
8227
  const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
7900
8228
  if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
@@ -7958,7 +8286,9 @@ class Formatter {
7958
8286
  this.saveData();
7959
8287
  }
7960
8288
  self.isBlur = false;
7961
- self.contentModule.getEditPanel().focus();
8289
+ if (isNullOrUndefined(saveSelection) || isNullOrUndefined(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
8290
+ self.contentModule.getEditPanel().focus();
8291
+ }
7962
8292
  if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
7963
8293
  if (isNullOrUndefined(args.selectType) || (!isNullOrUndefined(args.selectType) && args.selectType !== 'showDialog')) {
7964
8294
  saveSelection.restore();
@@ -10422,6 +10752,12 @@ const CLEAR_TYPE = 'clear-type';
10422
10752
  * @hidden
10423
10753
  */
10424
10754
  const SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'param', 'source', 'track', 'wbr', 'iframe', 'td', 'table'];
10755
+ /**
10756
+ * Source
10757
+ *
10758
+ * @hidden
10759
+ */
10760
+ const PASTE_SOURCE = ['word', 'excel', 'onenote'];
10425
10761
 
10426
10762
  /**
10427
10763
  * `Selection` module is used to handle RTE Selections.
@@ -10512,6 +10848,9 @@ class NodeSelection {
10512
10848
  || this.isChildNode(nodeCollection, startNode))) {
10513
10849
  return null;
10514
10850
  }
10851
+ if (startNode.nodeType === 3 && startNode.previousSibling === endNode && endNode.nodeName === 'IMG') {
10852
+ return null;
10853
+ }
10515
10854
  if (nodeCollection.indexOf(startNode.firstChild) === -1 && startNode.firstChild && !this.isChildNode(nodeCollection, startNode)) {
10516
10855
  return startNode.firstChild;
10517
10856
  }
@@ -11435,7 +11774,9 @@ class DOMNode {
11435
11774
  else if (start.tagName === 'BR') {
11436
11775
  this.replaceWith(start, this.marker(className, this.encode(start.textContent)));
11437
11776
  const markerStart = range.startContainer.querySelector('.' + className);
11438
- markerStart.parentElement.appendChild(start);
11777
+ if (markerStart) {
11778
+ markerStart.parentElement.appendChild(start);
11779
+ }
11439
11780
  }
11440
11781
  else {
11441
11782
  if (start.tagName === 'IMG') {
@@ -13225,7 +13566,12 @@ class InsertHtml {
13225
13566
  lasNode.textContent.length : lasNode.childNodes.length);
13226
13567
  range = nodeSelection.getRange(docElement);
13227
13568
  }
13228
- range.extractContents();
13569
+ if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
13570
+ nestedListCleanUp(range);
13571
+ }
13572
+ else {
13573
+ range.extractContents();
13574
+ }
13229
13575
  if (insertNode.tagName === 'TABLE') {
13230
13576
  this.removeEmptyElements(editNode);
13231
13577
  }
@@ -15068,7 +15414,6 @@ class TableCommand {
15068
15414
  table.appendChild(tblBody);
15069
15415
  e.item.selection.restore();
15070
15416
  InsertHtml.Insert(this.parent.currentDocument, table, this.parent.editableElement);
15071
- this.removeEmptyNode();
15072
15417
  e.item.selection.setSelectionText(this.parent.currentDocument, table.querySelector('td'), table.querySelector('td'), 0, 0);
15073
15418
  if (table.nextElementSibling === null) {
15074
15419
  let insertElem;
@@ -15112,24 +15457,6 @@ class TableCommand {
15112
15457
  }
15113
15458
  return styleValue;
15114
15459
  }
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
15460
  insertAfter(newNode, referenceNode) {
15134
15461
  referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
15135
15462
  }
@@ -15477,14 +15804,21 @@ class TableCommand {
15477
15804
  }
15478
15805
  }
15479
15806
  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';
15807
+ let value = '';
15808
+ switch (e.item.subCommand) {
15809
+ case 'AlignTop':
15810
+ value = 'top';
15811
+ break;
15812
+ case 'AlignMiddle':
15813
+ value = 'middle';
15814
+ break;
15815
+ case 'AlignBottom':
15816
+ value = 'bottom';
15817
+ break;
15485
15818
  }
15486
- else {
15487
- e.item.tableCell.style.verticalAlign = 'bottom';
15819
+ e.item.tableCell.style.verticalAlign = value;
15820
+ if (value && value !== '' && e.item.tableCell.getAttribute('valign')) {
15821
+ e.item.tableCell.removeAttribute('valign');
15488
15822
  }
15489
15823
  if (e.callBack) {
15490
15824
  e.callBack({
@@ -16233,6 +16567,22 @@ class SelectionCommands {
16233
16567
  const nodeCutter = new NodeCutter();
16234
16568
  const isFormatted = new IsFormatted();
16235
16569
  let range = domSelection.getRange(docElement);
16570
+ if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer === range.endContainer && !isNullOrUndefined(endNode) && range.startContainer === endNode) {
16571
+ const startChildNodes = range.startContainer.childNodes;
16572
+ const startNode = ((startChildNodes[(range.startOffset > 0) ? (range.startOffset - 1) :
16573
+ range.startOffset]) || range.startContainer);
16574
+ const endNode = (range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) :
16575
+ range.endOffset] || range.endContainer);
16576
+ let lastSelectionNode = (endNode.lastChild.nodeName === 'BR' ? (isNullOrUndefined(endNode.lastChild.previousSibling) ? endNode
16577
+ : endNode.lastChild.previousSibling) : endNode.firstChild);
16578
+ while (!isNullOrUndefined(lastSelectionNode) && lastSelectionNode.nodeName !== '#text' && lastSelectionNode.nodeName !== 'IMG' &&
16579
+ lastSelectionNode.nodeName !== 'BR' && lastSelectionNode.nodeName !== 'HR') {
16580
+ lastSelectionNode = lastSelectionNode.lastChild;
16581
+ }
16582
+
16583
+ domSelection.setSelectionText(docElement, startNode, lastSelectionNode, 0, 0);
16584
+ range = domSelection.getRange(docElement);
16585
+ }
16236
16586
  const save = domSelection.save(range, docElement);
16237
16587
  const nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
16238
16588
  domSelection.getSelectionNodeCollectionBr(range);
@@ -17452,6 +17802,25 @@ class UndoRedoManager {
17452
17802
  }
17453
17803
  return textContent;
17454
17804
  }
17805
+ isElementStructureEqual(previousFragment, currentFragment) {
17806
+ if (previousFragment.childNodes.length !== currentFragment.childNodes.length) {
17807
+ return false;
17808
+ }
17809
+ for (let i = 0; i < previousFragment.childNodes.length; i++) {
17810
+ const previousFragmentNode = previousFragment.childNodes[i];
17811
+ const currentFragmentNode = currentFragment.childNodes[i];
17812
+ if (!previousFragmentNode || !currentFragmentNode) {
17813
+ return false;
17814
+ }
17815
+ if (previousFragmentNode.nodeType !== currentFragmentNode.nodeType) {
17816
+ return false;
17817
+ }
17818
+ if (previousFragmentNode.outerHTML !== currentFragmentNode.outerHTML) {
17819
+ return false;
17820
+ }
17821
+ }
17822
+ return true;
17823
+ }
17455
17824
  /**
17456
17825
  * RTE collection stored html format.
17457
17826
  *
@@ -17488,7 +17857,8 @@ class UndoRedoManager {
17488
17857
  (this.undoRedoStack[this.undoRedoStack.length - 1].range.endOffset === save.range.endOffset) &&
17489
17858
  (this.undoRedoStack[this.undoRedoStack.length - 1].range.range.startContainer === save.range.startContainer) &&
17490
17859
  (this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length - 1].text).trim() ===
17491
- this.getTextContentFromFragment(changEle.text).trim())) {
17860
+ this.getTextContentFromFragment(changEle.text).trim()) &&
17861
+ this.isElementStructureEqual(this.undoRedoStack[this.undoRedoStack.length - 1].text, changEle.text)) {
17492
17862
  return;
17493
17863
  }
17494
17864
  this.undoRedoStack.push(changEle);
@@ -17650,6 +18020,7 @@ class MsWordPaste {
17650
18020
  const pattern4 = /style='mso-width-source:/i;
17651
18021
  if (patern.test(tempHTMLContent) || patern2.test(tempHTMLContent) || patern3.test(tempHTMLContent) ||
17652
18022
  pattern4.test(tempHTMLContent)) {
18023
+ const source = this.findSource(elm);
17653
18024
  this.imageConversion(elm, rtfData);
17654
18025
  tempHTMLContent = tempHTMLContent.replace(/<img[^>]+>/i, '');
17655
18026
  this.addListClass(elm);
@@ -17670,16 +18041,8 @@ class MsWordPaste {
17670
18041
  if (pattern4.test(tempHTMLContent)) {
17671
18042
  this.addTableBorderClass(elm);
17672
18043
  }
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);
18044
+ this.processMargin(elm);
18045
+ e.callBack(elm.innerHTML, this.cropImageDimensions, source);
17683
18046
  }
17684
18047
  else {
17685
18048
  e.callBack(elm.innerHTML);
@@ -18513,6 +18876,25 @@ class MsWordPaste {
18513
18876
  }
18514
18877
  this.listContents.push(elem.innerHTML);
18515
18878
  }
18879
+ processMargin(element) {
18880
+ const liChildren = element.querySelectorAll('li');
18881
+ if (liChildren.length > 0) {
18882
+ for (let i = 0; i < liChildren.length; i++) {
18883
+ if (!isNullOrUndefined((liChildren[i]).style.marginLeft)) {
18884
+ (liChildren[i]).style.marginLeft = '';
18885
+ }
18886
+ }
18887
+ }
18888
+ const tableChildren = element.querySelectorAll('table');
18889
+ if (tableChildren.length > 0) {
18890
+ for (let i = 0; i < tableChildren.length; i++) {
18891
+ if (!isNullOrUndefined((tableChildren[i]).style.marginLeft) &&
18892
+ (tableChildren[i]).style.marginLeft.indexOf('-') >= 0) {
18893
+ (tableChildren[i]).style.marginLeft = '';
18894
+ }
18895
+ }
18896
+ }
18897
+ }
18516
18898
  removeEmptyAnchorTag(element) {
18517
18899
  const removableElement = element.querySelectorAll('a:not([href])');
18518
18900
  for (let j = removableElement.length - 1; j >= 0; j--) {
@@ -18523,6 +18905,22 @@ class MsWordPaste {
18523
18905
  parentElem.removeChild(removableElement[j]);
18524
18906
  }
18525
18907
  }
18908
+ findSource(element) {
18909
+ const metaNodes = element.querySelectorAll('meta');
18910
+ for (let i = 0; i < metaNodes.length; i++) {
18911
+ const metaNode = metaNodes[i];
18912
+ const content = metaNode.getAttribute('content');
18913
+ const name = metaNode.getAttribute('name');
18914
+ if (name && name.toLowerCase().indexOf('generator') >= 0 && content && content.toLowerCase().indexOf('microsoft') >= 0) {
18915
+ for (let j = 0; j < PASTE_SOURCE.length; j++) {
18916
+ if (content.toLowerCase().indexOf(PASTE_SOURCE[j]) >= 0) {
18917
+ return PASTE_SOURCE[j];
18918
+ }
18919
+ }
18920
+ }
18921
+ }
18922
+ return 'html';
18923
+ }
18526
18924
  }
18527
18925
 
18528
18926
  /**
@@ -19156,7 +19554,7 @@ class FormatPainterActions {
19156
19554
  }
19157
19555
  copyAction() {
19158
19556
  const copyCollection = [];
19159
- const range = this.parent.nodeSelection.getRange(document);
19557
+ const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
19160
19558
  const domSelection = this.parent.nodeSelection;
19161
19559
  let nodes = range.collapsed ? domSelection.getSelectionNodeCollection(range) :
19162
19560
  domSelection.getSelectionNodeCollectionBr(range);
@@ -19648,6 +20046,7 @@ class EditorManager {
19648
20046
  this.observer.on(MODEL_CHANGED, this.onPropertyChanged, this);
19649
20047
  this.observer.on(MS_WORD_CLEANUP, this.onWordPaste, this);
19650
20048
  this.observer.on(ON_BEGIN, this.onBegin, this);
20049
+ this.observer.on(MOUSE_DOWN, this.editorMouseDown, this);
19651
20050
  }
19652
20051
  onWordPaste(e) {
19653
20052
  this.observer.notify(MS_WORD_CLEANUP_PLUGIN, e);
@@ -19791,6 +20190,64 @@ class EditorManager {
19791
20190
  event: event, callBack: callBack });
19792
20191
  }
19793
20192
  }
20193
+ editorMouseDown(e) {
20194
+ if (e.args.detail === 3) {
20195
+ this.tripleClickSelection(e.args);
20196
+ }
20197
+ }
20198
+ tripleClickSelection(e) {
20199
+ const range = this.nodeSelection.getRange(this.currentDocument);
20200
+ const selection = this.nodeSelection.get(this.currentDocument);
20201
+ if (selection.rangeCount > 0 && selection.toString() !== '') {
20202
+ const startBlockNode = this.getParentBlockNode(range.startContainer);
20203
+ const endBlockNode = this.getParentBlockNode(range.endContainer);
20204
+ if (startBlockNode && endBlockNode && startBlockNode === endBlockNode) {
20205
+ const newRange = this.currentDocument.createRange();
20206
+ const startTextNode = this.getFirstTextNode(startBlockNode);
20207
+ const endTextNode = this.getLastTextNode(endBlockNode);
20208
+ if (startTextNode && endTextNode) {
20209
+ newRange.setStart(startTextNode, 0);
20210
+ newRange.setEnd(endTextNode, endTextNode.textContent.length);
20211
+ this.nodeSelection.setRange(this.currentDocument, newRange);
20212
+ e.preventDefault();
20213
+ }
20214
+ }
20215
+ }
20216
+ }
20217
+ getParentBlockNode(node) {
20218
+ let treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
20219
+ NodeFilter.SHOW_ELEMENT, // whatToShow
20220
+ {
20221
+ acceptNode: function (currentNode) {
20222
+ // Check if the node is a block element
20223
+ let displayStyle = window.getComputedStyle(currentNode).display;
20224
+ if (displayStyle.indexOf('inline') < 0) {
20225
+ return NodeFilter.FILTER_ACCEPT;
20226
+ }
20227
+ else {
20228
+ return NodeFilter.FILTER_SKIP;
20229
+ }
20230
+ }
20231
+ });
20232
+ treeWalker.currentNode = node;
20233
+ let blockParent = treeWalker.parentNode();
20234
+ return blockParent;
20235
+ }
20236
+ getLastTextNode(node) {
20237
+ let treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
20238
+ let lastTextNode = null;
20239
+ let currentNode = treeWalker.nextNode();
20240
+ while (currentNode) {
20241
+ lastTextNode = currentNode;
20242
+ currentNode = treeWalker.nextNode();
20243
+ }
20244
+ return lastTextNode;
20245
+ }
20246
+ getFirstTextNode(node) {
20247
+ let treeWalker = this.currentDocument.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
20248
+ let firstTextNode = treeWalker.nextNode();
20249
+ return firstTextNode;
20250
+ }
19794
20251
  }
19795
20252
 
19796
20253
  /**
@@ -20009,12 +20466,12 @@ const IFRAMEHEADER = `
20009
20466
  display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
20010
20467
  .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}
20011
20468
  img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
20012
- span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
20469
+ span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;
20013
20470
  background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
20014
- .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
20015
- .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
20471
+ .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }
20472
+ .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;
20016
20473
  border-radius: 15px; height: 20px; width: 20px; }
20017
- .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
20474
+ .e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }
20018
20475
  .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
20019
20476
  .e-img-caption .e-img-inner { outline: 0; }
20020
20477
  .e-img-caption a:focus-visible { outline: none; }
@@ -20364,6 +20821,7 @@ class HtmlEditor {
20364
20821
  this.parent.on(readOnlyMode, this.updateReadOnly, this);
20365
20822
  this.parent.on(paste, this.onPaste, this);
20366
20823
  this.parent.on(tableclass, this.isTableClassAdded, this);
20824
+ this.parent.on(onHandleFontsizeChange, this.onHandleFontsizeChange, this);
20367
20825
  }
20368
20826
  updateReadOnly() {
20369
20827
  if (this.parent.readonly) {
@@ -20382,7 +20840,9 @@ class HtmlEditor {
20382
20840
  }
20383
20841
  onSelectionRestore(e) {
20384
20842
  this.parent.isBlur = false;
20385
- this.contentRenderer.getEditPanel().focus();
20843
+ 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")) {
20844
+ this.contentRenderer.getEditPanel().focus();
20845
+ }
20386
20846
  if (isNullOrUndefined(e.items) || e.items) {
20387
20847
  this.saveSelection.restore();
20388
20848
  }
@@ -20390,11 +20850,85 @@ class HtmlEditor {
20390
20850
  isTableClassAdded() {
20391
20851
  const tableElement = this.parent.inputElement.querySelectorAll('table');
20392
20852
  for (let i = 0; i < tableElement.length; i++) {
20393
- if (!tableElement[i].classList.contains('e-rte-table')) {
20853
+ if (!tableElement[i].classList.contains('e-rte-table') && !tableElement[i].classList.contains('e-rte-paste-table')) {
20394
20854
  tableElement[i].classList.add('e-rte-table');
20395
20855
  }
20396
20856
  }
20397
20857
  }
20858
+ onHandleFontsizeChange(e) {
20859
+ const keyboardArgs = e.args;
20860
+ const args = { name: 'dropDownSelect' };
20861
+ args.item = {
20862
+ command: 'Font',
20863
+ subCommand: 'FontSize'
20864
+ };
20865
+ const items = this.parent.fontSize.items;
20866
+ let activeElem;
20867
+ if (this.parent.toolbarModule && this.parent.toolbarModule.dropDownModule &&
20868
+ this.parent.toolbarModule.dropDownModule.fontSizeDropDown && !isNullOrUndefined(this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent) && this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent !== '') {
20869
+ activeElem = this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent;
20870
+ }
20871
+ else {
20872
+ let fontSizeValue;
20873
+ const selection = this.parent.contentModule.getDocument().getSelection();
20874
+ if (selection && selection.focusNode && selection.focusNode.parentElement) {
20875
+ fontSizeValue = document.defaultView.getComputedStyle(selection.focusNode.parentElement, null).getPropertyValue('font-size');
20876
+ }
20877
+ else {
20878
+ fontSizeValue = this.parent.fontSize.width;
20879
+ }
20880
+ fontSizeValue = isNullOrUndefined(fontSizeValue) ? this.parent.fontSize.width : fontSizeValue;
20881
+ const actualTxtFontValues = fontSizeValue.match(/^([\d.]+)(\D+)$/);
20882
+ const size = parseInt(actualTxtFontValues[1], 10);
20883
+ const unit = actualTxtFontValues[2];
20884
+ const defaultFontValues = items[0].value.match(/^([\d.]+)(\D+)$/);
20885
+ if (defaultFontValues[2] === unit) {
20886
+ const index = items.findIndex(({ value }) => parseInt(value, 10) >= size);
20887
+ activeElem = items[index].text;
20888
+ }
20889
+ else {
20890
+ const convertedSize = this.convertFontSize(size, unit, defaultFontValues[2]);
20891
+ const index = items.findIndex(({ value }) => parseInt(value, 10) >= convertedSize);
20892
+ activeElem = items[index].text;
20893
+ }
20894
+ }
20895
+ const fontIndex = items.findIndex((size) => size.text === activeElem);
20896
+ if (keyboardArgs.action === 'increase-fontsize' && fontIndex !== -1) {
20897
+ if (fontIndex >= items.length - 1) {
20898
+ const fontValues = items[fontIndex].value.match(/^([\d.]+)(\D+)$/);
20899
+ if (fontValues) {
20900
+ const size = parseInt(fontValues[1], 10);
20901
+ const unit = fontValues[2];
20902
+ const roundedSize = size % 10 === 0 ? Math.ceil((size + 1) / 10) * 10 : Math.ceil(size / 10) * 10;
20903
+ args.item.value = roundedSize.toLocaleString() + unit;
20904
+ args.item.text = roundedSize.toLocaleString() + ' ' + unit;
20905
+ }
20906
+ this.parent.fontSize.items.push(args.item);
20907
+ }
20908
+ else {
20909
+ args.item.value = items[fontIndex + 1].value;
20910
+ args.item.text = items[fontIndex + 1].text;
20911
+ }
20912
+ }
20913
+ else if (keyboardArgs.action === 'decrease-fontsize' && fontIndex !== -1 && fontIndex > 0) {
20914
+ args.item.value = items[fontIndex - 1].value;
20915
+ args.item.text = items[fontIndex - 1].text;
20916
+ }
20917
+ else {
20918
+ if (fontIndex >= 0 && fontIndex < items.length && items[fontIndex]) {
20919
+ args.item.value = items[fontIndex].value;
20920
+ args.item.text = items[fontIndex].text;
20921
+ }
20922
+ }
20923
+ this.parent.formatter.process(this.parent, args, keyboardArgs);
20924
+ }
20925
+ convertFontSize(value, originalUnit, targetUnit) {
20926
+ if (supportedUnits.indexOf(originalUnit) !== -1 || supportedUnits.indexOf(targetUnit) !== -1) {
20927
+ originalUnit = 'px';
20928
+ }
20929
+ const convertedValue = value * conversionFactors[originalUnit][targetUnit];
20930
+ return convertedValue;
20931
+ }
20398
20932
  onKeyUp(e) {
20399
20933
  const args = e.args;
20400
20934
  const restrictKeys = [8, 9, 13, 16, 17, 18, 20, 27, 37, 38, 39, 40, 44, 45, 46, 91,
@@ -20515,7 +21049,7 @@ class HtmlEditor {
20515
21049
  e.args.keyCode === 13) {
20516
21050
  this.spaceLink(e.args);
20517
21051
  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;
21052
+ const currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
20519
21053
  const selectionLength = this.parent.getSelection().length;
20520
21054
  const totalLength = (currentLength - selectionLength) + 1;
20521
21055
  if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
@@ -20677,7 +21211,7 @@ class HtmlEditor {
20677
21211
  let liElement;
20678
21212
  let rootElement;
20679
21213
  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' &&
21214
+ 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
21215
  currentRange.startContainer.parentElement.tagName !== 'TH') {
20682
21216
  this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
20683
21217
  if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
@@ -21277,7 +21811,8 @@ class PasteCleanup {
21277
21811
  args: e.args,
21278
21812
  text: e.text,
21279
21813
  allowedStylePropertiesArray: this.parent.pasteCleanupSettings.allowedStyleProps,
21280
- callBack: (a, cropImageData) => {
21814
+ callBack: (a, cropImageData, pasteTableSource) => {
21815
+ args.pasteTableSource = pasteTableSource;
21281
21816
  value = a.trim();
21282
21817
  this.cropImageData = cropImageData;
21283
21818
  }
@@ -21847,10 +22382,24 @@ class PasteCleanup {
21847
22382
  }
21848
22383
  this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, (updatedArgs) => { value = updatedArgs.value; });
21849
22384
  clipBoardElem.innerHTML = this.parent.addAnchorAriaLabel(value);
21850
- clipBoardElem = this.addTableClass(clipBoardElem);
22385
+ clipBoardElem = this.addTableClass(clipBoardElem, args.pasteTableSource);
21851
22386
  this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
21852
22387
  extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
21853
22388
  this.parent.formatter.onSuccess(this.parent, args);
22389
+ if (!isNullOrUndefined(returnArgs.elements) && !isNullOrUndefined(returnArgs.imgElem)) {
22390
+ const pasteContent = returnArgs.elements;
22391
+ const imageContent = returnArgs.imgElem;
22392
+ const lastElementChild = this.findLastElement(pasteContent[pasteContent.length - 1]);
22393
+ const isImageAtLast = !isNullOrUndefined(lastElementChild) ? lastElementChild.nodeName === 'IMG' : false;
22394
+ if (isImageAtLast || pasteContent[pasteContent.length - 1] === imageContent[imageContent.length - 1]) {
22395
+ this.parent.notify(insertCompleted, {
22396
+ args: args.event,
22397
+ type: 'Images',
22398
+ isNotify: true,
22399
+ elements: imageContent[imageContent.length - 1]
22400
+ });
22401
+ }
22402
+ }
21854
22403
  }, clipBoardElem, null, null, this.parent.enterKey);
21855
22404
  this.removeTempClass();
21856
22405
  this.parent.notify(toolbarRefresh, {});
@@ -21901,12 +22450,15 @@ class PasteCleanup {
21901
22450
  }
21902
22451
  }
21903
22452
  }
21904
- addTableClass(element) {
22453
+ addTableClass(element, source) {
21905
22454
  const tableElement = element.querySelectorAll('table');
21906
22455
  for (let i = 0; i < tableElement.length; i++) {
21907
- if (!tableElement[i].classList.contains('e-rte-table')) {
22456
+ if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
21908
22457
  tableElement[i].classList.add('e-rte-table');
21909
22458
  }
22459
+ else if (source && source !== 'html') {
22460
+ tableElement[i].classList.add('e-rte-paste-' + source + '-table');
22461
+ }
21910
22462
  }
21911
22463
  return element;
21912
22464
  }
@@ -22243,6 +22795,16 @@ class PasteCleanup {
22243
22795
  }
22244
22796
  return clipBoardElem;
22245
22797
  }
22798
+ findLastElement(element) {
22799
+ if (!isNullOrUndefined(element) && !isNullOrUndefined(element.lastElementChild)) {
22800
+ let lastChild = element.lastElementChild;
22801
+ while (lastChild && lastChild.lastElementChild) {
22802
+ lastChild = lastChild.lastElementChild;
22803
+ }
22804
+ return lastChild;
22805
+ }
22806
+ return null;
22807
+ }
22246
22808
  /**
22247
22809
  * For internal use only - Get the module name.
22248
22810
  *
@@ -22738,6 +23300,7 @@ class FullScreen {
22738
23300
  this.parent.toolbarModule.addFixedTBarClass();
22739
23301
  }
22740
23302
  }
23303
+ this.parent.refreshUI();
22741
23304
  this.parent.trigger(actionComplete, { requestType: 'Minimize', targetItem: 'Minimize', args: event });
22742
23305
  }
22743
23306
  });
@@ -23651,7 +24214,7 @@ class EmojiPicker {
23651
24214
  noEmojiObj.style.margin = '55px';
23652
24215
  emojipickerAll.appendChild(noEmojiObj);
23653
24216
  }
23654
- else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':')) {
24217
+ else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':') || (inputValue === '' && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'))) {
23655
24218
  emojipickerAll.removeChild(this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'));
23656
24219
  }
23657
24220
  emojipickerAll.appendChild(emojiBtnDiv);
@@ -24301,12 +24864,20 @@ class Link {
24301
24864
  }
24302
24865
  const target = (this.selfLink.checkBoxObj.checked) ? '_blank' : null;
24303
24866
  const linkLabel = (this.selfLink.checkBoxObj.checked) ? this.selfLink.i10n.getConstant('linkAriaLabel') : null;
24867
+ if (this.selfLink.parent.editorMode === 'Markdown' && linkUrl === '') {
24868
+ linkUrl = 'http://';
24869
+ }
24304
24870
  if (linkUrl === '') {
24305
24871
  this.selfLink.checkUrl(true);
24306
24872
  return;
24307
24873
  }
24308
24874
  if (!this.selfLink.isUrl(linkUrl)) {
24309
- linkText = (linkText === '') ? linkUrl : linkText;
24875
+ if (this.selfLink.parent.editorMode === 'Markdown') {
24876
+ linkText = (linkText !== '') ? linkText : '';
24877
+ }
24878
+ else {
24879
+ linkText = (linkText === '') ? linkUrl : linkText;
24880
+ }
24310
24881
  if (!this.selfLink.parent.enableAutoUrl) {
24311
24882
  linkUrl = linkUrl.indexOf('http') > -1 ? linkUrl : 'http://' + linkUrl;
24312
24883
  }
@@ -24447,6 +25018,7 @@ class Link {
24447
25018
  this.parent.inlineMode.enable && !closest(target, '#' + this.dialogObj.element.id)) &&
24448
25019
  !closest(target, '#' + this.parent.getID() + '_toolbar_CreateLink') &&
24449
25020
  !target.querySelector('#' + this.parent.getID() + '_toolbar_CreateLink')))) {
25021
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
24450
25022
  this.dialogObj.hide({ returnValue: true });
24451
25023
  EventHandler.remove(this.parent.element.ownerDocument, 'mousedown', this.onDocumentClick);
24452
25024
  this.parent.isBlur = true;
@@ -25195,6 +25767,14 @@ class Image$1 {
25195
25767
  originalEvent.preventDefault();
25196
25768
  break;
25197
25769
  }
25770
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
25771
+ this.handleSelectAll();
25772
+ }
25773
+ }
25774
+ handleSelectAll() {
25775
+ this.cancelResizeAction();
25776
+ const imgFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_IMG_FOCUS);
25777
+ removeClass(imgFocusNodes, CLS_IMG_FOCUS);
25198
25778
  }
25199
25779
  openDialog(isInternal, event, selection, ele, parentEle) {
25200
25780
  let range;
@@ -25363,10 +25943,12 @@ class Image$1 {
25363
25943
  this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());
25364
25944
  this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(), target);
25365
25945
  this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
25946
+ this.resizeStart(e.args, target);
25366
25947
  }, 400);
25367
25948
  }
25368
25949
  else {
25369
- this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
25950
+ const coordinates = target.getBoundingClientRect();
25951
+ this.quickToolObj.imageQTBar.showPopup(coordinates.left, coordinates.top, target, 'Image');
25370
25952
  }
25371
25953
  }
25372
25954
  }
@@ -25826,7 +26408,7 @@ class Image$1 {
25826
26408
  isModal: Browser.isDevice,
25827
26409
  buttons: [{
25828
26410
  click: this.insertImageUrl.bind(selectObj),
25829
- buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
26411
+ buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: this.parent.editorMode === 'Markdown' ? false : true }
25830
26412
  },
25831
26413
  {
25832
26414
  click: (e) => {
@@ -25932,6 +26514,7 @@ class Image$1 {
25932
26514
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
25933
26515
  }
25934
26516
  else {
26517
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
25935
26518
  this.dialogObj.hide({ returnValue: true });
25936
26519
  this.parent.isBlur = true;
25937
26520
  dispatchEvent(this.parent.element, 'focusout');
@@ -25992,6 +26575,10 @@ class Image$1 {
25992
26575
  }
25993
26576
  }
25994
26577
  });
26578
+ if (e.selectNode && e.selectNode[0].nodeName === 'IMG') {
26579
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
26580
+ this.inputUrl.value = e.selectNode[0].src.match(regex) ? e.selectNode[0].src : '';
26581
+ }
25995
26582
  imgUrl.appendChild(this.inputUrl);
25996
26583
  return imgUrl;
25997
26584
  }
@@ -25999,7 +26586,10 @@ class Image$1 {
25999
26586
  insertImageUrl(e) {
26000
26587
  const proxy = this.selfImage;
26001
26588
  proxy.isImgUploaded = false;
26002
- const url = proxy.inputUrl.value;
26589
+ let url = proxy.inputUrl.value;
26590
+ if (proxy.parent.editorMode === 'Markdown' && url === '') {
26591
+ url = 'http://';
26592
+ }
26003
26593
  if (proxy.parent.formatter.getUndoRedoStack().length === 0) {
26004
26594
  proxy.parent.formatter.saveData();
26005
26595
  }
@@ -26989,6 +27579,13 @@ class Audio {
26989
27579
  originalEvent.preventDefault();
26990
27580
  break;
26991
27581
  }
27582
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
27583
+ this.handleSelectAll();
27584
+ }
27585
+ }
27586
+ handleSelectAll() {
27587
+ const audioFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_AUD_FOCUS);
27588
+ removeClass(audioFocusNodes, CLS_AUD_FOCUS);
26992
27589
  }
26993
27590
  openDialog(isInternal, event, selection, ele, parentEle) {
26994
27591
  let range;
@@ -27129,6 +27726,7 @@ class Audio {
27129
27726
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
27130
27727
  }
27131
27728
  else {
27729
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
27132
27730
  this.dialogObj.hide({ returnValue: true });
27133
27731
  this.parent.isBlur = true;
27134
27732
  dispatchEvent(this.parent.element, 'focusout');
@@ -27387,6 +27985,11 @@ class Audio {
27387
27985
  }
27388
27986
  }
27389
27987
  });
27988
+ if (e.selectNode && this.isAudioElem(e.selectNode[0])) {
27989
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
27990
+ const sourceElement = e.selectNode[0].querySelector('source');
27991
+ this.inputUrl.value = sourceElement.src.match(regex) ? sourceElement.src : '';
27992
+ }
27390
27993
  audioUrl.appendChild(this.inputUrl);
27391
27994
  return audioUrl;
27392
27995
  }
@@ -27602,6 +28205,7 @@ class Video {
27602
28205
  this.isAllowedTypes = true;
27603
28206
  this.pageX = null;
27604
28207
  this.pageY = null;
28208
+ this.mouseX = null;
27605
28209
  this.deletedVid = [];
27606
28210
  this.parent = parent;
27607
28211
  this.rteID = parent.element.id;
@@ -27998,62 +28602,50 @@ class Video {
27998
28602
  if (isNullOrUndefined(vidEleStyle)) {
27999
28603
  return;
28000
28604
  }
28001
- // eslint-disable-next-line
28002
- const width = vidEleStyle.width !== '' ? vidEleStyle.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(vidEleStyle.width) :
28605
+ /* eslint-disable */
28606
+ let width = vidEleStyle.width !== '' ? vidEleStyle.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(vidEleStyle.width) :
28003
28607
  parseInt(vidEleStyle.width, 10) : vid.style.width !== '' ? vid.style.width : vid.width;
28004
- const height = vidEleStyle.height !== '' ? parseInt(vidEleStyle.height, 10) : vid.style.height !== '' ? vid.style.height : vid.height;
28608
+ let height = vidEleStyle.height !== '' ? parseInt(vidEleStyle.height, 10) : vid.style.height !== '' ? vid.style.height : vid.height;
28609
+ width = width.toString().match(/\b\d+(\.\d*)?(%|$)\b/g) ? parseFloat(width.toString()) : parseInt(width.toString(), 10);
28610
+ height = height.toString().match(/\b\d+(\.\d*)?(%|$)\b/g) ? parseFloat(height.toString()) : parseInt(height.toString(), 10);
28611
+ /* eslint-enable */
28005
28612
  if (width > height) {
28006
28613
  vid.style.minWidth = this.parent.insertVideoSettings.minWidth === 0 ? '200px' : formatUnit(this.parent.insertVideoSettings.minWidth);
28007
28614
  vid.style.minHeight = this.parent.insertVideoSettings.minHeight === 0 ? '90px' : formatUnit(this.parent.insertVideoSettings.minHeight);
28008
28615
  if (this.parent.insertVideoSettings.resizeByPercent) {
28009
- if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28010
- const percentageValue = this.pixToPerc((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY), (vid.previousElementSibling || vid.parentElement));
28011
- vid.style.width = Math.min(Math.round((percentageValue / vid.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
28012
- }
28013
- else {
28014
- vid.style.width = this.pixToPerc(parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY, (vid.previousElementSibling || vid.parentElement)) + '%';
28015
- }
28016
- vid.style.height = null;
28017
- vid.removeAttribute('height');
28616
+ this.updateVidEleWidth(vid, width, height, expectedX, expectedY);
28018
28617
  }
28019
28618
  else if ((vid.style.width === '' && vid.style.height !== '') || (vidEleStyle.width === '' && vidEleStyle.height !== '')) {
28020
28619
  vid.style.height = expectedY + 'px';
28021
28620
  }
28022
28621
  else if ((vid.style.width !== '' && vid.style.height === '') || (vidEleStyle.width !== '' && vidEleStyle.height === '')) {
28023
- const currentWidth = ((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) +
28024
- parseInt(width.toString(), 10) / parseInt(height.toString(), 10)) <
28622
+ const currentWidth = ((width / height * expectedY) +
28623
+ width / height) <
28025
28624
  (this.parent.inputElement.getBoundingClientRect().right - 32) ?
28026
- ((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) +
28027
- parseInt(width.toString(), 10) / parseInt(height.toString(), 10)) :
28625
+ ((width / height * expectedY) +
28626
+ width / height) :
28028
28627
  (this.parent.inputElement.getBoundingClientRect().right - 32);
28029
28628
  vid.style.width = currentWidth.toString() + 'px';
28030
28629
  }
28031
28630
  else if (vid.style.width !== '' || vidEleStyle.width !== '') {
28032
- const currentWidth = (parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) <
28631
+ const currentWidth = (width / height * expectedY) <
28033
28632
  (this.parent.inputElement.getBoundingClientRect().right - 32) ?
28034
- (parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) :
28633
+ (width / height * expectedY) :
28035
28634
  (this.parent.inputElement.getBoundingClientRect().right - 32);
28036
28635
  vid.style.width = currentWidth + 'px';
28037
28636
  vid.style.height = expectedY + 'px';
28038
28637
  }
28039
28638
  else {
28040
- vid.setAttribute('width', (parseInt(((parseInt(width.toString(), 10) / parseInt(height.toString(), 10) * expectedY) + parseInt(width.toString(), 10) / parseInt(height.toString(), 10)).toString(), 10)).toString());
28639
+ vid.setAttribute('width', (parseInt(((width / height * expectedY) + width / height).toString(), 10)).toString());
28041
28640
  }
28042
28641
  }
28043
28642
  else if (height > width) {
28044
28643
  if (this.parent.insertVideoSettings.resizeByPercent) {
28045
- if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28046
- vid.style.width = Math.min(Math.round((parseInt(width.toString(), 10) / vid.getBoundingClientRect().width) * expectedX * 100) / 100, 100) + '%';
28047
- }
28048
- else {
28049
- vid.style.width = this.pixToPerc((expectedX / parseInt(height.toString(), 10) * expectedY), (vid.previousElementSibling || vid.parentElement)) + '%';
28050
- }
28051
- vid.style.height = null;
28052
- vid.removeAttribute('height');
28644
+ this.updateVidEleWidth(vid, width, height, expectedX, expectedY);
28053
28645
  }
28054
28646
  else if (vid.style.width !== '' || vidEleStyle.width !== '') {
28055
28647
  vid.style.width = expectedX + 'px';
28056
- vid.style.height = (parseInt(height.toString(), 10) / parseInt(width.toString(), 10) * expectedX) + 'px';
28648
+ vid.style.height = (height / width * expectedX) + 'px';
28057
28649
  }
28058
28650
  else {
28059
28651
  vid.setAttribute('width', this.resizeBtnStat.botRight ? (this.getPointX(e.event) - vid.getBoundingClientRect().left).toString() : expectedX.toString());
@@ -28071,6 +28663,23 @@ class Video {
28071
28663
  }
28072
28664
  }
28073
28665
  }
28666
+ updateVidEleWidth(vid, width, height, expectedX, expectedY) {
28667
+ if (parseInt('' + vid.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
28668
+ const original = vid.offsetWidth + this.mouseX;
28669
+ const finalWidthByPerc = (original / vid.offsetWidth) * (parseFloat(vid.style.width).toString() === 'NaN' ? (vid.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(vid.style.width));
28670
+ vid.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
28671
+ }
28672
+ else {
28673
+ if (width > height) {
28674
+ vid.style.width = this.pixToPerc(width / height * expectedY, (vid.previousElementSibling || vid.parentElement)) + '%';
28675
+ }
28676
+ else {
28677
+ vid.style.width = this.pixToPerc((expectedX / height * expectedY), (vid.previousElementSibling || vid.parentElement)) + '%';
28678
+ }
28679
+ }
28680
+ vid.style.height = null;
28681
+ vid.removeAttribute('height');
28682
+ }
28074
28683
  pixToPerc(expected, parentEle) {
28075
28684
  return expected / parseFloat(getComputedStyle(parentEle).width) * 100;
28076
28685
  }
@@ -28111,6 +28720,7 @@ class Video {
28111
28720
  const height = parseInt(this.vidDupPos.height, 10) + mouseY;
28112
28721
  this.pageX = pageX;
28113
28722
  this.pageY = pageY;
28723
+ this.mouseX = mouseX;
28114
28724
  if (this.resizeBtnStat.botRight) {
28115
28725
  this.vidDupMouseMove(width + 'px', height + 'px', e);
28116
28726
  }
@@ -28277,6 +28887,14 @@ class Video {
28277
28887
  originalEvent.preventDefault();
28278
28888
  break;
28279
28889
  }
28890
+ if (originalEvent.ctrlKey && originalEvent.key === 'a') {
28891
+ this.handleSelectAll();
28892
+ }
28893
+ }
28894
+ handleSelectAll() {
28895
+ this.cancelResizeAction();
28896
+ const videoFocusNodes = this.parent.inputElement.querySelectorAll('.' + CLS_VID_FOCUS);
28897
+ removeClass(videoFocusNodes, CLS_VID_FOCUS);
28280
28898
  }
28281
28899
  openDialog(isInternal, event, selection, ele, parentEle) {
28282
28900
  let range;
@@ -28454,6 +29072,7 @@ class Video {
28454
29072
  if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
28455
29073
  }
28456
29074
  else {
29075
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
28457
29076
  this.dialogObj.hide({ returnValue: true });
28458
29077
  this.parent.isBlur = true;
28459
29078
  dispatchEvent(this.parent.element, 'focusout');
@@ -28740,6 +29359,15 @@ class Video {
28740
29359
  }
28741
29360
  }
28742
29361
  });
29362
+ if (e.selectNode && ((e.selectNode[0] && e.selectNode[0].nodeType !== 3 &&
29363
+ e.selectNode[0].nodeName !== 'BR' &&
29364
+ (e.selectNode[0].classList &&
29365
+ e.selectNode[0].classList.contains(CLS_VID_CLICK_ELEM))) ||
29366
+ e.selectNode[0].nodeName === 'IFRAME' || e.selectNode[0].nodeName === 'VIDEO')) {
29367
+ const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
29368
+ const sourceElement = e.selectNode[0].querySelector('source');
29369
+ this.inputUrl.value = sourceElement.src.match(regex) ? sourceElement.src : '';
29370
+ }
28743
29371
  const embedUrlBtn = new RadioButton({
28744
29372
  label: this.i10n.getConstant('embeddedCode'),
28745
29373
  checked: true,
@@ -28749,7 +29377,6 @@ class Video {
28749
29377
  },
28750
29378
  change: () => {
28751
29379
  urlContent.innerHTML = '';
28752
- this.inputUrl.value = '';
28753
29380
  urlContent.appendChild(this.embedInputUrl);
28754
29381
  }
28755
29382
  });
@@ -28759,7 +29386,6 @@ class Video {
28759
29386
  name: 'URL',
28760
29387
  change: () => {
28761
29388
  urlContent.innerHTML = '';
28762
- this.embedInputUrl.value = '';
28763
29389
  urlContent.appendChild(this.inputUrl);
28764
29390
  }
28765
29391
  });
@@ -28949,10 +29575,11 @@ class Video {
28949
29575
  this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
28950
29576
  this.selectParent = proxy.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
28951
29577
  }
28952
- const name = url !== '' ? url.split('/')[url.split('/').length - 1] : embedUrl;
29578
+ const webUrlBtn = document.getElementById('webURL');
29579
+ const name = webUrlBtn.checked ? url.split('/')[url.split('/').length - 1] : embedUrl;
28953
29580
  const value = {
28954
29581
  cssClass: (proxy.parent.insertVideoSettings.layoutOption === 'Inline' ? CLS_VIDEOINLINE : CLS_VIDEOBREAK),
28955
- url: url, selection: this.selection, fileName: name, isEmbedUrl: embedUrl !== '' ? true : false,
29582
+ url: url, selection: this.selection, fileName: name, isEmbedUrl: !webUrlBtn.checked,
28956
29583
  selectParent: this.selectParent, width: {
28957
29584
  width: proxy.parent.insertVideoSettings.width, minWidth: proxy.parent.insertVideoSettings.minWidth,
28958
29585
  maxWidth: proxy.parent.getInsertImgMaxWidth()
@@ -29309,6 +29936,7 @@ class Table {
29309
29936
  this.parent.on(bindCssClass, this.setCssClass, this);
29310
29937
  this.parent.on(destroy, this.destroy, this);
29311
29938
  this.parent.on(moduleDestroy, this.moduleDestroy, this);
29939
+ this.parent.on(afterKeyDown, this.afterKeyDown, this);
29312
29940
  }
29313
29941
  removeEventListener() {
29314
29942
  if (this.parent.isDestroyed) {
@@ -29334,6 +29962,7 @@ class Table {
29334
29962
  this.parent.off(bindCssClass, this.setCssClass);
29335
29963
  this.parent.off(destroy, this.destroy);
29336
29964
  this.parent.off(moduleDestroy, this.moduleDestroy);
29965
+ this.parent.off(afterKeyDown, this.afterKeyDown);
29337
29966
  if (!Browser.isDevice && this.parent.tableSettings.resize) {
29338
29967
  EventHandler.remove(this.contentModule.getEditPanel(), 'mouseover', this.resizeHelper);
29339
29968
  }
@@ -29491,6 +30120,14 @@ class Table {
29491
30120
  }
29492
30121
  }
29493
30122
  }
30123
+ if (event.ctrlKey && event.key === 'a') {
30124
+ this.handleSelectAll();
30125
+ }
30126
+ }
30127
+ handleSelectAll() {
30128
+ this.cancelResizeAction();
30129
+ const selectedCells = this.parent.inputElement.querySelectorAll('.' + CLS_TABLE_SEL);
30130
+ removeClass(selectedCells, CLS_TABLE_SEL);
29494
30131
  }
29495
30132
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
29496
30133
  tableModulekeyUp(e) {
@@ -29524,7 +30161,6 @@ class Table {
29524
30161
  name: !isInternal ? 'showDialog' : null
29525
30162
  };
29526
30163
  this.insertTableDialog({ self: this, args: args, selection: selection });
29527
- this.parent.formatter.editorManager.nodeSelection.restore();
29528
30164
  }
29529
30165
  }
29530
30166
  showDialog() {
@@ -29869,7 +30505,7 @@ class Table {
29869
30505
  return;
29870
30506
  }
29871
30507
  const target = e.target || e.targetTouches[0].target;
29872
- const closestTable = closest(target, 'table.e-rte-table');
30508
+ const closestTable = closest(target, 'table.e-rte-table, table.e-rte-paste-table');
29873
30509
  if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable &&
29874
30510
  this.parent.contentModule.getEditPanel().contains(closestTable)) {
29875
30511
  this.removeResizeElement();
@@ -30506,6 +31142,7 @@ class Table {
30506
31142
  this.popupObj.hide();
30507
31143
  }
30508
31144
  if (this.editdlgObj) {
31145
+ this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
30509
31146
  this.editdlgObj.hide();
30510
31147
  }
30511
31148
  this.parent.isBlur = true;
@@ -30814,6 +31451,15 @@ class Table {
30814
31451
  getModuleName() {
30815
31452
  return 'table';
30816
31453
  }
31454
+ afterKeyDown(e) {
31455
+ if (this.curTable) {
31456
+ setTimeout(() => {
31457
+ const mouseOverEvent = document.createEvent('MouseEvents');
31458
+ mouseOverEvent.initEvent('mouseover', true, true);
31459
+ this.curTable.dispatchEvent(mouseOverEvent);
31460
+ }, 1);
31461
+ }
31462
+ }
30817
31463
  }
30818
31464
 
30819
31465
  /**
@@ -30830,6 +31476,7 @@ class DialogRenderer {
30830
31476
  }
30831
31477
  this.parent.on(moduleDestroy, this.moduleDestroy, this);
30832
31478
  this.parent.on(destroy, this.removeEventListener, this);
31479
+ this.parent.on(documentClickClosedBy, this.documentClickClosedBy, this);
30833
31480
  }
30834
31481
  removeEventListener() {
30835
31482
  if (this.parent.isDestroyed) {
@@ -30837,6 +31484,7 @@ class DialogRenderer {
30837
31484
  }
30838
31485
  this.parent.off(destroy, this.removeEventListener);
30839
31486
  this.parent.off(moduleDestroy, this.moduleDestroy);
31487
+ this.parent.off(documentClickClosedBy, this.documentClickClosedBy);
30840
31488
  }
30841
31489
  /**
30842
31490
  * dialog render method
@@ -30883,10 +31531,14 @@ class DialogRenderer {
30883
31531
  open(args) {
30884
31532
  this.parent.trigger(dialogOpen, args);
30885
31533
  }
31534
+ documentClickClosedBy(args) {
31535
+ this.outsideClickClosedBy = args.closedBy;
31536
+ }
30886
31537
  beforeClose(args) {
30887
31538
  if (this.dialogEle) {
30888
31539
  this.dialogEle.removeEventListener('keydown', this.handleEnterKeyDown);
30889
31540
  }
31541
+ args.closedBy = this.outsideClickClosedBy === 'outside click' ? this.outsideClickClosedBy : args.closedBy;
30890
31542
  this.parent.trigger(beforeDialogClose, args, (closeArgs) => {
30891
31543
  if (!closeArgs.cancel) {
30892
31544
  if (closeArgs.container.classList.contains('e-popup-close')) {
@@ -30894,6 +31546,7 @@ class DialogRenderer {
30894
31546
  }
30895
31547
  }
30896
31548
  });
31549
+ this.outsideClickClosedBy = "";
30897
31550
  }
30898
31551
  getDialogPosition() {
30899
31552
  let distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
@@ -32399,7 +33052,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32399
33052
  if (tool.command === 'InsertText') {
32400
33053
  currentInsertContentLength = value.length;
32401
33054
  }
32402
- const currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
33055
+ const currentLength = this.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
32403
33056
  const selectionLength = this.getSelection().length;
32404
33057
  const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
32405
33058
  if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
@@ -32773,7 +33426,12 @@ let RichTextEditor = class RichTextEditor extends Component {
32773
33426
  FormatPainterEscapeAction = this.formatPainterModule.previousAction === 'escape';
32774
33427
  }
32775
33428
  if (!FormatPainterEscapeAction) {
32776
- this.formatter.process(this, null, e);
33429
+ if (this.editorMode === 'HTML' && (e.action === 'increase-fontsize' || e.action === 'decrease-fontsize')) {
33430
+ this.notify(onHandleFontsizeChange, { member: 'onHandleFontsizeChange', args: e });
33431
+ }
33432
+ else {
33433
+ this.formatter.process(this, null, e);
33434
+ }
32777
33435
  }
32778
33436
  switch (e.action) {
32779
33437
  case 'toolbar-focus':
@@ -32799,6 +33457,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32799
33457
  this.setPlaceHolder();
32800
33458
  }
32801
33459
  }
33460
+ this.notify(afterKeyDown, { member: 'afterKeyDown', args: e });
32802
33461
  this.autoResize();
32803
33462
  }
32804
33463
  keyUp(e) {
@@ -32825,7 +33484,7 @@ let RichTextEditor = class RichTextEditor extends Component {
32825
33484
  const formatPainterCopy = e.key === 'C' && e.altKey && e.shiftKey;
32826
33485
  const formatPainterPaste = e.key === 'V' && e.altKey && e.shiftKey;
32827
33486
  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) {
33487
+ && ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) || (this.autoSaveOnIdle && Browser.isDevice) && !this.inlineMode.enable) {
32829
33488
  this.formatter.onKeyHandler(this, e);
32830
33489
  }
32831
33490
  if (this.inputElement && this.inputElement.textContent.length !== 0
@@ -32921,60 +33580,6 @@ let RichTextEditor = class RichTextEditor extends Component {
32921
33580
  return;
32922
33581
  }
32923
33582
  }
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
33583
  this.notifyMouseUp(e);
32979
33584
  }
32980
33585
  /**
@@ -33015,10 +33620,10 @@ let RichTextEditor = class RichTextEditor extends Component {
33015
33620
  requestType: 'Paste'
33016
33621
  };
33017
33622
  this.trigger(actionBegin, evenArgs, (pasteArgs) => {
33018
- const currentLength = this.inputElement.textContent.length;
33623
+ const currentLength = this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
33019
33624
  const selectionLength = this.getSelection().length;
33020
33625
  const pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
33021
- ? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
33626
+ ? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
33022
33627
  const totalLength = (currentLength - selectionLength) + pastedContentLength;
33023
33628
  if (this.editorMode === 'Markdown') {
33024
33629
  const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
@@ -33457,7 +34062,7 @@ let RichTextEditor = class RichTextEditor extends Component {
33457
34062
  if (this.valueContainer) {
33458
34063
  this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
33459
34064
  }
33460
- if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.replace('&amp;', '&').trim() !== value.trim()) {
34065
+ if (this.editorMode === 'HTML' && this.inputElement && this.inputElement.innerHTML.trim() !== value.trim()) {
33461
34066
  this.inputElement.innerHTML = value;
33462
34067
  }
33463
34068
  else if (this.editorMode === 'Markdown' && this.inputElement
@@ -33478,9 +34083,6 @@ let RichTextEditor = class RichTextEditor extends Component {
33478
34083
  }
33479
34084
  else {
33480
34085
  this.inputElement.innerHTML = '<p><br/></p>';
33481
- if (value === '' && this.formatter && this.inputElement) {
33482
- this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), this.inputElement.firstElementChild, this.inputElement.firstElementChild.childElementCount);
33483
- }
33484
34086
  }
33485
34087
  }
33486
34088
  else {
@@ -34093,6 +34695,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34093
34695
  addClass([this.element], [CLS_FOCUS]);
34094
34696
  this.preventDefaultResize(e);
34095
34697
  this.notify(mouseDown, { args: e });
34698
+ this.formatter.editorManager.observer.notify(mouseDown, { args: e });
34096
34699
  this.clickPoints = { clientX: touch.clientX, clientY: touch.clientY };
34097
34700
  }
34098
34701
  preventImgResize(e) {
@@ -34254,6 +34857,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34254
34857
  detach(item[i]);
34255
34858
  }
34256
34859
  }
34860
+ this.removeSelectionClassStates(valueElementWrapper);
34257
34861
  return valueElementWrapper.innerHTML;
34258
34862
  }
34259
34863
  updateStatus(e) {
@@ -34301,6 +34905,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34301
34905
  }
34302
34906
  if (this.isBlur && isNullOrUndefined(trg)) {
34303
34907
  removeClass([this.element], [CLS_FOCUS]);
34908
+ this.removeSelectionClassStates(this.inputElement);
34304
34909
  this.notify(focusChange, {});
34305
34910
  const value = this.getUpdatedValue();
34306
34911
  this.setProperties({ value: value });
@@ -34473,7 +35078,7 @@ let RichTextEditor = class RichTextEditor extends Component {
34473
35078
  restrict(e) {
34474
35079
  if (this.maxLength >= 0) {
34475
35080
  const element = this.editorMode === 'Markdown' ? this.contentModule.getText() :
34476
- (e && e.currentTarget.textContent);
35081
+ (this.getText().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, ''));
34477
35082
  if (!element) {
34478
35083
  return;
34479
35084
  }
@@ -34623,6 +35228,24 @@ let RichTextEditor = class RichTextEditor extends Component {
34623
35228
  }
34624
35229
  }
34625
35230
  }
35231
+ removeSelectionClassStates(element) {
35232
+ const classNames = [CLS_IMG_FOCUS, CLS_TABLE_SEL, CLS_VID_FOCUS, CLS_AUD_FOCUS];
35233
+ for (let i = 0; i < classNames.length; i++) {
35234
+ const item = element.querySelectorAll('.' + classNames[i]);
35235
+ removeClass(item, classNames[i]);
35236
+ if (item.length === 0) {
35237
+ continue;
35238
+ }
35239
+ for (let j = 0; j < item.length; j++) {
35240
+ if (item[j].classList.length === 0) {
35241
+ item[j].removeAttribute('class');
35242
+ }
35243
+ if (item[j].nodeName === 'IMG' && item[j].style.outline !== '') {
35244
+ item[j].style.outline = '';
35245
+ }
35246
+ }
35247
+ }
35248
+ }
34626
35249
  };
34627
35250
  __decorate$1([
34628
35251
  Complex({}, ToolbarSettings$1)
@@ -34926,5 +35549,5 @@ RichTextEditor = __decorate$1([
34926
35549
  * Rich Text Editor component exported items
34927
35550
  */
34928
35551
 
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 };
35552
+ 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
35553
  //# sourceMappingURL=ej2-richtexteditor.es2015.js.map