@syncfusion/ej2-richtexteditor 28.1.38 → 28.1.41-640046

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 (186) hide show
  1. package/.eslintignore +4 -4
  2. package/.eslintrc.json +260 -260
  3. package/README.md +76 -76
  4. package/dist/ej2-richtexteditor.umd.min.js +1 -10
  5. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-richtexteditor.es2015.js +648 -584
  7. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  8. package/dist/es6/ej2-richtexteditor.es5.js +757 -693
  9. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  10. package/helpers/e2e/index.js +3 -3
  11. package/helpers/e2e/rte-helper.js +13 -13
  12. package/license +9 -9
  13. package/package.json +84 -84
  14. package/src/common/interface.d.ts +8 -8
  15. package/src/common/util.d.ts +1 -2
  16. package/src/common/util.js +49 -95
  17. package/src/editor-manager/base/classes.d.ts +1 -1
  18. package/src/editor-manager/base/classes.js +1 -1
  19. package/src/editor-manager/base/editor-manager.d.ts +3 -3
  20. package/src/editor-manager/base/editor-manager.js +3 -3
  21. package/src/editor-manager/base/enum.d.ts +2 -2
  22. package/src/editor-manager/base/interface.d.ts +17 -9
  23. package/src/editor-manager/base/types.d.ts +1 -1
  24. package/src/editor-manager/plugin/alignments.d.ts +2 -2
  25. package/src/editor-manager/plugin/alignments.js +2 -2
  26. package/src/editor-manager/plugin/audio.d.ts +3 -3
  27. package/src/editor-manager/plugin/audio.js +3 -3
  28. package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
  29. package/src/editor-manager/plugin/clearformat-exec.js +2 -2
  30. package/src/editor-manager/plugin/clearformat.d.ts +1 -1
  31. package/src/editor-manager/plugin/clearformat.js +1 -1
  32. package/src/editor-manager/plugin/dom-node.d.ts +36 -36
  33. package/src/editor-manager/plugin/dom-node.js +36 -36
  34. package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
  35. package/src/editor-manager/plugin/format-painter-actions.js +1 -1
  36. package/src/editor-manager/plugin/formats.d.ts +2 -2
  37. package/src/editor-manager/plugin/formats.js +2 -2
  38. package/src/editor-manager/plugin/image.d.ts +3 -3
  39. package/src/editor-manager/plugin/image.js +3 -3
  40. package/src/editor-manager/plugin/indents.d.ts +2 -2
  41. package/src/editor-manager/plugin/indents.js +2 -2
  42. package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
  43. package/src/editor-manager/plugin/insert-methods.js +4 -4
  44. package/src/editor-manager/plugin/insert-text.d.ts +2 -2
  45. package/src/editor-manager/plugin/insert-text.js +2 -2
  46. package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
  47. package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
  48. package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
  49. package/src/editor-manager/plugin/inserthtml.js +5 -5
  50. package/src/editor-manager/plugin/isformatted.d.ts +9 -9
  51. package/src/editor-manager/plugin/isformatted.js +9 -9
  52. package/src/editor-manager/plugin/link.d.ts +2 -2
  53. package/src/editor-manager/plugin/link.js +2 -2
  54. package/src/editor-manager/plugin/lists.d.ts +3 -2
  55. package/src/editor-manager/plugin/lists.js +15 -3
  56. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
  57. package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
  58. package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
  59. package/src/editor-manager/plugin/nodecutter.js +6 -6
  60. package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
  61. package/src/editor-manager/plugin/selection-commands.js +1 -1
  62. package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
  63. package/src/editor-manager/plugin/selection-exec.js +2 -2
  64. package/src/editor-manager/plugin/table.d.ts +2 -2
  65. package/src/editor-manager/plugin/table.js +2 -2
  66. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  67. package/src/editor-manager/plugin/toolbar-status.js +2 -2
  68. package/src/editor-manager/plugin/undo.d.ts +6 -6
  69. package/src/editor-manager/plugin/undo.js +6 -6
  70. package/src/editor-manager/plugin/video.d.ts +3 -3
  71. package/src/editor-manager/plugin/video.js +3 -3
  72. package/src/markdown-parser/base/interface.d.ts +10 -10
  73. package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
  74. package/src/markdown-parser/base/markdown-parser.js +3 -3
  75. package/src/markdown-parser/base/types.d.ts +1 -1
  76. package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
  77. package/src/markdown-parser/plugin/clearformat.js +2 -2
  78. package/src/markdown-parser/plugin/formats.d.ts +2 -2
  79. package/src/markdown-parser/plugin/formats.js +2 -2
  80. package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
  81. package/src/markdown-parser/plugin/insert-text.js +2 -2
  82. package/src/markdown-parser/plugin/link.d.ts +2 -2
  83. package/src/markdown-parser/plugin/link.js +2 -2
  84. package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
  85. package/src/markdown-parser/plugin/markdown-selection.js +14 -14
  86. package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
  87. package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
  88. package/src/markdown-parser/plugin/table.d.ts +3 -3
  89. package/src/markdown-parser/plugin/table.js +3 -3
  90. package/src/markdown-parser/plugin/undo.d.ts +6 -6
  91. package/src/markdown-parser/plugin/undo.js +6 -6
  92. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
  93. package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
  94. package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
  95. package/src/rich-text-editor/actions/base-toolbar.js +3 -3
  96. package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
  97. package/src/rich-text-editor/actions/color-picker.js +2 -2
  98. package/src/rich-text-editor/actions/count.d.ts +3 -3
  99. package/src/rich-text-editor/actions/count.js +3 -3
  100. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
  101. package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
  102. package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
  103. package/src/rich-text-editor/actions/emoji-picker.js +1 -1
  104. package/src/rich-text-editor/actions/enter-key.js +34 -3
  105. package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
  106. package/src/rich-text-editor/actions/full-screen.js +3 -3
  107. package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
  108. package/src/rich-text-editor/actions/html-editor.js +26 -4
  109. package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
  110. package/src/rich-text-editor/actions/keyboard.js +20 -20
  111. package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
  112. package/src/rich-text-editor/actions/markdown-editor.js +2 -2
  113. package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
  114. package/src/rich-text-editor/actions/paste-clean-up.js +23 -32
  115. package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
  116. package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
  117. package/src/rich-text-editor/actions/resize.d.ts +2 -0
  118. package/src/rich-text-editor/actions/resize.js +13 -2
  119. package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
  120. package/src/rich-text-editor/actions/toolbar.js +13 -13
  121. package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
  122. package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
  123. package/src/rich-text-editor/base/classes.d.ts +125 -125
  124. package/src/rich-text-editor/base/classes.js +125 -125
  125. package/src/rich-text-editor/base/constant.d.ts +158 -158
  126. package/src/rich-text-editor/base/constant.js +158 -158
  127. package/src/rich-text-editor/base/enum.d.ts +1 -1
  128. package/src/rich-text-editor/base/enum.js +1 -1
  129. package/src/rich-text-editor/base/interface.d.ts +51 -51
  130. package/src/rich-text-editor/base/interface.js +1 -1
  131. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
  132. package/src/rich-text-editor/base/rich-text-editor.d.ts +62 -62
  133. package/src/rich-text-editor/base/rich-text-editor.js +67 -51
  134. package/src/rich-text-editor/base/util.d.ts +1 -1
  135. package/src/rich-text-editor/base/util.js +1 -1
  136. package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
  137. package/src/rich-text-editor/formatter/formatter.js +8 -8
  138. package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
  139. package/src/rich-text-editor/formatter/html-formatter.js +15 -15
  140. package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
  141. package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
  142. package/src/rich-text-editor/models/iframe-settings.js +19 -19
  143. package/src/rich-text-editor/models/inline-mode.js +19 -19
  144. package/src/rich-text-editor/models/slash-menu-settings.js +19 -19
  145. package/src/rich-text-editor/models/toolbar-settings.js +19 -19
  146. package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
  147. package/src/rich-text-editor/renderer/audio-module.js +1 -1
  148. package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
  149. package/src/rich-text-editor/renderer/content-renderer.js +6 -6
  150. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
  151. package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
  152. package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
  153. package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
  154. package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
  155. package/src/rich-text-editor/renderer/image-module.js +1 -1
  156. package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
  157. package/src/rich-text-editor/renderer/link-module.js +3 -3
  158. package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
  159. package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
  160. package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
  161. package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
  162. package/src/rich-text-editor/renderer/render.d.ts +2 -2
  163. package/src/rich-text-editor/renderer/render.js +2 -2
  164. package/src/rich-text-editor/renderer/table-module.d.ts +3 -2
  165. package/src/rich-text-editor/renderer/table-module.js +15 -18
  166. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
  167. package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -10
  168. package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
  169. package/src/rich-text-editor/renderer/video-module.js +1 -1
  170. package/src/rich-text-editor/renderer/view-source.d.ts +5 -5
  171. package/src/rich-text-editor/renderer/view-source.js +5 -5
  172. package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
  173. package/src/rich-text-editor/services/renderer-factory.js +3 -3
  174. package/src/rich-text-editor/services/service-locator.d.ts +3 -3
  175. package/src/rich-text-editor/services/service-locator.js +3 -3
  176. package/src/selection/selection.d.ts +22 -22
  177. package/src/selection/selection.js +22 -22
  178. package/styles/material3-dark.scss +1 -1
  179. package/styles/material3.scss +1 -1
  180. package/styles/rich-text-editor/material3-dark.scss +1 -1
  181. package/styles/rich-text-editor/material3.scss +1 -1
  182. package/dist/ej2-richtexteditor.min.js +0 -10
  183. package/dist/global/ej2-richtexteditor.min.js +0 -11
  184. package/dist/global/ej2-richtexteditor.min.js.map +0 -1
  185. package/dist/global/index.d.ts +0 -14
  186. package/tslint.json +0 -111
@@ -1,4 +1,4 @@
1
- import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Base, Property, Event as Event$1, NotifyPropertyChanges, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes, getComponent, getEnumValue, Complex, Component, print, L10n, compile, Touch } from '@syncfusion/ej2-base';
1
+ import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Base, Property, Event as Event$1, NotifyPropertyChanges, getComponent, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes, getEnumValue, Complex, Component, print, L10n, compile, Touch } from '@syncfusion/ej2-base';
2
2
  import { Toolbar as Toolbar$1 } from '@syncfusion/ej2-navigations';
3
3
  import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
4
4
  import { Tooltip, Popup, Dialog, isCollide, getScrollableParent } from '@syncfusion/ej2-popups';
@@ -2513,185 +2513,185 @@ let windowKeys = {
2513
2513
  'inlineCode': 'ctrl+`'
2514
2514
  };
