@syncfusion/ej2-richtexteditor 28.1.39 → 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.
- package/.eslintignore +4 -4
- package/.eslintrc.json +260 -260
- package/README.md +76 -76
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +530 -460
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +639 -569
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +84 -84
- package/src/common/interface.d.ts +8 -8
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +3 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +9 -9
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +3 -3
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.d.ts +36 -36
- package/src/editor-manager/plugin/dom-node.js +36 -36
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
- package/src/editor-manager/plugin/format-painter-actions.js +1 -1
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +3 -3
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml.js +2 -2
- package/src/editor-manager/plugin/isformatted.d.ts +9 -9
- package/src/editor-manager/plugin/isformatted.js +9 -9
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +2 -2
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +1 -1
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
- package/src/rich-text-editor/actions/html-editor.js +23 -3
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +20 -20
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +23 -32
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/resize.d.ts +2 -0
- package/src/rich-text-editor/actions/resize.js +13 -2
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +125 -125
- package/src/rich-text-editor/base/classes.js +125 -125
- package/src/rich-text-editor/base/constant.d.ts +158 -158
- package/src/rich-text-editor/base/constant.js +158 -158
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +51 -51
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +62 -62
- package/src/rich-text-editor/base/rich-text-editor.js +66 -49
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +1 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +8 -8
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/slash-menu-settings.js +19 -19
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +1 -1
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +1 -1
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +1 -1
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +1 -1
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -9
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +1 -1
- package/src/rich-text-editor/renderer/view-source.d.ts +5 -5
- package/src/rich-text-editor/renderer/view-source.js +5 -5
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +22 -22
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.scss +1 -1
- package/dist/ej2-richtexteditor.min.js +0 -10
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -2513,185 +2513,185 @@ let windowKeys = {
|
|
|
2513
2513
|
'inlineCode': 'ctrl+`'
|
|
2514
2514
|
};
|
|
2515
2515
|
const defaultEmojiIcons = [{
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4334
|
+
range.collapse(!0)),
|
|
4335
4335
|
range);
|
|
4336
4336
|
}
|
|
4337
4337
|
/**
|
|
@@ -5984,13 +5984,18 @@ class ToolbarRenderer {
|
|
|
5984
5984
|
(proxy.parent.iframeSettings.enable && !hasClass(parentNode.ownerDocument.querySelector('body'), 'e-lib')))
|
|
5985
5985
|
&& range.collapsed && args.subCommand === 'BackgroundColor' && (closest(closestElement, '.' + CLS_RTE) || proxy.parent.iframeSettings.enable)) {
|
|
5986
5986
|
proxy.parent.notify(tableColorPickerChanged, {
|
|
5987
|
-
item: {
|
|
5988
|
-
|
|
5987
|
+
item: {
|
|
5988
|
+
command: args.command, subCommand: args.subCommand,
|
|
5989
|
+
value: colorpickerValue
|
|
5990
|
+
}
|
|
5989
5991
|
});
|
|
5990
5992
|
}
|
|
5991
5993
|
else {
|
|
5992
|
-
proxy.parent.notify(colorPickerChanged, {
|
|
5993
|
-
|
|
5994
|
+
proxy.parent.notify(colorPickerChanged, {
|
|
5995
|
+
item: {
|
|
5996
|
+
command: args.command, subCommand: args.subCommand,
|
|
5997
|
+
value: colorpickerValue
|
|
5998
|
+
}
|
|
5994
5999
|
});
|
|
5995
6000
|
}
|
|
5996
6001
|
return;
|
|
@@ -6031,15 +6036,19 @@ class ToolbarRenderer {
|
|
|
6031
6036
|
range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
|
|
6032
6037
|
if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' ||
|
|
6033
6038
|
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed) {
|
|
6034
|
-
proxy.parent.notify(tableColorPickerChanged, {
|
|
6039
|
+
proxy.parent.notify(tableColorPickerChanged, {
|
|
6040
|
+
item: {
|
|
6035
6041
|
command: args.command, subCommand: args.subCommand,
|
|
6036
6042
|
value: colorpickerValue
|
|
6037
6043
|
}
|
|
6038
6044
|
});
|
|
6039
6045
|
}
|
|
6040
6046
|
else {
|
|
6041
|
-
proxy.parent.notify(colorPickerChanged, {
|
|
6042
|
-
|
|
6047
|
+
proxy.parent.notify(colorPickerChanged, {
|
|
6048
|
+
item: {
|
|
6049
|
+
command: args.command, subCommand: args.subCommand,
|
|
6050
|
+
value: colorpickerValue
|
|
6051
|
+
}
|
|
6043
6052
|
});
|
|
6044
6053
|
}
|
|
6045
6054
|
return;
|
|
@@ -6510,8 +6519,10 @@ class Link {
|
|
|
6510
6519
|
const linkText = linkContent.querySelector('.e-rte-linkText');
|
|
6511
6520
|
const linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
6512
6521
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
6513
|
-
this.checkBoxObj = new CheckBox({
|
|
6514
|
-
|
|
6522
|
+
this.checkBoxObj = new CheckBox({
|
|
6523
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
6524
|
+
cssClass: this.parent.getCssClass()
|
|
6525
|
+
});
|
|
6515
6526
|
this.checkBoxObj.isStringTemplate = true;
|
|
6516
6527
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
6517
6528
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -6530,10 +6541,10 @@ class Link {
|
|
|
6530
6541
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
6531
6542
|
isModal: Browser.isDevice,
|
|
6532
6543
|
buttons: [{
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
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 } }],
|
|
6537
6548
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
6538
6549
|
animationSettings: { effect: 'None' },
|
|
6539
6550
|
close: (event) => {
|
|
@@ -6755,8 +6766,8 @@ class Link {
|
|
|
6755
6766
|
onDocumentClick(e) {
|
|
6756
6767
|
const target = e.target;
|
|
6757
6768
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
6758
|
-
|
|
6759
|
-
|
|
6769
|
+
// eslint-disable-next-line
|
|
6770
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable &&
|
|
6760
6771
|
this.parent.getToolbarElement() && !this.parent.getToolbarElement().contains(e.target)) ||
|
|
6761
6772
|
(((this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target)) ||
|
|
6762
6773
|
this.parent.inlineMode.enable && !closest(target, '#' + this.dialogObj.element.id)) &&
|
|
@@ -8009,14 +8020,14 @@ class Image$1 {
|
|
|
8009
8020
|
header: this.parent.localeObj.getConstant('imageInsertLinkHeader'),
|
|
8010
8021
|
content: linkWrap,
|
|
8011
8022
|
buttons: [{
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
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
|
+
}],
|
|
8020
8031
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
8021
8032
|
});
|
|
8022
8033
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8057,14 +8068,14 @@ class Image$1 {
|
|
|
8057
8068
|
this.dialogObj.setProperties({
|
|
8058
8069
|
width: '290px', header: altHeader, content: altWrap,
|
|
8059
8070
|
buttons: [{
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
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
|
+
}],
|
|
8068
8079
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
8069
8080
|
});
|
|
8070
8081
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8220,8 +8231,10 @@ class Image$1 {
|
|
|
8220
8231
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
8221
8232
|
});
|
|
8222
8233
|
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
8223
|
-
const imgInner = this.parent.createElement('span', {
|
|
8224
|
-
|
|
8234
|
+
const imgInner = this.parent.createElement('span', {
|
|
8235
|
+
className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
8236
|
+
attrs: { contenteditable: 'true' }
|
|
8237
|
+
});
|
|
8225
8238
|
const parent = e.selectNode[0].parentElement;
|
|
8226
8239
|
if (parent.tagName === 'A') {
|
|
8227
8240
|
parent.setAttribute('contenteditable', 'true');
|
|
@@ -8267,14 +8280,14 @@ class Image$1 {
|
|
|
8267
8280
|
this.dialogObj.setProperties({
|
|
8268
8281
|
width: '290px', header: imgSizeHeader, content: dialogContent,
|
|
8269
8282
|
buttons: [{
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
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
|
+
}],
|
|
8278
8291
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
8279
8292
|
});
|
|
8280
8293
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8359,13 +8372,13 @@ class Image$1 {
|
|
|
8359
8372
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
8360
8373
|
isModal: Browser.isDevice,
|
|
8361
8374
|
buttons: [{
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
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
|
+
}],
|
|
8369
8382
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
8370
8383
|
animationSettings: { effect: 'None' },
|
|
8371
8384
|
close: (event) => {
|
|
@@ -8455,14 +8468,14 @@ class Image$1 {
|
|
|
8455
8468
|
this.parent.currentTarget = e.target;
|
|
8456
8469
|
}
|
|
8457
8470
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
8458
|
-
|
|
8459
|
-
|
|
8471
|
+
// eslint-disable-next-line
|
|
8472
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
8460
8473
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
8461
8474
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
8462
8475
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Image') &&
|
|
8463
8476
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Image')))) {
|
|
8464
8477
|
/* eslint-disable */
|
|
8465
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
8478
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
8466
8479
|
else {
|
|
8467
8480
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
8468
8481
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -8473,7 +8486,7 @@ class Image$1 {
|
|
|
8473
8486
|
}
|
|
8474
8487
|
if (!(this.parent.iframeSettings.enable && !isNullOrUndefined(this.parent.currentTarget) && this.parent.currentTarget.nodeName === 'IMG') &&
|
|
8475
8488
|
e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
|
|
8476
|
-
|
|
8489
|
+
this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
|
|
8477
8490
|
this.contentModule.getEditPanel().contains(this.imgResizeDiv)) {
|
|
8478
8491
|
this.cancelResizeAction();
|
|
8479
8492
|
}
|
|
@@ -8572,8 +8585,8 @@ class Image$1 {
|
|
|
8572
8585
|
}
|
|
8573
8586
|
else if (url !== '') {
|
|
8574
8587
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
8575
|
-
|
|
8576
|
-
|
|
8588
|
+
// eslint-disable-next-line
|
|
8589
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
8577
8590
|
proxy.contentModule.getEditPanel().focus();
|
|
8578
8591
|
const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
8579
8592
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -9801,14 +9814,14 @@ class Audio {
|
|
|
9801
9814
|
this.audEle = target.querySelector('audio');
|
|
9802
9815
|
}
|
|
9803
9816
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
9804
|
-
|
|
9805
|
-
|
|
9817
|
+
// eslint-disable-next-line
|
|
9818
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
9806
9819
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
9807
9820
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
9808
9821
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Audio') &&
|
|
9809
9822
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Audio')))) {
|
|
9810
9823
|
/* eslint-disable */
|
|
9811
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
9824
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
9812
9825
|
else {
|
|
9813
9826
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
9814
9827
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -10008,15 +10021,15 @@ class Audio {
|
|
|
10008
10021
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
10009
10022
|
isModal: Browser.isDevice,
|
|
10010
10023
|
buttons: [{
|
|
10011
|
-
|
|
10012
|
-
|
|
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);
|
|
10013
10030
|
},
|
|
10014
|
-
{
|
|
10015
|
-
|
|
10016
|
-
this.cancelDialog(e);
|
|
10017
|
-
},
|
|
10018
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
|
|
10019
|
-
}],
|
|
10031
|
+
buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
|
|
10032
|
+
}],
|
|
10020
10033
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
10021
10034
|
animationSettings: { effect: 'None' },
|
|
10022
10035
|
close: (event) => {
|
|
@@ -10266,8 +10279,8 @@ class Audio {
|
|
|
10266
10279
|
}
|
|
10267
10280
|
else if (url !== '') {
|
|
10268
10281
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
10269
|
-
|
|
10270
|
-
|
|
10282
|
+
// eslint-disable-next-line
|
|
10283
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
10271
10284
|
proxy.contentModule.getEditPanel().focus();
|
|
10272
10285
|
const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
10273
10286
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -10499,14 +10512,14 @@ class Video {
|
|
|
10499
10512
|
this.dialogObj.setProperties({
|
|
10500
10513
|
width: '290px', header: vidSizeHeader, content: dialogContent,
|
|
10501
10514
|
buttons: [{
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
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
|
+
}]
|
|
10510
10523
|
});
|
|
10511
10524
|
this.dialogObj.element.style.maxHeight = 'inherit';
|
|
10512
10525
|
this.dialogObj.content.querySelector('input').focus();
|
|
@@ -11107,7 +11120,7 @@ class Video {
|
|
|
11107
11120
|
checkVideoBack(range) {
|
|
11108
11121
|
if (range.startContainer.nodeName === '#text' && range.startOffset === 0 &&
|
|
11109
11122
|
!isNullOrUndefined(range.startContainer.previousSibling) && (range.startContainer.previousSibling.nodeName === 'VIDEO' ||
|
|
11110
|
-
|
|
11123
|
+
this.isEmbedVidElem(range.startContainer.previousSibling))) {
|
|
11111
11124
|
this.deletedVid.push(range.startContainer.previousSibling);
|
|
11112
11125
|
}
|
|
11113
11126
|
else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset - 1]) &&
|
|
@@ -11119,7 +11132,7 @@ class Video {
|
|
|
11119
11132
|
checkVideoDel(range) {
|
|
11120
11133
|
if (range.startContainer.nodeName === '#text' && range.startOffset === range.startContainer.textContent.length &&
|
|
11121
11134
|
!isNullOrUndefined(range.startContainer.nextSibling) && (range.startContainer.nextSibling.nodeName === 'VIDEO' ||
|
|
11122
|
-
|
|
11135
|
+
this.isEmbedVidElem(range.startContainer.nextSibling))) {
|
|
11123
11136
|
this.deletedVid.push(range.startContainer.nextSibling);
|
|
11124
11137
|
}
|
|
11125
11138
|
else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset]) &&
|
|
@@ -11236,14 +11249,14 @@ class Video {
|
|
|
11236
11249
|
this.videoEle = !this.isEmbedVidElem(target) ? target : target.querySelector('iframe');
|
|
11237
11250
|
}
|
|
11238
11251
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
11239
|
-
|
|
11240
|
-
|
|
11252
|
+
// eslint-disable-next-line
|
|
11253
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
11241
11254
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
11242
11255
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
11243
11256
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Video') &&
|
|
11244
11257
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Video')))) {
|
|
11245
11258
|
/* eslint-disable */
|
|
11246
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
11259
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
11247
11260
|
else {
|
|
11248
11261
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
11249
11262
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -11432,15 +11445,15 @@ class Video {
|
|
|
11432
11445
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
11433
11446
|
isModal: Browser.isDevice,
|
|
11434
11447
|
buttons: [{
|
|
11435
|
-
|
|
11436
|
-
|
|
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);
|
|
11437
11454
|
},
|
|
11438
|
-
{
|
|
11439
|
-
|
|
11440
|
-
this.cancelDialog(e);
|
|
11441
|
-
},
|
|
11442
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
|
|
11443
|
-
}],
|
|
11455
|
+
buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
|
|
11456
|
+
}],
|
|
11444
11457
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
11445
11458
|
animationSettings: { effect: 'None' },
|
|
11446
11459
|
close: (event) => {
|
|
@@ -11775,8 +11788,8 @@ class Video {
|
|
|
11775
11788
|
}
|
|
11776
11789
|
else if (proxy.parent.editorMode === 'HTML' && (url !== '' || embedUrl !== '')) {
|
|
11777
11790
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
11778
|
-
|
|
11779
|
-
|
|
11791
|
+
// eslint-disable-next-line
|
|
11792
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
11780
11793
|
proxy.contentModule.getEditPanel().focus();
|
|
11781
11794
|
const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
11782
11795
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -12992,7 +13005,7 @@ class Table {
|
|
|
12992
13005
|
const eventArgs = e.args;
|
|
12993
13006
|
if (this.previousTableElement !== ele && !isNullOrUndefined(this.previousTableElement)
|
|
12994
13007
|
&& !eventArgs.shiftKey && (eventArgs.keyCode === 39 || eventArgs.keyCode === 37 ||
|
|
12995
|
-
|
|
13008
|
+
eventArgs.keyCode === 38 || eventArgs.keyCode === 40)) {
|
|
12996
13009
|
removeClassWithAttr([this.previousTableElement], CLS_TABLE_SEL);
|
|
12997
13010
|
this.removeTableSelection();
|
|
12998
13011
|
}
|
|
@@ -13257,7 +13270,7 @@ class Table {
|
|
|
13257
13270
|
const ismacRightClick = /Version\/\d+\.\d+.*Safari/.test(Browser.userAgent) && !/Chrome|Edg|Firefox/.test(Browser.userAgent) && args.which === 3;
|
|
13258
13271
|
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
13259
13272
|
target.nodeName !== 'AUDIO' && (startNode === endNode || ismacRightClick) && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
13260
|
-
|
|
13273
|
+
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
13261
13274
|
&& !(range.startContainer.nodeType === 3 && !(range.collapsed || ismacRightClick)) &&
|
|
13262
13275
|
currentTime - this.resizeEndTime > 100 && !(ismacRightClick && (range.collapsed && range.startOffset !== 0)) && !(ismacRightClick && range.endContainer.nodeName === '#text')) {
|
|
13263
13276
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
@@ -13369,7 +13382,7 @@ class Table {
|
|
|
13369
13382
|
const selection = proxy.parent.formatter.editorManager.nodeSelection.get(proxy.contentModule.getDocument());
|
|
13370
13383
|
if (!isNullOrUndefined(selection) && !isNullOrUndefined(selection.anchorNode) &&
|
|
13371
13384
|
selection.anchorNode.nodeType === Node.ELEMENT_NODE && (selection.anchorNode.tagName === 'TD'
|
|
13372
|
-
|
|
13385
|
+
|| selection.anchorNode.tagName === 'TH')) {
|
|
13373
13386
|
proxy.curTable = closest(selection.anchorNode, 'table');
|
|
13374
13387
|
proxy.activeCell = selection.anchorNode;
|
|
13375
13388
|
}
|
|
@@ -13725,7 +13738,7 @@ class Table {
|
|
|
13725
13738
|
this.helper.classList.add('e-column-helper');
|
|
13726
13739
|
this.helper.style.cssText = 'height: ' + getComputedStyle(this.curTable).height + '; top: ' +
|
|
13727
13740
|
pos.top + 'px; left:' + ((pos.left + this.calcPos(this.columnEle).left) +
|
|
13728
|
-
|
|
13741
|
+
(this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1) + 'px;';
|
|
13729
13742
|
}
|
|
13730
13743
|
else {
|
|
13731
13744
|
this.helper.classList.add('e-row-helper');
|
|
@@ -14263,15 +14276,15 @@ class Table {
|
|
|
14263
14276
|
this.editdlgObj.setProperties({
|
|
14264
14277
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
14265
14278
|
buttons: [{
|
|
14266
|
-
|
|
14267
|
-
|
|
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);
|
|
14268
14285
|
},
|
|
14269
|
-
{
|
|
14270
|
-
|
|
14271
|
-
this.cancelDialog(e);
|
|
14272
|
-
},
|
|
14273
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14274
|
-
}],
|
|
14286
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14287
|
+
}],
|
|
14275
14288
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
14276
14289
|
});
|
|
14277
14290
|
this.editdlgObj.element.style.maxHeight = 'none';
|
|
@@ -14293,15 +14306,15 @@ class Table {
|
|
|
14293
14306
|
proxy.editdlgObj.setProperties({
|
|
14294
14307
|
height: 'initial', width: '290px', content: dlgContent,
|
|
14295
14308
|
buttons: [{
|
|
14296
|
-
|
|
14297
|
-
|
|
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);
|
|
14298
14315
|
},
|
|
14299
|
-
{
|
|
14300
|
-
|
|
14301
|
-
proxy.cancelDialog(e);
|
|
14302
|
-
},
|
|
14303
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
|
|
14304
|
-
}]
|
|
14316
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
|
|
14317
|
+
}]
|
|
14305
14318
|
});
|
|
14306
14319
|
if (!isNullOrUndefined(proxy.parent.cssClass)) {
|
|
14307
14320
|
proxy.editdlgObj.setProperties({ cssClass: proxy.parent.cssClass });
|
|
@@ -14373,14 +14386,14 @@ class Table {
|
|
|
14373
14386
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
14374
14387
|
isModal: Browser.isDevice,
|
|
14375
14388
|
buttons: [{
|
|
14376
|
-
|
|
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);
|
|
14377
14394
|
},
|
|
14378
|
-
{
|
|
14379
|
-
|
|
14380
|
-
this.cancelDialog(e);
|
|
14381
|
-
},
|
|
14382
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14383
|
-
}],
|
|
14395
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14396
|
+
}],
|
|
14384
14397
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
14385
14398
|
animationSettings: { effect: 'None' },
|
|
14386
14399
|
close: (event) => {
|
|
@@ -16695,7 +16708,7 @@ class ToolbarAction {
|
|
|
16695
16708
|
this.parent.notify(selectionRestore, {});
|
|
16696
16709
|
if (!(document.body.contains(document.body.querySelector('.e-rte-quick-toolbar'))
|
|
16697
16710
|
&& e.item && (e.item.command === 'Images' || e.item.command === 'Audios' || e.item.command === 'Videos' ||
|
|
16698
|
-
|
|
16711
|
+
e.item.command === 'VideoLayoutOption' || e.item.command === 'Display' || e.item.command === 'Table'))) {
|
|
16699
16712
|
const value = e.item.controlParent && this.parent.quickToolbarModule && this.parent.quickToolbarModule.tableQTBar
|
|
16700
16713
|
&& this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element) ? 'Table' : null;
|
|
16701
16714
|
if (e.item.command === 'Lists') {
|
|
@@ -17814,8 +17827,10 @@ class BaseQuickToolbar {
|
|
|
17814
17827
|
* @deprecated
|
|
17815
17828
|
*/
|
|
17816
17829
|
showPopup(x, y, target, type) {
|
|
17817
|
-
const eventArgs = {
|
|
17818
|
-
|
|
17830
|
+
const eventArgs = {
|
|
17831
|
+
popup: this.popupObj, cancel: false, targetElement: target,
|
|
17832
|
+
positionX: x, positionY: y
|
|
17833
|
+
};
|
|
17819
17834
|
this.parent.trigger(beforeQuickToolbarOpen, eventArgs, (beforeQuickToolbarArgs) => {
|
|
17820
17835
|
if (!beforeQuickToolbarArgs.cancel) {
|
|
17821
17836
|
let editPanelTop;
|
|
@@ -19659,9 +19674,9 @@ class MDLists {
|
|
|
19659
19674
|
}
|
|
19660
19675
|
this.restore(textArea, start, end + addedLength, event);
|
|
19661
19676
|
}
|
|
19662
|
-
changeTextAreaValue(splitText, prefixValue, event,
|
|
19663
|
-
|
|
19664
|
-
|
|
19677
|
+
changeTextAreaValue(splitText, prefixValue, event,
|
|
19678
|
+
// eslint-disable-next-line
|
|
19679
|
+
textArea, parents, k, end) {
|
|
19665
19680
|
const prefix = prefixValue;
|
|
19666
19681
|
splitText.splice(0, 1);
|
|
19667
19682
|
const textAreaLength = this.selection.getAllParents(textArea.value).length;
|
|
@@ -21001,9 +21016,9 @@ class MDTable {
|
|
|
21001
21016
|
return this.element.value.substr(0, this.element.selectionStart) + text +
|
|
21002
21017
|
this.element.value.substr(this.element.selectionEnd, this.element.value.length);
|
|
21003
21018
|
}
|
|
21004
|
-
checkValid(start, end, text, textAreaInitial,
|
|
21005
|
-
|
|
21006
|
-
|
|
21019
|
+
checkValid(start, end, text, textAreaInitial,
|
|
21020
|
+
// eslint-disable-next-line
|
|
21021
|
+
e, formatSplit, parentText, syntaxArr) {
|
|
21007
21022
|
if (this.ensureStartValid(parentText[0].start, parentText) &&
|
|
21008
21023
|
this.ensureEndValid(parentText[parentText.length - 1].start, formatSplit[0].length)) {
|
|
21009
21024
|
if (start === parentText[0].start) {
|
|
@@ -21342,8 +21357,10 @@ class MarkdownParser {
|
|
|
21342
21357
|
this.observer.notify(CLEAR_COMMAND, { subCommand: value, event: event, callBack: callBack });
|
|
21343
21358
|
break;
|
|
21344
21359
|
case 'inserttext':
|
|
21345
|
-
this.observer.notify(INSERT_TEXT_COMMAND, {
|
|
21346
|
-
|
|
21360
|
+
this.observer.notify(INSERT_TEXT_COMMAND, {
|
|
21361
|
+
subCommand: value, event: event, callBack: callBack,
|
|
21362
|
+
value: { text: exeValue }
|
|
21363
|
+
});
|
|
21347
21364
|
break;
|
|
21348
21365
|
}
|
|
21349
21366
|
}
|
|
@@ -21539,8 +21556,10 @@ class MarkdownEditor {
|
|
|
21539
21556
|
// On property code change here
|
|
21540
21557
|
if (!isNullOrUndefined(e.newProp.formatter)) {
|
|
21541
21558
|
const editElement = this.contentRenderer.getEditPanel();
|
|
21542
|
-
const option = {
|
|
21543
|
-
|
|
21559
|
+
const option = {
|
|
21560
|
+
undoRedoSteps: this.parent.undoRedoSteps,
|
|
21561
|
+
undoRedoTimer: this.parent.undoRedoTimer
|
|
21562
|
+
};
|
|
21544
21563
|
this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
|
|
21545
21564
|
}
|
|
21546
21565
|
}
|
|
@@ -23746,8 +23765,8 @@ class DOMNode {
|
|
|
23746
23765
|
}
|
|
23747
23766
|
else if (node && node.nodeType !== 8 && (node.tagName === 'BR' || (node.nodeType === Node.TEXT_NODE &&
|
|
23748
23767
|
node.textContent.trim() !== '') || (node.nodeType !== Node.TEXT_NODE &&
|
|
23749
|
-
|
|
23750
|
-
|
|
23768
|
+
(node.classList.contains(markerClassName.startSelection) ||
|
|
23769
|
+
node.classList.contains(markerClassName.endSelection)))) &&
|
|
23751
23770
|
IGNORE_BLOCK_TAGS.indexOf(node.parentNode.tagName.toLocaleLowerCase()) >= 0) {
|
|
23752
23771
|
node = this.createTempNode(node);
|
|
23753
23772
|
}
|
|
@@ -24513,7 +24532,7 @@ class Lists {
|
|
|
24513
24532
|
if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
24514
24533
|
range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
24515
24534
|
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName !== 'TABLE' &&
|
|
24516
|
-
|
|
24535
|
+
this.parent.editableElement.childNodes[0].nodeName !== 'IMG')) {
|
|
24517
24536
|
const focusNode = range.startContainer.childNodes[0];
|
|
24518
24537
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, focusNode, focusNode, 0, 0);
|
|
24519
24538
|
range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
@@ -24847,11 +24866,11 @@ class Lists {
|
|
|
24847
24866
|
}
|
|
24848
24867
|
if (element.parentNode.insertBefore(this.closeTag(parentNode.tagName), element),
|
|
24849
24868
|
'LI' === parentNode.parentNode.tagName || 'OL' === parentNode.parentNode.tagName ||
|
|
24850
|
-
|
|
24869
|
+
'UL' === parentNode.parentNode.tagName) {
|
|
24851
24870
|
element.parentNode.insertBefore(this.closeTag('LI'), element);
|
|
24852
24871
|
}
|
|
24853
24872
|
else {
|
|
24854
|
-
if (
|
|
24873
|
+
if (0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
|
|
24855
24874
|
const wrapperclass = isNullOrUndefined(className) ? ' class="e-rte-wrap-inner"' :
|
|
24856
24875
|
' class="' + className + ' e-rte-wrap-inner"';
|
|
24857
24876
|
const parentElement = parentNode;
|
|
@@ -25062,8 +25081,8 @@ class Formats {
|
|
|
25062
25081
|
const startParent = this.getBlockParent(range.startContainer, blockquoteEle);
|
|
25063
25082
|
if ((startParent.textContent.charCodeAt(0) === 8203 &&
|
|
25064
25083
|
startParent.textContent.length === 1) || (startParent.textContent.length === 0 &&
|
|
25065
|
-
|
|
25066
|
-
|
|
25084
|
+
startParent.querySelectorAll('img').length === 0 &&
|
|
25085
|
+
startParent.querySelectorAll('table').length === 0)) {
|
|
25067
25086
|
e.event.preventDefault();
|
|
25068
25087
|
if (isNullOrUndefined(startParent.nextElementSibling)) {
|
|
25069
25088
|
this.paraFocus(startParent.parentElement === this.parent.editableElement ?
|
|
@@ -25680,13 +25699,13 @@ class DOMMethods {
|
|
|
25680
25699
|
*/
|
|
25681
25700
|
getParentBlockNode(node) {
|
|
25682
25701
|
const treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
|
|
25683
|
-
|
|
25684
|
-
|
|
25685
|
-
|
|
25686
|
-
|
|
25687
|
-
|
|
25688
|
-
|
|
25689
|
-
|
|
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
|
+
});
|
|
25690
25709
|
treeWalker.currentNode = node;
|
|
25691
25710
|
const blockParent = treeWalker.parentNode();
|
|
25692
25711
|
return blockParent;
|
|
@@ -25985,9 +26004,9 @@ class LinkCommand {
|
|
|
25985
26004
|
}
|
|
25986
26005
|
else {
|
|
25987
26006
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, appliedNodes[0], // Start Node
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
26007
|
+
appliedNodes[appliedNodes.length - 1], // end Node
|
|
26008
|
+
0, // start offset
|
|
26009
|
+
appliedNodes[appliedNodes.length - 1].textContent.length // end offset
|
|
25991
26010
|
);
|
|
25992
26011
|
}
|
|
25993
26012
|
}
|
|
@@ -26493,7 +26512,8 @@ class ImageCommand {
|
|
|
26493
26512
|
}
|
|
26494
26513
|
if (!isNullOrUndefined(e.selector) && e.selector === 'pasteCleanupModule') {
|
|
26495
26514
|
if (!isNullOrUndefined(this.parent.currentDocument)) {
|
|
26496
|
-
e.callBack({
|
|
26515
|
+
e.callBack({
|
|
26516
|
+
requestType: 'Images',
|
|
26497
26517
|
editorMode: 'HTML',
|
|
26498
26518
|
event: e.event,
|
|
26499
26519
|
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
@@ -27824,9 +27844,9 @@ class TableCommand {
|
|
|
27824
27844
|
this.updateColSpanStyle(minMaxIndexes.startColumn, minMaxIndexes.endColumn, this.getCorrespondingColumns());
|
|
27825
27845
|
e.item.selection.setSelectionText(this.parent.currentDocument, e.item.selection.range.startContainer, e.item.selection.range.startContainer, 0, 0);
|
|
27826
27846
|
if (this.parent.nodeSelection && firstCell) {
|
|
27827
|
-
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
27828
|
-
|
|
27829
|
-
|
|
27847
|
+
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
27848
|
+
// eslint-disable-next-line
|
|
27849
|
+
firstCell, 0);
|
|
27830
27850
|
}
|
|
27831
27851
|
if (e.callBack) {
|
|
27832
27852
|
e.callBack({
|
|
@@ -27894,7 +27914,7 @@ class TableCommand {
|
|
|
27894
27914
|
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0])
|
|
27895
27915
|
// eslint-disable-next-line no-cond-assign
|
|
27896
27916
|
&& eleArray[rowValue][0] && 1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) ||
|
|
27897
|
-
|
|
27917
|
+
1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
|
|
27898
27918
|
for (count = index - 1, colIndex = 1; colIndex < eleArray[0].length; colIndex++) {
|
|
27899
27919
|
if (eleArray[rowValue][colIndex] !== eleArray[rowValue][colIndex - 1]) {
|
|
27900
27920
|
for (rowMin = rowValue; rowMin < rowValue + index; rowMin++) {
|
|
@@ -27929,7 +27949,7 @@ class TableCommand {
|
|
|
27929
27949
|
spanCount = parseInt(elements[rowIndex][colIndex].getAttribute(attr), 10) || 1;
|
|
27930
27950
|
if (min < rowIndex && elements[rowIndex][colIndex] === elements[rowIndex - 1][colIndex] ||
|
|
27931
27951
|
firstIndex < colIndex && elements[rowIndex][colIndex] ===
|
|
27932
|
-
|
|
27952
|
+
elements[rowIndex][colIndex - 1] || 1 < (spanCount)) {
|
|
27933
27953
|
if ((1 < spanCount - index)) {
|
|
27934
27954
|
elements[rowIndex][colIndex].setAttribute(attr, (spanCount - index).toString());
|
|
27935
27955
|
}
|
|
@@ -27999,9 +28019,9 @@ class TableCommand {
|
|
|
27999
28019
|
for (avgRowIndex = activeCellIndex[0] + Math.ceil(activeCellRowSpan / 2),
|
|
28000
28020
|
colIndex = 0 === activeCellIndex[1] ? activeCellIndex[1]
|
|
28001
28021
|
: activeCellIndex[1] - 1; 0 <= colIndex && (correspondingCells[avgRowIndex][colIndex] ===
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
|
|
28022
|
+
// eslint-disable-next-line max-len
|
|
28023
|
+
correspondingCells[avgRowIndex][colIndex - 1] || 0 < avgRowIndex && correspondingCells[avgRowIndex][colIndex]
|
|
28024
|
+
=== correspondingCells[avgRowIndex - 1][colIndex]);) {
|
|
28005
28025
|
colIndex--;
|
|
28006
28026
|
}
|
|
28007
28027
|
if (colIndex === -1) {
|
|
@@ -28433,8 +28453,8 @@ class SelectionCommands {
|
|
|
28433
28453
|
else if (range.startContainer.nodeType === 3 && ((range.startContainer.parentElement.childElementCount > 0 &&
|
|
28434
28454
|
range.startOffset > 0 && range.startContainer.parentElement.firstElementChild.tagName.toLowerCase() !== 'br') ||
|
|
28435
28455
|
!isNullOrUndefined(currentFormatNode) && currentFormatNode ===
|
|
28436
|
-
|
|
28437
|
-
|
|
28456
|
+
(range.startContainer.parentElement.closest(currentSelector)) &&
|
|
28457
|
+
((range.startContainer.parentElement.closest(currentSelector)).textContent.replace(new RegExp('\u200B', 'g'), '').trim().length !== 0))) {
|
|
28438
28458
|
isCollapsed = true;
|
|
28439
28459
|
range = nodeCutter.GetCursorRange(docElement, range, range.startContainer);
|
|
28440
28460
|
nodes.push(range.startContainer);
|
|
@@ -28762,9 +28782,9 @@ class SelectionCommands {
|
|
|
28762
28782
|
if (child[0] && !isFontStyle) {
|
|
28763
28783
|
let nodeTraverse = child[index] ? child[index] : child[0];
|
|
28764
28784
|
const textNode = nodeTraverse;
|
|
28765
|
-
for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
|
|
28766
|
-
|
|
28767
|
-
|
|
28785
|
+
for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
|
|
28786
|
+
// eslint-disable-next-line
|
|
28787
|
+
nodeTraverse = nodeTraverse) {
|
|
28768
28788
|
let nodeTraverseCondition;
|
|
28769
28789
|
if (formatNode.nodeName === 'SPAN') {
|
|
28770
28790
|
nodeTraverseCondition = nodeTraverse.parentElement.tagName.toLocaleLowerCase()
|
|
@@ -28857,7 +28877,7 @@ class SelectionCommands {
|
|
|
28857
28877
|
let isNestedListItem = false;
|
|
28858
28878
|
if (!isNullOrUndefined(liElement) && liElement.childNodes) {
|
|
28859
28879
|
for (let num = 0; num < liElement.childNodes.length; num++) {
|
|
28860
|
-
if (liElement.childNodes[num].nodeName === ('OL'
|
|
28880
|
+
if (liElement.childNodes[num].nodeName === ('OL')) {
|
|
28861
28881
|
nestedListCount++;
|
|
28862
28882
|
isNestedList = true;
|
|
28863
28883
|
}
|
|
@@ -28883,7 +28903,7 @@ class SelectionCommands {
|
|
|
28883
28903
|
}
|
|
28884
28904
|
if (isNestedListItem) {
|
|
28885
28905
|
for (let num = 0; num < liElement.childNodes.length; num++) {
|
|
28886
|
-
if (liElement.childNodes[num].nodeName === ('OL'
|
|
28906
|
+
if (liElement.childNodes[num].nodeName === ('OL')) {
|
|
28887
28907
|
liElement.childNodes[num].style.fontSize = 'initial';
|
|
28888
28908
|
}
|
|
28889
28909
|
}
|
|
@@ -29683,7 +29703,7 @@ class ClearFormat$1 {
|
|
|
29683
29703
|
}
|
|
29684
29704
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
29685
29705
|
childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
|
|
29686
|
-
|
|
29706
|
+
childNodes[index2].nodeName.toLocaleLowerCase()) {
|
|
29687
29707
|
InsertMethods.unwrap(childNodes[index2]);
|
|
29688
29708
|
}
|
|
29689
29709
|
}
|
|
@@ -29694,9 +29714,9 @@ class ClearFormat$1 {
|
|
|
29694
29714
|
}
|
|
29695
29715
|
}
|
|
29696
29716
|
}
|
|
29697
|
-
static clearInlines(textNodes, nodes, range, nodeCutter,
|
|
29698
|
-
|
|
29699
|
-
|
|
29717
|
+
static clearInlines(textNodes, nodes, range, nodeCutter,
|
|
29718
|
+
// eslint-disable-next-line
|
|
29719
|
+
endNode) {
|
|
29700
29720
|
for (let index = 0; index < textNodes.length; index++) {
|
|
29701
29721
|
let currentInlineNode = textNodes[index];
|
|
29702
29722
|
let currentNode;
|
|
@@ -30436,8 +30456,8 @@ class MsWordPaste {
|
|
|
30436
30456
|
if (allElements[i].children.length === 0 && allElements[i].innerHTML === ' ' &&
|
|
30437
30457
|
(allElements[i].innerHTML === ' ' && !allElements[i].closest('li')) &&
|
|
30438
30458
|
!allElements[i].closest('td') && (allElements[i].nodeName !== 'SPAN' ||
|
|
30439
|
-
|
|
30440
|
-
|
|
30459
|
+
allElements[i].nodeName === 'SPAN' && (isNullOrUndefined(allElements[i].previousElementSibling) &&
|
|
30460
|
+
isNullOrUndefined(allElements[i].nextElementSibling)))) {
|
|
30441
30461
|
const detachableElement = this.findDetachElem(allElements[i]);
|
|
30442
30462
|
const brElement = createElement('br');
|
|
30443
30463
|
const hasNbsp = detachableElement.textContent.length > 0 && detachableElement.textContent.match(/\u00a0/g)
|
|
@@ -32045,11 +32065,14 @@ class EditorManager {
|
|
|
32045
32065
|
execCommand(command, value, event, callBack, text, exeValue, selector, enterAction) {
|
|
32046
32066
|
switch (command.toLowerCase()) {
|
|
32047
32067
|
case 'lists':
|
|
32048
|
-
this.observer.notify(LIST_TYPE, {
|
|
32049
|
-
|
|
32068
|
+
this.observer.notify(LIST_TYPE, {
|
|
32069
|
+
subCommand: value, event: event, callBack: callBack,
|
|
32070
|
+
selector: selector, item: exeValue, enterAction: enterAction
|
|
32071
|
+
});
|
|
32050
32072
|
break;
|
|
32051
32073
|
case 'formats':
|
|
32052
|
-
this.observer.notify(FORMAT_TYPE, {
|
|
32074
|
+
this.observer.notify(FORMAT_TYPE, {
|
|
32075
|
+
subCommand: value, event: event, callBack: callBack,
|
|
32053
32076
|
selector: selector, exeValue: exeValue, enterAction: enterAction
|
|
32054
32077
|
});
|
|
32055
32078
|
break;
|
|
@@ -32066,8 +32089,10 @@ class EditorManager {
|
|
|
32066
32089
|
});
|
|
32067
32090
|
break;
|
|
32068
32091
|
case 'links':
|
|
32069
|
-
this.observer.notify(LINK, {
|
|
32070
|
-
|
|
32092
|
+
this.observer.notify(LINK, {
|
|
32093
|
+
command: command, value: value, item: exeValue, event: event, callBack: callBack,
|
|
32094
|
+
enterAction: enterAction
|
|
32095
|
+
});
|
|
32071
32096
|
break;
|
|
32072
32097
|
case 'files':
|
|
32073
32098
|
this.observer.notify(IMAGE, {
|
|
@@ -32152,8 +32177,10 @@ class EditorManager {
|
|
|
32152
32177
|
this.observer.notify(FORMAT_PAINTER_ACTIONS, { item: exeValue, subCommand: value, event: event, callBack: callBack });
|
|
32153
32178
|
break;
|
|
32154
32179
|
case 'emojipicker':
|
|
32155
|
-
this.observer.notify(EMOJI_PICKER_ACTIONS, {
|
|
32156
|
-
|
|
32180
|
+
this.observer.notify(EMOJI_PICKER_ACTIONS, {
|
|
32181
|
+
item: exeValue, subCommand: value, value: text,
|
|
32182
|
+
event: event, callBack: callBack
|
|
32183
|
+
});
|
|
32157
32184
|
}
|
|
32158
32185
|
}
|
|
32159
32186
|
editorMouseDown(e) {
|
|
@@ -32195,19 +32222,19 @@ class EditorManager {
|
|
|
32195
32222
|
}
|
|
32196
32223
|
getParentBlockNode(node) {
|
|
32197
32224
|
const treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32206
|
-
|
|
32207
|
-
|
|
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
|
+
}
|
|
32208
32236
|
}
|
|
32209
|
-
}
|
|
32210
|
-
});
|
|
32237
|
+
});
|
|
32211
32238
|
treeWalker.currentNode = node;
|
|
32212
32239
|
const blockParent = treeWalker.parentNode();
|
|
32213
32240
|
return blockParent;
|
|
@@ -33107,6 +33134,26 @@ class HtmlEditor {
|
|
|
33107
33134
|
if (isNullOrUndefined(this.oldRangeElement)) {
|
|
33108
33135
|
return;
|
|
33109
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
|
+
}
|
|
33110
33157
|
else {
|
|
33111
33158
|
if (this.oldRangeElement.tagName === 'OL' || this.oldRangeElement.tagName === 'UL') {
|
|
33112
33159
|
this.oldRangeElement = this.oldRangeElement.lastElementChild.lastElementChild
|
|
@@ -33122,9 +33169,9 @@ class HtmlEditor {
|
|
|
33122
33169
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastNode.parentElement, lastNode.parentElement.childNodes.length);
|
|
33123
33170
|
}
|
|
33124
33171
|
else {
|
|
33125
|
-
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
33126
|
-
|
|
33127
|
-
|
|
33172
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
33173
|
+
// eslint-disable-next-line
|
|
33174
|
+
lastNode, lastNode.textContent.length);
|
|
33128
33175
|
}
|
|
33129
33176
|
let checkParent = false;
|
|
33130
33177
|
if (this.oldRangeElement && this.oldRangeElement.nodeName !== '#text' && this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
@@ -33613,8 +33660,10 @@ class HtmlEditor {
|
|
|
33613
33660
|
}
|
|
33614
33661
|
if (!isNullOrUndefined(e.newProp.formatter)) {
|
|
33615
33662
|
const editElement = this.contentRenderer.getEditPanel();
|
|
33616
|
-
const option = {
|
|
33617
|
-
|
|
33663
|
+
const option = {
|
|
33664
|
+
undoRedoSteps: this.parent.undoRedoSteps,
|
|
33665
|
+
undoRedoTimer: this.parent.undoRedoTimer
|
|
33666
|
+
};
|
|
33618
33667
|
this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
|
|
33619
33668
|
}
|
|
33620
33669
|
}
|
|
@@ -33885,28 +33934,6 @@ class PasteCleanup {
|
|
|
33885
33934
|
value = tempDivElem.innerHTML;
|
|
33886
33935
|
const isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
|
|
33887
33936
|
!isNullOrUndefined(tempDivElem.querySelector('table'));
|
|
33888
|
-
const imgElements = tempDivElem.querySelectorAll('img');
|
|
33889
|
-
const base = this.parent.contentModule.getDocument().location.origin;
|
|
33890
|
-
imgElements.forEach((imgElement) => {
|
|
33891
|
-
let imageFileFormat;
|
|
33892
|
-
const imgElementSrc = imgElement.getAttribute('src');
|
|
33893
|
-
if (!isNullOrUndefined(imgElementSrc) && imgElementSrc !== '') {
|
|
33894
|
-
if (imgElementSrc.indexOf('base64') > -1 && imgElementSrc.indexOf('data:') > -1) {
|
|
33895
|
-
imageFileFormat = imgElementSrc.split(';')[0].split('/')[1];
|
|
33896
|
-
}
|
|
33897
|
-
else {
|
|
33898
|
-
const parsedUrl = imgElementSrc.indexOf('http') > -1 ? new URL(imgElementSrc) : new URL(imgElementSrc, base);
|
|
33899
|
-
const path = parsedUrl.pathname;
|
|
33900
|
-
imageFileFormat = path.split('.').pop().toLowerCase();
|
|
33901
|
-
}
|
|
33902
|
-
if (!isNullOrUndefined(imageFileFormat) &&
|
|
33903
|
-
allowedTypes.every((type) => imageFileFormat !== type.substring(1).toLowerCase()) &&
|
|
33904
|
-
imgElementSrc.indexOf('blob') === -1) {
|
|
33905
|
-
detach(imgElement);
|
|
33906
|
-
}
|
|
33907
|
-
}
|
|
33908
|
-
});
|
|
33909
|
-
value = tempDivElem.innerHTML;
|
|
33910
33937
|
this.parent.notify(cleanupResizeElements, {
|
|
33911
33938
|
value: value,
|
|
33912
33939
|
callBack: (currentValue) => {
|
|
@@ -34135,14 +34162,14 @@ class PasteCleanup {
|
|
|
34135
34162
|
});
|
|
34136
34163
|
this.uploadObj.appendTo(this.popupObj.element.childNodes[0]);
|
|
34137
34164
|
const fileInfo = [{
|
|
34138
|
-
|
|
34139
|
-
|
|
34140
|
-
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
|
|
34144
|
-
|
|
34145
|
-
|
|
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
|
+
}];
|
|
34146
34173
|
this.uploadObj.createFileList(fileInfo);
|
|
34147
34174
|
this.uploadObj.upload(fileInfo);
|
|
34148
34175
|
this.popupObj.element.getElementsByClassName('e-file-select-wrap')[0].style.display = 'none';
|
|
@@ -34155,7 +34182,11 @@ class PasteCleanup {
|
|
|
34155
34182
|
this.parent.inputElement.contentEditable = 'true';
|
|
34156
34183
|
detach(imgElem);
|
|
34157
34184
|
if (popupObj) {
|
|
34158
|
-
|
|
34185
|
+
this.parent.isBlur = false;
|
|
34186
|
+
popupObj.destroy();
|
|
34187
|
+
if (!isNullOrUndefined(popupObj.element)) {
|
|
34188
|
+
detach(popupObj.element);
|
|
34189
|
+
}
|
|
34159
34190
|
}
|
|
34160
34191
|
this.parent.trigger(imageUploadFailed, e);
|
|
34161
34192
|
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
@@ -34171,7 +34202,7 @@ class PasteCleanup {
|
|
|
34171
34202
|
this.parent.trigger(imageUploadSuccess, e, (e) => {
|
|
34172
34203
|
if (!isNullOrUndefined(this.parent.insertImageSettings.path)) {
|
|
34173
34204
|
const url = this.parent.insertImageSettings.path + e.file.name;
|
|
34174
|
-
if (!this.parent.inputElement.contains(imgElem)) {
|
|
34205
|
+
if (!this.parent.inputElement.contains(imgElem) && imgElem.id) {
|
|
34175
34206
|
const imgHtmlElems = this.parent.inputElement.querySelectorAll('#' + imgElem.id);
|
|
34176
34207
|
for (let i = 0; i < imgHtmlElems.length; i++) {
|
|
34177
34208
|
const imgHtmlElem = imgHtmlElems[i];
|
|
@@ -34196,13 +34227,22 @@ class PasteCleanup {
|
|
|
34196
34227
|
});
|
|
34197
34228
|
}
|
|
34198
34229
|
this.popupCloseTime = setTimeout(() => {
|
|
34199
|
-
popupObj
|
|
34200
|
-
|
|
34201
|
-
|
|
34202
|
-
|
|
34203
|
-
|
|
34204
|
-
|
|
34205
|
-
|
|
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
|
+
}
|
|
34206
34246
|
}
|
|
34207
34247
|
}
|
|
34208
34248
|
}
|
|
@@ -34284,8 +34324,10 @@ class PasteCleanup {
|
|
|
34284
34324
|
}
|
|
34285
34325
|
}
|
|
34286
34326
|
radioRender() {
|
|
34287
|
-
this.keepRadioButton = new RadioButton({
|
|
34288
|
-
|
|
34327
|
+
this.keepRadioButton = new RadioButton({
|
|
34328
|
+
label: this.i10n.getConstant('keepFormat'),
|
|
34329
|
+
name: 'pasteOption', checked: true
|
|
34330
|
+
});
|
|
34289
34331
|
this.keepRadioButton.isStringTemplate = true;
|
|
34290
34332
|
const keepFormatElement = this.parent.element.querySelector('#keepFormating');
|
|
34291
34333
|
this.keepRadioButton.appendTo(keepFormatElement);
|
|
@@ -34999,13 +35041,24 @@ class Resize {
|
|
|
34999
35041
|
this.iframeElement = this.parent.contentModule.getDocument().querySelectorAll('iframe');
|
|
35000
35042
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
35001
35043
|
this.iframeElement.forEach((iframe) => {
|
|
35002
|
-
EventHandler.add(iframe
|
|
35044
|
+
EventHandler.add(iframe, 'load', this.onIFrameLoad, this);
|
|
35003
35045
|
});
|
|
35004
35046
|
}
|
|
35005
35047
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
35006
35048
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
35007
35049
|
EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
|
|
35008
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
|
+
}
|
|
35009
35062
|
resizeStart(e) {
|
|
35010
35063
|
this.isResizing = false;
|
|
35011
35064
|
if (e.cancelable) {
|
|
@@ -35109,7 +35162,7 @@ class Resize {
|
|
|
35109
35162
|
}
|
|
35110
35163
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
35111
35164
|
this.iframeElement.forEach((iframe) => {
|
|
35112
|
-
|
|
35165
|
+
this.removeMouseUpEventListener(iframe);
|
|
35113
35166
|
});
|
|
35114
35167
|
}
|
|
35115
35168
|
if (this.resizer) {
|
|
@@ -35171,13 +35224,13 @@ class FileManager {
|
|
|
35171
35224
|
const dlgHeader = this.parent.localeObj.getConstant('fileDialogHeader');
|
|
35172
35225
|
const dlgCancel = this.i10n.getConstant('dialogCancel');
|
|
35173
35226
|
this.dlgButtons = [{
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
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
|
+
}];
|
|
35181
35234
|
this.selectObj = { selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
35182
35235
|
const dlgTarget = this.parent.createElement('div', {
|
|
35183
35236
|
className: 'e-rte-file-manager-dialog', id: this.parent.getID() + '_file-manager-dialog',
|
|
@@ -36719,25 +36772,25 @@ class ImportExport {
|
|
|
36719
36772
|
body: JSON.stringify({ html: actionBeginArgs.exportValue })
|
|
36720
36773
|
})
|
|
36721
36774
|
.then((response) => {
|
|
36722
|
-
|
|
36723
|
-
|
|
36724
|
-
|
|
36725
|
-
|
|
36726
|
-
|
|
36775
|
+
if (!response.ok) {
|
|
36776
|
+
throw new Error(`HTTP error! Status: ${response.status}`);
|
|
36777
|
+
}
|
|
36778
|
+
return response.blob().then((blob) => ({ blob, filename }));
|
|
36779
|
+
})
|
|
36727
36780
|
.then(({ blob, filename }) => {
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36732
|
-
|
|
36733
|
-
|
|
36734
|
-
|
|
36735
|
-
|
|
36736
|
-
|
|
36737
|
-
|
|
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
|
+
})
|
|
36738
36791
|
.catch((error) => {
|
|
36739
|
-
|
|
36740
|
-
|
|
36792
|
+
console.error('Fetch error:', error);
|
|
36793
|
+
});
|
|
36741
36794
|
}
|
|
36742
36795
|
});
|
|
36743
36796
|
}
|
|
@@ -37722,7 +37775,7 @@ class EnterKeyAction {
|
|
|
37722
37775
|
}
|
|
37723
37776
|
if (this.range.startOffset !== 0 && this.range.endOffset !== 0 &&
|
|
37724
37777
|
this.range.startContainer === this.range.endContainer && !(!isNullOrUndefined(nearBlockNode.childNodes[0])
|
|
37725
|
-
|
|
37778
|
+
&& (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
|
|
37726
37779
|
const startNodeText = this.range.startContainer.textContent;
|
|
37727
37780
|
const splitFirstText = startNodeText.substring(0, this.range.startOffset);
|
|
37728
37781
|
const lastCharBeforeCursor = splitFirstText.charCodeAt(this.range.startOffset - 1);
|
|
@@ -37973,7 +38026,7 @@ class EnterKeyAction {
|
|
|
37973
38026
|
this.range.startContainer.textContent.length : currentParent.textContent.length;
|
|
37974
38027
|
const isImageElement = (this.range.startContainer.nodeName === 'IMG' || (this.range.startContainer.childNodes.length > 0
|
|
37975
38028
|
&& !isNullOrUndefined(this.range.startContainer.childNodes[this.range.startOffset]) && this.range.startContainer.childNodes[this.range.startOffset].nodeName === 'IMG') || (this.range.startContainer.nodeType === 1 &&
|
|
37976
|
-
|
|
38029
|
+
this.range.startContainer.querySelector('img') !== null));
|
|
37977
38030
|
if (currentParent !== this.parent.inputElement &&
|
|
37978
38031
|
this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
|
|
37979
38032
|
this.range.startOffset === this.range.endOffset &&
|
|
@@ -38066,7 +38119,7 @@ class EnterKeyAction {
|
|
|
38066
38119
|
removeBRElement(currentElement) {
|
|
38067
38120
|
if (Browser.userAgent.indexOf('Firefox') !== -1 &&
|
|
38068
38121
|
this.range.endOffset === currentElement.textContent.length && (currentElement.textContent.length !== 0 ||
|
|
38069
|
-
|
|
38122
|
+
currentElement.querySelectorAll('BR').length > 1) &&
|
|
38070
38123
|
!isNullOrUndefined(currentElement.lastChild) && currentElement.lastChild.nodeName === 'BR') {
|
|
38071
38124
|
detach(currentElement.lastChild);
|
|
38072
38125
|
}
|
|
@@ -38657,8 +38710,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
38657
38710
|
break;
|
|
38658
38711
|
case 'insertTable':
|
|
38659
38712
|
if (isNullOrUndefined(value.width)) {
|
|
38660
|
-
value.width = {
|
|
38661
|
-
|
|
38713
|
+
value.width = {
|
|
38714
|
+
minWidth: this.tableSettings.minWidth,
|
|
38715
|
+
maxWidth: this.tableSettings.maxWidth, width: this.tableSettings.width
|
|
38716
|
+
};
|
|
38662
38717
|
}
|
|
38663
38718
|
break;
|
|
38664
38719
|
case 'insertImage': {
|
|
@@ -38677,12 +38732,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
38677
38732
|
url = !isNullOrUndefined(url) ? url : '';
|
|
38678
38733
|
value.url = url;
|
|
38679
38734
|
if (isNullOrUndefined(value.width)) {
|
|
38680
|
-
value.width = {
|
|
38681
|
-
|
|
38735
|
+
value.width = {
|
|
38736
|
+
minWidth: this.insertImageSettings.minWidth,
|
|
38737
|
+
maxWidth: this.insertImageSettings.maxWidth, width: this.insertImageSettings.width
|
|
38738
|
+
};
|
|
38682
38739
|
}
|
|
38683
38740
|
if (isNullOrUndefined(value.height)) {
|
|
38684
|
-
value.height = {
|
|
38685
|
-
|
|
38741
|
+
value.height = {
|
|
38742
|
+
minHeight: this.insertImageSettings.minHeight,
|
|
38743
|
+
maxHeight: this.insertImageSettings.maxHeight, height: this.insertImageSettings.height
|
|
38744
|
+
};
|
|
38686
38745
|
}
|
|
38687
38746
|
break;
|
|
38688
38747
|
}
|
|
@@ -38735,12 +38794,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
38735
38794
|
url = !isNullOrUndefined(url) ? url : '';
|
|
38736
38795
|
value.url = url;
|
|
38737
38796
|
if (isNullOrUndefined(value.width)) {
|
|
38738
|
-
value.width = {
|
|
38739
|
-
|
|
38797
|
+
value.width = {
|
|
38798
|
+
minWidth: this.insertVideoSettings.minWidth,
|
|
38799
|
+
maxWidth: this.insertVideoSettings.maxWidth, width: this.insertVideoSettings.width
|
|
38800
|
+
};
|
|
38740
38801
|
}
|
|
38741
38802
|
if (isNullOrUndefined(value.height)) {
|
|
38742
|
-
value.height = {
|
|
38743
|
-
|
|
38803
|
+
value.height = {
|
|
38804
|
+
minHeight: this.insertVideoSettings.minHeight,
|
|
38805
|
+
maxHeight: this.insertVideoSettings.maxHeight, height: this.insertVideoSettings.height
|
|
38806
|
+
};
|
|
38744
38807
|
}
|
|
38745
38808
|
break;
|
|
38746
38809
|
}
|
|
@@ -39153,9 +39216,12 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
39153
39216
|
}
|
|
39154
39217
|
notifyMouseUp(e) {
|
|
39155
39218
|
const touch = (e.touches ? e.changedTouches[0] : e);
|
|
39156
|
-
this.notify(mouseUp, {
|
|
39157
|
-
|
|
39158
|
-
|
|
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
|
+
}
|
|
39159
39225
|
});
|
|
39160
39226
|
if (this.inputElement && ((this.editorMode === 'HTML' && ((this.inputElement.textContent.length !== 0) || e.target && !isNullOrUndefined(e.target.querySelector('li')))) ||
|
|
39161
39227
|
(this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) ||
|
|
@@ -40496,7 +40562,11 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
40496
40562
|
this.removeSelectionClassStates(this.inputElement);
|
|
40497
40563
|
this.notify(focusChange, {});
|
|
40498
40564
|
const value = this.getUpdatedValue();
|
|
40499
|
-
this.
|
|
40565
|
+
if (!this.rootContainer.classList.contains('e-source-code-enabled')) {
|
|
40566
|
+
this.setProperties({ value: value }, true);
|
|
40567
|
+
} else {
|
|
40568
|
+
this.setProperties({ value: value });
|
|
40569
|
+
}
|
|
40500
40570
|
this.valueContainer.value = this.value;
|
|
40501
40571
|
this.isValueChangeBlurhandler = true;
|
|
40502
40572
|
this.invokeChangeEvent();
|