2515
2515
  const defaultEmojiIcons = [{
2516
- name: 'Smilies & People', code: '1F600', iconCss: 'e-emoji', icons: [{ code: '1F600', desc: 'Grinning face' },
2517
- { code: '1F603', desc: 'Grinning face with big eyes' },
2518
- { code: '1F604', desc: 'Grinning face with smiling eyes' },
2519
- { code: '1F606', desc: 'Grinning squinting face' },
2520
- { code: '1F605', desc: 'Grinning face with sweat' },
2521
- { code: '1F602', desc: 'Face with tears of joy' },
2522
- { code: '1F923', desc: 'Rolling on the floor laughing' },
2523
- { code: '1F60A', desc: 'Smiling face with smiling eyes' },
2524
- { code: '1F607', desc: 'Smiling face with halo' },
2525
- { code: '1F642', desc: 'Slightly smiling face' },
2526
- { code: '1F643', desc: 'Upside-down face' },
2527
- { code: '1F60D', desc: 'Smiling face with heart-eyes' },
2528
- { code: '1F618', desc: 'Face blowing a kiss' },
2529
- { code: '1F61B', desc: 'Face with tongue' },
2530
- { code: '1F61C', desc: 'Winking face with tongue' },
2531
- { code: '1F604', desc: 'Grinning face with smiling eyes' },
2532
- { code: '1F469', desc: 'Woman' },
2533
- { code: '1F468', desc: 'Man' },
2534
- { code: '1F467', desc: 'Girl' },
2535
- { code: '1F466', desc: 'Boy' },
2536
- { code: '1F476', desc: 'Baby' },
2537
- { code: '1F475', desc: 'Old woman' },
2538
- { code: '1F474', desc: 'Old man' },
2539
- { code: '1F46E', desc: 'Police officer' },
2540
- { code: '1F477', desc: 'Construction worker' },
2541
- { code: '1F482', desc: 'Guard' },
2542
- { code: '1F575', desc: 'Detective' },
2543
- { code: '1F9D1', desc: 'Cook' }]
2544
- }, {
2545
- name: 'Animals & Nature', code: '1F435', iconCss: 'e-animals', icons: [{ code: '1F436', desc: 'Dog face' },
2546
- { code: '1F431', desc: 'Cat face' },
2547
- { code: '1F42D', desc: 'Mouse face' },
2548
- { code: '1F439', desc: 'Hamster face' },
2549
- { code: '1F430', desc: 'Rabbit face' },
2550
- { code: '1F98A', desc: 'Fox face' },
2551
- { code: '1F43B', desc: 'Bear face' },
2552
- { code: '1F43C', desc: 'Panda face' },
2553
- { code: '1F428', desc: 'Koala' },
2554
- { code: '1F42F', desc: 'Tiger face' },
2555
- { code: '1F981', desc: 'Lion face' },
2556
- { code: '1F42E', desc: 'Cow face' },
2557
- { code: '1F437', desc: 'Pig face' },
2558
- { code: '1F43D', desc: 'Pig nose' },
2559
- { code: '1F438', desc: 'Frog face' },
2560
- { code: '1F435', desc: 'Monkey face' },
2561
- { code: '1F649', desc: 'Hear-no-evil monkey' },
2562
- { code: '1F64A', desc: 'Speak-no-evil monkey' },
2563
- { code: '1F412', desc: 'Monkey' },
2564
- { code: '1F414', desc: 'Chicken' },
2565
- { code: '1F427', desc: 'Penguin' },
2566
- { code: '1F426', desc: 'Bird' },
2567
- { code: '1F424', desc: 'Baby chick' },
2568
- { code: '1F986', desc: 'Duck' },
2569
- { code: '1F985', desc: 'Eagle' }]
2570
- }, {
2571
- name: 'Food & Drink', code: '1F347', iconCss: 'e-food-and-drinks', icons: [{ code: '1F34E', desc: 'Red apple' },
2572
- { code: '1F34C', desc: 'Banana' },
2573
- { code: '1F347', desc: 'Grapes' },
2574
- { code: '1F353', desc: 'Strawberry' },
2575
- { code: '1F35E', desc: 'Bread' },
2576
- { code: '1F950', desc: 'Croissant' },
2577
- { code: '1F955', desc: 'Carrot' },
2578
- { code: '1F354', desc: 'Hamburger' },
2579
- { code: '1F355', desc: 'Pizza' },
2580
- { code: '1F32D', desc: 'Hot dog' },
2581
- { code: '1F35F', desc: 'French fries' },
2582
- { code: '1F37F', desc: 'Popcorn' },
2583
- { code: '1F366', desc: 'Soft ice cream' },
2584
- { code: '1F367', desc: 'Shaved ice' },
2585
- { code: '1F36A', desc: 'Cookie' },
2586
- { code: '1F382', desc: 'Birthday cake' },
2587
- { code: '1F370', desc: 'Shortcake' },
2588
- { code: '1F36B', desc: 'Chocolate bar' },
2589
- { code: '1F369', desc: 'Donut' },
2590
- { code: '1F36E', desc: 'Custard' },
2591
- { code: '1F36D', desc: 'Lollipop' },
2592
- { code: '1F36C', desc: 'Candy' },
2593
- { code: '1F377', desc: 'Wine glass' },
2594
- { code: '1F37A', desc: 'Beer mug' },
2595
- { code: '1F37E', desc: 'Bottle with popping cork' }]
2596
- }, {
2597
- name: 'Activities', code: '1F383', iconCss: 'e-activities', icons: [{ code: '26BD', desc: 'Soccer ball' },
2598
- { code: '1F3C0', desc: 'Basketball' },
2599
- { code: '1F3C8', desc: 'American football' },
2600
- { code: '26BE', desc: 'Baseball' },
2601
- { code: '1F3BE', desc: 'Tennis' },
2602
- { code: '1F3D0', desc: 'Volleyball' },
2603
- { code: '1F3C9', desc: 'Rugby football' },
2604
- { code: '1F3B1', desc: 'Pool 8 ball' },
2605
- { code: '1F3D3', desc: 'Ping pong' },
2606
- { code: '1F3F8', desc: 'Badminton' },
2607
- { code: '1F94A', desc: 'Boxing glove' },
2608
- { code: '1F3CA', desc: 'Swimmer' },
2609
- { code: '1F3CB', desc: 'Weightlifter' },
2610
- { code: '1F6B4', desc: 'Bicyclist' },
2611
- { code: '1F6F9', desc: 'Skateboard' },
2612
- { code: '1F3AE', desc: 'Video game' },
2613
- { code: '1F579', desc: 'Joystick' },
2614
- { code: '1F3CF', desc: 'Cricket' },
2615
- { code: '1F3C7', desc: 'Horse racing' },
2616
- { code: '1F3AF', desc: 'Direct hit' },
2617
- { code: '1F3D1', desc: 'Field hockey' },
2618
- { code: '1F3B0', desc: 'Slot machine' },
2619
- { code: '1F3B3', desc: 'Bowling' },
2620
- { code: '1F3B2', desc: 'Game die' },
2621
- { code: '265F', desc: 'Chess pawn' }]
2622
- }, {
2623
- name: 'Travel & Places', code: '1F30D', iconCss: 'e-travel-and-places', icons: [{ code: '2708', desc: 'Airplane' },
2624
- { code: '1F697', desc: 'Automobile' },
2625
- { code: '1F695', desc: 'Taxi' },
2626
- { code: '1F6B2', desc: 'Bicycle' },
2627
- { code: '1F68C', desc: 'Bus' },
2628
- { code: '1F682', desc: 'Locomotive' },
2629
- { code: '1F6F3', desc: 'Passenger ship' },
2630
- { code: '1F680', desc: 'Rocket' },
2631
- { code: '1F681', desc: 'Helicopter' },
2632
- { code: '1F6A2', desc: 'Ship' },
2633
- { code: '1F3DF', desc: 'Stadium' },
2634
- { code: '1F54C', desc: 'Mosque' },
2635
- { code: '26EA', desc: 'Church' },
2636
- { code: '1F6D5', desc: 'Hindu Temple' },
2637
- { code: '1F3D4', desc: 'Snow-capped mountain' },
2638
- { code: '1F3EB', desc: 'School' },
2639
- { code: '1F30B', desc: 'Volcano' },
2640
- { code: '1F3D6', desc: 'Beach with umbrella' },
2641
- { code: '1F3DD', desc: 'Desert island' },
2642
- { code: '1F3DE', desc: 'National park' },
2643
- { code: '1F3F0', desc: 'Castle' },
2644
- { code: '1F5FC', desc: 'Tokyo tower' },
2645
- { code: '1F5FD', desc: 'Statue of liberty' },
2646
- { code: '26E9', desc: 'Shinto shrine' },
2647
- { code: '1F3EF', desc: 'Japanese castle' },
2648
- { code: '1F3A2', desc: 'Roller coaster' }]
2649
- }, {
2650
- name: 'Objects', code: '1F507', iconCss: 'e-objects', icons: [{ code: '1F4A1', desc: 'Light bulb' },
2651
- { code: '1F526', desc: 'Flashlight' },
2652
- { code: '1F4BB', desc: 'Laptop computer' },
2653
- { code: '1F5A5', desc: 'Desktop computer' },
2654
- { code: '1F5A8', desc: 'Printer' },
2655
- { code: '1F4F7', desc: 'Camera' },
2656
- { code: '1F4F8', desc: 'Camera with flash' },
2657
- { code: '1F4FD', desc: 'Film projector' },
2658
- { code: '1F3A5', desc: 'Movie camera' },
2659
- { code: '1F4FA', desc: 'Television' },
2660
- { code: '1F4FB', desc: 'Radio' },
2661
- { code: '1F50B', desc: 'Battery' },
2662
- { code: '231A', desc: 'Watch' },
2663
- { code: '1F4F1', desc: 'Mobile phone' },
2664
- { code: '260E', desc: 'Telephone' },
2665
- { code: '1F4BE', desc: 'Floppy disk' },
2666
- { code: '1F4BF', desc: 'Optical disk' },
2667
- { code: '1F4C0', desc: 'Digital versatile disc' },
2668
- { code: '1F4BD', desc: 'Computer disk' },
2669
- { code: '1F3A7', desc: 'Headphone' },
2670
- { code: '1F3A4', desc: 'Microphone' },
2671
- { code: '1F3B6', desc: 'Multiple musical notes' },
2672
- { code: '1F4DA', desc: 'Books' }]
2673
- }, {
2674
- name: 'Symbols', code: '1F3E7', iconCss: 'e-symbols', icons: [{ code: '274C', desc: 'Cross mark' },
2675
- { code: '2714', desc: 'Check mark' },
2676
- { code: '26A0', desc: 'Warning sign' },
2677
- { code: '1F6AB', desc: 'Prohibited' },
2678
- { code: '2139', desc: 'Information' },
2679
- { code: '267B', desc: 'Recycling symbol' },
2680
- { code: '1F6AD', desc: 'No smoking' },
2681
- { code: '1F4F5', desc: 'No mobile phones' },
2682
- { code: '1F6AF', desc: 'No littering' },
2683
- { code: '1F6B3', desc: 'No bicycles' },
2684
- { code: '1F6B7', desc: 'No pedestrians' },
2685
- { code: '2795', desc: 'Plus' },
2686
- { code: '2796', desc: 'Minus' },
2687
- { code: '2797', desc: 'Divide' },
2688
- { code: '2716', desc: 'Multiplication' },
2689
- { code: '1F4B2', desc: 'Dollar banknote' },
2690
- { code: '1F4AC', desc: 'Speech balloon' },
2691
- { code: '2755', desc: 'White exclamation mark' },
2692
- { code: '2754', desc: 'White question mark' },
2693
- { code: '2764', desc: 'Heart' }]
2694
- }];
2516
+ name: 'Smilies & People', code: '1F600', iconCss: 'e-emoji', icons: [{ code: '1F600', desc: 'Grinning face' },
2517
+ { code: '1F603', desc: 'Grinning face with big eyes' },
2518
+ { code: '1F604', desc: 'Grinning face with smiling eyes' },
2519
+ { code: '1F606', desc: 'Grinning squinting face' },
2520
+ { code: '1F605', desc: 'Grinning face with sweat' },
2521
+ { code: '1F602', desc: 'Face with tears of joy' },
2522
+ { code: '1F923', desc: 'Rolling on the floor laughing' },
2523
+ { code: '1F60A', desc: 'Smiling face with smiling eyes' },
2524
+ { code: '1F607', desc: 'Smiling face with halo' },
2525
+ { code: '1F642', desc: 'Slightly smiling face' },
2526
+ { code: '1F643', desc: 'Upside-down face' },
2527
+ { code: '1F60D', desc: 'Smiling face with heart-eyes' },
2528
+ { code: '1F618', desc: 'Face blowing a kiss' },
2529
+ { code: '1F61B', desc: 'Face with tongue' },
2530
+ { code: '1F61C', desc: 'Winking face with tongue' },
2531
+ { code: '1F604', desc: 'Grinning face with smiling eyes' },
2532
+ { code: '1F469', desc: 'Woman' },
2533
+ { code: '1F468', desc: 'Man' },
2534
+ { code: '1F467', desc: 'Girl' },
2535
+ { code: '1F466', desc: 'Boy' },
2536
+ { code: '1F476', desc: 'Baby' },
2537
+ { code: '1F475', desc: 'Old woman' },
2538
+ { code: '1F474', desc: 'Old man' },
2539
+ { code: '1F46E', desc: 'Police officer' },
2540
+ { code: '1F477', desc: 'Construction worker' },
2541
+ { code: '1F482', desc: 'Guard' },
2542
+ { code: '1F575', desc: 'Detective' },
2543
+ { code: '1F9D1', desc: 'Cook' }]
2544
+ }, {
2545
+ name: 'Animals & Nature', code: '1F435', iconCss: 'e-animals', icons: [{ code: '1F436', desc: 'Dog face' },
2546
+ { code: '1F431', desc: 'Cat face' },
2547
+ { code: '1F42D', desc: 'Mouse face' },
2548
+ { code: '1F439', desc: 'Hamster face' },
2549
+ { code: '1F430', desc: 'Rabbit face' },
2550
+ { code: '1F98A', desc: 'Fox face' },
2551
+ { code: '1F43B', desc: 'Bear face' },
2552
+ { code: '1F43C', desc: 'Panda face' },
2553
+ { code: '1F428', desc: 'Koala' },
2554
+ { code: '1F42F', desc: 'Tiger face' },
2555
+ { code: '1F981', desc: 'Lion face' },
2556
+ { code: '1F42E', desc: 'Cow face' },
2557
+ { code: '1F437', desc: 'Pig face' },
2558
+ { code: '1F43D', desc: 'Pig nose' },
2559
+ { code: '1F438', desc: 'Frog face' },
2560
+ { code: '1F435', desc: 'Monkey face' },
2561
+ { code: '1F649', desc: 'Hear-no-evil monkey' },
2562
+ { code: '1F64A', desc: 'Speak-no-evil monkey' },
2563
+ { code: '1F412', desc: 'Monkey' },
2564
+ { code: '1F414', desc: 'Chicken' },
2565
+ { code: '1F427', desc: 'Penguin' },
2566
+ { code: '1F426', desc: 'Bird' },
2567
+ { code: '1F424', desc: 'Baby chick' },
2568
+ { code: '1F986', desc: 'Duck' },
2569
+ { code: '1F985', desc: 'Eagle' }]
2570
+ }, {
2571
+ name: 'Food & Drink', code: '1F347', iconCss: 'e-food-and-drinks', icons: [{ code: '1F34E', desc: 'Red apple' },
2572
+ { code: '1F34C', desc: 'Banana' },
2573
+ { code: '1F347', desc: 'Grapes' },
2574
+ { code: '1F353', desc: 'Strawberry' },
2575
+ { code: '1F35E', desc: 'Bread' },
2576
+ { code: '1F950', desc: 'Croissant' },
2577
+ { code: '1F955', desc: 'Carrot' },
2578
+ { code: '1F354', desc: 'Hamburger' },
2579
+ { code: '1F355', desc: 'Pizza' },
2580
+ { code: '1F32D', desc: 'Hot dog' },
2581
+ { code: '1F35F', desc: 'French fries' },
2582
+ { code: '1F37F', desc: 'Popcorn' },
2583
+ { code: '1F366', desc: 'Soft ice cream' },
2584
+ { code: '1F367', desc: 'Shaved ice' },
2585
+ { code: '1F36A', desc: 'Cookie' },
2586
+ { code: '1F382', desc: 'Birthday cake' },
2587
+ { code: '1F370', desc: 'Shortcake' },
2588
+ { code: '1F36B', desc: 'Chocolate bar' },
2589
+ { code: '1F369', desc: 'Donut' },
2590
+ { code: '1F36E', desc: 'Custard' },
2591
+ { code: '1F36D', desc: 'Lollipop' },
2592
+ { code: '1F36C', desc: 'Candy' },
2593
+ { code: '1F377', desc: 'Wine glass' },
2594
+ { code: '1F37A', desc: 'Beer mug' },
2595
+ { code: '1F37E', desc: 'Bottle with popping cork' }]
2596
+ }, {
2597
+ name: 'Activities', code: '1F383', iconCss: 'e-activities', icons: [{ code: '26BD', desc: 'Soccer ball' },
2598
+ { code: '1F3C0', desc: 'Basketball' },
2599
+ { code: '1F3C8', desc: 'American football' },
2600
+ { code: '26BE', desc: 'Baseball' },
2601
+ { code: '1F3BE', desc: 'Tennis' },
2602
+ { code: '1F3D0', desc: 'Volleyball' },
2603
+ { code: '1F3C9', desc: 'Rugby football' },
2604
+ { code: '1F3B1', desc: 'Pool 8 ball' },
2605
+ { code: '1F3D3', desc: 'Ping pong' },
2606
+ { code: '1F3F8', desc: 'Badminton' },
2607
+ { code: '1F94A', desc: 'Boxing glove' },
2608
+ { code: '1F3CA', desc: 'Swimmer' },
2609
+ { code: '1F3CB', desc: 'Weightlifter' },
2610
+ { code: '1F6B4', desc: 'Bicyclist' },
2611
+ { code: '1F6F9', desc: 'Skateboard' },
2612
+ { code: '1F3AE', desc: 'Video game' },
2613
+ { code: '1F579', desc: 'Joystick' },
2614
+ { code: '1F3CF', desc: 'Cricket' },
2615
+ { code: '1F3C7', desc: 'Horse racing' },
2616
+ { code: '1F3AF', desc: 'Direct hit' },
2617
+ { code: '1F3D1', desc: 'Field hockey' },
2618
+ { code: '1F3B0', desc: 'Slot machine' },
2619
+ { code: '1F3B3', desc: 'Bowling' },
2620
+ { code: '1F3B2', desc: 'Game die' },
2621
+ { code: '265F', desc: 'Chess pawn' }]
2622
+ }, {
2623
+ name: 'Travel & Places', code: '1F30D', iconCss: 'e-travel-and-places', icons: [{ code: '2708', desc: 'Airplane' },
2624
+ { code: '1F697', desc: 'Automobile' },
2625
+ { code: '1F695', desc: 'Taxi' },
2626
+ { code: '1F6B2', desc: 'Bicycle' },
2627
+ { code: '1F68C', desc: 'Bus' },
2628
+ { code: '1F682', desc: 'Locomotive' },
2629
+ { code: '1F6F3', desc: 'Passenger ship' },
2630
+ { code: '1F680', desc: 'Rocket' },
2631
+ { code: '1F681', desc: 'Helicopter' },
2632
+ { code: '1F6A2', desc: 'Ship' },
2633
+ { code: '1F3DF', desc: 'Stadium' },
2634
+ { code: '1F54C', desc: 'Mosque' },
2635
+ { code: '26EA', desc: 'Church' },
2636
+ { code: '1F6D5', desc: 'Hindu Temple' },
2637
+ { code: '1F3D4', desc: 'Snow-capped mountain' },
2638
+ { code: '1F3EB', desc: 'School' },
2639
+ { code: '1F30B', desc: 'Volcano' },
2640
+ { code: '1F3D6', desc: 'Beach with umbrella' },
2641
+ { code: '1F3DD', desc: 'Desert island' },
2642
+ { code: '1F3DE', desc: 'National park' },
2643
+ { code: '1F3F0', desc: 'Castle' },
2644
+ { code: '1F5FC', desc: 'Tokyo tower' },
2645
+ { code: '1F5FD', desc: 'Statue of liberty' },
2646
+ { code: '26E9', desc: 'Shinto shrine' },
2647
+ { code: '1F3EF', desc: 'Japanese castle' },
2648
+ { code: '1F3A2', desc: 'Roller coaster' }]
2649
+ }, {
2650
+ name: 'Objects', code: '1F507', iconCss: 'e-objects', icons: [{ code: '1F4A1', desc: 'Light bulb' },
2651
+ { code: '1F526', desc: 'Flashlight' },
2652
+ { code: '1F4BB', desc: 'Laptop computer' },
2653
+ { code: '1F5A5', desc: 'Desktop computer' },
2654
+ { code: '1F5A8', desc: 'Printer' },
2655
+ { code: '1F4F7', desc: 'Camera' },
2656
+ { code: '1F4F8', desc: 'Camera with flash' },
2657
+ { code: '1F4FD', desc: 'Film projector' },
2658
+ { code: '1F3A5', desc: 'Movie camera' },
2659
+ { code: '1F4FA', desc: 'Television' },
2660
+ { code: '1F4FB', desc: 'Radio' },
2661
+ { code: '1F50B', desc: 'Battery' },
2662
+ { code: '231A', desc: 'Watch' },
2663
+ { code: '1F4F1', desc: 'Mobile phone' },
2664
+ { code: '260E', desc: 'Telephone' },
2665
+ { code: '1F4BE', desc: 'Floppy disk' },
2666
+ { code: '1F4BF', desc: 'Optical disk' },
2667
+ { code: '1F4C0', desc: 'Digital versatile disc' },
2668
+ { code: '1F4BD', desc: 'Computer disk' },
2669
+ { code: '1F3A7', desc: 'Headphone' },
2670
+ { code: '1F3A4', desc: 'Microphone' },
2671
+ { code: '1F3B6', desc: 'Multiple musical notes' },
2672
+ { code: '1F4DA', desc: 'Books' }]
2673
+ }, {
2674
+ name: 'Symbols', code: '1F3E7', iconCss: 'e-symbols', icons: [{ code: '274C', desc: 'Cross mark' },
2675
+ { code: '2714', desc: 'Check mark' },
2676
+ { code: '26A0', desc: 'Warning sign' },
2677
+ { code: '1F6AB', desc: 'Prohibited' },
2678
+ { code: '2139', desc: 'Information' },
2679
+ { code: '267B', desc: 'Recycling symbol' },
2680
+ { code: '1F6AD', desc: 'No smoking' },
2681
+ { code: '1F4F5', desc: 'No mobile phones' },
2682
+ { code: '1F6AF', desc: 'No littering' },
2683
+ { code: '1F6B3', desc: 'No bicycles' },
2684
+ { code: '1F6B7', desc: 'No pedestrians' },
2685
+ { code: '2795', desc: 'Plus' },
2686
+ { code: '2796', desc: 'Minus' },
2687
+ { code: '2797', desc: 'Divide' },
2688
+ { code: '2716', desc: 'Multiplication' },
2689
+ { code: '1F4B2', desc: 'Dollar banknote' },
2690
+ { code: '1F4AC', desc: 'Speech balloon' },
2691
+ { code: '2755', desc: 'White exclamation mark' },
2692
+ { code: '2754', desc: 'White question mark' },
2693
+ { code: '2764', desc: 'Heart' }]
2694
+ }];
2695
2695
 
2696
2696
  /* eslint-disable */
2697
2697
  /**
@@ -3236,7 +3236,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
3236
3236
  const itemStr = item && item.toLocaleLowerCase();
3237
3237
  if (item && (itemStr === key) || (item === 'UL' && key === 'unorderedlist') || (item === 'OL' && key === 'orderedlist') ||
3238
3238
  (itemStr === 'pre' && key === 'insertcode') || (item === 'NumberFormatList' && key === 'numberFormatList' ||
3239
- item === 'BulletFormatList' && key === 'bulletFormatList')) {
3239
+ item === 'BulletFormatList' && key === 'bulletFormatList')) {
3240
3240
  if (typeof data[`${key}`] === 'boolean') {
3241
3241
  if (data[`${key}`] === true) {
3242
3242
  addClass([e.tbElements[j]], [CLS_ACTIVE]);
@@ -4050,7 +4050,7 @@ class IsFormatted {
4050
4050
  }
4051
4051
  else if (this.inlineTags.indexOf(node.nodeName.toLowerCase()) !== -1 &&
4052
4052
  node.style && (node.style.textDecoration === 'underline' ||
4053
- node.style.textDecorationLine === 'underline')) {
4053
+ node.style.textDecorationLine === 'underline')) {
4054
4054
  /* eslint-enable */
4055
4055
  return true;
4056
4056
  }
@@ -4074,7 +4074,7 @@ class IsFormatted {
4074
4074
  }
4075
4075
  else if (this.inlineTags.indexOf(node.nodeName.toLowerCase()) !== -1 &&
4076
4076
  node.style && (node.style.textDecoration === 'line-through' ||
4077
- node.style.textDecorationLine === 'line-through')) {
4077
+ node.style.textDecorationLine === 'line-through')) {
4078
4078
  /* eslint-enable */
4079
4079
  return true;
4080
4080
  }
@@ -4331,7 +4331,7 @@ class NodeSelection {
4331
4331
  const range = select && select.rangeCount > 0 ? select.getRangeAt(select.rangeCount - 1) : docElement.createRange();
4332
4332
  return (range.startContainer !== docElement || range.endContainer !== docElement
4333
4333
  || range.startOffset || range.endOffset || (range.setStart(docElement.body, 0),
4334
- range.collapse(!0)),
4334
+ range.collapse(!0)),
4335
4335
  range);
4336
4336
  }
4337
4337
  /**
@@ -4793,11 +4793,6 @@ class NodeSelection {
4793
4793
  /**
4794
4794
  * Defines common util methods used by Rich Text Editor.
4795
4795
  */
4796
- const inlineNode$1 = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
4797
- 'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
4798
- 'ins', 'kbd', 'label', 'map', 'mark', 'meter', 'noscript', 'object', 'output', 'picture', 'progress',
4799
- 'q', 'ruby', 's', 'samp', 'script', 'select', 'slot', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'svg',
4800
- 'template', 'textarea', 'time', 'u', 'tt', 'var', 'video', 'wbr'];
4801
4796
  /**
4802
4797
  * @returns {void}
4803
4798
  * @hidden
@@ -4825,109 +4820,68 @@ function setEditFrameFocus(editableElement, selector) {
4825
4820
  }
4826
4821
  /**
4827
4822
  * @param {string} value - specifies the string value
4828
- * @param {string} enterAction - specifies the enter key action API
4829
4823
  * @returns {void}
4830
4824
  * @hidden
4831
4825
  */
4832
- function updateTextNode$1(value, enterAction) {
4833
- const tempNode = document.createElement('div');
4834
- tempNode.innerHTML = value;
4835
- tempNode.setAttribute('class', 'tempDiv');
4826
+ function updateTextNode$1(value) {
4836
4827
  const resultElm = document.createElement('div');
4837
- const childNodes = tempNode.childNodes;
4838
- if (childNodes.length > 0) {
4839
- let isPreviousInlineElem;
4840
- let previousParent;
4841
- let paraElm;
4842
- while (tempNode.firstChild) {
4843
- if ((tempNode.firstChild.nodeName === '#text' &&
4844
- (tempNode.firstChild.textContent.indexOf('\n') < 0 || tempNode.firstChild.textContent.trim() !== '')) ||
4845
- inlineNode$1.indexOf(tempNode.firstChild.nodeName.toLocaleLowerCase()) >= 0) {
4846
- if (!isPreviousInlineElem) {
4847
- if (enterAction === 'BR') {
4848
- resultElm.appendChild(tempNode.firstChild);
4849
- previousParent = resultElm;
4850
- }
4851
- else {
4852
- paraElm = createElement('p');
4853
- resultElm.appendChild(paraElm);
4854
- paraElm.appendChild(tempNode.firstChild);
4855
- previousParent = paraElm;
4856
- isPreviousInlineElem = true;
4857
- }
4858
- }
4859
- else {
4860
- previousParent.appendChild(tempNode.firstChild);
4861
- previousParent = paraElm;
4862
- isPreviousInlineElem = true;
4863
- }
4828
+ resultElm.innerHTML = value;
4829
+ const tableElm = resultElm.querySelectorAll('table');
4830
+ for (let i = 0; i < tableElm.length; i++) {
4831
+ if (tableElm[i].classList.length > 0 &&
4832
+ !tableElm[i].classList.contains('e-rte-table') && !tableElm[i].classList.contains('e-rte-custom-table')) {
4833
+ tableElm[i].classList.add('e-rte-paste-table');
4834
+ if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
4835
+ tableElm[i].classList.remove('e-rte-paste-word-table');
4836
+ continue; // Skiping the removal of the border if the source is from word.
4864
4837
  }
4865
- else if (tempNode.firstChild.nodeName === '#text' && (tempNode.firstChild.textContent === '\n' ||
4866
- (tempNode.firstChild.textContent.indexOf('\n') >= 0 && tempNode.firstChild.textContent.trim() === ''))) {
4867
- detach(tempNode.firstChild);
4868
- }
4869
- else {
4870
- resultElm.appendChild(tempNode.firstChild);
4871
- isPreviousInlineElem = false;
4872
- }
4873
- }
4874
- const tableElm = resultElm.querySelectorAll('table');
4875
- for (let i = 0; i < tableElm.length; i++) {
4876
- if (tableElm[i].classList.length > 0 &&
4877
- !tableElm[i].classList.contains('e-rte-table') && !tableElm[i].classList.contains('e-rte-custom-table')) {
4878
- tableElm[i].classList.add('e-rte-paste-table');
4879
- if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
4880
- tableElm[i].classList.remove('e-rte-paste-word-table');
4881
- continue; // Skiping the removal of the border if the source is from word.
4838
+ else if (tableElm[i].classList.contains('e-rte-paste-excel-table')) {
4839
+ tableElm[i].classList.remove('e-rte-paste-excel-table');
4840
+ if (tableElm[i].getAttribute('border') === '0') {
4841
+ tableElm[i].removeAttribute('border');
4882
4842
  }
4883
- else if (tableElm[i].classList.contains('e-rte-paste-excel-table')) {
4884
- tableElm[i].classList.remove('e-rte-paste-excel-table');
4885
- if (tableElm[i].getAttribute('border') === '0') {
4886
- tableElm[i].removeAttribute('border');
4843
+ const tdElm = tableElm[i].querySelectorAll('td');
4844
+ for (let j = 0; j < tdElm.length; j++) {
4845
+ if (tdElm[j].style.borderLeft === 'none') {
4846
+ tdElm[j].style.removeProperty('border-left');
4887
4847
  }
4888
- const tdElm = tableElm[i].querySelectorAll('td');
4889
- for (let j = 0; j < tdElm.length; j++) {
4890
- if (tdElm[j].style.borderLeft === 'none') {
4891
- tdElm[j].style.removeProperty('border-left');
4892
- }
4893
- if (tdElm[j].style.borderRight === 'none') {
4894
- tdElm[j].style.removeProperty('border-right');
4895
- }
4896
- if (tdElm[j].style.borderBottom === 'none') {
4897
- tdElm[j].style.removeProperty('border-bottom');
4898
- }
4899
- if (tdElm[j].style.borderTop === 'none') {
4900
- tdElm[j].style.removeProperty('border-top');
4901
- }
4902
- if (tdElm[j].style.border === 'none') {
4903
- tdElm[j].style.removeProperty('border');
4904
- }
4848
+ if (tdElm[j].style.borderRight === 'none') {
4849
+ tdElm[j].style.removeProperty('border-right');
4850
+ }
4851
+ if (tdElm[j].style.borderBottom === 'none') {
4852
+ tdElm[j].style.removeProperty('border-bottom');
4853
+ }
4854
+ if (tdElm[j].style.borderTop === 'none') {
4855
+ tdElm[j].style.removeProperty('border-top');
4856
+ }
4857
+ if (tdElm[j].style.border === 'none') {
4858
+ tdElm[j].style.removeProperty('border');
4905
4859
  }
4906
- }
4907
- else if (tableElm[i].classList.contains('e-rte-paste-onenote-table')) {
4908
- tableElm[i].classList.remove('e-rte-paste-onenote-table');
4909
- continue;
4910
- }
4911
- else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
4912
- tableElm[i].classList.remove('e-rte-paste-html-table');
4913
- continue;
4914
4860
  }
4915
4861
  }
4916
- }
4917
- const imageElm = resultElm.querySelectorAll('img');
4918
- for (let i = 0; i < imageElm.length; i++) {
4919
- if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
4920
- continue; // Should not add the class if the image is Broken.
4921
- }
4922
- if (!imageElm[i].classList.contains('e-rte-image')) {
4923
- imageElm[i].classList.add('e-rte-image');
4862
+ else if (tableElm[i].classList.contains('e-rte-paste-onenote-table')) {
4863
+ tableElm[i].classList.remove('e-rte-paste-onenote-table');
4864
+ continue;
4924
4865
  }
4925
- if (!(imageElm[i].classList.contains('e-imginline') ||
4926
- imageElm[i].classList.contains('e-imgbreak'))) {
4927
- imageElm[i].classList.add('e-imginline');
4866
+ else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
4867
+ tableElm[i].classList.remove('e-rte-paste-html-table');
4868
+ continue;
4928
4869
  }
4929
4870
  }
4930
4871
  }
4872
+ const imageElm = resultElm.querySelectorAll('img');
4873
+ for (let i = 0; i < imageElm.length; i++) {
4874
+ if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
4875
+ continue; // Should not add the class if the image is Broken.
4876
+ }
4877
+ if (!imageElm[i].classList.contains('e-rte-image')) {
4878
+ imageElm[i].classList.add('e-rte-image');
4879
+ }
4880
+ if (!(imageElm[i].classList.contains('e-imginline') ||
4881
+ imageElm[i].classList.contains('e-imgbreak'))) {
4882
+ imageElm[i].classList.add('e-imginline');
4883
+ }
4884
+ }
4931
4885
  return resultElm.innerHTML;
4932
4886
  }
4933
4887
  /**
@@ -6030,13 +5984,18 @@ class ToolbarRenderer {
6030
5984
  (proxy.parent.iframeSettings.enable && !hasClass(parentNode.ownerDocument.querySelector('body'), 'e-lib')))
6031
5985
  && range.collapsed && args.subCommand === 'BackgroundColor' && (closest(closestElement, '.' + CLS_RTE) || proxy.parent.iframeSettings.enable)) {
6032
5986
  proxy.parent.notify(tableColorPickerChanged, {
6033
- item: { command: args.command, subCommand: args.subCommand,
6034
- value: colorpickerValue }
5987
+ item: {
5988
+ command: args.command, subCommand: args.subCommand,
5989
+ value: colorpickerValue
5990
+ }
6035
5991
  });
6036
5992
  }
6037
5993
  else {
6038
- proxy.parent.notify(colorPickerChanged, { item: { command: args.command, subCommand: args.subCommand,
6039
- value: colorpickerValue }
5994
+ proxy.parent.notify(colorPickerChanged, {
5995
+ item: {
5996
+ command: args.command, subCommand: args.subCommand,
5997
+ value: colorpickerValue
5998
+ }
6040
5999
  });
6041
6000
  }
6042
6001
  return;
@@ -6077,15 +6036,19 @@ class ToolbarRenderer {
6077
6036
  range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
6078
6037
  if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' ||
6079
6038
  closest(range.startContainer.parentNode, 'td,th')) && range.collapsed) {
6080
- proxy.parent.notify(tableColorPickerChanged, { item: {
6039
+ proxy.parent.notify(tableColorPickerChanged, {
6040
+ item: {
6081
6041
  command: args.command, subCommand: args.subCommand,
6082
6042
  value: colorpickerValue
6083
6043
  }
6084
6044
  });
6085
6045
  }
6086
6046
  else {
6087
- proxy.parent.notify(colorPickerChanged, { item: { command: args.command, subCommand: args.subCommand,
6088
- value: colorpickerValue }
6047
+ proxy.parent.notify(colorPickerChanged, {
6048
+ item: {
6049
+ command: args.command, subCommand: args.subCommand,
6050
+ value: colorpickerValue
6051
+ }
6089
6052
  });
6090
6053
  }
6091
6054
  return;
@@ -6143,7 +6106,6 @@ class ToolbarRenderer {
6143
6106
  let proxy = this;
6144
6107
  let value;
6145
6108
  const colorPicker = new ColorPicker({
6146
- enablePersistence: this.parent.enablePersistence,
6147
6109
  enableRtl: this.parent.enableRtl,
6148
6110
  inline: true,
6149
6111
  value: null,
@@ -6557,8 +6519,10 @@ class Link {
6557
6519
  const linkText = linkContent.querySelector('.e-rte-linkText');
6558
6520
  const linkTitle = linkContent.querySelector('.e-rte-linkTitle');
6559
6521
  const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
6560
- this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
6561
- cssClass: this.parent.getCssClass() });
6522
+ this.checkBoxObj = new CheckBox({
6523
+ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
6524
+ cssClass: this.parent.getCssClass()
6525
+ });
6562
6526
  this.checkBoxObj.isStringTemplate = true;
6563
6527
  this.checkBoxObj.createElement = this.parent.createElement;
6564
6528
  this.checkBoxObj.appendTo(linkTarget);
@@ -6577,10 +6541,10 @@ class Link {
6577
6541
  showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
6578
6542
  isModal: Browser.isDevice,
6579
6543
  buttons: [{
6580
- click: this.insertlink.bind(selectObj),
6581
- buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
6582
- },
6583
- { click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
6544
+ click: this.insertlink.bind(selectObj),
6545
+ buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
6546
+ },
6547
+ { click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
6584
6548
  target: (Browser.isDevice) ? document.body : this.parent.element,
6585
6549
  animationSettings: { effect: 'None' },
6586
6550
  close: (event) => {
@@ -6654,10 +6618,10 @@ class Link {
6654
6618
  }
6655
6619
  if (!this.selfLink.isUrl(linkUrl)) {
6656
6620
  if (this.selfLink.parent.editorMode === 'Markdown') {
6657
- linkText = (linkText !== '') ? linkText : '';
6621
+ linkText = (linkText.trim() !== '') ? linkText : '';
6658
6622
  }
6659
6623
  else {
6660
- linkText = (linkText === '') ? linkUrl : linkText;
6624
+ linkText = (linkText.trim() === '') ? linkUrl : linkText;
6661
6625
  }
6662
6626
  if (!this.selfLink.parent.enableAutoUrl) {
6663
6627
  linkUrl = linkUrl.indexOf('http') > -1 ? linkUrl : 'http://' + linkUrl;
@@ -6802,8 +6766,8 @@ class Link {
6802
6766
  onDocumentClick(e) {
6803
6767
  const target = e.target;
6804
6768
  if (!isNullOrUndefined(this.dialogObj) && ((
6805
- // eslint-disable-next-line
6806
- !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable &&
6769
+ // eslint-disable-next-line
6770
+ !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable &&
6807
6771
  this.parent.getToolbarElement() && !this.parent.getToolbarElement().contains(e.target)) ||
6808
6772
  (((this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target)) ||
6809
6773
  this.parent.inlineMode.enable && !closest(target, '#' + this.dialogObj.element.id)) &&
@@ -8056,14 +8020,14 @@ class Image$1 {
8056
8020
  header: this.parent.localeObj.getConstant('imageInsertLinkHeader'),
8057
8021
  content: linkWrap,
8058
8022
  buttons: [{
8059
- // eslint-disable-next-line
8060
- click: (e) => {
8061
- this.insertlink(linkargs);
8062
- },
8063
- buttonModel: {
8064
- content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
8065
- }
8066
- }],
8023
+ // eslint-disable-next-line
8024
+ click: (e) => {
8025
+ this.insertlink(linkargs);
8026
+ },
8027
+ buttonModel: {
8028
+ content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
8029
+ }
8030
+ }],
8067
8031
  cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
8068
8032
  });
8069
8033
  if (!isNullOrUndefined(this.parent.cssClass)) {
@@ -8104,14 +8068,14 @@ class Image$1 {
8104
8068
  this.dialogObj.setProperties({
8105
8069
  width: '290px', header: altHeader, content: altWrap,
8106
8070
  buttons: [{
8107
- // eslint-disable-next-line
8108
- click: (e) => {
8109
- this.insertAlt(altArgs);
8110
- },
8111
- buttonModel: {
8112
- content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
8113
- }
8114
- }],
8071
+ // eslint-disable-next-line
8072
+ click: (e) => {
8073
+ this.insertAlt(altArgs);
8074
+ },
8075
+ buttonModel: {
8076
+ content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
8077
+ }
8078
+ }],
8115
8079
  cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
8116
8080
  });
8117
8081
  if (!isNullOrUndefined(this.parent.cssClass)) {
@@ -8267,8 +8231,10 @@ class Image$1 {
8267
8231
  attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
8268
8232
  });
8269
8233
  const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
8270
- const imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
8271
- attrs: { contenteditable: 'true' } });
8234
+ const imgInner = this.parent.createElement('span', {
8235
+ className: 'e-img-inner' + this.parent.getCssClass(true),
8236
+ attrs: { contenteditable: 'true' }
8237
+ });
8272
8238
  const parent = e.selectNode[0].parentElement;
8273
8239
  if (parent.tagName === 'A') {
8274
8240
  parent.setAttribute('contenteditable', 'true');
@@ -8314,14 +8280,14 @@ class Image$1 {
8314
8280
  this.dialogObj.setProperties({
8315
8281
  width: '290px', header: imgSizeHeader, content: dialogContent,
8316
8282
  buttons: [{
8317
- // eslint-disable-next-line
8318
- click: (e) => {
8319
- this.insertSize(selectObj);
8320
- },
8321
- buttonModel: {
8322
- content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
8323
- }
8324
- }],
8283
+ // eslint-disable-next-line
8284
+ click: (e) => {
8285
+ this.insertSize(selectObj);
8286
+ },
8287
+ buttonModel: {
8288
+ content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
8289
+ }
8290
+ }],
8325
8291
  cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
8326
8292
  });
8327
8293
  if (!isNullOrUndefined(this.parent.cssClass)) {
@@ -8406,13 +8372,13 @@ class Image$1 {
8406
8372
  showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
8407
8373
  isModal: Browser.isDevice,
8408
8374
  buttons: [{
8409
- click: this.insertImageUrl.bind(selectObj),
8410
- buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: this.parent.editorMode === 'Markdown' ? false : true }
8411
- },
8412
- {
8413
- click: this.cancelDialog.bind(this),
8414
- buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
8415
- }],
8375
+ click: this.insertImageUrl.bind(selectObj),
8376
+ buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: this.parent.editorMode === 'Markdown' ? false : true }
8377
+ },
8378
+ {
8379
+ click: this.cancelDialog.bind(this),
8380
+ buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
8381
+ }],
8416
8382
  target: (Browser.isDevice) ? document.body : this.parent.element,
8417
8383
  animationSettings: { effect: 'None' },
8418
8384
  close: (event) => {
@@ -8502,14 +8468,14 @@ class Image$1 {
8502
8468
  this.parent.currentTarget = e.target;
8503
8469
  }
8504
8470
  if (!isNullOrUndefined(this.dialogObj) && ((
8505
- // eslint-disable-next-line
8506
- !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
8471
+ // eslint-disable-next-line
8472
+ !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
8507
8473
  !this.parent.getToolbarElement().contains(e.target)) ||
8508
8474
  (this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
8509
8475
  !closest(target, '#' + this.parent.getID() + '_toolbar_Image') &&
8510
8476
  !target.querySelector('#' + this.parent.getID() + '_toolbar_Image')))) {
8511
8477
  /* eslint-disable */
8512
- if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) ;
8478
+ if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
8513
8479
  else {
8514
8480
  this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
8515
8481
  this.dialogObj.hide({ returnValue: true });
@@ -8520,7 +8486,7 @@ class Image$1 {
8520
8486
  }
8521
8487
  if (!(this.parent.iframeSettings.enable && !isNullOrUndefined(this.parent.currentTarget) && this.parent.currentTarget.nodeName === 'IMG') &&
8522
8488
  e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
8523
- this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
8489
+ this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
8524
8490
  this.contentModule.getEditPanel().contains(this.imgResizeDiv)) {
8525
8491
  this.cancelResizeAction();
8526
8492
  }
@@ -8619,8 +8585,8 @@ class Image$1 {
8619
8585
  }
8620
8586
  else if (url !== '') {
8621
8587
  if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
8622
- // eslint-disable-next-line
8623
- this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
8588
+ // eslint-disable-next-line
8589
+ this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
8624
8590
  proxy.contentModule.getEditPanel().focus();
8625
8591
  const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
8626
8592
  this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
@@ -9848,14 +9814,14 @@ class Audio {
9848
9814
  this.audEle = target.querySelector('audio');
9849
9815
  }
9850
9816
  if (!isNullOrUndefined(this.dialogObj) && ((
9851
- // eslint-disable-next-line
9852
- !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
9817
+ // eslint-disable-next-line
9818
+ !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
9853
9819
  !this.parent.getToolbarElement().contains(e.target)) ||
9854
9820
  (this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
9855
9821
  !closest(target, '#' + this.parent.getID() + '_toolbar_Audio') &&
9856
9822
  !target.querySelector('#' + this.parent.getID() + '_toolbar_Audio')))) {
9857
9823
  /* eslint-disable */
9858
- if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) ;
9824
+ if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
9859
9825
  else {
9860
9826
  this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
9861
9827
  this.dialogObj.hide({ returnValue: true });
@@ -10055,15 +10021,15 @@ class Audio {
10055
10021
  showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
10056
10022
  isModal: Browser.isDevice,
10057
10023
  buttons: [{
10058
- click: this.insertAudioUrl.bind(selectObj),
10059
- buttonModel: { content: audioInsert, cssClass: 'e-flat e-insertAudio', isPrimary: true, disabled: true }
10024
+ click: this.insertAudioUrl.bind(selectObj),
10025
+ buttonModel: { content: audioInsert, cssClass: 'e-flat e-insertAudio', isPrimary: true, disabled: true }
10026
+ },
10027
+ {
10028
+ click: (e) => {
10029
+ this.cancelDialog(e);
10060
10030
  },
10061
- {
10062
- click: (e) => {
10063
- this.cancelDialog(e);
10064
- },
10065
- buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
10066
- }],
10031
+ buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
10032
+ }],
10067
10033
  target: (Browser.isDevice) ? document.body : this.parent.element,
10068
10034
  animationSettings: { effect: 'None' },
10069
10035
  close: (event) => {
@@ -10313,8 +10279,8 @@ class Audio {
10313
10279
  }
10314
10280
  else if (url !== '') {
10315
10281
  if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
10316
- // eslint-disable-next-line
10317
- this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
10282
+ // eslint-disable-next-line
10283
+ this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
10318
10284
  proxy.contentModule.getEditPanel().focus();
10319
10285
  const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
10320
10286
  this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
@@ -10546,14 +10512,14 @@ class Video {
10546
10512
  this.dialogObj.setProperties({
10547
10513
  width: '290px', header: vidSizeHeader, content: dialogContent,
10548
10514
  buttons: [{
10549
- // eslint-disable-next-line
10550
- click: (e) => {
10551
- this.insertSize(selectObj);
10552
- },
10553
- buttonModel: {
10554
- content: linkUpdate, cssClass: 'e-flat e-update-size', isPrimary: true
10555
- }
10556
- }]
10515
+ // eslint-disable-next-line
10516
+ click: (e) => {
10517
+ this.insertSize(selectObj);
10518
+ },
10519
+ buttonModel: {
10520
+ content: linkUpdate, cssClass: 'e-flat e-update-size', isPrimary: true
10521
+ }
10522
+ }]
10557
10523
  });
10558
10524
  this.dialogObj.element.style.maxHeight = 'inherit';
10559
10525
  this.dialogObj.content.querySelector('input').focus();
@@ -11154,7 +11120,7 @@ class Video {
11154
11120
  checkVideoBack(range) {
11155
11121
  if (range.startContainer.nodeName === '#text' && range.startOffset === 0 &&
11156
11122
  !isNullOrUndefined(range.startContainer.previousSibling) && (range.startContainer.previousSibling.nodeName === 'VIDEO' ||
11157
- this.isEmbedVidElem(range.startContainer.previousSibling))) {
11123
+ this.isEmbedVidElem(range.startContainer.previousSibling))) {
11158
11124
  this.deletedVid.push(range.startContainer.previousSibling);
11159
11125
  }
11160
11126
  else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset - 1]) &&
@@ -11166,7 +11132,7 @@ class Video {
11166
11132
  checkVideoDel(range) {
11167
11133
  if (range.startContainer.nodeName === '#text' && range.startOffset === range.startContainer.textContent.length &&
11168
11134
  !isNullOrUndefined(range.startContainer.nextSibling) && (range.startContainer.nextSibling.nodeName === 'VIDEO' ||
11169
- this.isEmbedVidElem(range.startContainer.nextSibling))) {
11135
+ this.isEmbedVidElem(range.startContainer.nextSibling))) {
11170
11136
  this.deletedVid.push(range.startContainer.nextSibling);
11171
11137
  }
11172
11138
  else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset]) &&
@@ -11283,14 +11249,14 @@ class Video {
11283
11249
  this.videoEle = !this.isEmbedVidElem(target) ? target : target.querySelector('iframe');
11284
11250
  }
11285
11251
  if (!isNullOrUndefined(this.dialogObj) && ((
11286
- // eslint-disable-next-line
11287
- !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
11252
+ // eslint-disable-next-line
11253
+ !closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
11288
11254
  !this.parent.getToolbarElement().contains(e.target)) ||
11289
11255
  (this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
11290
11256
  !closest(target, '#' + this.parent.getID() + '_toolbar_Video') &&
11291
11257
  !target.querySelector('#' + this.parent.getID() + '_toolbar_Video')))) {
11292
11258
  /* eslint-disable */
11293
- if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) ;
11259
+ if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
11294
11260
  else {
11295
11261
  this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
11296
11262
  this.dialogObj.hide({ returnValue: true });
@@ -11479,15 +11445,15 @@ class Video {
11479
11445
  showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
11480
11446
  isModal: Browser.isDevice,
11481
11447
  buttons: [{
11482
- click: this.insertVideoUrl.bind(selectObj),
11483
- buttonModel: { content: videoInsert, cssClass: 'e-flat e-insertVideo', isPrimary: true, disabled: true }
11448
+ click: this.insertVideoUrl.bind(selectObj),
11449
+ buttonModel: { content: videoInsert, cssClass: 'e-flat e-insertVideo', isPrimary: true, disabled: true }
11450
+ },
11451
+ {
11452
+ click: (e) => {
11453
+ this.cancelDialog(e);
11484
11454
  },
11485
- {
11486
- click: (e) => {
11487
- this.cancelDialog(e);
11488
- },
11489
- buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
11490
- }],
11455
+ buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
11456
+ }],
11491
11457
  target: (Browser.isDevice) ? document.body : this.parent.element,
11492
11458
  animationSettings: { effect: 'None' },
11493
11459
  close: (event) => {
@@ -11822,8 +11788,8 @@ class Video {
11822
11788
  }
11823
11789
  else if (proxy.parent.editorMode === 'HTML' && (url !== '' || embedUrl !== '')) {
11824
11790
  if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
11825
- // eslint-disable-next-line
11826
- this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
11791
+ // eslint-disable-next-line
11792
+ this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
11827
11793
  proxy.contentModule.getEditPanel().focus();
11828
11794
  const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
11829
11795
  this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
@@ -12488,7 +12454,6 @@ class Table {
12488
12454
  this.parent.on(tableToolbarAction, this.onToolbarAction, this);
12489
12455
  this.parent.on(dropDownSelect, this.dropdownSelect, this);
12490
12456
  this.parent.on(keyDown, this.keyDown, this);
12491
- this.parent.on(keyUp, this.keyUp, this);
12492
12457
  this.parent.on(tableModulekeyUp, this.tableModulekeyUp, this);
12493
12458
  this.parent.on(bindCssClass, this.setCssClass, this);
12494
12459
  this.parent.on(destroy, this.destroy, this);
@@ -12509,7 +12474,6 @@ class Table {
12509
12474
  this.parent.off(mouseDown, this.cellSelect);
12510
12475
  this.parent.off(tableColorPickerChanged, this.setBGColor);
12511
12476
  this.parent.off(keyDown, this.keyDown);
12512
- this.parent.off(keyUp, this.keyUp);
12513
12477
  this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
12514
12478
  this.parent.off(bindCssClass, this.setCssClass);
12515
12479
  this.parent.off(destroy, this.destroy);
@@ -12606,20 +12570,6 @@ class Table {
12606
12570
  this.parent.formatter.process(this.parent, e, e, { selection: selectCell, subCommand: e.item.subCommand });
12607
12571
  this.hideTableQuickToolbar();
12608
12572
  }
12609
- keyUp(e) {
12610
- const target = e.args.target;
12611
- if (e.args.key.toLocaleLowerCase() === 'escape' && target && target.classList && (this.popupObj && !closest(target, '[id=' + '\'' + this.popupObj.element.id + '\'' + ']')) && this.popupObj) {
12612
- let createTableToolbarBtn = this.popupObj.relateTo;
12613
- if (createTableToolbarBtn.nodeName !== 'BUTTON') {
12614
- createTableToolbarBtn = createTableToolbarBtn.querySelector('span.e-create-table');
12615
- createTableToolbarBtn = createTableToolbarBtn.parentElement;
12616
- }
12617
- this.popupObj.hide();
12618
- if (createTableToolbarBtn) {
12619
- createTableToolbarBtn.focus();
12620
- }
12621
- }
12622
- }
12623
12573
  keyDown(e) {
12624
12574
  const event = e.args;
12625
12575
  // eslint-disable-next-line
@@ -13055,7 +13005,7 @@ class Table {
13055
13005
  const eventArgs = e.args;
13056
13006
  if (this.previousTableElement !== ele && !isNullOrUndefined(this.previousTableElement)
13057
13007
  && !eventArgs.shiftKey && (eventArgs.keyCode === 39 || eventArgs.keyCode === 37 ||
13058
- eventArgs.keyCode === 38 || eventArgs.keyCode === 40)) {
13008
+ eventArgs.keyCode === 38 || eventArgs.keyCode === 40)) {
13059
13009
  removeClassWithAttr([this.previousTableElement], CLS_TABLE_SEL);
13060
13010
  this.removeTableSelection();
13061
13011
  }
@@ -13320,7 +13270,7 @@ class Table {
13320
13270
  const ismacRightClick = /Version\/\d+\.\d+.*Safari/.test(Browser.userAgent) && !/Chrome|Edg|Firefox/.test(Browser.userAgent) && args.which === 3;
13321
13271
  if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
13322
13272
  target.nodeName !== 'AUDIO' && (startNode === endNode || ismacRightClick) && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
13323
- target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
13273
+ target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
13324
13274
  && !(range.startContainer.nodeType === 3 && !(range.collapsed || ismacRightClick)) &&
13325
13275
  currentTime - this.resizeEndTime > 100 && !(ismacRightClick && (range.collapsed && range.startOffset !== 0)) && !(ismacRightClick && range.endContainer.nodeName === '#text')) {
13326
13276
  const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
@@ -13432,7 +13382,7 @@ class Table {
13432
13382
  const selection = proxy.parent.formatter.editorManager.nodeSelection.get(proxy.contentModule.getDocument());
13433
13383
  if (!isNullOrUndefined(selection) && !isNullOrUndefined(selection.anchorNode) &&
13434
13384
  selection.anchorNode.nodeType === Node.ELEMENT_NODE && (selection.anchorNode.tagName === 'TD'
13435
- || selection.anchorNode.tagName === 'TH')) {
13385
+ || selection.anchorNode.tagName === 'TH')) {
13436
13386
  proxy.curTable = closest(selection.anchorNode, 'table');
13437
13387
  proxy.activeCell = selection.anchorNode;
13438
13388
  }
@@ -13788,7 +13738,7 @@ class Table {
13788
13738
  this.helper.classList.add('e-column-helper');
13789
13739
  this.helper.style.cssText = 'height: ' + getComputedStyle(this.curTable).height + '; top: ' +
13790
13740
  pos.top + 'px; left:' + ((pos.left + this.calcPos(this.columnEle).left) +
13791
- (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1) + 'px;';
13741
+ (this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1) + 'px;';
13792
13742
  }
13793
13743
  else {
13794
13744
  this.helper.classList.add('e-row-helper');
@@ -14191,6 +14141,8 @@ class Table {
14191
14141
  const header = '1X1';
14192
14142
  const insertbtn = this.l10n.getConstant('inserttablebtn');
14193
14143
  this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
14144
+ this.createTablePopupBoundFn = this.createTablePopupKeyDown.bind(this);
14145
+ this.dlgDiv.addEventListener('keydown', this.createTablePopupBoundFn);
14194
14146
  this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
14195
14147
  this.tblHeader.innerHTML = header;
14196
14148
  this.dlgDiv.appendChild(this.tblHeader);
@@ -14228,6 +14180,7 @@ class Table {
14228
14180
  // eslint-disable-next-line
14229
14181
  close: (event) => {
14230
14182
  EventHandler.remove(btnEle, 'click', this.insertTableDialog);
14183
+ this.dlgDiv.removeEventListener('keydown', this.createTablePopupBoundFn);
14231
14184
  detach(btnEle);
14232
14185
  if (this.createTableButton && !this.createTableButton.isDestroyed) {
14233
14186
  this.createTableButton.destroy();
@@ -14323,15 +14276,15 @@ class Table {
14323
14276
  this.editdlgObj.setProperties({
14324
14277
  height: 'initial', width: '290px', content: editContent, header: editHeader,
14325
14278
  buttons: [{
14326
- click: this.applyProperties.bind(this, args),
14327
- buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
14279
+ click: this.applyProperties.bind(this, args),
14280
+ buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
14281
+ },
14282
+ {
14283
+ click: (e) => {
14284
+ this.cancelDialog(e);
14328
14285
  },
14329
- {
14330
- click: (e) => {
14331
- this.cancelDialog(e);
14332
- },
14333
- buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
14334
- }],
14286
+ buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
14287
+ }],
14335
14288
  cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
14336
14289
  });
14337
14290
  this.editdlgObj.element.style.maxHeight = 'none';
@@ -14353,15 +14306,15 @@ class Table {
14353
14306
  proxy.editdlgObj.setProperties({
14354
14307
  height: 'initial', width: '290px', content: dlgContent,
14355
14308
  buttons: [{
14356
- click: proxy.customTable.bind(this, args),
14357
- buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + ' ' + proxy.parent.cssClass, isPrimary: true }
14309
+ click: proxy.customTable.bind(this, args),
14310
+ buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + ' ' + proxy.parent.cssClass, isPrimary: true }
14311
+ },
14312
+ {
14313
+ click: (e) => {
14314
+ proxy.cancelDialog(e);
14358
14315
  },
14359
- {
14360
- click: (e) => {
14361
- proxy.cancelDialog(e);
14362
- },
14363
- buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
14364
- }]
14316
+ buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
14317
+ }]
14365
14318
  });
14366
14319
  if (!isNullOrUndefined(proxy.parent.cssClass)) {
14367
14320
  proxy.editdlgObj.setProperties({ cssClass: proxy.parent.cssClass });
@@ -14433,14 +14386,14 @@ class Table {
14433
14386
  position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
14434
14387
  isModal: Browser.isDevice,
14435
14388
  buttons: [{
14436
- buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
14389
+ buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
14390
+ },
14391
+ {
14392
+ click: (e) => {
14393
+ this.cancelDialog(e);
14437
14394
  },
14438
- {
14439
- click: (e) => {
14440
- this.cancelDialog(e);
14441
- },
14442
- buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
14443
- }],
14395
+ buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
14396
+ }],
14444
14397
  target: (Browser.isDevice) ? document.body : this.parent.element,
14445
14398
  animationSettings: { effect: 'None' },
14446
14399
  close: (event) => {
@@ -14609,6 +14562,7 @@ class Table {
14609
14562
  this.createTableButton.destroy();
14610
14563
  this.createTableButton = null;
14611
14564
  }
14565
+ this.createTablePopupBoundFn = null;
14612
14566
  this.isDestroyed = true;
14613
14567
  }
14614
14568
  /**
@@ -14634,6 +14588,15 @@ class Table {
14634
14588
  'px; left:' + (tablePosition.left + parseInt(getComputedStyle(this.curTable).width, 10) - 4) + 'px;';
14635
14589
  }
14636
14590
  }
14591
+ createTablePopupKeyDown(e) {
14592
+ if (e.key === 'Escape') {
14593
+ const popupRootElem = e.target.closest('.e-rte-table-popup');
14594
+ const popup = getComponent(popupRootElem, 'popup');
14595
+ const tableToolbarButton = popup.relateTo;
14596
+ popup.hide();
14597
+ tableToolbarButton.focus({ preventScroll: true });
14598
+ }
14599
+ }
14637
14600
  }
14638
14601
 
14639
14602
  /**
@@ -16745,7 +16708,7 @@ class ToolbarAction {
16745
16708
  this.parent.notify(selectionRestore, {});
16746
16709
  if (!(document.body.contains(document.body.querySelector('.e-rte-quick-toolbar'))
16747
16710
  && e.item && (e.item.command === 'Images' || e.item.command === 'Audios' || e.item.command === 'Videos' ||
16748
- e.item.command === 'VideoLayoutOption' || e.item.command === 'Display' || e.item.command === 'Table'))) {
16711
+ e.item.command === 'VideoLayoutOption' || e.item.command === 'Display' || e.item.command === 'Table'))) {
16749
16712
  const value = e.item.controlParent && this.parent.quickToolbarModule && this.parent.quickToolbarModule.tableQTBar
16750
16713
  && this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element) ? 'Table' : null;
16751
16714
  if (e.item.command === 'Lists') {
@@ -17864,8 +17827,10 @@ class BaseQuickToolbar {
17864
17827
  * @deprecated
17865
17828
  */
17866
17829
  showPopup(x, y, target, type) {
17867
- const eventArgs = { popup: this.popupObj, cancel: false, targetElement: target,
17868
- positionX: x, positionY: y };
17830
+ const eventArgs = {
17831
+ popup: this.popupObj, cancel: false, targetElement: target,
17832
+ positionX: x, positionY: y
17833
+ };
17869
17834
  this.parent.trigger(beforeQuickToolbarOpen, eventArgs, (beforeQuickToolbarArgs) => {
17870
17835
  if (!beforeQuickToolbarArgs.cancel) {
17871
17836
  let editPanelTop;
@@ -19709,9 +19674,9 @@ class MDLists {
19709
19674
  }
19710
19675
  this.restore(textArea, start, end + addedLength, event);
19711
19676
  }
19712
- changeTextAreaValue(splitText, prefixValue, event,
19713
- // eslint-disable-next-line
19714
- textArea, parents, k, end) {
19677
+ changeTextAreaValue(splitText, prefixValue, event,
19678
+ // eslint-disable-next-line
19679
+ textArea, parents, k, end) {
19715
19680
  const prefix = prefixValue;
19716
19681
  splitText.splice(0, 1);
19717
19682
  const textAreaLength = this.selection.getAllParents(textArea.value).length;
@@ -21051,9 +21016,9 @@ class MDTable {
21051
21016
  return this.element.value.substr(0, this.element.selectionStart) + text +
21052
21017
  this.element.value.substr(this.element.selectionEnd, this.element.value.length);
21053
21018
  }
21054
- checkValid(start, end, text, textAreaInitial,
21055
- // eslint-disable-next-line
21056
- e, formatSplit, parentText, syntaxArr) {
21019
+ checkValid(start, end, text, textAreaInitial,
21020
+ // eslint-disable-next-line
21021
+ e, formatSplit, parentText, syntaxArr) {
21057
21022
  if (this.ensureStartValid(parentText[0].start, parentText) &&
21058
21023
  this.ensureEndValid(parentText[parentText.length - 1].start, formatSplit[0].length)) {
21059
21024
  if (start === parentText[0].start) {
@@ -21392,8 +21357,10 @@ class MarkdownParser {
21392
21357
  this.observer.notify(CLEAR_COMMAND, { subCommand: value, event: event, callBack: callBack });
21393
21358
  break;
21394
21359
  case 'inserttext':
21395
- this.observer.notify(INSERT_TEXT_COMMAND, { subCommand: value, event: event, callBack: callBack,
21396
- value: { text: exeValue } });
21360
+ this.observer.notify(INSERT_TEXT_COMMAND, {
21361
+ subCommand: value, event: event, callBack: callBack,
21362
+ value: { text: exeValue }
21363
+ });
21397
21364
  break;
21398
21365
  }
21399
21366
  }
@@ -21589,8 +21556,10 @@ class MarkdownEditor {
21589
21556
  // On property code change here
21590
21557
  if (!isNullOrUndefined(e.newProp.formatter)) {
21591
21558
  const editElement = this.contentRenderer.getEditPanel();
21592
- const option = { undoRedoSteps: this.parent.undoRedoSteps,
21593
- undoRedoTimer: this.parent.undoRedoTimer };
21559
+ const option = {
21560
+ undoRedoSteps: this.parent.undoRedoSteps,
21561
+ undoRedoTimer: this.parent.undoRedoTimer
21562
+ };
21594
21563
  this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
21595
21564
  }
21596
21565
  }
@@ -22303,7 +22272,7 @@ class InsertHtml {
22303
22272
  nodeSelection.setSelectionText(docElement, lastSelectionNode, lastSelectionNode, 0, 0);
22304
22273
  }
22305
22274
  else {
22306
- this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction);
22275
+ this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode);
22307
22276
  }
22308
22277
  this.alignCheck(editNode);
22309
22278
  this.listCleanUp(nodeSelection, docElement);
@@ -22563,9 +22532,9 @@ class InsertHtml {
22563
22532
  }
22564
22533
  }
22565
22534
  }
22566
- static cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction) {
22535
+ static cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode) {
22567
22536
  lastSelectionNode.classList.add('lastNode');
22568
- editNode.innerHTML = updateTextNode$1(editNode.innerHTML, enterAction);
22537
+ editNode.innerHTML = updateTextNode$1(editNode.innerHTML);
22569
22538
  lastSelectionNode = editNode.querySelector('.lastNode');
22570
22539
  if (!isNullOrUndefined(lastSelectionNode)) {
22571
22540
  this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
@@ -23796,8 +23765,8 @@ class DOMNode {
23796
23765
  }
23797
23766
  else if (node && node.nodeType !== 8 && (node.tagName === 'BR' || (node.nodeType === Node.TEXT_NODE &&
23798
23767
  node.textContent.trim() !== '') || (node.nodeType !== Node.TEXT_NODE &&
23799
- (node.classList.contains(markerClassName.startSelection) ||
23800
- node.classList.contains(markerClassName.endSelection)))) &&
23768
+ (node.classList.contains(markerClassName.startSelection) ||
23769
+ node.classList.contains(markerClassName.endSelection)))) &&
23801
23770
  IGNORE_BLOCK_TAGS.indexOf(node.parentNode.tagName.toLocaleLowerCase()) >= 0) {
23802
23771
  node = this.createTempNode(node);
23803
23772
  }
@@ -24044,6 +24013,17 @@ class Lists {
24044
24013
  }
24045
24014
  return false;
24046
24015
  }
24016
+ createAutoList(enterKey, shiftEnterKey) {
24017
+ const autoListRules = {
24018
+ BR: { BR: true, P: true, DIV: true },
24019
+ P: { BR: false, P: true, DIV: true },
24020
+ DIV: { BR: false, P: true, DIV: true }
24021
+ };
24022
+ if (autoListRules[enterKey] && autoListRules[enterKey][shiftEnterKey] !== undefined) {
24023
+ return autoListRules[enterKey][shiftEnterKey];
24024
+ }
24025
+ return false;
24026
+ }
24047
24027
  spaceList(e) {
24048
24028
  const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
24049
24029
  this.saveSelection = this.parent.nodeSelection.save(range, this.parent.currentDocument);
@@ -24059,7 +24039,8 @@ class Lists {
24059
24039
  const startElementOLTest = this.testCurrentList(range);
24060
24040
  const preElementOLTest = this.testList(preElement);
24061
24041
  const nextElementOLTest = this.testList(nextElement);
24062
- if (!preElementOLTest && !nextElementOLTest && preElemULStart !== '*' && nextElemULStart !== '*') {
24042
+ const nextElementBRTest = range.startContainer.previousElementSibling && range.startContainer.previousElementSibling.tagName === 'BR';
24043
+ if (!preElementOLTest && !nextElementOLTest && preElemULStart !== '*' && nextElemULStart !== '*' && (this.createAutoList(e.enterKey, e.shiftEnterKey) || !nextElementBRTest)) {
24063
24044
  const brElement = createElement('br');
24064
24045
  if (startElementOLTest) {
24065
24046
  range.startContainer.textContent = range.startContainer.textContent.slice(range.startOffset, range.startContainer.textContent.length);
@@ -24551,7 +24532,7 @@ class Lists {
24551
24532
  if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
24552
24533
  range.startOffset === range.endOffset && range.startOffset === 0 &&
24553
24534
  this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName !== 'TABLE' &&
24554
- this.parent.editableElement.childNodes[0].nodeName !== 'IMG')) {
24535
+ this.parent.editableElement.childNodes[0].nodeName !== 'IMG')) {
24555
24536
  const focusNode = range.startContainer.childNodes[0];
24556
24537
  this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, focusNode, focusNode, 0, 0);
24557
24538
  range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
@@ -24885,11 +24866,11 @@ class Lists {
24885
24866
  }
24886
24867
  if (element.parentNode.insertBefore(this.closeTag(parentNode.tagName), element),
24887
24868
  'LI' === parentNode.parentNode.tagName || 'OL' === parentNode.parentNode.tagName ||
24888
- 'UL' === parentNode.parentNode.tagName) {
24869
+ 'UL' === parentNode.parentNode.tagName) {
24889
24870
  element.parentNode.insertBefore(this.closeTag('LI'), element);
24890
24871
  }
24891
24872
  else {
24892
- if ( 0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
24873
+ if (0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
24893
24874
  const wrapperclass = isNullOrUndefined(className) ? ' class="e-rte-wrap-inner"' :
24894
24875
  ' class="' + className + ' e-rte-wrap-inner"';
24895
24876
  const parentElement = parentNode;
@@ -25100,8 +25081,8 @@ class Formats {
25100
25081
  const startParent = this.getBlockParent(range.startContainer, blockquoteEle);
25101
25082
  if ((startParent.textContent.charCodeAt(0) === 8203 &&
25102
25083
  startParent.textContent.length === 1) || (startParent.textContent.length === 0 &&
25103
- startParent.querySelectorAll('img').length === 0 &&
25104
- startParent.querySelectorAll('table').length === 0)) {
25084
+ startParent.querySelectorAll('img').length === 0 &&
25085
+ startParent.querySelectorAll('table').length === 0)) {
25105
25086
  e.event.preventDefault();
25106
25087
  if (isNullOrUndefined(startParent.nextElementSibling)) {
25107
25088
  this.paraFocus(startParent.parentElement === this.parent.editableElement ?
@@ -25718,13 +25699,13 @@ class DOMMethods {
25718
25699
  */
25719
25700
  getParentBlockNode(node) {
25720
25701
  const treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
25721
- NodeFilter.SHOW_ELEMENT, // whatToShow
25722
- {
25723
- acceptNode: (currentNode) => {
25724
- // Check if the node is a block element
25725
- return this.isBlockNode(currentNode) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
25726
- }
25727
- });
25702
+ NodeFilter.SHOW_ELEMENT, // whatToShow
25703
+ {
25704
+ acceptNode: (currentNode) => {
25705
+ // Check if the node is a block element
25706
+ return this.isBlockNode(currentNode) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
25707
+ }
25708
+ });
25728
25709
  treeWalker.currentNode = node;
25729
25710
  const blockParent = treeWalker.parentNode();
25730
25711
  return blockParent;
@@ -26023,9 +26004,9 @@ class LinkCommand {
26023
26004
  }
26024
26005
  else {
26025
26006
  this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, appliedNodes[0], // Start Node
26026
- appliedNodes[appliedNodes.length - 1], // end Node
26027
- 0, // start offset
26028
- appliedNodes[appliedNodes.length - 1].textContent.length // end offset
26007
+ appliedNodes[appliedNodes.length - 1], // end Node
26008
+ 0, // start offset
26009
+ appliedNodes[appliedNodes.length - 1].textContent.length // end offset
26029
26010
  );
26030
26011
  }
26031
26012
  }
@@ -26531,7 +26512,8 @@ class ImageCommand {
26531
26512
  }
26532
26513
  if (!isNullOrUndefined(e.selector) && e.selector === 'pasteCleanupModule') {
26533
26514
  if (!isNullOrUndefined(this.parent.currentDocument)) {
26534
- e.callBack({ requestType: 'Images',
26515
+ e.callBack({
26516
+ requestType: 'Images',
26535
26517
  editorMode: 'HTML',
26536
26518
  event: e.event,
26537
26519
  range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
@@ -27862,9 +27844,9 @@ class TableCommand {
27862
27844
  this.updateColSpanStyle(minMaxIndexes.startColumn, minMaxIndexes.endColumn, this.getCorrespondingColumns());
27863
27845
  e.item.selection.setSelectionText(this.parent.currentDocument, e.item.selection.range.startContainer, e.item.selection.range.startContainer, 0, 0);
27864
27846
  if (this.parent.nodeSelection && firstCell) {
27865
- this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
27866
- // eslint-disable-next-line
27867
- firstCell, 0);
27847
+ this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
27848
+ // eslint-disable-next-line
27849
+ firstCell, 0);
27868
27850
  }
27869
27851
  if (e.callBack) {
27870
27852
  e.callBack({
@@ -27932,7 +27914,7 @@ class TableCommand {
27932
27914
  if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0])
27933
27915
  // eslint-disable-next-line no-cond-assign
27934
27916
  && eleArray[rowValue][0] && 1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) ||
27935
- 1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
27917
+ 1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
27936
27918
  for (count = index - 1, colIndex = 1; colIndex < eleArray[0].length; colIndex++) {
27937
27919
  if (eleArray[rowValue][colIndex] !== eleArray[rowValue][colIndex - 1]) {
27938
27920
  for (rowMin = rowValue; rowMin < rowValue + index; rowMin++) {
@@ -27967,7 +27949,7 @@ class TableCommand {
27967
27949
  spanCount = parseInt(elements[rowIndex][colIndex].getAttribute(attr), 10) || 1;
27968
27950
  if (min < rowIndex && elements[rowIndex][colIndex] === elements[rowIndex - 1][colIndex] ||
27969
27951
  firstIndex < colIndex && elements[rowIndex][colIndex] ===
27970
- elements[rowIndex][colIndex - 1] || 1 < (spanCount)) {
27952
+ elements[rowIndex][colIndex - 1] || 1 < (spanCount)) {
27971
27953
  if ((1 < spanCount - index)) {
27972
27954
  elements[rowIndex][colIndex].setAttribute(attr, (spanCount - index).toString());
27973
27955
  }
@@ -28037,9 +28019,9 @@ class TableCommand {
28037
28019
  for (avgRowIndex = activeCellIndex[0] + Math.ceil(activeCellRowSpan / 2),
28038
28020
  colIndex = 0 === activeCellIndex[1] ? activeCellIndex[1]
28039
28021
  : activeCellIndex[1] - 1; 0 <= colIndex && (correspondingCells[avgRowIndex][colIndex] ===
28040
- // eslint-disable-next-line max-len
28041
- correspondingCells[avgRowIndex][colIndex - 1] || 0 < avgRowIndex && correspondingCells[avgRowIndex][colIndex]
28042
- === correspondingCells[avgRowIndex - 1][colIndex]);) {
28022
+ // eslint-disable-next-line max-len
28023
+ correspondingCells[avgRowIndex][colIndex - 1] || 0 < avgRowIndex && correspondingCells[avgRowIndex][colIndex]
28024
+ === correspondingCells[avgRowIndex - 1][colIndex]);) {
28043
28025
  colIndex--;
28044
28026
  }
28045
28027
  if (colIndex === -1) {
@@ -28471,8 +28453,8 @@ class SelectionCommands {
28471
28453
  else if (range.startContainer.nodeType === 3 && ((range.startContainer.parentElement.childElementCount > 0 &&
28472
28454
  range.startOffset > 0 && range.startContainer.parentElement.firstElementChild.tagName.toLowerCase() !== 'br') ||
28473
28455
  !isNullOrUndefined(currentFormatNode) && currentFormatNode ===
28474
- (range.startContainer.parentElement.closest(currentSelector)) &&
28475
- ((range.startContainer.parentElement.closest(currentSelector)).textContent.replace(new RegExp('\u200B', 'g'), '').trim().length !== 0))) {
28456
+ (range.startContainer.parentElement.closest(currentSelector)) &&
28457
+ ((range.startContainer.parentElement.closest(currentSelector)).textContent.replace(new RegExp('\u200B', 'g'), '').trim().length !== 0))) {
28476
28458
  isCollapsed = true;
28477
28459
  range = nodeCutter.GetCursorRange(docElement, range, range.startContainer);
28478
28460
  nodes.push(range.startContainer);
@@ -28800,9 +28782,9 @@ class SelectionCommands {
28800
28782
  if (child[0] && !isFontStyle) {
28801
28783
  let nodeTraverse = child[index] ? child[index] : child[0];
28802
28784
  const textNode = nodeTraverse;
28803
- for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
28804
- // eslint-disable-next-line
28805
- nodeTraverse = nodeTraverse) {
28785
+ for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
28786
+ // eslint-disable-next-line
28787
+ nodeTraverse = nodeTraverse) {
28806
28788
  let nodeTraverseCondition;
28807
28789
  if (formatNode.nodeName === 'SPAN') {
28808
28790
  nodeTraverseCondition = nodeTraverse.parentElement.tagName.toLocaleLowerCase()
@@ -28895,7 +28877,7 @@ class SelectionCommands {
28895
28877
  let isNestedListItem = false;
28896
28878
  if (!isNullOrUndefined(liElement) && liElement.childNodes) {
28897
28879
  for (let num = 0; num < liElement.childNodes.length; num++) {
28898
- if (liElement.childNodes[num].nodeName === ('OL' )) {
28880
+ if (liElement.childNodes[num].nodeName === ('OL')) {
28899
28881
  nestedListCount++;
28900
28882
  isNestedList = true;
28901
28883
  }
@@ -28921,7 +28903,7 @@ class SelectionCommands {
28921
28903
  }
28922
28904
  if (isNestedListItem) {
28923
28905
  for (let num = 0; num < liElement.childNodes.length; num++) {
28924
- if (liElement.childNodes[num].nodeName === ('OL' )) {
28906
+ if (liElement.childNodes[num].nodeName === ('OL')) {
28925
28907
  liElement.childNodes[num].style.fontSize = 'initial';
28926
28908
  }
28927
28909
  }
@@ -29721,7 +29703,7 @@ class ClearFormat$1 {
29721
29703
  }
29722
29704
  else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
29723
29705
  childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
29724
- childNodes[index2].nodeName.toLocaleLowerCase()) {
29706
+ childNodes[index2].nodeName.toLocaleLowerCase()) {
29725
29707
  InsertMethods.unwrap(childNodes[index2]);
29726
29708
  }
29727
29709
  }
@@ -29732,9 +29714,9 @@ class ClearFormat$1 {
29732
29714
  }
29733
29715
  }
29734
29716
  }
29735
- static clearInlines(textNodes, nodes, range, nodeCutter,
29736
- // eslint-disable-next-line
29737
- endNode) {
29717
+ static clearInlines(textNodes, nodes, range, nodeCutter,
29718
+ // eslint-disable-next-line
29719
+ endNode) {
29738
29720
  for (let index = 0; index < textNodes.length; index++) {
29739
29721
  let currentInlineNode = textNodes[index];
29740
29722
  let currentNode;
@@ -30474,8 +30456,8 @@ class MsWordPaste {
30474
30456
  if (allElements[i].children.length === 0 && allElements[i].innerHTML === '&nbsp;' &&
30475
30457
  (allElements[i].innerHTML === '&nbsp;' && !allElements[i].closest('li')) &&
30476
30458
  !allElements[i].closest('td') && (allElements[i].nodeName !== 'SPAN' ||
30477
- allElements[i].nodeName === 'SPAN' && (isNullOrUndefined(allElements[i].previousElementSibling) &&
30478
- isNullOrUndefined(allElements[i].nextElementSibling)))) {
30459
+ allElements[i].nodeName === 'SPAN' && (isNullOrUndefined(allElements[i].previousElementSibling) &&
30460
+ isNullOrUndefined(allElements[i].nextElementSibling)))) {
30479
30461
  const detachableElement = this.findDetachElem(allElements[i]);
30480
30462
  const brElement = createElement('br');
30481
30463
  const hasNbsp = detachableElement.textContent.length > 0 && detachableElement.textContent.match(/\u00a0/g)
@@ -32083,11 +32065,14 @@ class EditorManager {
32083
32065
  execCommand(command, value, event, callBack, text, exeValue, selector, enterAction) {
32084
32066
  switch (command.toLowerCase()) {
32085
32067
  case 'lists':
32086
- this.observer.notify(LIST_TYPE, { subCommand: value, event: event, callBack: callBack,
32087
- selector: selector, item: exeValue, enterAction: enterAction });
32068
+ this.observer.notify(LIST_TYPE, {
32069
+ subCommand: value, event: event, callBack: callBack,
32070
+ selector: selector, item: exeValue, enterAction: enterAction
32071
+ });
32088
32072
  break;
32089
32073
  case 'formats':
32090
- this.observer.notify(FORMAT_TYPE, { subCommand: value, event: event, callBack: callBack,
32074
+ this.observer.notify(FORMAT_TYPE, {
32075
+ subCommand: value, event: event, callBack: callBack,
32091
32076
  selector: selector, exeValue: exeValue, enterAction: enterAction
32092
32077
  });
32093
32078
  break;
@@ -32104,8 +32089,10 @@ class EditorManager {
32104
32089
  });
32105
32090
  break;
32106
32091
  case 'links':
32107
- this.observer.notify(LINK, { command: command, value: value, item: exeValue, event: event, callBack: callBack,
32108
- enterAction: enterAction });
32092
+ this.observer.notify(LINK, {
32093
+ command: command, value: value, item: exeValue, event: event, callBack: callBack,
32094
+ enterAction: enterAction
32095
+ });
32109
32096
  break;
32110
32097
  case 'files':
32111
32098
  this.observer.notify(IMAGE, {
@@ -32190,8 +32177,10 @@ class EditorManager {
32190
32177
  this.observer.notify(FORMAT_PAINTER_ACTIONS, { item: exeValue, subCommand: value, event: event, callBack: callBack });
32191
32178
  break;
32192
32179
  case 'emojipicker':
32193
- this.observer.notify(EMOJI_PICKER_ACTIONS, { item: exeValue, subCommand: value, value: text,
32194
- event: event, callBack: callBack });
32180
+ this.observer.notify(EMOJI_PICKER_ACTIONS, {
32181
+ item: exeValue, subCommand: value, value: text,
32182
+ event: event, callBack: callBack
32183
+ });
32195
32184
  }
32196
32185
  }
32197
32186
  editorMouseDown(e) {
@@ -32233,19 +32222,19 @@ class EditorManager {
32233
32222
  }
32234
32223
  getParentBlockNode(node) {
32235
32224
  const treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
32236
- NodeFilter.SHOW_ELEMENT, // whatToShow
32237
- {
32238
- acceptNode: function (currentNode) {
32239
- // Check if the node is a block element
32240
- const displayStyle = window.getComputedStyle(currentNode).display;
32241
- if (displayStyle.indexOf('inline') < 0) {
32242
- return NodeFilter.FILTER_ACCEPT;
32243
- }
32244
- else {
32245
- return NodeFilter.FILTER_SKIP;
32225
+ NodeFilter.SHOW_ELEMENT, // whatToShow
32226
+ {
32227
+ acceptNode: function (currentNode) {
32228
+ // Check if the node is a block element
32229
+ const displayStyle = window.getComputedStyle(currentNode).display;
32230
+ if (displayStyle.indexOf('inline') < 0) {
32231
+ return NodeFilter.FILTER_ACCEPT;
32232
+ }
32233
+ else {
32234
+ return NodeFilter.FILTER_SKIP;
32235
+ }
32246
32236
  }
32247
- }
32248
- });
32237
+ });
32249
32238
  treeWalker.currentNode = node;
32250
32239
  const blockParent = treeWalker.parentNode();
32251
32240
  return blockParent;
@@ -33007,7 +32996,9 @@ class HtmlEditor {
33007
32996
  const eventArgs = {
33008
32997
  callBack: null,
33009
32998
  event: e.args,
33010
- name: 'keydown-handler'
32999
+ name: 'keydown-handler',
33000
+ enterKey: this.parent.enterKey,
33001
+ shiftEnterKey: this.parent.shiftEnterKey
33011
33002
  };
33012
33003
  const actionBeginArgs = {
33013
33004
  cancel: false,
@@ -33143,6 +33134,26 @@ class HtmlEditor {
33143
33134
  if (isNullOrUndefined(this.oldRangeElement)) {
33144
33135
  return;
33145
33136
  }
33137
+ else if (findBlockElement[0].previousSibling) {
33138
+ const prevSibling = findBlockElement[0].previousSibling;
33139
+ const currentElement = findBlockElement[0];
33140
+ if (prevSibling.textContent.trim()) {
33141
+ if (prevSibling.lastChild.nodeName === 'BR') {
33142
+ prevSibling.removeChild(prevSibling.lastChild);
33143
+ }
33144
+ const cursorpointer = prevSibling.lastChild.textContent.length;
33145
+ const lastChild = prevSibling.lastChild;
33146
+ const childNodes = Array.from(currentElement.childNodes);
33147
+ for (let i = 0; i < childNodes.length; i++) {
33148
+ prevSibling.appendChild(childNodes[i].cloneNode(true));
33149
+ }
33150
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastChild, cursorpointer);
33151
+ currentElement.parentNode.removeChild(currentElement);
33152
+ }
33153
+ else {
33154
+ prevSibling.parentNode.removeChild(prevSibling);
33155
+ }
33156
+ }
33146
33157
  else {
33147
33158
  if (this.oldRangeElement.tagName === 'OL' || this.oldRangeElement.tagName === 'UL') {
33148
33159
  this.oldRangeElement = this.oldRangeElement.lastElementChild.lastElementChild
@@ -33158,9 +33169,9 @@ class HtmlEditor {
33158
33169
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastNode.parentElement, lastNode.parentElement.childNodes.length);
33159
33170
  }
33160
33171
  else {
33161
- this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
33162
- // eslint-disable-next-line
33163
- lastNode, lastNode.textContent.length);
33172
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
33173
+ // eslint-disable-next-line
33174
+ lastNode, lastNode.textContent.length);
33164
33175
  }
33165
33176
  let checkParent = false;
33166
33177
  if (this.oldRangeElement && this.oldRangeElement.nodeName !== '#text' && this.oldRangeElement.querySelectorAll('BR').length === 1) {
@@ -33649,8 +33660,10 @@ class HtmlEditor {
33649
33660
  }
33650
33661
  if (!isNullOrUndefined(e.newProp.formatter)) {
33651
33662
  const editElement = this.contentRenderer.getEditPanel();
33652
- const option = { undoRedoSteps: this.parent.undoRedoSteps,
33653
- undoRedoTimer: this.parent.undoRedoTimer };
33663
+ const option = {
33664
+ undoRedoSteps: this.parent.undoRedoSteps,
33665
+ undoRedoTimer: this.parent.undoRedoTimer
33666
+ };
33654
33667
  this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
33655
33668
  }
33656
33669
  }
@@ -33921,28 +33934,6 @@ class PasteCleanup {
33921
33934
  value = tempDivElem.innerHTML;
33922
33935
  const isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
33923
33936
  !isNullOrUndefined(tempDivElem.querySelector('table'));
33924
- const imgElements = tempDivElem.querySelectorAll('img');
33925
- const base = this.parent.contentModule.getDocument().location.origin;
33926
- imgElements.forEach((imgElement) => {
33927
- let imageFileFormat;
33928
- const imgElementSrc = imgElement.getAttribute('src');
33929
- if (!isNullOrUndefined(imgElementSrc) && imgElementSrc !== '') {
33930
- if (imgElementSrc.indexOf('base64') > -1 && imgElementSrc.indexOf('data:') > -1) {
33931
- imageFileFormat = imgElementSrc.split(';')[0].split('/')[1];
33932
- }
33933
- else {
33934
- const parsedUrl = imgElementSrc.indexOf('http') > -1 ? new URL(imgElementSrc) : new URL(imgElementSrc, base);
33935
- const path = parsedUrl.pathname;
33936
- imageFileFormat = path.split('.').pop().toLowerCase();
33937
- }
33938
- if (!isNullOrUndefined(imageFileFormat) &&
33939
- allowedTypes.every((type) => imageFileFormat !== type.substring(1).toLowerCase()) &&
33940
- imgElementSrc.indexOf('blob') === -1) {
33941
- detach(imgElement);
33942
- }
33943
- }
33944
- });
33945
- value = tempDivElem.innerHTML;
33946
33937
  this.parent.notify(cleanupResizeElements, {
33947
33938
  value: value,
33948
33939
  callBack: (currentValue) => {
@@ -34171,14 +34162,14 @@ class PasteCleanup {
34171
34162
  });
34172
34163
  this.uploadObj.appendTo(this.popupObj.element.childNodes[0]);
34173
34164
  const fileInfo = [{
34174
- name: file.name,
34175
- rawFile: file,
34176
- size: file.size,
34177
- type: file.type,
34178
- status: 'Ready to Upload',
34179
- validationMessages: { minSize: '', maxSize: '' },
34180
- statusCode: '1'
34181
- }];
34165
+ name: file.name,
34166
+ rawFile: file,
34167
+ size: file.size,
34168
+ type: file.type,
34169
+ status: 'Ready to Upload',
34170
+ validationMessages: { minSize: '', maxSize: '' },
34171
+ statusCode: '1'
34172
+ }];
34182
34173
  this.uploadObj.createFileList(fileInfo);
34183
34174
  this.uploadObj.upload(fileInfo);
34184
34175
  this.popupObj.element.getElementsByClassName('e-file-select-wrap')[0].style.display = 'none';
@@ -34191,7 +34182,11 @@ class PasteCleanup {
34191
34182
  this.parent.inputElement.contentEditable = 'true';
34192
34183
  detach(imgElem);
34193
34184
  if (popupObj) {
34194
- popupObj.close();
34185
+ this.parent.isBlur = false;
34186
+ popupObj.destroy();
34187
+ if (!isNullOrUndefined(popupObj.element)) {
34188
+ detach(popupObj.element);
34189
+ }
34195
34190
  }
34196
34191
  this.parent.trigger(imageUploadFailed, e);
34197
34192
  if (uploadObj && document.body.contains(uploadObj.element)) {
@@ -34207,7 +34202,7 @@ class PasteCleanup {
34207
34202
  this.parent.trigger(imageUploadSuccess, e, (e) => {
34208
34203
  if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
34209
34204
  const url = this.parent.insertImageSettings.path + e.file.name;
34210
- if (!this.parent.inputElement.contains(imgElem)) {
34205
+ if (!this.parent.inputElement.contains(imgElem) && imgElem.id) {
34211
34206
  const imgHtmlElems = this.parent.inputElement.querySelectorAll('#' + imgElem.id);
34212
34207
  for (let i = 0; i < imgHtmlElems.length; i++) {
34213
34208
  const imgHtmlElem = imgHtmlElems[i];
@@ -34232,13 +34227,22 @@ class PasteCleanup {
34232
34227
  });
34233
34228
  }
34234
34229
  this.popupCloseTime = setTimeout(() => {
34235
- popupObj.close();
34236
- if (!this.parent.inputElement.contains(imgElem)) {
34237
- const imgHtmlElems = this.parent.inputElement.querySelectorAll('#' + imgElem.id);
34238
- for (let i = 0; i < imgHtmlElems.length; i++) {
34239
- const imgHtmlElem = imgHtmlElems[i];
34240
- if (imgHtmlElem && imgHtmlElem.style && imgHtmlElem.style.opacity === '0.5') {
34241
- imgHtmlElem.style.opacity = '1';
34230
+ if (popupObj) {
34231
+ this.parent.isBlur = false;
34232
+ popupObj.destroy();
34233
+ if (!isNullOrUndefined(popupObj.element)) {
34234
+ detach(popupObj.element);
34235
+ }
34236
+ }
34237
+ if (!this.parent.inputElement.contains(imgElem) && (imgElem.id || imgElem.alt)) {
34238
+ const selector = imgElem.id ? `#${imgElem.id}` : `[alt="${imgElem.alt}"]`;
34239
+ if (selector) {
34240
+ const imgHtmlElems = this.parent.inputElement.querySelectorAll(selector);
34241
+ for (let i = 0; i < imgHtmlElems.length; i++) {
34242
+ const imgHtmlElem = imgHtmlElems[i];
34243
+ if (imgHtmlElem && imgHtmlElem.style && imgHtmlElem.style.opacity === '0.5') {
34244
+ imgHtmlElem.style.opacity = '1';
34245
+ }
34242
34246
  }
34243
34247
  }
34244
34248
  }
@@ -34320,8 +34324,10 @@ class PasteCleanup {
34320
34324
  }
34321
34325
  }
34322
34326
  radioRender() {
34323
- this.keepRadioButton = new RadioButton({ label: this.i10n.getConstant('keepFormat'),
34324
- name: 'pasteOption', checked: true });
34327
+ this.keepRadioButton = new RadioButton({
34328
+ label: this.i10n.getConstant('keepFormat'),
34329
+ name: 'pasteOption', checked: true
34330
+ });
34325
34331
  this.keepRadioButton.isStringTemplate = true;
34326
34332
  const keepFormatElement = this.parent.element.querySelector('#keepFormating');
34327
34333
  this.keepRadioButton.appendTo(keepFormatElement);
@@ -35035,13 +35041,24 @@ class Resize {
35035
35041
  this.iframeElement = this.parent.contentModule.getDocument().querySelectorAll('iframe');
35036
35042
  if (!isNullOrUndefined(this.iframeElement)) {
35037
35043
  this.iframeElement.forEach((iframe) => {
35038
- EventHandler.add(iframe.contentDocument, 'mouseup', this.stopResize, this);
35044
+ EventHandler.add(iframe, 'load', this.onIFrameLoad, this);
35039
35045
  });
35040
35046
  }
35041
35047
  this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
35042
35048
  EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
35043
35049
  EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
35044
35050
  }
35051
+ onIFrameLoad(e) {
35052
+ const iframe = e.target;
35053
+ if (iframe.nodeName === 'IFRAME' && iframe.contentDocument) {
35054
+ EventHandler.add(iframe.contentDocument, 'mouseup', this.stopResize, this);
35055
+ }
35056
+ }
35057
+ removeMouseUpEventListener(iframe) {
35058
+ if (iframe.contentDocument) {
35059
+ EventHandler.remove(iframe.contentDocument, 'mouseup', this.stopResize);
35060
+ }
35061
+ }
35045
35062
  resizeStart(e) {
35046
35063
  this.isResizing = false;
35047
35064
  if (e.cancelable) {
@@ -35145,7 +35162,7 @@ class Resize {
35145
35162
  }
35146
35163
  if (!isNullOrUndefined(this.iframeElement)) {
35147
35164
  this.iframeElement.forEach((iframe) => {
35148
- EventHandler.remove(iframe.contentDocument, 'mouseup', this.stopResize);
35165
+ this.removeMouseUpEventListener(iframe);
35149
35166
  });
35150
35167
  }
35151
35168
  if (this.resizer) {
@@ -35207,13 +35224,13 @@ class FileManager {
35207
35224
  const dlgHeader = this.parent.localeObj.getConstant('fileDialogHeader');
35208
35225
  const dlgCancel = this.i10n.getConstant('dialogCancel');
35209
35226
  this.dlgButtons = [{
35210
- click: this.insertImageBoundFn,
35211
- buttonModel: { content: dlgInsert, cssClass: 'e-flat e-insertImage', isPrimary: true, disabled: true }
35212
- },
35213
- {
35214
- click: this.cancelDialogBoundFn,
35215
- buttonModel: { cssClass: 'e-flat e-cancel', content: dlgCancel }
35216
- }];
35227
+ click: this.insertImageBoundFn,
35228
+ buttonModel: { content: dlgInsert, cssClass: 'e-flat e-insertImage', isPrimary: true, disabled: true }
35229
+ },
35230
+ {
35231
+ click: this.cancelDialogBoundFn,
35232
+ buttonModel: { cssClass: 'e-flat e-cancel', content: dlgCancel }
35233
+ }];
35217
35234
  this.selectObj = { selection: e.selection, args: e.args, selectParent: e.selectParent };
35218
35235
  const dlgTarget = this.parent.createElement('div', {
35219
35236
  className: 'e-rte-file-manager-dialog', id: this.parent.getID() + '_file-manager-dialog',
@@ -36755,25 +36772,25 @@ class ImportExport {
36755
36772
  body: JSON.stringify({ html: actionBeginArgs.exportValue })
36756
36773
  })
36757
36774
  .then((response) => {
36758
- if (!response.ok) {
36759
- throw new Error(`HTTP error! Status: ${response.status}`);
36760
- }
36761
- return response.blob().then((blob) => ({ blob, filename }));
36762
- })
36775
+ if (!response.ok) {
36776
+ throw new Error(`HTTP error! Status: ${response.status}`);
36777
+ }
36778
+ return response.blob().then((blob) => ({ blob, filename }));
36779
+ })
36763
36780
  .then(({ blob, filename }) => {
36764
- const url = window.URL.createObjectURL(blob);
36765
- const a = document.createElement('a');
36766
- a.href = url;
36767
- a.download = filename;
36768
- document.body.appendChild(a);
36769
- a.click();
36770
- document.body.removeChild(a);
36771
- window.URL.revokeObjectURL(url);
36772
- this.parent.trigger(actionComplete, { requestType: args.member });
36773
- })
36781
+ const url = window.URL.createObjectURL(blob);
36782
+ const a = document.createElement('a');
36783
+ a.href = url;
36784
+ a.download = filename;
36785
+ document.body.appendChild(a);
36786
+ a.click();
36787
+ document.body.removeChild(a);
36788
+ window.URL.revokeObjectURL(url);
36789
+ this.parent.trigger(actionComplete, { requestType: args.member });
36790
+ })
36774
36791
  .catch((error) => {
36775
- console.error('Fetch error:', error);
36776
- });
36792
+ console.error('Fetch error:', error);
36793
+ });
36777
36794
  }
36778
36795
  });
36779
36796
  }
@@ -37726,7 +37743,7 @@ class EnterKeyAction {
37726
37743
  if ((this.parent.enterKey === 'P' && !shiftKey) || (this.parent.enterKey === 'DIV' && !shiftKey) ||
37727
37744
  (this.parent.shiftEnterKey === 'P' && shiftKey) ||
37728
37745
  (this.parent.shiftEnterKey === 'DIV' && shiftKey)) {
37729
- if ((this.range.startOffset === 1 && this.parent.inputElement.childNodes.length === 1 && this.parent.inputElement.childNodes[0].nodeName === 'TABLE') || (this.parent.enterKey === 'BR' && shiftKey)) {
37746
+ if ((this.range.startOffset === 1 && this.parent.inputElement.childNodes.length === 1 && this.parent.inputElement.childNodes[0].nodeName === 'TABLE')) {
37730
37747
  const newElem = this.createInsertElement(shiftKey);
37731
37748
  newElem.appendChild(this.parent.createElement('BR'));
37732
37749
  this.parent.inputElement.appendChild(newElem);
@@ -37758,7 +37775,7 @@ class EnterKeyAction {
37758
37775
  }
37759
37776
  if (this.range.startOffset !== 0 && this.range.endOffset !== 0 &&
37760
37777
  this.range.startContainer === this.range.endContainer && !(!isNullOrUndefined(nearBlockNode.childNodes[0])
37761
- && (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
37778
+ && (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
37762
37779
  const startNodeText = this.range.startContainer.textContent;
37763
37780
  const splitFirstText = startNodeText.substring(0, this.range.startOffset);
37764
37781
  const lastCharBeforeCursor = splitFirstText.charCodeAt(this.range.startOffset - 1);
@@ -37785,8 +37802,9 @@ class EnterKeyAction {
37785
37802
  (this.range.startContainer.nodeName === '#text' && !isNullOrUndefined(this.range.startContainer.textContent[this.range.startOffset]) &&
37786
37803
  this.range.startContainer.textContent[this.range.startOffset].includes('\u200B') && this.range.startContainer.textContent[this.range.startOffset] === '\u200B' &&
37787
37804
  this.parent.inputElement.textContent[0] !== '\u200B'));
37805
+ const preventEnterkeyShiftKey = (this.range.startContainer.nodeName === '#text' || this.range.startContainer.nodeName === 'BR') && (this.range.startOffset === 0 && this.range.endOffset === 0) && this.range.startContainer.parentElement === this.parent.inputElement && this.parent.enterKey === 'BR' && shiftKey;
37788
37806
  // eslint-disable-next-line max-len
37789
- if (!preventZeroWithSpace && !fireFoxEnterAtMiddle && ((this.range.startOffset === 0 && this.range.endOffset === 0) || isFocusedFirst) &&
37807
+ if (!preventEnterkeyShiftKey && !preventZeroWithSpace && !fireFoxEnterAtMiddle && ((this.range.startOffset === 0 && this.range.endOffset === 0) || isFocusedFirst) &&
37790
37808
  !(!isNullOrUndefined(this.range.startContainer.previousSibling) &&
37791
37809
  (this.range.startContainer.previousSibling.nodeName === 'IMG' || this.range.startContainer.previousSibling.nodeName === 'BR'))) {
37792
37810
  let isNearBlockLengthZero;
@@ -37851,7 +37869,7 @@ class EnterKeyAction {
37851
37869
  }
37852
37870
  this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
37853
37871
  }
37854
- else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
37872
+ else if (nearBlockNode !== this.parent.inputElement && nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
37855
37873
  (nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
37856
37874
  if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
37857
37875
  const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, false).cloneNode(true);
@@ -37907,6 +37925,36 @@ class EnterKeyAction {
37907
37925
  this.parent.videoModule.hideVideoQuickToolbar();
37908
37926
  }
37909
37927
  }
37928
+ else if (this.parent.enterKey === 'BR' && shiftKey && this.range.startContainer.nodeType === Node.TEXT_NODE && this.range.startContainer.parentElement && this.range.startContainer.parentElement === this.parent.inputElement) {
37929
+ const range = this.range;
37930
+ const startContainer = range.startContainer;
37931
+ const startOffset = range.startOffset;
37932
+ const newElement = this.parent.createElement(this.parent.shiftEnterKey);
37933
+ if (startContainer.nodeType === Node.TEXT_NODE && range.endOffset !== 0 && range.startOffset !== 0) {
37934
+ const textNode = startContainer;
37935
+ if (startOffset < textNode.length) {
37936
+ const newTextNode = textNode.splitText(startOffset);
37937
+ newElement.appendChild(newTextNode);
37938
+ }
37939
+ else {
37940
+ newElement.innerHTML = '<br>';
37941
+ }
37942
+ textNode.parentNode.insertBefore(newElement, textNode.nextSibling);
37943
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), newElement, 0);
37944
+ }
37945
+ else if (startOffset === 0 && range.endOffset === 0) {
37946
+ newElement.innerHTML = '<br>';
37947
+ if (range.endOffset === startContainer.textContent.length) {
37948
+ const brElement = this.parent.createElement('br');
37949
+ startContainer.parentNode.insertBefore(brElement, startContainer);
37950
+ }
37951
+ startContainer.parentNode.insertBefore(newElement, startContainer);
37952
+ const cursorTarget = (range.endOffset === startContainer.textContent.length)
37953
+ ? newElement : newElement.nextSibling;
37954
+ startContainer.parentNode.insertBefore(newElement, startContainer);
37955
+ this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), cursorTarget, 0);
37956
+ }
37957
+ }
37910
37958
  else {
37911
37959
  const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, true);
37912
37960
  if (!isNullOrUndefined(newElem.childNodes[0]) && newElem.childNodes[0].nodeName === '#text' &&
@@ -37978,7 +38026,7 @@ class EnterKeyAction {
37978
38026
  this.range.startContainer.textContent.length : currentParent.textContent.length;
37979
38027
  const isImageElement = (this.range.startContainer.nodeName === 'IMG' || (this.range.startContainer.childNodes.length > 0
37980
38028
  && !isNullOrUndefined(this.range.startContainer.childNodes[this.range.startOffset]) && this.range.startContainer.childNodes[this.range.startOffset].nodeName === 'IMG') || (this.range.startContainer.nodeType === 1 &&
37981
- this.range.startContainer.querySelector('img') !== null));
38029
+ this.range.startContainer.querySelector('img') !== null));
37982
38030
  if (currentParent !== this.parent.inputElement &&
37983
38031
  this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
37984
38032
  this.range.startOffset === this.range.endOffset &&
@@ -38071,7 +38119,7 @@ class EnterKeyAction {
38071
38119
  removeBRElement(currentElement) {
38072
38120
  if (Browser.userAgent.indexOf('Firefox') !== -1 &&
38073
38121
  this.range.endOffset === currentElement.textContent.length && (currentElement.textContent.length !== 0 ||
38074
- currentElement.querySelectorAll('BR').length > 1) &&
38122
+ currentElement.querySelectorAll('BR').length > 1) &&
38075
38123
  !isNullOrUndefined(currentElement.lastChild) && currentElement.lastChild.nodeName === 'BR') {
38076
38124
  detach(currentElement.lastChild);
38077
38125
  }
@@ -38662,8 +38710,10 @@ let RichTextEditor = class RichTextEditor extends Component {
38662
38710
  break;
38663
38711
  case 'insertTable':
38664
38712
  if (isNullOrUndefined(value.width)) {
38665
- value.width = { minWidth: this.tableSettings.minWidth,
38666
- maxWidth: this.tableSettings.maxWidth, width: this.tableSettings.width };
38713
+ value.width = {
38714
+ minWidth: this.tableSettings.minWidth,
38715
+ maxWidth: this.tableSettings.maxWidth, width: this.tableSettings.width
38716
+ };
38667
38717
  }
38668
38718
  break;
38669
38719
  case 'insertImage': {
@@ -38682,12 +38732,16 @@ let RichTextEditor = class RichTextEditor extends Component {
38682
38732
  url = !isNullOrUndefined(url) ? url : '';
38683
38733
  value.url = url;
38684
38734
  if (isNullOrUndefined(value.width)) {
38685
- value.width = { minWidth: this.insertImageSettings.minWidth,
38686
- maxWidth: this.insertImageSettings.maxWidth, width: this.insertImageSettings.width };
38735
+ value.width = {
38736
+ minWidth: this.insertImageSettings.minWidth,
38737
+ maxWidth: this.insertImageSettings.maxWidth, width: this.insertImageSettings.width
38738
+ };
38687
38739
  }
38688
38740
  if (isNullOrUndefined(value.height)) {
38689
- value.height = { minHeight: this.insertImageSettings.minHeight,
38690
- maxHeight: this.insertImageSettings.maxHeight, height: this.insertImageSettings.height };
38741
+ value.height = {
38742
+ minHeight: this.insertImageSettings.minHeight,
38743
+ maxHeight: this.insertImageSettings.maxHeight, height: this.insertImageSettings.height
38744
+ };
38691
38745
  }
38692
38746
  break;
38693
38747
  }
@@ -38740,12 +38794,16 @@ let RichTextEditor = class RichTextEditor extends Component {
38740
38794
  url = !isNullOrUndefined(url) ? url : '';
38741
38795
  value.url = url;
38742
38796
  if (isNullOrUndefined(value.width)) {
38743
- value.width = { minWidth: this.insertVideoSettings.minWidth,
38744
- maxWidth: this.insertVideoSettings.maxWidth, width: this.insertVideoSettings.width };
38797
+ value.width = {
38798
+ minWidth: this.insertVideoSettings.minWidth,
38799
+ maxWidth: this.insertVideoSettings.maxWidth, width: this.insertVideoSettings.width
38800
+ };
38745
38801
  }
38746
38802
  if (isNullOrUndefined(value.height)) {
38747
- value.height = { minHeight: this.insertVideoSettings.minHeight,
38748
- maxHeight: this.insertVideoSettings.maxHeight, height: this.insertVideoSettings.height };
38803
+ value.height = {
38804
+ minHeight: this.insertVideoSettings.minHeight,
38805
+ maxHeight: this.insertVideoSettings.maxHeight, height: this.insertVideoSettings.height
38806
+ };
38749
38807
  }
38750
38808
  break;
38751
38809
  }
@@ -39158,9 +39216,12 @@ let RichTextEditor = class RichTextEditor extends Component {
39158
39216
  }
39159
39217
  notifyMouseUp(e) {
39160
39218
  const touch = (e.touches ? e.changedTouches[0] : e);
39161
- this.notify(mouseUp, { member: 'mouseUp', args: e,
39162
- touchData: { prevClientX: this.clickPoints.clientX, prevClientY: this.clickPoints.clientY,
39163
- clientX: touch.clientX, clientY: touch.clientY }
39219
+ this.notify(mouseUp, {
39220
+ member: 'mouseUp', args: e,
39221
+ touchData: {
39222
+ prevClientX: this.clickPoints.clientX, prevClientY: this.clickPoints.clientY,
39223
+ clientX: touch.clientX, clientY: touch.clientY
39224
+ }
39164
39225
  });
39165
39226
  if (this.inputElement && ((this.editorMode === 'HTML' && ((this.inputElement.textContent.length !== 0) || e.target && !isNullOrUndefined(e.target.querySelector('li')))) ||
39166
39227
  (this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) ||
@@ -39769,7 +39830,7 @@ let RichTextEditor = class RichTextEditor extends Component {
39769
39830
  this.placeHolderWrapper.innerHTML = this.placeholder;
39770
39831
  if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
39771
39832
  ((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
39772
- this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
39833
+ this.inputElement.firstChild.childNodes.length < 2 && this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
39773
39834
  this.placeHolderWrapper.classList.add('enabled');
39774
39835
  }
39775
39836
  else {
@@ -40501,9 +40562,12 @@ let RichTextEditor = class RichTextEditor extends Component {
40501
40562
  this.removeSelectionClassStates(this.inputElement);
40502
40563
  this.notify(focusChange, {});
40503
40564
  const value = this.getUpdatedValue();
40504
- this.setProperties({ value: value });
40565
+ if (!this.rootContainer.classList.contains('e-source-code-enabled')) {
40566
+ this.setProperties({ value: value }, true);
40567
+ } else {
40568
+ this.setProperties({ value: value });
40569
+ }
40505
40570
  this.valueContainer.value = this.value;
40506
- this.notify(toolbarRefresh, { args: e, documentNode: document });
40507
40571
  this.isValueChangeBlurhandler = true;
40508
40572
  this.invokeChangeEvent();
40509
40573
  this.isFocusOut = true;