@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.
- 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 +648 -584
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +757 -693
- 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/common/util.d.ts +1 -2
- package/src/common/util.js +49 -95
- 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 +17 -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 +5 -5
- 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 +3 -2
- package/src/editor-manager/plugin/lists.js +15 -3
- 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/enter-key.js +34 -3
- 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 +26 -4
- 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 +67 -51
- 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 +3 -3
- 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 +3 -2
- package/src/rich-text-editor/renderer/table-module.js +15 -18
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -10
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Property, Event as Event$1, NotifyPropertyChanges, Base, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes,
|
|
1
|
+
import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Property, Event as Event$1, NotifyPropertyChanges, Base, getComponent, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes, getEnumValue, Complex, print, L10n, compile, Touch, Component } 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';
|
|
@@ -2506,185 +2506,185 @@ var windowKeys = {
|
|
|
2506
2506
|
'inlineCode': 'ctrl+`'
|
|
2507
2507
|
};
|
|
2508
2508
|
var defaultEmojiIcons = [{
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
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
|
-
|
|
2509
|
+
name: 'Smilies & People', code: '1F600', iconCss: 'e-emoji', icons: [{ code: '1F600', desc: 'Grinning face' },
|
|
2510
|
+
{ code: '1F603', desc: 'Grinning face with big eyes' },
|
|
2511
|
+
{ code: '1F604', desc: 'Grinning face with smiling eyes' },
|
|
2512
|
+
{ code: '1F606', desc: 'Grinning squinting face' },
|
|
2513
|
+
{ code: '1F605', desc: 'Grinning face with sweat' },
|
|
2514
|
+
{ code: '1F602', desc: 'Face with tears of joy' },
|
|
2515
|
+
{ code: '1F923', desc: 'Rolling on the floor laughing' },
|
|
2516
|
+
{ code: '1F60A', desc: 'Smiling face with smiling eyes' },
|
|
2517
|
+
{ code: '1F607', desc: 'Smiling face with halo' },
|
|
2518
|
+
{ code: '1F642', desc: 'Slightly smiling face' },
|
|
2519
|
+
{ code: '1F643', desc: 'Upside-down face' },
|
|
2520
|
+
{ code: '1F60D', desc: 'Smiling face with heart-eyes' },
|
|
2521
|
+
{ code: '1F618', desc: 'Face blowing a kiss' },
|
|
2522
|
+
{ code: '1F61B', desc: 'Face with tongue' },
|
|
2523
|
+
{ code: '1F61C', desc: 'Winking face with tongue' },
|
|
2524
|
+
{ code: '1F604', desc: 'Grinning face with smiling eyes' },
|
|
2525
|
+
{ code: '1F469', desc: 'Woman' },
|
|
2526
|
+
{ code: '1F468', desc: 'Man' },
|
|
2527
|
+
{ code: '1F467', desc: 'Girl' },
|
|
2528
|
+
{ code: '1F466', desc: 'Boy' },
|
|
2529
|
+
{ code: '1F476', desc: 'Baby' },
|
|
2530
|
+
{ code: '1F475', desc: 'Old woman' },
|
|
2531
|
+
{ code: '1F474', desc: 'Old man' },
|
|
2532
|
+
{ code: '1F46E', desc: 'Police officer' },
|
|
2533
|
+
{ code: '1F477', desc: 'Construction worker' },
|
|
2534
|
+
{ code: '1F482', desc: 'Guard' },
|
|
2535
|
+
{ code: '1F575', desc: 'Detective' },
|
|
2536
|
+
{ code: '1F9D1', desc: 'Cook' }]
|
|
2537
|
+
}, {
|
|
2538
|
+
name: 'Animals & Nature', code: '1F435', iconCss: 'e-animals', icons: [{ code: '1F436', desc: 'Dog face' },
|
|
2539
|
+
{ code: '1F431', desc: 'Cat face' },
|
|
2540
|
+
{ code: '1F42D', desc: 'Mouse face' },
|
|
2541
|
+
{ code: '1F439', desc: 'Hamster face' },
|
|
2542
|
+
{ code: '1F430', desc: 'Rabbit face' },
|
|
2543
|
+
{ code: '1F98A', desc: 'Fox face' },
|
|
2544
|
+
{ code: '1F43B', desc: 'Bear face' },
|
|
2545
|
+
{ code: '1F43C', desc: 'Panda face' },
|
|
2546
|
+
{ code: '1F428', desc: 'Koala' },
|
|
2547
|
+
{ code: '1F42F', desc: 'Tiger face' },
|
|
2548
|
+
{ code: '1F981', desc: 'Lion face' },
|
|
2549
|
+
{ code: '1F42E', desc: 'Cow face' },
|
|
2550
|
+
{ code: '1F437', desc: 'Pig face' },
|
|
2551
|
+
{ code: '1F43D', desc: 'Pig nose' },
|
|
2552
|
+
{ code: '1F438', desc: 'Frog face' },
|
|
2553
|
+
{ code: '1F435', desc: 'Monkey face' },
|
|
2554
|
+
{ code: '1F649', desc: 'Hear-no-evil monkey' },
|
|
2555
|
+
{ code: '1F64A', desc: 'Speak-no-evil monkey' },
|
|
2556
|
+
{ code: '1F412', desc: 'Monkey' },
|
|
2557
|
+
{ code: '1F414', desc: 'Chicken' },
|
|
2558
|
+
{ code: '1F427', desc: 'Penguin' },
|
|
2559
|
+
{ code: '1F426', desc: 'Bird' },
|
|
2560
|
+
{ code: '1F424', desc: 'Baby chick' },
|
|
2561
|
+
{ code: '1F986', desc: 'Duck' },
|
|
2562
|
+
{ code: '1F985', desc: 'Eagle' }]
|
|
2563
|
+
}, {
|
|
2564
|
+
name: 'Food & Drink', code: '1F347', iconCss: 'e-food-and-drinks', icons: [{ code: '1F34E', desc: 'Red apple' },
|
|
2565
|
+
{ code: '1F34C', desc: 'Banana' },
|
|
2566
|
+
{ code: '1F347', desc: 'Grapes' },
|
|
2567
|
+
{ code: '1F353', desc: 'Strawberry' },
|
|
2568
|
+
{ code: '1F35E', desc: 'Bread' },
|
|
2569
|
+
{ code: '1F950', desc: 'Croissant' },
|
|
2570
|
+
{ code: '1F955', desc: 'Carrot' },
|
|
2571
|
+
{ code: '1F354', desc: 'Hamburger' },
|
|
2572
|
+
{ code: '1F355', desc: 'Pizza' },
|
|
2573
|
+
{ code: '1F32D', desc: 'Hot dog' },
|
|
2574
|
+
{ code: '1F35F', desc: 'French fries' },
|
|
2575
|
+
{ code: '1F37F', desc: 'Popcorn' },
|
|
2576
|
+
{ code: '1F366', desc: 'Soft ice cream' },
|
|
2577
|
+
{ code: '1F367', desc: 'Shaved ice' },
|
|
2578
|
+
{ code: '1F36A', desc: 'Cookie' },
|
|
2579
|
+
{ code: '1F382', desc: 'Birthday cake' },
|
|
2580
|
+
{ code: '1F370', desc: 'Shortcake' },
|
|
2581
|
+
{ code: '1F36B', desc: 'Chocolate bar' },
|
|
2582
|
+
{ code: '1F369', desc: 'Donut' },
|
|
2583
|
+
{ code: '1F36E', desc: 'Custard' },
|
|
2584
|
+
{ code: '1F36D', desc: 'Lollipop' },
|
|
2585
|
+
{ code: '1F36C', desc: 'Candy' },
|
|
2586
|
+
{ code: '1F377', desc: 'Wine glass' },
|
|
2587
|
+
{ code: '1F37A', desc: 'Beer mug' },
|
|
2588
|
+
{ code: '1F37E', desc: 'Bottle with popping cork' }]
|
|
2589
|
+
}, {
|
|
2590
|
+
name: 'Activities', code: '1F383', iconCss: 'e-activities', icons: [{ code: '26BD', desc: 'Soccer ball' },
|
|
2591
|
+
{ code: '1F3C0', desc: 'Basketball' },
|
|
2592
|
+
{ code: '1F3C8', desc: 'American football' },
|
|
2593
|
+
{ code: '26BE', desc: 'Baseball' },
|
|
2594
|
+
{ code: '1F3BE', desc: 'Tennis' },
|
|
2595
|
+
{ code: '1F3D0', desc: 'Volleyball' },
|
|
2596
|
+
{ code: '1F3C9', desc: 'Rugby football' },
|
|
2597
|
+
{ code: '1F3B1', desc: 'Pool 8 ball' },
|
|
2598
|
+
{ code: '1F3D3', desc: 'Ping pong' },
|
|
2599
|
+
{ code: '1F3F8', desc: 'Badminton' },
|
|
2600
|
+
{ code: '1F94A', desc: 'Boxing glove' },
|
|
2601
|
+
{ code: '1F3CA', desc: 'Swimmer' },
|
|
2602
|
+
{ code: '1F3CB', desc: 'Weightlifter' },
|
|
2603
|
+
{ code: '1F6B4', desc: 'Bicyclist' },
|
|
2604
|
+
{ code: '1F6F9', desc: 'Skateboard' },
|
|
2605
|
+
{ code: '1F3AE', desc: 'Video game' },
|
|
2606
|
+
{ code: '1F579', desc: 'Joystick' },
|
|
2607
|
+
{ code: '1F3CF', desc: 'Cricket' },
|
|
2608
|
+
{ code: '1F3C7', desc: 'Horse racing' },
|
|
2609
|
+
{ code: '1F3AF', desc: 'Direct hit' },
|
|
2610
|
+
{ code: '1F3D1', desc: 'Field hockey' },
|
|
2611
|
+
{ code: '1F3B0', desc: 'Slot machine' },
|
|
2612
|
+
{ code: '1F3B3', desc: 'Bowling' },
|
|
2613
|
+
{ code: '1F3B2', desc: 'Game die' },
|
|
2614
|
+
{ code: '265F', desc: 'Chess pawn' }]
|
|
2615
|
+
}, {
|
|
2616
|
+
name: 'Travel & Places', code: '1F30D', iconCss: 'e-travel-and-places', icons: [{ code: '2708', desc: 'Airplane' },
|
|
2617
|
+
{ code: '1F697', desc: 'Automobile' },
|
|
2618
|
+
{ code: '1F695', desc: 'Taxi' },
|
|
2619
|
+
{ code: '1F6B2', desc: 'Bicycle' },
|
|
2620
|
+
{ code: '1F68C', desc: 'Bus' },
|
|
2621
|
+
{ code: '1F682', desc: 'Locomotive' },
|
|
2622
|
+
{ code: '1F6F3', desc: 'Passenger ship' },
|
|
2623
|
+
{ code: '1F680', desc: 'Rocket' },
|
|
2624
|
+
{ code: '1F681', desc: 'Helicopter' },
|
|
2625
|
+
{ code: '1F6A2', desc: 'Ship' },
|
|
2626
|
+
{ code: '1F3DF', desc: 'Stadium' },
|
|
2627
|
+
{ code: '1F54C', desc: 'Mosque' },
|
|
2628
|
+
{ code: '26EA', desc: 'Church' },
|
|
2629
|
+
{ code: '1F6D5', desc: 'Hindu Temple' },
|
|
2630
|
+
{ code: '1F3D4', desc: 'Snow-capped mountain' },
|
|
2631
|
+
{ code: '1F3EB', desc: 'School' },
|
|
2632
|
+
{ code: '1F30B', desc: 'Volcano' },
|
|
2633
|
+
{ code: '1F3D6', desc: 'Beach with umbrella' },
|
|
2634
|
+
{ code: '1F3DD', desc: 'Desert island' },
|
|
2635
|
+
{ code: '1F3DE', desc: 'National park' },
|
|
2636
|
+
{ code: '1F3F0', desc: 'Castle' },
|
|
2637
|
+
{ code: '1F5FC', desc: 'Tokyo tower' },
|
|
2638
|
+
{ code: '1F5FD', desc: 'Statue of liberty' },
|
|
2639
|
+
{ code: '26E9', desc: 'Shinto shrine' },
|
|
2640
|
+
{ code: '1F3EF', desc: 'Japanese castle' },
|
|
2641
|
+
{ code: '1F3A2', desc: 'Roller coaster' }]
|
|
2642
|
+
}, {
|
|
2643
|
+
name: 'Objects', code: '1F507', iconCss: 'e-objects', icons: [{ code: '1F4A1', desc: 'Light bulb' },
|
|
2644
|
+
{ code: '1F526', desc: 'Flashlight' },
|
|
2645
|
+
{ code: '1F4BB', desc: 'Laptop computer' },
|
|
2646
|
+
{ code: '1F5A5', desc: 'Desktop computer' },
|
|
2647
|
+
{ code: '1F5A8', desc: 'Printer' },
|
|
2648
|
+
{ code: '1F4F7', desc: 'Camera' },
|
|
2649
|
+
{ code: '1F4F8', desc: 'Camera with flash' },
|
|
2650
|
+
{ code: '1F4FD', desc: 'Film projector' },
|
|
2651
|
+
{ code: '1F3A5', desc: 'Movie camera' },
|
|
2652
|
+
{ code: '1F4FA', desc: 'Television' },
|
|
2653
|
+
{ code: '1F4FB', desc: 'Radio' },
|
|
2654
|
+
{ code: '1F50B', desc: 'Battery' },
|
|
2655
|
+
{ code: '231A', desc: 'Watch' },
|
|
2656
|
+
{ code: '1F4F1', desc: 'Mobile phone' },
|
|
2657
|
+
{ code: '260E', desc: 'Telephone' },
|
|
2658
|
+
{ code: '1F4BE', desc: 'Floppy disk' },
|
|
2659
|
+
{ code: '1F4BF', desc: 'Optical disk' },
|
|
2660
|
+
{ code: '1F4C0', desc: 'Digital versatile disc' },
|
|
2661
|
+
{ code: '1F4BD', desc: 'Computer disk' },
|
|
2662
|
+
{ code: '1F3A7', desc: 'Headphone' },
|
|
2663
|
+
{ code: '1F3A4', desc: 'Microphone' },
|
|
2664
|
+
{ code: '1F3B6', desc: 'Multiple musical notes' },
|
|
2665
|
+
{ code: '1F4DA', desc: 'Books' }]
|
|
2666
|
+
}, {
|
|
2667
|
+
name: 'Symbols', code: '1F3E7', iconCss: 'e-symbols', icons: [{ code: '274C', desc: 'Cross mark' },
|
|
2668
|
+
{ code: '2714', desc: 'Check mark' },
|
|
2669
|
+
{ code: '26A0', desc: 'Warning sign' },
|
|
2670
|
+
{ code: '1F6AB', desc: 'Prohibited' },
|
|
2671
|
+
{ code: '2139', desc: 'Information' },
|
|
2672
|
+
{ code: '267B', desc: 'Recycling symbol' },
|
|
2673
|
+
{ code: '1F6AD', desc: 'No smoking' },
|
|
2674
|
+
{ code: '1F4F5', desc: 'No mobile phones' },
|
|
2675
|
+
{ code: '1F6AF', desc: 'No littering' },
|
|
2676
|
+
{ code: '1F6B3', desc: 'No bicycles' },
|
|
2677
|
+
{ code: '1F6B7', desc: 'No pedestrians' },
|
|
2678
|
+
{ code: '2795', desc: 'Plus' },
|
|
2679
|
+
{ code: '2796', desc: 'Minus' },
|
|
2680
|
+
{ code: '2797', desc: 'Divide' },
|
|
2681
|
+
{ code: '2716', desc: 'Multiplication' },
|
|
2682
|
+
{ code: '1F4B2', desc: 'Dollar banknote' },
|
|
2683
|
+
{ code: '1F4AC', desc: 'Speech balloon' },
|
|
2684
|
+
{ code: '2755', desc: 'White exclamation mark' },
|
|
2685
|
+
{ code: '2754', desc: 'White question mark' },
|
|
2686
|
+
{ code: '2764', desc: 'Heart' }]
|
|
2687
|
+
}];
|
|
2688
2688
|
|
|
2689
2689
|
/* eslint-disable */
|
|
2690
2690
|
/**
|
|
@@ -3230,7 +3230,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
3230
3230
|
var itemStr = item && item.toLocaleLowerCase();
|
|
3231
3231
|
if (item && (itemStr === key) || (item === 'UL' && key === 'unorderedlist') || (item === 'OL' && key === 'orderedlist') ||
|
|
3232
3232
|
(itemStr === 'pre' && key === 'insertcode') || (item === 'NumberFormatList' && key === 'numberFormatList' ||
|
|
3233
|
-
|
|
3233
|
+
item === 'BulletFormatList' && key === 'bulletFormatList')) {
|
|
3234
3234
|
if (typeof data["" + key] === 'boolean') {
|
|
3235
3235
|
if (data["" + key] === true) {
|
|
3236
3236
|
addClass([e.tbElements[j]], [CLS_ACTIVE]);
|
|
@@ -3742,7 +3742,7 @@ function updateDropDownFontFormatLocale(self) {
|
|
|
3742
3742
|
* @hidden
|
|
3743
3743
|
* @deprecated
|
|
3744
3744
|
*/
|
|
3745
|
-
var ContentRender = /** @
|
|
3745
|
+
var ContentRender = /** @class */ (function () {
|
|
3746
3746
|
/**
|
|
3747
3747
|
* Constructor for content renderer module
|
|
3748
3748
|
*
|
|
@@ -3839,7 +3839,7 @@ var ContentRender = /** @__PURE__ @class */ (function () {
|
|
|
3839
3839
|
* @hidden
|
|
3840
3840
|
* @deprecated
|
|
3841
3841
|
*/
|
|
3842
|
-
var Render = /** @
|
|
3842
|
+
var Render = /** @class */ (function () {
|
|
3843
3843
|
/**
|
|
3844
3844
|
* Constructor for render module
|
|
3845
3845
|
*
|
|
@@ -3938,7 +3938,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
3938
3938
|
* @hidden
|
|
3939
3939
|
* @deprecated
|
|
3940
3940
|
*/
|
|
3941
|
-
var IsFormatted = /** @
|
|
3941
|
+
var IsFormatted = /** @class */ (function () {
|
|
3942
3942
|
function IsFormatted() {
|
|
3943
3943
|
}
|
|
3944
3944
|
/**
|
|
@@ -4050,7 +4050,7 @@ var IsFormatted = /** @__PURE__ @class */ (function () {
|
|
|
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 @@ var IsFormatted = /** @__PURE__ @class */ (function () {
|
|
|
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
|
}
|
|
@@ -4307,7 +4307,7 @@ var ALLOWED_TABLE_BLOCK_TAGS = ['article', 'aside', 'blockquote', 'body', 'canva
|
|
|
4307
4307
|
/**
|
|
4308
4308
|
* `Selection` module is used to handle RTE Selections.
|
|
4309
4309
|
*/
|
|
4310
|
-
var NodeSelection = /** @
|
|
4310
|
+
var NodeSelection = /** @class */ (function () {
|
|
4311
4311
|
function NodeSelection(editElement) {
|
|
4312
4312
|
this.startNodeName = [];
|
|
4313
4313
|
this.endNodeName = [];
|
|
@@ -4332,7 +4332,7 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
|
4332
4332
|
var range = select && select.rangeCount > 0 ? select.getRangeAt(select.rangeCount - 1) : docElement.createRange();
|
|
4333
4333
|
return (range.startContainer !== docElement || range.endContainer !== docElement
|
|
4334
4334
|
|| range.startOffset || range.endOffset || (range.setStart(docElement.body, 0),
|
|
4335
|
-
|
|
4335
|
+
range.collapse(!0)),
|
|
4336
4336
|
range);
|
|
4337
4337
|
};
|
|
4338
4338
|
/**
|
|
@@ -4795,11 +4795,6 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
|
4795
4795
|
/**
|
|
4796
4796
|
* Defines common util methods used by Rich Text Editor.
|
|
4797
4797
|
*/
|
|
4798
|
-
var inlineNode$1 = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
4799
|
-
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
4800
|
-
'ins', 'kbd', 'label', 'map', 'mark', 'meter', 'noscript', 'object', 'output', 'picture', 'progress',
|
|
4801
|
-
'q', 'ruby', 's', 'samp', 'script', 'select', 'slot', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'svg',
|
|
4802
|
-
'template', 'textarea', 'time', 'u', 'tt', 'var', 'video', 'wbr'];
|
|
4803
4798
|
/**
|
|
4804
4799
|
* @returns {void}
|
|
4805
4800
|
* @hidden
|
|
@@ -4827,109 +4822,68 @@ function setEditFrameFocus(editableElement, selector) {
|
|
|
4827
4822
|
}
|
|
4828
4823
|
/**
|
|
4829
4824
|
* @param {string} value - specifies the string value
|
|
4830
|
-
* @param {string} enterAction - specifies the enter key action API
|
|
4831
4825
|
* @returns {void}
|
|
4832
4826
|
* @hidden
|
|
4833
4827
|
*/
|
|
4834
|
-
function updateTextNode$1(value
|
|
4835
|
-
var tempNode = document.createElement('div');
|
|
4836
|
-
tempNode.innerHTML = value;
|
|
4837
|
-
tempNode.setAttribute('class', 'tempDiv');
|
|
4828
|
+
function updateTextNode$1(value) {
|
|
4838
4829
|
var resultElm = document.createElement('div');
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
if (
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
if (!isPreviousInlineElem) {
|
|
4849
|
-
if (enterAction === 'BR') {
|
|
4850
|
-
resultElm.appendChild(tempNode.firstChild);
|
|
4851
|
-
previousParent = resultElm;
|
|
4852
|
-
}
|
|
4853
|
-
else {
|
|
4854
|
-
paraElm = createElement('p');
|
|
4855
|
-
resultElm.appendChild(paraElm);
|
|
4856
|
-
paraElm.appendChild(tempNode.firstChild);
|
|
4857
|
-
previousParent = paraElm;
|
|
4858
|
-
isPreviousInlineElem = true;
|
|
4859
|
-
}
|
|
4860
|
-
}
|
|
4861
|
-
else {
|
|
4862
|
-
previousParent.appendChild(tempNode.firstChild);
|
|
4863
|
-
previousParent = paraElm;
|
|
4864
|
-
isPreviousInlineElem = true;
|
|
4865
|
-
}
|
|
4866
|
-
}
|
|
4867
|
-
else if (tempNode.firstChild.nodeName === '#text' && (tempNode.firstChild.textContent === '\n' ||
|
|
4868
|
-
(tempNode.firstChild.textContent.indexOf('\n') >= 0 && tempNode.firstChild.textContent.trim() === ''))) {
|
|
4869
|
-
detach(tempNode.firstChild);
|
|
4830
|
+
resultElm.innerHTML = value;
|
|
4831
|
+
var tableElm = resultElm.querySelectorAll('table');
|
|
4832
|
+
for (var i = 0; i < tableElm.length; i++) {
|
|
4833
|
+
if (tableElm[i].classList.length > 0 &&
|
|
4834
|
+
!tableElm[i].classList.contains('e-rte-table') && !tableElm[i].classList.contains('e-rte-custom-table')) {
|
|
4835
|
+
tableElm[i].classList.add('e-rte-paste-table');
|
|
4836
|
+
if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
|
|
4837
|
+
tableElm[i].classList.remove('e-rte-paste-word-table');
|
|
4838
|
+
continue; // Skiping the removal of the border if the source is from word.
|
|
4870
4839
|
}
|
|
4871
|
-
else {
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
}
|
|
4876
|
-
var tableElm = resultElm.querySelectorAll('table');
|
|
4877
|
-
for (var i = 0; i < tableElm.length; i++) {
|
|
4878
|
-
if (tableElm[i].classList.length > 0 &&
|
|
4879
|
-
!tableElm[i].classList.contains('e-rte-table') && !tableElm[i].classList.contains('e-rte-custom-table')) {
|
|
4880
|
-
tableElm[i].classList.add('e-rte-paste-table');
|
|
4881
|
-
if (tableElm[i].classList.contains('e-rte-paste-word-table')) {
|
|
4882
|
-
tableElm[i].classList.remove('e-rte-paste-word-table');
|
|
4883
|
-
continue; // Skiping the removal of the border if the source is from word.
|
|
4840
|
+
else if (tableElm[i].classList.contains('e-rte-paste-excel-table')) {
|
|
4841
|
+
tableElm[i].classList.remove('e-rte-paste-excel-table');
|
|
4842
|
+
if (tableElm[i].getAttribute('border') === '0') {
|
|
4843
|
+
tableElm[i].removeAttribute('border');
|
|
4884
4844
|
}
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
if (
|
|
4888
|
-
|
|
4845
|
+
var tdElm = tableElm[i].querySelectorAll('td');
|
|
4846
|
+
for (var j = 0; j < tdElm.length; j++) {
|
|
4847
|
+
if (tdElm[j].style.borderLeft === 'none') {
|
|
4848
|
+
tdElm[j].style.removeProperty('border-left');
|
|
4889
4849
|
}
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
if (tdElm[j].style.borderTop === 'none') {
|
|
4902
|
-
tdElm[j].style.removeProperty('border-top');
|
|
4903
|
-
}
|
|
4904
|
-
if (tdElm[j].style.border === 'none') {
|
|
4905
|
-
tdElm[j].style.removeProperty('border');
|
|
4906
|
-
}
|
|
4850
|
+
if (tdElm[j].style.borderRight === 'none') {
|
|
4851
|
+
tdElm[j].style.removeProperty('border-right');
|
|
4852
|
+
}
|
|
4853
|
+
if (tdElm[j].style.borderBottom === 'none') {
|
|
4854
|
+
tdElm[j].style.removeProperty('border-bottom');
|
|
4855
|
+
}
|
|
4856
|
+
if (tdElm[j].style.borderTop === 'none') {
|
|
4857
|
+
tdElm[j].style.removeProperty('border-top');
|
|
4858
|
+
}
|
|
4859
|
+
if (tdElm[j].style.border === 'none') {
|
|
4860
|
+
tdElm[j].style.removeProperty('border');
|
|
4907
4861
|
}
|
|
4908
|
-
}
|
|
4909
|
-
else if (tableElm[i].classList.contains('e-rte-paste-onenote-table')) {
|
|
4910
|
-
tableElm[i].classList.remove('e-rte-paste-onenote-table');
|
|
4911
|
-
continue;
|
|
4912
|
-
}
|
|
4913
|
-
else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
|
|
4914
|
-
tableElm[i].classList.remove('e-rte-paste-html-table');
|
|
4915
|
-
continue;
|
|
4916
4862
|
}
|
|
4917
4863
|
}
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
|
|
4922
|
-
continue; // Should not add the class if the image is Broken.
|
|
4923
|
-
}
|
|
4924
|
-
if (!imageElm[i].classList.contains('e-rte-image')) {
|
|
4925
|
-
imageElm[i].classList.add('e-rte-image');
|
|
4864
|
+
else if (tableElm[i].classList.contains('e-rte-paste-onenote-table')) {
|
|
4865
|
+
tableElm[i].classList.remove('e-rte-paste-onenote-table');
|
|
4866
|
+
continue;
|
|
4926
4867
|
}
|
|
4927
|
-
if (
|
|
4928
|
-
|
|
4929
|
-
|
|
4868
|
+
else if (tableElm[i].classList.contains('e-rte-paste-html-table')) {
|
|
4869
|
+
tableElm[i].classList.remove('e-rte-paste-html-table');
|
|
4870
|
+
continue;
|
|
4930
4871
|
}
|
|
4931
4872
|
}
|
|
4932
4873
|
}
|
|
4874
|
+
var imageElm = resultElm.querySelectorAll('img');
|
|
4875
|
+
for (var i = 0; i < imageElm.length; i++) {
|
|
4876
|
+
if (imageElm[i].classList.contains('e-rte-image-unsupported')) {
|
|
4877
|
+
continue; // Should not add the class if the image is Broken.
|
|
4878
|
+
}
|
|
4879
|
+
if (!imageElm[i].classList.contains('e-rte-image')) {
|
|
4880
|
+
imageElm[i].classList.add('e-rte-image');
|
|
4881
|
+
}
|
|
4882
|
+
if (!(imageElm[i].classList.contains('e-imginline') ||
|
|
4883
|
+
imageElm[i].classList.contains('e-imgbreak'))) {
|
|
4884
|
+
imageElm[i].classList.add('e-imginline');
|
|
4885
|
+
}
|
|
4886
|
+
}
|
|
4933
4887
|
return resultElm.innerHTML;
|
|
4934
4888
|
}
|
|
4935
4889
|
/**
|
|
@@ -5126,7 +5080,7 @@ function removeClassWithAttr(elements, classes) {
|
|
|
5126
5080
|
* @deprecated
|
|
5127
5081
|
*/
|
|
5128
5082
|
var statusCollection = getDefaultHtmlTbStatus();
|
|
5129
|
-
var ToolbarStatus = /** @
|
|
5083
|
+
var ToolbarStatus = /** @class */ (function () {
|
|
5130
5084
|
function ToolbarStatus() {
|
|
5131
5085
|
}
|
|
5132
5086
|
/**
|
|
@@ -5524,7 +5478,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
5524
5478
|
* @hidden
|
|
5525
5479
|
* @deprecated
|
|
5526
5480
|
*/
|
|
5527
|
-
var ToolbarRenderer = /** @
|
|
5481
|
+
var ToolbarRenderer = /** @class */ (function () {
|
|
5528
5482
|
/**
|
|
5529
5483
|
* Constructor for toolbar renderer module
|
|
5530
5484
|
*
|
|
@@ -6040,13 +5994,18 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
6040
5994
|
(proxy.parent.iframeSettings.enable && !hasClass(parentNode.ownerDocument.querySelector('body'), 'e-lib')))
|
|
6041
5995
|
&& range.collapsed && args.subCommand === 'BackgroundColor' && (closest(closestElement, '.' + CLS_RTE) || proxy.parent.iframeSettings.enable)) {
|
|
6042
5996
|
proxy.parent.notify(tableColorPickerChanged, {
|
|
6043
|
-
item: {
|
|
6044
|
-
|
|
5997
|
+
item: {
|
|
5998
|
+
command: args.command, subCommand: args.subCommand,
|
|
5999
|
+
value: colorpickerValue
|
|
6000
|
+
}
|
|
6045
6001
|
});
|
|
6046
6002
|
}
|
|
6047
6003
|
else {
|
|
6048
|
-
proxy.parent.notify(colorPickerChanged, {
|
|
6049
|
-
|
|
6004
|
+
proxy.parent.notify(colorPickerChanged, {
|
|
6005
|
+
item: {
|
|
6006
|
+
command: args.command, subCommand: args.subCommand,
|
|
6007
|
+
value: colorpickerValue
|
|
6008
|
+
}
|
|
6050
6009
|
});
|
|
6051
6010
|
}
|
|
6052
6011
|
return;
|
|
@@ -6087,15 +6046,19 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
6087
6046
|
range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
|
|
6088
6047
|
if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' ||
|
|
6089
6048
|
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed) {
|
|
6090
|
-
proxy.parent.notify(tableColorPickerChanged, {
|
|
6049
|
+
proxy.parent.notify(tableColorPickerChanged, {
|
|
6050
|
+
item: {
|
|
6091
6051
|
command: args.command, subCommand: args.subCommand,
|
|
6092
6052
|
value: colorpickerValue
|
|
6093
6053
|
}
|
|
6094
6054
|
});
|
|
6095
6055
|
}
|
|
6096
6056
|
else {
|
|
6097
|
-
proxy.parent.notify(colorPickerChanged, {
|
|
6098
|
-
|
|
6057
|
+
proxy.parent.notify(colorPickerChanged, {
|
|
6058
|
+
item: {
|
|
6059
|
+
command: args.command, subCommand: args.subCommand,
|
|
6060
|
+
value: colorpickerValue
|
|
6061
|
+
}
|
|
6099
6062
|
});
|
|
6100
6063
|
}
|
|
6101
6064
|
return;
|
|
@@ -6154,7 +6117,6 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
6154
6117
|
var proxy = this;
|
|
6155
6118
|
var value;
|
|
6156
6119
|
var colorPicker = new ColorPicker({
|
|
6157
|
-
enablePersistence: this.parent.enablePersistence,
|
|
6158
6120
|
enableRtl: this.parent.enableRtl,
|
|
6159
6121
|
inline: true,
|
|
6160
6122
|
value: null,
|
|
@@ -6279,7 +6241,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
6279
6241
|
/**
|
|
6280
6242
|
* `Link` module is used to handle undo actions.
|
|
6281
6243
|
*/
|
|
6282
|
-
var Link = /** @
|
|
6244
|
+
var Link = /** @class */ (function () {
|
|
6283
6245
|
function Link(parent, serviceLocator) {
|
|
6284
6246
|
this.parent = parent;
|
|
6285
6247
|
this.rteID = parent.element.id;
|
|
@@ -6570,8 +6532,10 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6570
6532
|
var linkText = linkContent.querySelector('.e-rte-linkText');
|
|
6571
6533
|
var linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
6572
6534
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
6573
|
-
this.checkBoxObj = new CheckBox({
|
|
6574
|
-
|
|
6535
|
+
this.checkBoxObj = new CheckBox({
|
|
6536
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
6537
|
+
cssClass: this.parent.getCssClass()
|
|
6538
|
+
});
|
|
6575
6539
|
this.checkBoxObj.isStringTemplate = true;
|
|
6576
6540
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
6577
6541
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -6590,10 +6554,10 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6590
6554
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
6591
6555
|
isModal: Browser.isDevice,
|
|
6592
6556
|
buttons: [{
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6557
|
+
click: this.insertlink.bind(selectObj),
|
|
6558
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
6559
|
+
},
|
|
6560
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
6597
6561
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
6598
6562
|
animationSettings: { effect: 'None' },
|
|
6599
6563
|
close: function (event) {
|
|
@@ -6667,10 +6631,10 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6667
6631
|
}
|
|
6668
6632
|
if (!this.selfLink.isUrl(linkUrl)) {
|
|
6669
6633
|
if (this.selfLink.parent.editorMode === 'Markdown') {
|
|
6670
|
-
linkText = (linkText !== '') ? linkText : '';
|
|
6634
|
+
linkText = (linkText.trim() !== '') ? linkText : '';
|
|
6671
6635
|
}
|
|
6672
6636
|
else {
|
|
6673
|
-
linkText = (linkText === '') ? linkUrl : linkText;
|
|
6637
|
+
linkText = (linkText.trim() === '') ? linkUrl : linkText;
|
|
6674
6638
|
}
|
|
6675
6639
|
if (!this.selfLink.parent.enableAutoUrl) {
|
|
6676
6640
|
linkUrl = linkUrl.indexOf('http') > -1 ? linkUrl : 'http://' + linkUrl;
|
|
@@ -6815,8 +6779,8 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6815
6779
|
Link.prototype.onDocumentClick = function (e) {
|
|
6816
6780
|
var target = e.target;
|
|
6817
6781
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
6818
|
-
|
|
6819
|
-
|
|
6782
|
+
// eslint-disable-next-line
|
|
6783
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable &&
|
|
6820
6784
|
this.parent.getToolbarElement() && !this.parent.getToolbarElement().contains(e.target)) ||
|
|
6821
6785
|
(((this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target)) ||
|
|
6822
6786
|
this.parent.inlineMode.enable && !closest(target, '#' + this.dialogObj.element.id)) &&
|
|
@@ -7015,7 +6979,7 @@ var mentionRestrictKeys = [
|
|
|
7015
6979
|
/**
|
|
7016
6980
|
* `Image` module is used to handle image actions.
|
|
7017
6981
|
*/
|
|
7018
|
-
var Image$1 = /** @
|
|
6982
|
+
var Image$1 = /** @class */ (function () {
|
|
7019
6983
|
function Image(parent, serviceLocator) {
|
|
7020
6984
|
this.isImgUploaded = false;
|
|
7021
6985
|
this.isAllowedTypes = true;
|
|
@@ -8074,14 +8038,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8074
8038
|
header: this.parent.localeObj.getConstant('imageInsertLinkHeader'),
|
|
8075
8039
|
content: linkWrap,
|
|
8076
8040
|
buttons: [{
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8041
|
+
// eslint-disable-next-line
|
|
8042
|
+
click: function (e) {
|
|
8043
|
+
_this.insertlink(linkargs_1);
|
|
8044
|
+
},
|
|
8045
|
+
buttonModel: {
|
|
8046
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
8047
|
+
}
|
|
8048
|
+
}],
|
|
8085
8049
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
8086
8050
|
});
|
|
8087
8051
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8123,14 +8087,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8123
8087
|
this.dialogObj.setProperties({
|
|
8124
8088
|
width: '290px', header: altHeader, content: altWrap,
|
|
8125
8089
|
buttons: [{
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8090
|
+
// eslint-disable-next-line
|
|
8091
|
+
click: function (e) {
|
|
8092
|
+
_this.insertAlt(altArgs_1);
|
|
8093
|
+
},
|
|
8094
|
+
buttonModel: {
|
|
8095
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
8096
|
+
}
|
|
8097
|
+
}],
|
|
8134
8098
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
8135
8099
|
});
|
|
8136
8100
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8286,8 +8250,10 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8286
8250
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
8287
8251
|
});
|
|
8288
8252
|
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
8289
|
-
var imgInner = this.parent.createElement('span', {
|
|
8290
|
-
|
|
8253
|
+
var imgInner = this.parent.createElement('span', {
|
|
8254
|
+
className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
8255
|
+
attrs: { contenteditable: 'true' }
|
|
8256
|
+
});
|
|
8291
8257
|
var parent_1 = e.selectNode[0].parentElement;
|
|
8292
8258
|
if (parent_1.tagName === 'A') {
|
|
8293
8259
|
parent_1.setAttribute('contenteditable', 'true');
|
|
@@ -8334,14 +8300,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8334
8300
|
this.dialogObj.setProperties({
|
|
8335
8301
|
width: '290px', header: imgSizeHeader, content: dialogContent,
|
|
8336
8302
|
buttons: [{
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8303
|
+
// eslint-disable-next-line
|
|
8304
|
+
click: function (e) {
|
|
8305
|
+
_this.insertSize(selectObj_1);
|
|
8306
|
+
},
|
|
8307
|
+
buttonModel: {
|
|
8308
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
8309
|
+
}
|
|
8310
|
+
}],
|
|
8345
8311
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
8346
8312
|
});
|
|
8347
8313
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
@@ -8427,13 +8393,13 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8427
8393
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
8428
8394
|
isModal: Browser.isDevice,
|
|
8429
8395
|
buttons: [{
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8396
|
+
click: this.insertImageUrl.bind(selectObj),
|
|
8397
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: this.parent.editorMode === 'Markdown' ? false : true }
|
|
8398
|
+
},
|
|
8399
|
+
{
|
|
8400
|
+
click: this.cancelDialog.bind(this),
|
|
8401
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
8402
|
+
}],
|
|
8437
8403
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
8438
8404
|
animationSettings: { effect: 'None' },
|
|
8439
8405
|
close: function (event) {
|
|
@@ -8523,14 +8489,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8523
8489
|
this.parent.currentTarget = e.target;
|
|
8524
8490
|
}
|
|
8525
8491
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
8526
|
-
|
|
8527
|
-
|
|
8492
|
+
// eslint-disable-next-line
|
|
8493
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
8528
8494
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
8529
8495
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
8530
8496
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Image') &&
|
|
8531
8497
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Image')))) {
|
|
8532
8498
|
/* eslint-disable */
|
|
8533
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
8499
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
8534
8500
|
else {
|
|
8535
8501
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
8536
8502
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -8541,7 +8507,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8541
8507
|
}
|
|
8542
8508
|
if (!(this.parent.iframeSettings.enable && !isNullOrUndefined(this.parent.currentTarget) && this.parent.currentTarget.nodeName === 'IMG') &&
|
|
8543
8509
|
e.target.tagName !== 'IMG' && this.imgResizeDiv && !(this.quickToolObj &&
|
|
8544
|
-
|
|
8510
|
+
this.quickToolObj.imageQTBar && this.quickToolObj.imageQTBar.element.contains(e.target)) &&
|
|
8545
8511
|
this.contentModule.getEditPanel().contains(this.imgResizeDiv)) {
|
|
8546
8512
|
this.cancelResizeAction();
|
|
8547
8513
|
}
|
|
@@ -8641,8 +8607,8 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8641
8607
|
}
|
|
8642
8608
|
else if (url !== '') {
|
|
8643
8609
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
8644
|
-
|
|
8645
|
-
|
|
8610
|
+
// eslint-disable-next-line
|
|
8611
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
8646
8612
|
proxy.contentModule.getEditPanel().focus();
|
|
8647
8613
|
var range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
8648
8614
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -9507,7 +9473,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
9507
9473
|
/**
|
|
9508
9474
|
* `Audio` module is used to handle audio actions.
|
|
9509
9475
|
*/
|
|
9510
|
-
var Audio = /** @
|
|
9476
|
+
var Audio = /** @class */ (function () {
|
|
9511
9477
|
function Audio(parent, serviceLocator) {
|
|
9512
9478
|
this.isAudioUploaded = false;
|
|
9513
9479
|
this.isAllowedTypes = true;
|
|
@@ -9880,14 +9846,14 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
9880
9846
|
this.audEle = target.querySelector('audio');
|
|
9881
9847
|
}
|
|
9882
9848
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
9883
|
-
|
|
9884
|
-
|
|
9849
|
+
// eslint-disable-next-line
|
|
9850
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
9885
9851
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
9886
9852
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
9887
9853
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Audio') &&
|
|
9888
9854
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Audio')))) {
|
|
9889
9855
|
/* eslint-disable */
|
|
9890
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
9856
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
9891
9857
|
else {
|
|
9892
9858
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
9893
9859
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -10089,15 +10055,15 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
10089
10055
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
10090
10056
|
isModal: Browser.isDevice,
|
|
10091
10057
|
buttons: [{
|
|
10092
|
-
|
|
10093
|
-
|
|
10058
|
+
click: this.insertAudioUrl.bind(selectObj),
|
|
10059
|
+
buttonModel: { content: audioInsert, cssClass: 'e-flat e-insertAudio', isPrimary: true, disabled: true }
|
|
10060
|
+
},
|
|
10061
|
+
{
|
|
10062
|
+
click: function (e) {
|
|
10063
|
+
_this.cancelDialog(e);
|
|
10094
10064
|
},
|
|
10095
|
-
{
|
|
10096
|
-
|
|
10097
|
-
_this.cancelDialog(e);
|
|
10098
|
-
},
|
|
10099
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
|
|
10100
|
-
}],
|
|
10065
|
+
buttonModel: { cssClass: 'e-flat e-cancel', content: audiolinkCancel }
|
|
10066
|
+
}],
|
|
10101
10067
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
10102
10068
|
animationSettings: { effect: 'None' },
|
|
10103
10069
|
close: function (event) {
|
|
@@ -10349,8 +10315,8 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
10349
10315
|
}
|
|
10350
10316
|
else if (url !== '') {
|
|
10351
10317
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
10352
|
-
|
|
10353
|
-
|
|
10318
|
+
// eslint-disable-next-line
|
|
10319
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
10354
10320
|
proxy.contentModule.getEditPanel().focus();
|
|
10355
10321
|
var range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
10356
10322
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -10404,7 +10370,7 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
10404
10370
|
return Audio;
|
|
10405
10371
|
}());
|
|
10406
10372
|
|
|
10407
|
-
var Video = /** @
|
|
10373
|
+
var Video = /** @class */ (function () {
|
|
10408
10374
|
function Video(parent, serviceLocator) {
|
|
10409
10375
|
this.isVideoUploaded = false;
|
|
10410
10376
|
this.isAllowedTypes = true;
|
|
@@ -10584,14 +10550,14 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
10584
10550
|
this.dialogObj.setProperties({
|
|
10585
10551
|
width: '290px', header: vidSizeHeader, content: dialogContent,
|
|
10586
10552
|
buttons: [{
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10553
|
+
// eslint-disable-next-line
|
|
10554
|
+
click: function (e) {
|
|
10555
|
+
_this.insertSize(selectObj_1);
|
|
10556
|
+
},
|
|
10557
|
+
buttonModel: {
|
|
10558
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size', isPrimary: true
|
|
10559
|
+
}
|
|
10560
|
+
}]
|
|
10595
10561
|
});
|
|
10596
10562
|
this.dialogObj.element.style.maxHeight = 'inherit';
|
|
10597
10563
|
this.dialogObj.content.querySelector('input').focus();
|
|
@@ -11195,7 +11161,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11195
11161
|
Video.prototype.checkVideoBack = function (range) {
|
|
11196
11162
|
if (range.startContainer.nodeName === '#text' && range.startOffset === 0 &&
|
|
11197
11163
|
!isNullOrUndefined(range.startContainer.previousSibling) && (range.startContainer.previousSibling.nodeName === 'VIDEO' ||
|
|
11198
|
-
|
|
11164
|
+
this.isEmbedVidElem(range.startContainer.previousSibling))) {
|
|
11199
11165
|
this.deletedVid.push(range.startContainer.previousSibling);
|
|
11200
11166
|
}
|
|
11201
11167
|
else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset - 1]) &&
|
|
@@ -11207,7 +11173,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11207
11173
|
Video.prototype.checkVideoDel = function (range) {
|
|
11208
11174
|
if (range.startContainer.nodeName === '#text' && range.startOffset === range.startContainer.textContent.length &&
|
|
11209
11175
|
!isNullOrUndefined(range.startContainer.nextSibling) && (range.startContainer.nextSibling.nodeName === 'VIDEO' ||
|
|
11210
|
-
|
|
11176
|
+
this.isEmbedVidElem(range.startContainer.nextSibling))) {
|
|
11211
11177
|
this.deletedVid.push(range.startContainer.nextSibling);
|
|
11212
11178
|
}
|
|
11213
11179
|
else if (range.startContainer.nodeName !== '#text' && !isNullOrUndefined(range.startContainer.childNodes[range.startOffset]) &&
|
|
@@ -11324,14 +11290,14 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11324
11290
|
this.videoEle = !this.isEmbedVidElem(target) ? target : target.querySelector('iframe');
|
|
11325
11291
|
}
|
|
11326
11292
|
if (!isNullOrUndefined(this.dialogObj) && ((
|
|
11327
|
-
|
|
11328
|
-
|
|
11293
|
+
// eslint-disable-next-line
|
|
11294
|
+
!closest(target, '[id=' + "'" + this.dialogObj.element.id + "'" + ']') && this.parent.toolbarSettings.enable && this.parent.getToolbarElement() &&
|
|
11329
11295
|
!this.parent.getToolbarElement().contains(e.target)) ||
|
|
11330
11296
|
(this.parent.getToolbarElement() && this.parent.getToolbarElement().contains(e.target) &&
|
|
11331
11297
|
!closest(target, '#' + this.parent.getID() + '_toolbar_Video') &&
|
|
11332
11298
|
!target.querySelector('#' + this.parent.getID() + '_toolbar_Video')))) {
|
|
11333
11299
|
/* eslint-disable */
|
|
11334
|
-
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight)
|
|
11300
|
+
if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight);
|
|
11335
11301
|
else {
|
|
11336
11302
|
this.parent.notify(documentClickClosedBy, { closedBy: "outside click" });
|
|
11337
11303
|
this.dialogObj.hide({ returnValue: true });
|
|
@@ -11522,15 +11488,15 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11522
11488
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
11523
11489
|
isModal: Browser.isDevice,
|
|
11524
11490
|
buttons: [{
|
|
11525
|
-
|
|
11526
|
-
|
|
11491
|
+
click: this.insertVideoUrl.bind(selectObj),
|
|
11492
|
+
buttonModel: { content: videoInsert, cssClass: 'e-flat e-insertVideo', isPrimary: true, disabled: true }
|
|
11493
|
+
},
|
|
11494
|
+
{
|
|
11495
|
+
click: function (e) {
|
|
11496
|
+
_this.cancelDialog(e);
|
|
11527
11497
|
},
|
|
11528
|
-
{
|
|
11529
|
-
|
|
11530
|
-
_this.cancelDialog(e);
|
|
11531
|
-
},
|
|
11532
|
-
buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
|
|
11533
|
-
}],
|
|
11498
|
+
buttonModel: { cssClass: 'e-flat e-cancel', content: videolinkCancel }
|
|
11499
|
+
}],
|
|
11534
11500
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
11535
11501
|
animationSettings: { effect: 'None' },
|
|
11536
11502
|
close: function (event) {
|
|
@@ -11867,8 +11833,8 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11867
11833
|
}
|
|
11868
11834
|
else if (proxy.parent.editorMode === 'HTML' && (url !== '' || embedUrl !== '')) {
|
|
11869
11835
|
if (proxy.parent.editorMode === 'HTML' && isNullOrUndefined(closest(
|
|
11870
|
-
|
|
11871
|
-
|
|
11836
|
+
// eslint-disable-next-line
|
|
11837
|
+
this.selection.range.startContainer.parentNode, '[id=' + "'" + proxy.contentModule.getPanel().id + "'" + ']'))) {
|
|
11872
11838
|
proxy.contentModule.getEditPanel().focus();
|
|
11873
11839
|
var range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.contentModule.getDocument());
|
|
11874
11840
|
this.selection = proxy.parent.formatter.editorManager.nodeSelection.save(range, proxy.contentModule.getDocument());
|
|
@@ -12137,7 +12103,7 @@ var keyCode = {
|
|
|
12137
12103
|
* @hidden
|
|
12138
12104
|
* @deprecated
|
|
12139
12105
|
*/
|
|
12140
|
-
var KeyboardEvents = /** @
|
|
12106
|
+
var KeyboardEvents = /** @class */ (function (_super) {
|
|
12141
12107
|
__extends(KeyboardEvents, _super);
|
|
12142
12108
|
/**
|
|
12143
12109
|
* Initializes the KeyboardEvents
|
|
@@ -12283,7 +12249,7 @@ var KeyboardEvents = /** @__PURE__ @class */ (function (_super) {
|
|
|
12283
12249
|
* @hidden
|
|
12284
12250
|
* @deprecated
|
|
12285
12251
|
*/
|
|
12286
|
-
var ViewSource = /** @
|
|
12252
|
+
var ViewSource = /** @class */ (function () {
|
|
12287
12253
|
/**
|
|
12288
12254
|
* Constructor for view source module
|
|
12289
12255
|
*
|
|
@@ -12522,7 +12488,7 @@ var ViewSource = /** @__PURE__ @class */ (function () {
|
|
|
12522
12488
|
/**
|
|
12523
12489
|
* `Table` module is used to handle table actions.
|
|
12524
12490
|
*/
|
|
12525
|
-
var Table = /** @
|
|
12491
|
+
var Table = /** @class */ (function () {
|
|
12526
12492
|
function Table(parent, serviceLocator) {
|
|
12527
12493
|
this.ensureInsideTableList = true;
|
|
12528
12494
|
this.pageX = null;
|
|
@@ -12556,7 +12522,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
12556
12522
|
this.parent.on(tableToolbarAction, this.onToolbarAction, this);
|
|
12557
12523
|
this.parent.on(dropDownSelect, this.dropdownSelect, this);
|
|
12558
12524
|
this.parent.on(keyDown, this.keyDown, this);
|
|
12559
|
-
this.parent.on(keyUp, this.keyUp, this);
|
|
12560
12525
|
this.parent.on(tableModulekeyUp, this.tableModulekeyUp, this);
|
|
12561
12526
|
this.parent.on(bindCssClass, this.setCssClass, this);
|
|
12562
12527
|
this.parent.on(destroy, this.destroy, this);
|
|
@@ -12577,7 +12542,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
12577
12542
|
this.parent.off(mouseDown, this.cellSelect);
|
|
12578
12543
|
this.parent.off(tableColorPickerChanged, this.setBGColor);
|
|
12579
12544
|
this.parent.off(keyDown, this.keyDown);
|
|
12580
|
-
this.parent.off(keyUp, this.keyUp);
|
|
12581
12545
|
this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
|
|
12582
12546
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
12583
12547
|
this.parent.off(destroy, this.destroy);
|
|
@@ -12674,20 +12638,6 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
12674
12638
|
this.parent.formatter.process(this.parent, e, e, { selection: selectCell, subCommand: e.item.subCommand });
|
|
12675
12639
|
this.hideTableQuickToolbar();
|
|
12676
12640
|
};
|
|
12677
|
-
Table.prototype.keyUp = function (e) {
|
|
12678
|
-
var target = e.args.target;
|
|
12679
|
-
if (e.args.key.toLocaleLowerCase() === 'escape' && target && target.classList && (this.popupObj && !closest(target, '[id=' + '\'' + this.popupObj.element.id + '\'' + ']')) && this.popupObj) {
|
|
12680
|
-
var createTableToolbarBtn = this.popupObj.relateTo;
|
|
12681
|
-
if (createTableToolbarBtn.nodeName !== 'BUTTON') {
|
|
12682
|
-
createTableToolbarBtn = createTableToolbarBtn.querySelector('span.e-create-table');
|
|
12683
|
-
createTableToolbarBtn = createTableToolbarBtn.parentElement;
|
|
12684
|
-
}
|
|
12685
|
-
this.popupObj.hide();
|
|
12686
|
-
if (createTableToolbarBtn) {
|
|
12687
|
-
createTableToolbarBtn.focus();
|
|
12688
|
-
}
|
|
12689
|
-
}
|
|
12690
|
-
};
|
|
12691
12641
|
Table.prototype.keyDown = function (e) {
|
|
12692
12642
|
var event = e.args;
|
|
12693
12643
|
// eslint-disable-next-line
|
|
@@ -13124,7 +13074,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13124
13074
|
var eventArgs = e.args;
|
|
13125
13075
|
if (this.previousTableElement !== ele && !isNullOrUndefined(this.previousTableElement)
|
|
13126
13076
|
&& !eventArgs.shiftKey && (eventArgs.keyCode === 39 || eventArgs.keyCode === 37 ||
|
|
13127
|
-
|
|
13077
|
+
eventArgs.keyCode === 38 || eventArgs.keyCode === 40)) {
|
|
13128
13078
|
removeClassWithAttr([this.previousTableElement], CLS_TABLE_SEL);
|
|
13129
13079
|
this.removeTableSelection();
|
|
13130
13080
|
}
|
|
@@ -13389,7 +13339,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13389
13339
|
var ismacRightClick = /Version\/\d+\.\d+.*Safari/.test(Browser.userAgent) && !/Chrome|Edg|Firefox/.test(Browser.userAgent) && args.which === 3;
|
|
13390
13340
|
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
13391
13341
|
target.nodeName !== 'AUDIO' && (startNode === endNode || ismacRightClick) && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
13392
|
-
|
|
13342
|
+
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
13393
13343
|
&& !(range.startContainer.nodeType === 3 && !(range.collapsed || ismacRightClick)) &&
|
|
13394
13344
|
currentTime - this.resizeEndTime > 100 && !(ismacRightClick && (range.collapsed && range.startOffset !== 0)) && !(ismacRightClick && range.endContainer.nodeName === '#text')) {
|
|
13395
13345
|
var range_1 = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
@@ -13501,7 +13451,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13501
13451
|
var selection = proxy.parent.formatter.editorManager.nodeSelection.get(proxy.contentModule.getDocument());
|
|
13502
13452
|
if (!isNullOrUndefined(selection) && !isNullOrUndefined(selection.anchorNode) &&
|
|
13503
13453
|
selection.anchorNode.nodeType === Node.ELEMENT_NODE && (selection.anchorNode.tagName === 'TD'
|
|
13504
|
-
|
|
13454
|
+
|| selection.anchorNode.tagName === 'TH')) {
|
|
13505
13455
|
proxy.curTable = closest(selection.anchorNode, 'table');
|
|
13506
13456
|
proxy.activeCell = selection.anchorNode;
|
|
13507
13457
|
}
|
|
@@ -13858,7 +13808,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13858
13808
|
this.helper.classList.add('e-column-helper');
|
|
13859
13809
|
this.helper.style.cssText = 'height: ' + getComputedStyle(this.curTable).height + '; top: ' +
|
|
13860
13810
|
pos.top + 'px; left:' + ((pos.left + this.calcPos(this.columnEle).left) +
|
|
13861
|
-
|
|
13811
|
+
(this.currentColumnResize === 'last' ? this.columnEle.offsetWidth : 0) - 1) + 'px;';
|
|
13862
13812
|
}
|
|
13863
13813
|
else {
|
|
13864
13814
|
this.helper.classList.add('e-row-helper');
|
|
@@ -14266,6 +14216,8 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14266
14216
|
var header = '1X1';
|
|
14267
14217
|
var insertbtn = this.l10n.getConstant('inserttablebtn');
|
|
14268
14218
|
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
|
|
14219
|
+
this.createTablePopupBoundFn = this.createTablePopupKeyDown.bind(this);
|
|
14220
|
+
this.dlgDiv.addEventListener('keydown', this.createTablePopupBoundFn);
|
|
14269
14221
|
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
|
|
14270
14222
|
this.tblHeader.innerHTML = header;
|
|
14271
14223
|
this.dlgDiv.appendChild(this.tblHeader);
|
|
@@ -14303,6 +14255,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14303
14255
|
// eslint-disable-next-line
|
|
14304
14256
|
close: function (event) {
|
|
14305
14257
|
EventHandler.remove(btnEle, 'click', _this.insertTableDialog);
|
|
14258
|
+
_this.dlgDiv.removeEventListener('keydown', _this.createTablePopupBoundFn);
|
|
14306
14259
|
detach(btnEle);
|
|
14307
14260
|
if (_this.createTableButton && !_this.createTableButton.isDestroyed) {
|
|
14308
14261
|
_this.createTableButton.destroy();
|
|
@@ -14399,15 +14352,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14399
14352
|
this.editdlgObj.setProperties({
|
|
14400
14353
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
14401
14354
|
buttons: [{
|
|
14402
|
-
|
|
14403
|
-
|
|
14355
|
+
click: this.applyProperties.bind(this, args),
|
|
14356
|
+
buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
|
|
14357
|
+
},
|
|
14358
|
+
{
|
|
14359
|
+
click: function (e) {
|
|
14360
|
+
_this.cancelDialog(e);
|
|
14404
14361
|
},
|
|
14405
|
-
{
|
|
14406
|
-
|
|
14407
|
-
_this.cancelDialog(e);
|
|
14408
|
-
},
|
|
14409
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14410
|
-
}],
|
|
14362
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14363
|
+
}],
|
|
14411
14364
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
14412
14365
|
});
|
|
14413
14366
|
this.editdlgObj.element.style.maxHeight = 'none';
|
|
@@ -14429,15 +14382,15 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14429
14382
|
proxy.editdlgObj.setProperties({
|
|
14430
14383
|
height: 'initial', width: '290px', content: dlgContent,
|
|
14431
14384
|
buttons: [{
|
|
14432
|
-
|
|
14433
|
-
|
|
14385
|
+
click: proxy.customTable.bind(this, args),
|
|
14386
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + ' ' + proxy.parent.cssClass, isPrimary: true }
|
|
14387
|
+
},
|
|
14388
|
+
{
|
|
14389
|
+
click: function (e) {
|
|
14390
|
+
proxy.cancelDialog(e);
|
|
14434
14391
|
},
|
|
14435
|
-
{
|
|
14436
|
-
|
|
14437
|
-
proxy.cancelDialog(e);
|
|
14438
|
-
},
|
|
14439
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
|
|
14440
|
-
}]
|
|
14392
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + proxy.parent.cssClass, content: cancel }
|
|
14393
|
+
}]
|
|
14441
14394
|
});
|
|
14442
14395
|
if (!isNullOrUndefined(proxy.parent.cssClass)) {
|
|
14443
14396
|
proxy.editdlgObj.setProperties({ cssClass: proxy.parent.cssClass });
|
|
@@ -14510,14 +14463,14 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14510
14463
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
14511
14464
|
isModal: Browser.isDevice,
|
|
14512
14465
|
buttons: [{
|
|
14513
|
-
|
|
14466
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
|
|
14467
|
+
},
|
|
14468
|
+
{
|
|
14469
|
+
click: function (e) {
|
|
14470
|
+
_this.cancelDialog(e);
|
|
14514
14471
|
},
|
|
14515
|
-
{
|
|
14516
|
-
|
|
14517
|
-
_this.cancelDialog(e);
|
|
14518
|
-
},
|
|
14519
|
-
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14520
|
-
}],
|
|
14472
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
14473
|
+
}],
|
|
14521
14474
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
14522
14475
|
animationSettings: { effect: 'None' },
|
|
14523
14476
|
close: function (event) {
|
|
@@ -14686,6 +14639,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14686
14639
|
this.createTableButton.destroy();
|
|
14687
14640
|
this.createTableButton = null;
|
|
14688
14641
|
}
|
|
14642
|
+
this.createTablePopupBoundFn = null;
|
|
14689
14643
|
this.isDestroyed = true;
|
|
14690
14644
|
};
|
|
14691
14645
|
/**
|
|
@@ -14712,13 +14666,22 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
14712
14666
|
'px; left:' + (tablePosition.left + parseInt(getComputedStyle(this.curTable).width, 10) - 4) + 'px;';
|
|
14713
14667
|
}
|
|
14714
14668
|
};
|
|
14669
|
+
Table.prototype.createTablePopupKeyDown = function (e) {
|
|
14670
|
+
if (e.key === 'Escape') {
|
|
14671
|
+
var popupRootElem = e.target.closest('.e-rte-table-popup');
|
|
14672
|
+
var popup = getComponent(popupRootElem, 'popup');
|
|
14673
|
+
var tableToolbarButton = popup.relateTo;
|
|
14674
|
+
popup.hide();
|
|
14675
|
+
tableToolbarButton.focus({ preventScroll: true });
|
|
14676
|
+
}
|
|
14677
|
+
};
|
|
14715
14678
|
return Table;
|
|
14716
14679
|
}());
|
|
14717
14680
|
|
|
14718
14681
|
/**
|
|
14719
14682
|
* Dialog Renderer
|
|
14720
14683
|
*/
|
|
14721
|
-
var DialogRenderer = /** @
|
|
14684
|
+
var DialogRenderer = /** @class */ (function () {
|
|
14722
14685
|
function DialogRenderer(parent) {
|
|
14723
14686
|
this.parent = parent;
|
|
14724
14687
|
this.addEventListener();
|
|
@@ -14859,7 +14822,7 @@ var IFRAMEHEADER = "\n <!DOCTYPE html> \n <html>\n <head>\n
|
|
|
14859
14822
|
* @hidden
|
|
14860
14823
|
* @deprecated
|
|
14861
14824
|
*/
|
|
14862
|
-
var IframeContentRender = /** @
|
|
14825
|
+
var IframeContentRender = /** @class */ (function (_super) {
|
|
14863
14826
|
__extends$1(IframeContentRender, _super);
|
|
14864
14827
|
function IframeContentRender() {
|
|
14865
14828
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -14967,7 +14930,7 @@ var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
|
|
|
14967
14930
|
* @hidden
|
|
14968
14931
|
* @deprecated
|
|
14969
14932
|
*/
|
|
14970
|
-
var MarkdownRender = /** @
|
|
14933
|
+
var MarkdownRender = /** @class */ (function () {
|
|
14971
14934
|
/**
|
|
14972
14935
|
* Constructor for content renderer module
|
|
14973
14936
|
*
|
|
@@ -15053,7 +15016,7 @@ var MarkdownRender = /** @__PURE__ @class */ (function () {
|
|
|
15053
15016
|
* @hidden
|
|
15054
15017
|
* @deprecated
|
|
15055
15018
|
*/
|
|
15056
|
-
var PopupRenderer = /** @
|
|
15019
|
+
var PopupRenderer = /** @class */ (function () {
|
|
15057
15020
|
/**
|
|
15058
15021
|
* Constructor for popup renderer module
|
|
15059
15022
|
*
|
|
@@ -15141,7 +15104,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
15141
15104
|
/**
|
|
15142
15105
|
* Configures the slash menu settings of the RichTextEditor.
|
|
15143
15106
|
*/
|
|
15144
|
-
var SlashMenuSettings = /** @
|
|
15107
|
+
var SlashMenuSettings = /** @class */ (function (_super) {
|
|
15145
15108
|
__extends$2(SlashMenuSettings, _super);
|
|
15146
15109
|
function SlashMenuSettings() {
|
|
15147
15110
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -15261,7 +15224,7 @@ var injectibleSlashMenuDataModel = [
|
|
|
15261
15224
|
}
|
|
15262
15225
|
];
|
|
15263
15226
|
|
|
15264
|
-
var SlashMenu = /** @
|
|
15227
|
+
var SlashMenu = /** @class */ (function () {
|
|
15265
15228
|
function SlashMenu(options, serviceLocator) {
|
|
15266
15229
|
this.parent = options;
|
|
15267
15230
|
this.currentDocument = this.parent.element.ownerDocument;
|
|
@@ -15471,7 +15434,7 @@ var SlashMenu = /** @__PURE__ @class */ (function () {
|
|
|
15471
15434
|
/**
|
|
15472
15435
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
15473
15436
|
*/
|
|
15474
|
-
var BaseToolbar = /** @
|
|
15437
|
+
var BaseToolbar = /** @class */ (function () {
|
|
15475
15438
|
function BaseToolbar(parent, serviceLocator) {
|
|
15476
15439
|
this.tools = {};
|
|
15477
15440
|
this.parent = parent;
|
|
@@ -15709,7 +15672,7 @@ var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
|
15709
15672
|
/**
|
|
15710
15673
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
15711
15674
|
*/
|
|
15712
|
-
var DropDownButtons = /** @
|
|
15675
|
+
var DropDownButtons = /** @class */ (function () {
|
|
15713
15676
|
function DropDownButtons(parent, serviceLocator) {
|
|
15714
15677
|
this.parent = parent;
|
|
15715
15678
|
this.locator = serviceLocator;
|
|
@@ -16244,7 +16207,7 @@ var DropDownButtons = /** @__PURE__ @class */ (function () {
|
|
|
16244
16207
|
/**
|
|
16245
16208
|
* `ToolbarAction` module is used to toolbar click action
|
|
16246
16209
|
*/
|
|
16247
|
-
var ToolbarAction = /** @
|
|
16210
|
+
var ToolbarAction = /** @class */ (function () {
|
|
16248
16211
|
function ToolbarAction(parent) {
|
|
16249
16212
|
this.parent = parent;
|
|
16250
16213
|
this.addEventListener();
|
|
@@ -16286,7 +16249,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
|
|
|
16286
16249
|
this.parent.notify(selectionRestore, {});
|
|
16287
16250
|
if (!(document.body.contains(document.body.querySelector('.e-rte-quick-toolbar'))
|
|
16288
16251
|
&& e.item && (e.item.command === 'Images' || e.item.command === 'Audios' || e.item.command === 'Videos' ||
|
|
16289
|
-
|
|
16252
|
+
e.item.command === 'VideoLayoutOption' || e.item.command === 'Display' || e.item.command === 'Table'))) {
|
|
16290
16253
|
var value = e.item.controlParent && this.parent.quickToolbarModule && this.parent.quickToolbarModule.tableQTBar
|
|
16291
16254
|
&& this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element) ? 'Table' : null;
|
|
16292
16255
|
if (e.item.command === 'Lists') {
|
|
@@ -16316,7 +16279,7 @@ var ToolbarAction = /** @__PURE__ @class */ (function () {
|
|
|
16316
16279
|
/**
|
|
16317
16280
|
* `Color Picker` module is used to handle ColorPicker actions.
|
|
16318
16281
|
*/
|
|
16319
|
-
var ColorPickerInput = /** @
|
|
16282
|
+
var ColorPickerInput = /** @class */ (function () {
|
|
16320
16283
|
function ColorPickerInput(parent, serviceLocator) {
|
|
16321
16284
|
this.tools = {};
|
|
16322
16285
|
this.parent = parent;
|
|
@@ -16571,7 +16534,7 @@ var ColorPickerInput = /** @__PURE__ @class */ (function () {
|
|
|
16571
16534
|
/**
|
|
16572
16535
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
16573
16536
|
*/
|
|
16574
|
-
var Toolbar = /** @
|
|
16537
|
+
var Toolbar = /** @class */ (function () {
|
|
16575
16538
|
function Toolbar(parent, serviceLocator) {
|
|
16576
16539
|
this.tools = {};
|
|
16577
16540
|
this.parent = parent;
|
|
@@ -17193,7 +17156,7 @@ var Toolbar = /** @__PURE__ @class */ (function () {
|
|
|
17193
17156
|
/**
|
|
17194
17157
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
17195
17158
|
*/
|
|
17196
|
-
var BaseQuickToolbar = /** @
|
|
17159
|
+
var BaseQuickToolbar = /** @class */ (function () {
|
|
17197
17160
|
function BaseQuickToolbar(parent, locator) {
|
|
17198
17161
|
this.parent = parent;
|
|
17199
17162
|
this.locator = locator;
|
|
@@ -17414,8 +17377,10 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
17414
17377
|
*/
|
|
17415
17378
|
BaseQuickToolbar.prototype.showPopup = function (x, y, target, type) {
|
|
17416
17379
|
var _this = this;
|
|
17417
|
-
var eventArgs = {
|
|
17418
|
-
|
|
17380
|
+
var eventArgs = {
|
|
17381
|
+
popup: this.popupObj, cancel: false, targetElement: target,
|
|
17382
|
+
positionX: x, positionY: y
|
|
17383
|
+
};
|
|
17419
17384
|
this.parent.trigger(beforeQuickToolbarOpen, eventArgs, function (beforeQuickToolbarArgs) {
|
|
17420
17385
|
if (!beforeQuickToolbarArgs.cancel) {
|
|
17421
17386
|
var editPanelTop = void 0;
|
|
@@ -17716,7 +17681,7 @@ var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
17716
17681
|
/**
|
|
17717
17682
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
17718
17683
|
*/
|
|
17719
|
-
var QuickToolbar = /** @
|
|
17684
|
+
var QuickToolbar = /** @class */ (function () {
|
|
17720
17685
|
function QuickToolbar(parent, locator) {
|
|
17721
17686
|
this.debounceTimeout = 1000;
|
|
17722
17687
|
this.parent = parent;
|
|
@@ -18328,7 +18293,7 @@ var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
|
18328
18293
|
/**
|
|
18329
18294
|
* `Count` module is used to handle Count actions.
|
|
18330
18295
|
*/
|
|
18331
|
-
var Count = /** @
|
|
18296
|
+
var Count = /** @class */ (function () {
|
|
18332
18297
|
function Count(parent, serviceLocator) {
|
|
18333
18298
|
this.parent = parent;
|
|
18334
18299
|
this.locator = serviceLocator;
|
|
@@ -18472,7 +18437,7 @@ var Count = /** @__PURE__ @class */ (function () {
|
|
|
18472
18437
|
* @hidden
|
|
18473
18438
|
* @deprecated
|
|
18474
18439
|
*/
|
|
18475
|
-
var MarkdownSelection = /** @
|
|
18440
|
+
var MarkdownSelection = /** @class */ (function () {
|
|
18476
18441
|
function MarkdownSelection() {
|
|
18477
18442
|
}
|
|
18478
18443
|
/**
|
|
@@ -18687,7 +18652,7 @@ var MarkdownSelection = /** @__PURE__ @class */ (function () {
|
|
|
18687
18652
|
/**
|
|
18688
18653
|
* MarkdownToolbarStatus module for refresh the toolbar status
|
|
18689
18654
|
*/
|
|
18690
|
-
var MarkdownToolbarStatus = /** @
|
|
18655
|
+
var MarkdownToolbarStatus = /** @class */ (function () {
|
|
18691
18656
|
function MarkdownToolbarStatus(parent) {
|
|
18692
18657
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
|
|
18693
18658
|
this.selection = new MarkdownSelection();
|
|
@@ -18810,7 +18775,7 @@ var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18810
18775
|
/**
|
|
18811
18776
|
* `ExecCommandCallBack` module is used to run the editor manager command
|
|
18812
18777
|
*/
|
|
18813
|
-
var ExecCommandCallBack = /** @
|
|
18778
|
+
var ExecCommandCallBack = /** @class */ (function () {
|
|
18814
18779
|
function ExecCommandCallBack(parent) {
|
|
18815
18780
|
this.parent = parent;
|
|
18816
18781
|
this.addEventListener();
|
|
@@ -18840,7 +18805,7 @@ var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
|
|
|
18840
18805
|
* @hidden
|
|
18841
18806
|
* @deprecated
|
|
18842
18807
|
*/
|
|
18843
|
-
var Formatter = /** @
|
|
18808
|
+
var Formatter = /** @class */ (function () {
|
|
18844
18809
|
function Formatter() {
|
|
18845
18810
|
}
|
|
18846
18811
|
/**
|
|
@@ -19155,7 +19120,7 @@ var INSERT_TEXT_COMMAND = 'insert-text';
|
|
|
19155
19120
|
*
|
|
19156
19121
|
* @hidden
|
|
19157
19122
|
*/
|
|
19158
|
-
var MDLists = /** @
|
|
19123
|
+
var MDLists = /** @class */ (function () {
|
|
19159
19124
|
/**
|
|
19160
19125
|
* Constructor for creating the Lists plugin
|
|
19161
19126
|
*
|
|
@@ -19276,9 +19241,9 @@ var MDLists = /** @__PURE__ @class */ (function () {
|
|
|
19276
19241
|
}
|
|
19277
19242
|
this.restore(textArea, start, end + addedLength, event);
|
|
19278
19243
|
};
|
|
19279
|
-
MDLists.prototype.changeTextAreaValue = function (splitText, prefixValue, event,
|
|
19280
|
-
|
|
19281
|
-
|
|
19244
|
+
MDLists.prototype.changeTextAreaValue = function (splitText, prefixValue, event,
|
|
19245
|
+
// eslint-disable-next-line
|
|
19246
|
+
textArea, parents, k, end) {
|
|
19282
19247
|
var prefix = prefixValue;
|
|
19283
19248
|
splitText.splice(0, 1);
|
|
19284
19249
|
var textAreaLength = this.selection.getAllParents(textArea.value).length;
|
|
@@ -19635,7 +19600,7 @@ var MDLists = /** @__PURE__ @class */ (function () {
|
|
|
19635
19600
|
* @hidden
|
|
19636
19601
|
* @deprecated
|
|
19637
19602
|
*/
|
|
19638
|
-
var MDFormats = /** @
|
|
19603
|
+
var MDFormats = /** @class */ (function () {
|
|
19639
19604
|
/**
|
|
19640
19605
|
* Constructor for creating the Formats plugin
|
|
19641
19606
|
*
|
|
@@ -19870,7 +19835,7 @@ var MDFormats = /** @__PURE__ @class */ (function () {
|
|
|
19870
19835
|
* @hidden
|
|
19871
19836
|
* @deprecated
|
|
19872
19837
|
*/
|
|
19873
|
-
var MDSelectionFormats = /** @
|
|
19838
|
+
var MDSelectionFormats = /** @class */ (function () {
|
|
19874
19839
|
function MDSelectionFormats(parent) {
|
|
19875
19840
|
extend(this, this, parent, true);
|
|
19876
19841
|
this.selection = this.parent.markdownSelection;
|
|
@@ -20207,7 +20172,7 @@ var MDSelectionFormats = /** @__PURE__ @class */ (function () {
|
|
|
20207
20172
|
/**
|
|
20208
20173
|
* `Undo` module is used to handle undo actions.
|
|
20209
20174
|
*/
|
|
20210
|
-
var UndoRedoCommands = /** @
|
|
20175
|
+
var UndoRedoCommands = /** @class */ (function () {
|
|
20211
20176
|
function UndoRedoCommands(parent, options) {
|
|
20212
20177
|
this.undoRedoStack = [];
|
|
20213
20178
|
this.parent = parent;
|
|
@@ -20404,7 +20369,7 @@ var UndoRedoCommands = /** @__PURE__ @class */ (function () {
|
|
|
20404
20369
|
* @hidden
|
|
20405
20370
|
* @deprecated
|
|
20406
20371
|
*/
|
|
20407
|
-
var MDLink = /** @
|
|
20372
|
+
var MDLink = /** @class */ (function () {
|
|
20408
20373
|
/**
|
|
20409
20374
|
* Constructor for creating the Formats plugin
|
|
20410
20375
|
*
|
|
@@ -20463,7 +20428,7 @@ var MDLink = /** @__PURE__ @class */ (function () {
|
|
|
20463
20428
|
* @hidden
|
|
20464
20429
|
* @deprecated
|
|
20465
20430
|
*/
|
|
20466
|
-
var MDTable = /** @
|
|
20431
|
+
var MDTable = /** @class */ (function () {
|
|
20467
20432
|
/**
|
|
20468
20433
|
* Constructor for creating the Formats plugin
|
|
20469
20434
|
*
|
|
@@ -20624,9 +20589,9 @@ var MDTable = /** @__PURE__ @class */ (function () {
|
|
|
20624
20589
|
return this.element.value.substr(0, this.element.selectionStart) + text +
|
|
20625
20590
|
this.element.value.substr(this.element.selectionEnd, this.element.value.length);
|
|
20626
20591
|
};
|
|
20627
|
-
MDTable.prototype.checkValid = function (start, end, text, textAreaInitial,
|
|
20628
|
-
|
|
20629
|
-
|
|
20592
|
+
MDTable.prototype.checkValid = function (start, end, text, textAreaInitial,
|
|
20593
|
+
// eslint-disable-next-line
|
|
20594
|
+
e, formatSplit, parentText, syntaxArr) {
|
|
20630
20595
|
if (this.ensureStartValid(parentText[0].start, parentText) &&
|
|
20631
20596
|
this.ensureEndValid(parentText[parentText.length - 1].start, formatSplit[0].length)) {
|
|
20632
20597
|
if (start === parentText[0].start) {
|
|
@@ -20693,7 +20658,7 @@ var MDTable = /** @__PURE__ @class */ (function () {
|
|
|
20693
20658
|
* @hidden
|
|
20694
20659
|
* @deprecated
|
|
20695
20660
|
*/
|
|
20696
|
-
var ClearFormat = /** @
|
|
20661
|
+
var ClearFormat = /** @class */ (function () {
|
|
20697
20662
|
/**
|
|
20698
20663
|
* Constructor for creating the clear format plugin
|
|
20699
20664
|
*
|
|
@@ -20817,7 +20782,7 @@ var ClearFormat = /** @__PURE__ @class */ (function () {
|
|
|
20817
20782
|
* @hidden
|
|
20818
20783
|
* @deprecated
|
|
20819
20784
|
*/
|
|
20820
|
-
var MDInsertText = /** @
|
|
20785
|
+
var MDInsertText = /** @class */ (function () {
|
|
20821
20786
|
/**
|
|
20822
20787
|
* Constructor for creating the insert text plugin
|
|
20823
20788
|
*
|
|
@@ -20875,7 +20840,7 @@ var MDInsertText = /** @__PURE__ @class */ (function () {
|
|
|
20875
20840
|
* @hidden
|
|
20876
20841
|
* @deprecated
|
|
20877
20842
|
*/
|
|
20878
|
-
var MarkdownParser = /** @
|
|
20843
|
+
var MarkdownParser = /** @class */ (function () {
|
|
20879
20844
|
/**
|
|
20880
20845
|
* Constructor for creating the component
|
|
20881
20846
|
*
|
|
@@ -20968,8 +20933,10 @@ var MarkdownParser = /** @__PURE__ @class */ (function () {
|
|
|
20968
20933
|
this.observer.notify(CLEAR_COMMAND, { subCommand: value, event: event, callBack: callBack });
|
|
20969
20934
|
break;
|
|
20970
20935
|
case 'inserttext':
|
|
20971
|
-
this.observer.notify(INSERT_TEXT_COMMAND, {
|
|
20972
|
-
|
|
20936
|
+
this.observer.notify(INSERT_TEXT_COMMAND, {
|
|
20937
|
+
subCommand: value, event: event, callBack: callBack,
|
|
20938
|
+
value: { text: exeValue }
|
|
20939
|
+
});
|
|
20973
20940
|
break;
|
|
20974
20941
|
}
|
|
20975
20942
|
};
|
|
@@ -20999,7 +20966,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
|
20999
20966
|
* @hidden
|
|
21000
20967
|
* @deprecated
|
|
21001
20968
|
*/
|
|
21002
|
-
var MarkdownFormatter = /** @
|
|
20969
|
+
var MarkdownFormatter = /** @class */ (function (_super) {
|
|
21003
20970
|
__extends$3(MarkdownFormatter, _super);
|
|
21004
20971
|
function MarkdownFormatter(options) {
|
|
21005
20972
|
var _this = _super.call(this) || this;
|
|
@@ -21043,7 +21010,7 @@ var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
|
21043
21010
|
/**
|
|
21044
21011
|
* `MarkdownEditor` module is used to markdown editor
|
|
21045
21012
|
*/
|
|
21046
|
-
var MarkdownEditor = /** @
|
|
21013
|
+
var MarkdownEditor = /** @class */ (function () {
|
|
21047
21014
|
function MarkdownEditor(parent, serviceLocator) {
|
|
21048
21015
|
this.parent = parent;
|
|
21049
21016
|
this.locator = serviceLocator;
|
|
@@ -21182,8 +21149,10 @@ var MarkdownEditor = /** @__PURE__ @class */ (function () {
|
|
|
21182
21149
|
// On property code change here
|
|
21183
21150
|
if (!isNullOrUndefined(e.newProp.formatter)) {
|
|
21184
21151
|
var editElement = this.contentRenderer.getEditPanel();
|
|
21185
|
-
var option = {
|
|
21186
|
-
|
|
21152
|
+
var option = {
|
|
21153
|
+
undoRedoSteps: this.parent.undoRedoSteps,
|
|
21154
|
+
undoRedoTimer: this.parent.undoRedoTimer
|
|
21155
|
+
};
|
|
21187
21156
|
this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
|
|
21188
21157
|
}
|
|
21189
21158
|
};
|
|
@@ -21222,7 +21191,7 @@ var MarkdownEditor = /** @__PURE__ @class */ (function () {
|
|
|
21222
21191
|
*
|
|
21223
21192
|
* @hidden
|
|
21224
21193
|
*/
|
|
21225
|
-
var InsertMethods = /** @
|
|
21194
|
+
var InsertMethods = /** @class */ (function () {
|
|
21226
21195
|
function InsertMethods() {
|
|
21227
21196
|
}
|
|
21228
21197
|
/**
|
|
@@ -21299,7 +21268,7 @@ var InsertMethods = /** @__PURE__ @class */ (function () {
|
|
|
21299
21268
|
* @hidden
|
|
21300
21269
|
* @deprecated
|
|
21301
21270
|
*/
|
|
21302
|
-
var NodeCutter = /** @
|
|
21271
|
+
var NodeCutter = /** @class */ (function () {
|
|
21303
21272
|
function NodeCutter() {
|
|
21304
21273
|
this.enterAction = 'P';
|
|
21305
21274
|
this.position = -1;
|
|
@@ -21516,7 +21485,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
21516
21485
|
* @hidden
|
|
21517
21486
|
* @deprecated
|
|
21518
21487
|
*/
|
|
21519
|
-
var InsertHtml = /** @
|
|
21488
|
+
var InsertHtml = /** @class */ (function () {
|
|
21520
21489
|
function InsertHtml() {
|
|
21521
21490
|
}
|
|
21522
21491
|
InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
|
|
@@ -21903,7 +21872,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
21903
21872
|
nodeSelection.setSelectionText(docElement, lastSelectionNode, lastSelectionNode, 0, 0);
|
|
21904
21873
|
}
|
|
21905
21874
|
else {
|
|
21906
|
-
this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode
|
|
21875
|
+
this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode);
|
|
21907
21876
|
}
|
|
21908
21877
|
this.alignCheck(editNode);
|
|
21909
21878
|
this.listCleanUp(nodeSelection, docElement);
|
|
@@ -22167,9 +22136,9 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
22167
22136
|
}
|
|
22168
22137
|
}
|
|
22169
22138
|
};
|
|
22170
|
-
InsertHtml.cursorPos = function (lastSelectionNode, node, nodeSelection, docElement, editNode
|
|
22139
|
+
InsertHtml.cursorPos = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
|
|
22171
22140
|
lastSelectionNode.classList.add('lastNode');
|
|
22172
|
-
editNode.innerHTML = updateTextNode$1(editNode.innerHTML
|
|
22141
|
+
editNode.innerHTML = updateTextNode$1(editNode.innerHTML);
|
|
22173
22142
|
lastSelectionNode = editNode.querySelector('.lastNode');
|
|
22174
22143
|
if (!isNullOrUndefined(lastSelectionNode)) {
|
|
22175
22144
|
this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
|
|
@@ -22337,7 +22306,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
22337
22306
|
/**
|
|
22338
22307
|
* Utilities to handle the table cell selection
|
|
22339
22308
|
*/
|
|
22340
|
-
var TableSelection = /** @
|
|
22309
|
+
var TableSelection = /** @class */ (function () {
|
|
22341
22310
|
function TableSelection(root, currentDocument) {
|
|
22342
22311
|
this.BLOCK_TAGS = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'li', 'pre', 'td', 'th', 'div', 'hr', 'section', 'figure'];
|
|
22343
22312
|
this.BASIC_FORMATS = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'pre'];
|
|
@@ -22572,7 +22541,7 @@ var markerClassName = {
|
|
|
22572
22541
|
* @hidden
|
|
22573
22542
|
* @deprecated
|
|
22574
22543
|
*/
|
|
22575
|
-
var DOMNode = /** @
|
|
22544
|
+
var DOMNode = /** @class */ (function () {
|
|
22576
22545
|
/**
|
|
22577
22546
|
* Constructor for creating the DOMNode plugin
|
|
22578
22547
|
*
|
|
@@ -23404,8 +23373,8 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
23404
23373
|
}
|
|
23405
23374
|
else if (node && node.nodeType !== 8 && (node.tagName === 'BR' || (node.nodeType === Node.TEXT_NODE &&
|
|
23406
23375
|
node.textContent.trim() !== '') || (node.nodeType !== Node.TEXT_NODE &&
|
|
23407
|
-
|
|
23408
|
-
|
|
23376
|
+
(node.classList.contains(markerClassName.startSelection) ||
|
|
23377
|
+
node.classList.contains(markerClassName.endSelection)))) &&
|
|
23409
23378
|
IGNORE_BLOCK_TAGS.indexOf(node.parentNode.tagName.toLocaleLowerCase()) >= 0) {
|
|
23410
23379
|
node = this_1.createTempNode(node);
|
|
23411
23380
|
}
|
|
@@ -23604,7 +23573,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
23604
23573
|
* @hidden
|
|
23605
23574
|
* @deprecated
|
|
23606
23575
|
*/
|
|
23607
|
-
var Lists = /** @
|
|
23576
|
+
var Lists = /** @class */ (function () {
|
|
23608
23577
|
/**
|
|
23609
23578
|
* Constructor for creating the Lists plugin
|
|
23610
23579
|
*
|
|
@@ -23657,6 +23626,17 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
23657
23626
|
}
|
|
23658
23627
|
return false;
|
|
23659
23628
|
};
|
|
23629
|
+
Lists.prototype.createAutoList = function (enterKey, shiftEnterKey) {
|
|
23630
|
+
var autoListRules = {
|
|
23631
|
+
BR: { BR: true, P: true, DIV: true },
|
|
23632
|
+
P: { BR: false, P: true, DIV: true },
|
|
23633
|
+
DIV: { BR: false, P: true, DIV: true }
|
|
23634
|
+
};
|
|
23635
|
+
if (autoListRules[enterKey] && autoListRules[enterKey][shiftEnterKey] !== undefined) {
|
|
23636
|
+
return autoListRules[enterKey][shiftEnterKey];
|
|
23637
|
+
}
|
|
23638
|
+
return false;
|
|
23639
|
+
};
|
|
23660
23640
|
Lists.prototype.spaceList = function (e) {
|
|
23661
23641
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
23662
23642
|
this.saveSelection = this.parent.nodeSelection.save(range, this.parent.currentDocument);
|
|
@@ -23672,7 +23652,8 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
23672
23652
|
var startElementOLTest = this.testCurrentList(range);
|
|
23673
23653
|
var preElementOLTest = this.testList(preElement);
|
|
23674
23654
|
var nextElementOLTest = this.testList(nextElement);
|
|
23675
|
-
|
|
23655
|
+
var nextElementBRTest = range.startContainer.previousElementSibling && range.startContainer.previousElementSibling.tagName === 'BR';
|
|
23656
|
+
if (!preElementOLTest && !nextElementOLTest && preElemULStart !== '*' && nextElemULStart !== '*' && (this.createAutoList(e.enterKey, e.shiftEnterKey) || !nextElementBRTest)) {
|
|
23676
23657
|
var brElement = createElement('br');
|
|
23677
23658
|
if (startElementOLTest) {
|
|
23678
23659
|
range.startContainer.textContent = range.startContainer.textContent.slice(range.startOffset, range.startContainer.textContent.length);
|
|
@@ -24164,7 +24145,7 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
24164
24145
|
if (range.startContainer === range.endContainer && range.startContainer === this.parent.editableElement &&
|
|
24165
24146
|
range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
24166
24147
|
this.parent.editableElement.textContent.length === 0 && (this.parent.editableElement.childNodes[0].nodeName !== 'TABLE' &&
|
|
24167
|
-
|
|
24148
|
+
this.parent.editableElement.childNodes[0].nodeName !== 'IMG')) {
|
|
24168
24149
|
var focusNode = range.startContainer.childNodes[0];
|
|
24169
24150
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, focusNode, focusNode, 0, 0);
|
|
24170
24151
|
range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
@@ -24498,11 +24479,11 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
24498
24479
|
}
|
|
24499
24480
|
if (element.parentNode.insertBefore(this.closeTag(parentNode.tagName), element),
|
|
24500
24481
|
'LI' === parentNode.parentNode.tagName || 'OL' === parentNode.parentNode.tagName ||
|
|
24501
|
-
|
|
24482
|
+
'UL' === parentNode.parentNode.tagName) {
|
|
24502
24483
|
element.parentNode.insertBefore(this.closeTag('LI'), element);
|
|
24503
24484
|
}
|
|
24504
24485
|
else {
|
|
24505
|
-
if (
|
|
24486
|
+
if (0 === element.querySelectorAll(BLOCK_TAGS.join(', ')).length) {
|
|
24506
24487
|
var wrapperclass = isNullOrUndefined(className) ? ' class="e-rte-wrap-inner"' :
|
|
24507
24488
|
' class="' + className + ' e-rte-wrap-inner"';
|
|
24508
24489
|
var parentElement = parentNode;
|
|
@@ -24618,7 +24599,7 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
24618
24599
|
* @hidden
|
|
24619
24600
|
* @deprecated
|
|
24620
24601
|
*/
|
|
24621
|
-
var Formats = /** @
|
|
24602
|
+
var Formats = /** @class */ (function () {
|
|
24622
24603
|
/**
|
|
24623
24604
|
* Constructor for creating the Formats plugin
|
|
24624
24605
|
*
|
|
@@ -24714,8 +24695,8 @@ var Formats = /** @__PURE__ @class */ (function () {
|
|
|
24714
24695
|
var startParent = this.getBlockParent(range.startContainer, blockquoteEle);
|
|
24715
24696
|
if ((startParent.textContent.charCodeAt(0) === 8203 &&
|
|
24716
24697
|
startParent.textContent.length === 1) || (startParent.textContent.length === 0 &&
|
|
24717
|
-
|
|
24718
|
-
|
|
24698
|
+
startParent.querySelectorAll('img').length === 0 &&
|
|
24699
|
+
startParent.querySelectorAll('table').length === 0)) {
|
|
24719
24700
|
e.event.preventDefault();
|
|
24720
24701
|
if (isNullOrUndefined(startParent.nextElementSibling)) {
|
|
24721
24702
|
this.paraFocus(startParent.parentElement === this.parent.editableElement ?
|
|
@@ -25152,7 +25133,7 @@ var Formats = /** @__PURE__ @class */ (function () {
|
|
|
25152
25133
|
/**
|
|
25153
25134
|
* DOMTreeMethods - A `TreeWalkder` API implementation to get the block and text nodes in the selection.
|
|
25154
25135
|
*/
|
|
25155
|
-
var DOMMethods = /** @
|
|
25136
|
+
var DOMMethods = /** @class */ (function () {
|
|
25156
25137
|
function DOMMethods(editElement) {
|
|
25157
25138
|
this.directRangeElems = ['IMG', 'TABLE', 'AUDIO', 'VIDEO', 'HR'];
|
|
25158
25139
|
this.BLOCK_TAGS = ['address', 'article', 'aside', 'audio', 'blockquote',
|
|
@@ -25335,13 +25316,13 @@ var DOMMethods = /** @__PURE__ @class */ (function () {
|
|
|
25335
25316
|
DOMMethods.prototype.getParentBlockNode = function (node) {
|
|
25336
25317
|
var _this = this;
|
|
25337
25318
|
var treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25344
|
-
|
|
25319
|
+
NodeFilter.SHOW_ELEMENT, // whatToShow
|
|
25320
|
+
{
|
|
25321
|
+
acceptNode: function (currentNode) {
|
|
25322
|
+
// Check if the node is a block element
|
|
25323
|
+
return _this.isBlockNode(currentNode) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
25324
|
+
}
|
|
25325
|
+
});
|
|
25345
25326
|
treeWalker.currentNode = node;
|
|
25346
25327
|
var blockParent = treeWalker.parentNode();
|
|
25347
25328
|
return blockParent;
|
|
@@ -25382,7 +25363,7 @@ var DOMMethods = /** @__PURE__ @class */ (function () {
|
|
|
25382
25363
|
* @hidden
|
|
25383
25364
|
* @deprecated
|
|
25384
25365
|
*/
|
|
25385
|
-
var LinkCommand = /** @
|
|
25366
|
+
var LinkCommand = /** @class */ (function () {
|
|
25386
25367
|
/**
|
|
25387
25368
|
* Constructor for creating the Formats plugin
|
|
25388
25369
|
*
|
|
@@ -25641,9 +25622,9 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
25641
25622
|
}
|
|
25642
25623
|
else {
|
|
25643
25624
|
this.parent.nodeSelection.setSelectionText(this.parent.currentDocument, appliedNodes[0], // Start Node
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25625
|
+
appliedNodes[appliedNodes.length - 1], // end Node
|
|
25626
|
+
0, // start offset
|
|
25627
|
+
appliedNodes[appliedNodes.length - 1].textContent.length // end offset
|
|
25647
25628
|
);
|
|
25648
25629
|
}
|
|
25649
25630
|
}
|
|
@@ -25799,7 +25780,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
25799
25780
|
* @hidden
|
|
25800
25781
|
* @deprecated
|
|
25801
25782
|
*/
|
|
25802
|
-
var Alignments = /** @
|
|
25783
|
+
var Alignments = /** @class */ (function () {
|
|
25803
25784
|
/**
|
|
25804
25785
|
* Constructor for creating the Formats plugin
|
|
25805
25786
|
*
|
|
@@ -25914,7 +25895,7 @@ var Alignments = /** @__PURE__ @class */ (function () {
|
|
|
25914
25895
|
* @hidden
|
|
25915
25896
|
* @deprecated
|
|
25916
25897
|
*/
|
|
25917
|
-
var Indents = /** @
|
|
25898
|
+
var Indents = /** @class */ (function () {
|
|
25918
25899
|
/**
|
|
25919
25900
|
* Constructor for creating the Formats plugin
|
|
25920
25901
|
*
|
|
@@ -26061,7 +26042,7 @@ var CLASS_VIDEO_INLINE = 'e-video-inline';
|
|
|
26061
26042
|
* @hidden
|
|
26062
26043
|
* @deprecated
|
|
26063
26044
|
*/
|
|
26064
|
-
var ImageCommand = /** @
|
|
26045
|
+
var ImageCommand = /** @class */ (function () {
|
|
26065
26046
|
/**
|
|
26066
26047
|
* Constructor for creating the Formats plugin
|
|
26067
26048
|
*
|
|
@@ -26153,7 +26134,8 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
26153
26134
|
}
|
|
26154
26135
|
if (!isNullOrUndefined(e.selector) && e.selector === 'pasteCleanupModule') {
|
|
26155
26136
|
if (!isNullOrUndefined(this.parent.currentDocument)) {
|
|
26156
|
-
e.callBack({
|
|
26137
|
+
e.callBack({
|
|
26138
|
+
requestType: 'Images',
|
|
26157
26139
|
editorMode: 'HTML',
|
|
26158
26140
|
event: e.event,
|
|
26159
26141
|
range: this.parent.nodeSelection.getRange(this.parent.currentDocument),
|
|
@@ -26466,7 +26448,7 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
26466
26448
|
* @hidden
|
|
26467
26449
|
* @deprecated
|
|
26468
26450
|
*/
|
|
26469
|
-
var AudioCommand = /** @
|
|
26451
|
+
var AudioCommand = /** @class */ (function () {
|
|
26470
26452
|
/**
|
|
26471
26453
|
* Constructor for creating the Audio plugin
|
|
26472
26454
|
*
|
|
@@ -26619,7 +26601,7 @@ var AudioCommand = /** @__PURE__ @class */ (function () {
|
|
|
26619
26601
|
* @hidden
|
|
26620
26602
|
* @deprecated
|
|
26621
26603
|
*/
|
|
26622
|
-
var VideoCommand = /** @
|
|
26604
|
+
var VideoCommand = /** @class */ (function () {
|
|
26623
26605
|
/**
|
|
26624
26606
|
* Constructor for creating the Video plugin
|
|
26625
26607
|
*
|
|
@@ -26939,7 +26921,7 @@ var VideoCommand = /** @__PURE__ @class */ (function () {
|
|
|
26939
26921
|
* @hidden
|
|
26940
26922
|
* @deprecated
|
|
26941
26923
|
*/
|
|
26942
|
-
var TableCommand = /** @
|
|
26924
|
+
var TableCommand = /** @class */ (function () {
|
|
26943
26925
|
/**
|
|
26944
26926
|
* Constructor for creating the Formats plugin
|
|
26945
26927
|
*
|
|
@@ -27489,9 +27471,9 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
27489
27471
|
this.updateColSpanStyle(minMaxIndexes.startColumn, minMaxIndexes.endColumn, this.getCorrespondingColumns());
|
|
27490
27472
|
e.item.selection.setSelectionText(this.parent.currentDocument, e.item.selection.range.startContainer, e.item.selection.range.startContainer, 0, 0);
|
|
27491
27473
|
if (this.parent.nodeSelection && firstCell) {
|
|
27492
|
-
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
27493
|
-
|
|
27494
|
-
|
|
27474
|
+
this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,
|
|
27475
|
+
// eslint-disable-next-line
|
|
27476
|
+
firstCell, 0);
|
|
27495
27477
|
}
|
|
27496
27478
|
if (e.callBack) {
|
|
27497
27479
|
e.callBack({
|
|
@@ -27559,7 +27541,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
27559
27541
|
if (!(min < rowValue && eleArray[rowValue][0] === eleArray[rowValue - 1][0])
|
|
27560
27542
|
// eslint-disable-next-line no-cond-assign
|
|
27561
27543
|
&& eleArray[rowValue][0] && 1 < (index = Math.min(parseInt(eleArray[rowValue][0].getAttribute('rowspan'), 10) ||
|
|
27562
|
-
|
|
27544
|
+
1, max - min + 1)) && eleArray[rowValue][0] === eleArray[rowValue + 1][0]) {
|
|
27563
27545
|
for (count = index - 1, colIndex = 1; colIndex < eleArray[0].length; colIndex++) {
|
|
27564
27546
|
if (eleArray[rowValue][colIndex] !== eleArray[rowValue][colIndex - 1]) {
|
|
27565
27547
|
for (rowMin = rowValue; rowMin < rowValue + index; rowMin++) {
|
|
@@ -27594,7 +27576,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
27594
27576
|
spanCount = parseInt(elements[rowIndex][colIndex].getAttribute(attr), 10) || 1;
|
|
27595
27577
|
if (min < rowIndex && elements[rowIndex][colIndex] === elements[rowIndex - 1][colIndex] ||
|
|
27596
27578
|
firstIndex < colIndex && elements[rowIndex][colIndex] ===
|
|
27597
|
-
|
|
27579
|
+
elements[rowIndex][colIndex - 1] || 1 < (spanCount)) {
|
|
27598
27580
|
if ((1 < spanCount - index)) {
|
|
27599
27581
|
elements[rowIndex][colIndex].setAttribute(attr, (spanCount - index).toString());
|
|
27600
27582
|
}
|
|
@@ -27664,9 +27646,9 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
27664
27646
|
for (avgRowIndex = activeCellIndex[0] + Math.ceil(activeCellRowSpan / 2),
|
|
27665
27647
|
colIndex = 0 === activeCellIndex[1] ? activeCellIndex[1]
|
|
27666
27648
|
: activeCellIndex[1] - 1; 0 <= colIndex && (correspondingCells[avgRowIndex][colIndex] ===
|
|
27667
|
-
|
|
27668
|
-
|
|
27669
|
-
|
|
27649
|
+
// eslint-disable-next-line max-len
|
|
27650
|
+
correspondingCells[avgRowIndex][colIndex - 1] || 0 < avgRowIndex && correspondingCells[avgRowIndex][colIndex]
|
|
27651
|
+
=== correspondingCells[avgRowIndex - 1][colIndex]);) {
|
|
27670
27652
|
colIndex--;
|
|
27671
27653
|
}
|
|
27672
27654
|
if (colIndex === -1) {
|
|
@@ -27996,7 +27978,7 @@ var TableCommand = /** @__PURE__ @class */ (function () {
|
|
|
27996
27978
|
};
|
|
27997
27979
|
return TableCommand;
|
|
27998
27980
|
}());
|
|
27999
|
-
var MinMax = /** @
|
|
27981
|
+
var MinMax = /** @class */ (function () {
|
|
28000
27982
|
function MinMax() {
|
|
28001
27983
|
}
|
|
28002
27984
|
return MinMax;
|
|
@@ -28005,7 +27987,7 @@ var MinMax = /** @__PURE__ @class */ (function () {
|
|
|
28005
27987
|
/**
|
|
28006
27988
|
* `Selection` module is used to handle RTE Selections.
|
|
28007
27989
|
*/
|
|
28008
|
-
var SelectionCommands = /** @
|
|
27990
|
+
var SelectionCommands = /** @class */ (function () {
|
|
28009
27991
|
function SelectionCommands() {
|
|
28010
27992
|
}
|
|
28011
27993
|
/**
|
|
@@ -28104,8 +28086,8 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
28104
28086
|
else if (range.startContainer.nodeType === 3 && ((range.startContainer.parentElement.childElementCount > 0 &&
|
|
28105
28087
|
range.startOffset > 0 && range.startContainer.parentElement.firstElementChild.tagName.toLowerCase() !== 'br') ||
|
|
28106
28088
|
!isNullOrUndefined(currentFormatNode) && currentFormatNode ===
|
|
28107
|
-
|
|
28108
|
-
|
|
28089
|
+
(range.startContainer.parentElement.closest(currentSelector)) &&
|
|
28090
|
+
((range.startContainer.parentElement.closest(currentSelector)).textContent.replace(new RegExp('\u200B', 'g'), '').trim().length !== 0))) {
|
|
28109
28091
|
isCollapsed = true;
|
|
28110
28092
|
range = nodeCutter.GetCursorRange(docElement, range, range.startContainer);
|
|
28111
28093
|
nodes.push(range.startContainer);
|
|
@@ -28433,9 +28415,9 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
28433
28415
|
if (child[0] && !isFontStyle) {
|
|
28434
28416
|
var nodeTraverse = child[index] ? child[index] : child[0];
|
|
28435
28417
|
var textNode = nodeTraverse;
|
|
28436
|
-
for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
|
|
28437
|
-
|
|
28438
|
-
|
|
28418
|
+
for (; nodeTraverse && nodeTraverse.parentElement && nodeTraverse.parentElement !== endNode;
|
|
28419
|
+
// eslint-disable-next-line
|
|
28420
|
+
nodeTraverse = nodeTraverse) {
|
|
28439
28421
|
var nodeTraverseCondition = void 0;
|
|
28440
28422
|
if (formatNode.nodeName === 'SPAN') {
|
|
28441
28423
|
nodeTraverseCondition = nodeTraverse.parentElement.tagName.toLocaleLowerCase()
|
|
@@ -28528,7 +28510,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
28528
28510
|
var isNestedListItem = false;
|
|
28529
28511
|
if (!isNullOrUndefined(liElement) && liElement.childNodes) {
|
|
28530
28512
|
for (var num_1 = 0; num_1 < liElement.childNodes.length; num_1++) {
|
|
28531
|
-
if (liElement.childNodes[num_1].nodeName === ('OL'
|
|
28513
|
+
if (liElement.childNodes[num_1].nodeName === ('OL')) {
|
|
28532
28514
|
nestedListCount++;
|
|
28533
28515
|
isNestedList = true;
|
|
28534
28516
|
}
|
|
@@ -28554,7 +28536,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
28554
28536
|
}
|
|
28555
28537
|
if (isNestedListItem) {
|
|
28556
28538
|
for (var num_3 = 0; num_3 < liElement.childNodes.length; num_3++) {
|
|
28557
|
-
if (liElement.childNodes[num_3].nodeName === ('OL'
|
|
28539
|
+
if (liElement.childNodes[num_3].nodeName === ('OL')) {
|
|
28558
28540
|
liElement.childNodes[num_3].style.fontSize = 'initial';
|
|
28559
28541
|
}
|
|
28560
28542
|
}
|
|
@@ -29042,7 +29024,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
29042
29024
|
* @hidden
|
|
29043
29025
|
* @deprecated
|
|
29044
29026
|
*/
|
|
29045
|
-
var SelectionBasedExec = /** @
|
|
29027
|
+
var SelectionBasedExec = /** @class */ (function () {
|
|
29046
29028
|
/**
|
|
29047
29029
|
* Constructor for creating the Formats plugin
|
|
29048
29030
|
*
|
|
@@ -29100,7 +29082,7 @@ var SelectionBasedExec = /** @__PURE__ @class */ (function () {
|
|
|
29100
29082
|
* @hidden
|
|
29101
29083
|
* @deprecated
|
|
29102
29084
|
*/
|
|
29103
|
-
var InsertHtmlExec = /** @
|
|
29085
|
+
var InsertHtmlExec = /** @class */ (function () {
|
|
29104
29086
|
/**
|
|
29105
29087
|
* Constructor for creating the Formats plugin
|
|
29106
29088
|
*
|
|
@@ -29155,7 +29137,7 @@ var InsertHtmlExec = /** @__PURE__ @class */ (function () {
|
|
|
29155
29137
|
/**
|
|
29156
29138
|
* `Clear Format` module is used to handle Clear Format.
|
|
29157
29139
|
*/
|
|
29158
|
-
var ClearFormat$1 = /** @
|
|
29140
|
+
var ClearFormat$1 = /** @class */ (function () {
|
|
29159
29141
|
function ClearFormat() {
|
|
29160
29142
|
}
|
|
29161
29143
|
/**
|
|
@@ -29359,7 +29341,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
29359
29341
|
}
|
|
29360
29342
|
else if (this.BLOCK_TAGS.indexOf(childNodes[index2].nodeName.toLocaleLowerCase()) > -1 &&
|
|
29361
29343
|
childNodes[index2].parentNode.nodeName.toLocaleLowerCase() ===
|
|
29362
|
-
|
|
29344
|
+
childNodes[index2].nodeName.toLocaleLowerCase()) {
|
|
29363
29345
|
InsertMethods.unwrap(childNodes[index2]);
|
|
29364
29346
|
}
|
|
29365
29347
|
}
|
|
@@ -29370,9 +29352,9 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
29370
29352
|
}
|
|
29371
29353
|
}
|
|
29372
29354
|
};
|
|
29373
|
-
ClearFormat.clearInlines = function (textNodes, nodes, range, nodeCutter,
|
|
29374
|
-
|
|
29375
|
-
|
|
29355
|
+
ClearFormat.clearInlines = function (textNodes, nodes, range, nodeCutter,
|
|
29356
|
+
// eslint-disable-next-line
|
|
29357
|
+
endNode) {
|
|
29376
29358
|
for (var index = 0; index < textNodes.length; index++) {
|
|
29377
29359
|
var currentInlineNode = textNodes[index];
|
|
29378
29360
|
var currentNode = void 0;
|
|
@@ -29417,7 +29399,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
29417
29399
|
* @hidden
|
|
29418
29400
|
* @deprecated
|
|
29419
29401
|
*/
|
|
29420
|
-
var ClearFormatExec = /** @
|
|
29402
|
+
var ClearFormatExec = /** @class */ (function () {
|
|
29421
29403
|
/**
|
|
29422
29404
|
* Constructor for creating the Formats plugin
|
|
29423
29405
|
*
|
|
@@ -29471,7 +29453,7 @@ var ClearFormatExec = /** @__PURE__ @class */ (function () {
|
|
|
29471
29453
|
/**
|
|
29472
29454
|
* `Undo` module is used to handle undo actions.
|
|
29473
29455
|
*/
|
|
29474
|
-
var UndoRedoManager = /** @
|
|
29456
|
+
var UndoRedoManager = /** @class */ (function () {
|
|
29475
29457
|
function UndoRedoManager(parent, options) {
|
|
29476
29458
|
this.undoRedoStack = [];
|
|
29477
29459
|
this.parent = parent;
|
|
@@ -29737,7 +29719,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
29737
29719
|
* @hidden
|
|
29738
29720
|
* @deprecated
|
|
29739
29721
|
*/
|
|
29740
|
-
var MsWordPaste = /** @
|
|
29722
|
+
var MsWordPaste = /** @class */ (function () {
|
|
29741
29723
|
function MsWordPaste(parent) {
|
|
29742
29724
|
this.olData = [
|
|
29743
29725
|
'decimal',
|
|
@@ -30116,8 +30098,8 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
30116
30098
|
if (allElements[i].children.length === 0 && allElements[i].innerHTML === ' ' &&
|
|
30117
30099
|
(allElements[i].innerHTML === ' ' && !allElements[i].closest('li')) &&
|
|
30118
30100
|
!allElements[i].closest('td') && (allElements[i].nodeName !== 'SPAN' ||
|
|
30119
|
-
|
|
30120
|
-
|
|
30101
|
+
allElements[i].nodeName === 'SPAN' && (isNullOrUndefined(allElements[i].previousElementSibling) &&
|
|
30102
|
+
isNullOrUndefined(allElements[i].nextElementSibling)))) {
|
|
30121
30103
|
var detachableElement = this.findDetachElem(allElements[i]);
|
|
30122
30104
|
var brElement = createElement('br');
|
|
30123
30105
|
var hasNbsp = detachableElement.textContent.length > 0 && detachableElement.textContent.match(/\u00a0/g)
|
|
@@ -30868,7 +30850,7 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
30868
30850
|
* @hidden
|
|
30869
30851
|
* @deprecated
|
|
30870
30852
|
*/
|
|
30871
|
-
var InsertTextExec = /** @
|
|
30853
|
+
var InsertTextExec = /** @class */ (function () {
|
|
30872
30854
|
/**
|
|
30873
30855
|
* Constructor for creating the InsertText plugin
|
|
30874
30856
|
*
|
|
@@ -30907,7 +30889,7 @@ var InsertTextExec = /** @__PURE__ @class */ (function () {
|
|
|
30907
30889
|
return InsertTextExec;
|
|
30908
30890
|
}());
|
|
30909
30891
|
|
|
30910
|
-
var EmojiPickerAction = /** @
|
|
30892
|
+
var EmojiPickerAction = /** @class */ (function () {
|
|
30911
30893
|
function EmojiPickerAction(parent) {
|
|
30912
30894
|
this.parent = parent;
|
|
30913
30895
|
this.addEventListener();
|
|
@@ -30992,7 +30974,7 @@ var EmojiPickerAction = /** @__PURE__ @class */ (function () {
|
|
|
30992
30974
|
return EmojiPickerAction;
|
|
30993
30975
|
}());
|
|
30994
30976
|
|
|
30995
|
-
var FormatPainterActions = /** @
|
|
30977
|
+
var FormatPainterActions = /** @class */ (function () {
|
|
30996
30978
|
function FormatPainterActions(parent, options) {
|
|
30997
30979
|
this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
30998
30980
|
this.parent = parent;
|
|
@@ -31637,7 +31619,7 @@ var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
|
31637
31619
|
* @hidden
|
|
31638
31620
|
* @deprecated
|
|
31639
31621
|
*/
|
|
31640
|
-
var EditorManager = /** @
|
|
31622
|
+
var EditorManager = /** @class */ (function () {
|
|
31641
31623
|
/**
|
|
31642
31624
|
* Constructor for creating the component
|
|
31643
31625
|
*
|
|
@@ -31729,11 +31711,14 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
31729
31711
|
EditorManager.prototype.execCommand = function (command, value, event, callBack, text, exeValue, selector, enterAction) {
|
|
31730
31712
|
switch (command.toLowerCase()) {
|
|
31731
31713
|
case 'lists':
|
|
31732
|
-
this.observer.notify(LIST_TYPE, {
|
|
31733
|
-
|
|
31714
|
+
this.observer.notify(LIST_TYPE, {
|
|
31715
|
+
subCommand: value, event: event, callBack: callBack,
|
|
31716
|
+
selector: selector, item: exeValue, enterAction: enterAction
|
|
31717
|
+
});
|
|
31734
31718
|
break;
|
|
31735
31719
|
case 'formats':
|
|
31736
|
-
this.observer.notify(FORMAT_TYPE, {
|
|
31720
|
+
this.observer.notify(FORMAT_TYPE, {
|
|
31721
|
+
subCommand: value, event: event, callBack: callBack,
|
|
31737
31722
|
selector: selector, exeValue: exeValue, enterAction: enterAction
|
|
31738
31723
|
});
|
|
31739
31724
|
break;
|
|
@@ -31750,8 +31735,10 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
31750
31735
|
});
|
|
31751
31736
|
break;
|
|
31752
31737
|
case 'links':
|
|
31753
|
-
this.observer.notify(LINK, {
|
|
31754
|
-
|
|
31738
|
+
this.observer.notify(LINK, {
|
|
31739
|
+
command: command, value: value, item: exeValue, event: event, callBack: callBack,
|
|
31740
|
+
enterAction: enterAction
|
|
31741
|
+
});
|
|
31755
31742
|
break;
|
|
31756
31743
|
case 'files':
|
|
31757
31744
|
this.observer.notify(IMAGE, {
|
|
@@ -31836,8 +31823,10 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
31836
31823
|
this.observer.notify(FORMAT_PAINTER_ACTIONS, { item: exeValue, subCommand: value, event: event, callBack: callBack });
|
|
31837
31824
|
break;
|
|
31838
31825
|
case 'emojipicker':
|
|
31839
|
-
this.observer.notify(EMOJI_PICKER_ACTIONS, {
|
|
31840
|
-
|
|
31826
|
+
this.observer.notify(EMOJI_PICKER_ACTIONS, {
|
|
31827
|
+
item: exeValue, subCommand: value, value: text,
|
|
31828
|
+
event: event, callBack: callBack
|
|
31829
|
+
});
|
|
31841
31830
|
}
|
|
31842
31831
|
};
|
|
31843
31832
|
EditorManager.prototype.editorMouseDown = function (e) {
|
|
@@ -31879,19 +31868,19 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
31879
31868
|
};
|
|
31880
31869
|
EditorManager.prototype.getParentBlockNode = function (node) {
|
|
31881
31870
|
var treeWalker = this.currentDocument.createTreeWalker(this.editableElement, // root
|
|
31882
|
-
|
|
31883
|
-
|
|
31884
|
-
|
|
31885
|
-
|
|
31886
|
-
|
|
31887
|
-
|
|
31888
|
-
|
|
31889
|
-
|
|
31890
|
-
|
|
31891
|
-
|
|
31871
|
+
NodeFilter.SHOW_ELEMENT, // whatToShow
|
|
31872
|
+
{
|
|
31873
|
+
acceptNode: function (currentNode) {
|
|
31874
|
+
// Check if the node is a block element
|
|
31875
|
+
var displayStyle = window.getComputedStyle(currentNode).display;
|
|
31876
|
+
if (displayStyle.indexOf('inline') < 0) {
|
|
31877
|
+
return NodeFilter.FILTER_ACCEPT;
|
|
31878
|
+
}
|
|
31879
|
+
else {
|
|
31880
|
+
return NodeFilter.FILTER_SKIP;
|
|
31881
|
+
}
|
|
31892
31882
|
}
|
|
31893
|
-
}
|
|
31894
|
-
});
|
|
31883
|
+
});
|
|
31895
31884
|
treeWalker.currentNode = node;
|
|
31896
31885
|
var blockParent = treeWalker.parentNode();
|
|
31897
31886
|
return blockParent;
|
|
@@ -32006,7 +31995,7 @@ var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
|
32006
31995
|
* @hidden
|
|
32007
31996
|
* @deprecated
|
|
32008
31997
|
*/
|
|
32009
|
-
var HTMLFormatter = /** @
|
|
31998
|
+
var HTMLFormatter = /** @class */ (function (_super) {
|
|
32010
31999
|
__extends$4(HTMLFormatter, _super);
|
|
32011
32000
|
function HTMLFormatter(options) {
|
|
32012
32001
|
var _this = _super.call(this) || this;
|
|
@@ -32047,7 +32036,7 @@ var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
|
32047
32036
|
/**
|
|
32048
32037
|
* HtmlToolbarStatus module for refresh the toolbar status
|
|
32049
32038
|
*/
|
|
32050
|
-
var HtmlToolbarStatus = /** @
|
|
32039
|
+
var HtmlToolbarStatus = /** @class */ (function () {
|
|
32051
32040
|
function HtmlToolbarStatus(parent) {
|
|
32052
32041
|
this.parent = parent;
|
|
32053
32042
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
|
|
@@ -32093,7 +32082,7 @@ var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
32093
32082
|
/**
|
|
32094
32083
|
* XhtmlValidation module called when set enableXhtml as true
|
|
32095
32084
|
*/
|
|
32096
|
-
var XhtmlValidation = /** @
|
|
32085
|
+
var XhtmlValidation = /** @class */ (function () {
|
|
32097
32086
|
function XhtmlValidation(parent) {
|
|
32098
32087
|
this.parent = parent;
|
|
32099
32088
|
this.addEventListener();
|
|
@@ -32264,7 +32253,7 @@ var XhtmlValidation = /** @__PURE__ @class */ (function () {
|
|
|
32264
32253
|
/**
|
|
32265
32254
|
* `HtmlEditor` module is used to HTML editor
|
|
32266
32255
|
*/
|
|
32267
|
-
var HtmlEditor = /** @
|
|
32256
|
+
var HtmlEditor = /** @class */ (function () {
|
|
32268
32257
|
function HtmlEditor(parent, serviceLocator) {
|
|
32269
32258
|
this.rangeCollection = [];
|
|
32270
32259
|
this.isImageDelete = false;
|
|
@@ -32679,7 +32668,9 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32679
32668
|
var eventArgs_1 = {
|
|
32680
32669
|
callBack: null,
|
|
32681
32670
|
event: e.args,
|
|
32682
|
-
name: 'keydown-handler'
|
|
32671
|
+
name: 'keydown-handler',
|
|
32672
|
+
enterKey: this.parent.enterKey,
|
|
32673
|
+
shiftEnterKey: this.parent.shiftEnterKey
|
|
32683
32674
|
};
|
|
32684
32675
|
var actionBeginArgs = {
|
|
32685
32676
|
cancel: false,
|
|
@@ -32815,6 +32806,26 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32815
32806
|
if (isNullOrUndefined(this.oldRangeElement)) {
|
|
32816
32807
|
return;
|
|
32817
32808
|
}
|
|
32809
|
+
else if (findBlockElement[0].previousSibling) {
|
|
32810
|
+
var prevSibling = findBlockElement[0].previousSibling;
|
|
32811
|
+
var currentElement = findBlockElement[0];
|
|
32812
|
+
if (prevSibling.textContent.trim()) {
|
|
32813
|
+
if (prevSibling.lastChild.nodeName === 'BR') {
|
|
32814
|
+
prevSibling.removeChild(prevSibling.lastChild);
|
|
32815
|
+
}
|
|
32816
|
+
var cursorpointer = prevSibling.lastChild.textContent.length;
|
|
32817
|
+
var lastChild = prevSibling.lastChild;
|
|
32818
|
+
var childNodes = Array.from(currentElement.childNodes);
|
|
32819
|
+
for (var i = 0; i < childNodes.length; i++) {
|
|
32820
|
+
prevSibling.appendChild(childNodes[i].cloneNode(true));
|
|
32821
|
+
}
|
|
32822
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastChild, cursorpointer);
|
|
32823
|
+
currentElement.parentNode.removeChild(currentElement);
|
|
32824
|
+
}
|
|
32825
|
+
else {
|
|
32826
|
+
prevSibling.parentNode.removeChild(prevSibling);
|
|
32827
|
+
}
|
|
32828
|
+
}
|
|
32818
32829
|
else {
|
|
32819
32830
|
if (this.oldRangeElement.tagName === 'OL' || this.oldRangeElement.tagName === 'UL') {
|
|
32820
32831
|
this.oldRangeElement = this.oldRangeElement.lastElementChild.lastElementChild
|
|
@@ -32830,9 +32841,9 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32830
32841
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), lastNode.parentElement, lastNode.parentElement.childNodes.length);
|
|
32831
32842
|
}
|
|
32832
32843
|
else {
|
|
32833
|
-
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
32834
|
-
|
|
32835
|
-
|
|
32844
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),
|
|
32845
|
+
// eslint-disable-next-line
|
|
32846
|
+
lastNode, lastNode.textContent.length);
|
|
32836
32847
|
}
|
|
32837
32848
|
var checkParent = false;
|
|
32838
32849
|
if (this.oldRangeElement && this.oldRangeElement.nodeName !== '#text' && this.oldRangeElement.querySelectorAll('BR').length === 1) {
|
|
@@ -33322,8 +33333,10 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
33322
33333
|
}
|
|
33323
33334
|
if (!isNullOrUndefined(e.newProp.formatter)) {
|
|
33324
33335
|
var editElement = this.contentRenderer.getEditPanel();
|
|
33325
|
-
var option = {
|
|
33326
|
-
|
|
33336
|
+
var option = {
|
|
33337
|
+
undoRedoSteps: this.parent.undoRedoSteps,
|
|
33338
|
+
undoRedoTimer: this.parent.undoRedoTimer
|
|
33339
|
+
};
|
|
33327
33340
|
this.parent.formatter.updateFormatter(editElement, this.contentRenderer.getDocument(), option);
|
|
33328
33341
|
}
|
|
33329
33342
|
};
|
|
@@ -33421,7 +33434,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
33421
33434
|
/**
|
|
33422
33435
|
* PasteCleanup module called when pasting content in RichTextEditor
|
|
33423
33436
|
*/
|
|
33424
|
-
var PasteCleanup = /** @
|
|
33437
|
+
var PasteCleanup = /** @class */ (function () {
|
|
33425
33438
|
function PasteCleanup(parent, serviceLocator) {
|
|
33426
33439
|
this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
33427
33440
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -33596,28 +33609,6 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33596
33609
|
value = tempDivElem.innerHTML;
|
|
33597
33610
|
var isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
|
|
33598
33611
|
!isNullOrUndefined(tempDivElem.querySelector('table'));
|
|
33599
|
-
var imgElements = tempDivElem.querySelectorAll('img');
|
|
33600
|
-
var base_1 = this.parent.contentModule.getDocument().location.origin;
|
|
33601
|
-
imgElements.forEach(function (imgElement) {
|
|
33602
|
-
var imageFileFormat;
|
|
33603
|
-
var imgElementSrc = imgElement.getAttribute('src');
|
|
33604
|
-
if (!isNullOrUndefined(imgElementSrc) && imgElementSrc !== '') {
|
|
33605
|
-
if (imgElementSrc.indexOf('base64') > -1 && imgElementSrc.indexOf('data:') > -1) {
|
|
33606
|
-
imageFileFormat = imgElementSrc.split(';')[0].split('/')[1];
|
|
33607
|
-
}
|
|
33608
|
-
else {
|
|
33609
|
-
var parsedUrl = imgElementSrc.indexOf('http') > -1 ? new URL(imgElementSrc) : new URL(imgElementSrc, base_1);
|
|
33610
|
-
var path = parsedUrl.pathname;
|
|
33611
|
-
imageFileFormat = path.split('.').pop().toLowerCase();
|
|
33612
|
-
}
|
|
33613
|
-
if (!isNullOrUndefined(imageFileFormat) &&
|
|
33614
|
-
allowedTypes.every(function (type) { return imageFileFormat !== type.substring(1).toLowerCase(); }) &&
|
|
33615
|
-
imgElementSrc.indexOf('blob') === -1) {
|
|
33616
|
-
detach(imgElement);
|
|
33617
|
-
}
|
|
33618
|
-
}
|
|
33619
|
-
});
|
|
33620
|
-
value = tempDivElem.innerHTML;
|
|
33621
33612
|
this.parent.notify(cleanupResizeElements, {
|
|
33622
33613
|
value: value,
|
|
33623
33614
|
callBack: function (currentValue) {
|
|
@@ -33847,14 +33838,14 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33847
33838
|
});
|
|
33848
33839
|
this.uploadObj.appendTo(this.popupObj.element.childNodes[0]);
|
|
33849
33840
|
var fileInfo = [{
|
|
33850
|
-
|
|
33851
|
-
|
|
33852
|
-
|
|
33853
|
-
|
|
33854
|
-
|
|
33855
|
-
|
|
33856
|
-
|
|
33857
|
-
|
|
33841
|
+
name: file.name,
|
|
33842
|
+
rawFile: file,
|
|
33843
|
+
size: file.size,
|
|
33844
|
+
type: file.type,
|
|
33845
|
+
status: 'Ready to Upload',
|
|
33846
|
+
validationMessages: { minSize: '', maxSize: '' },
|
|
33847
|
+
statusCode: '1'
|
|
33848
|
+
}];
|
|
33858
33849
|
this.uploadObj.createFileList(fileInfo);
|
|
33859
33850
|
this.uploadObj.upload(fileInfo);
|
|
33860
33851
|
this.popupObj.element.getElementsByClassName('e-file-select-wrap')[0].style.display = 'none';
|
|
@@ -33867,7 +33858,11 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33867
33858
|
this.parent.inputElement.contentEditable = 'true';
|
|
33868
33859
|
detach(imgElem);
|
|
33869
33860
|
if (popupObj) {
|
|
33870
|
-
|
|
33861
|
+
this.parent.isBlur = false;
|
|
33862
|
+
popupObj.destroy();
|
|
33863
|
+
if (!isNullOrUndefined(popupObj.element)) {
|
|
33864
|
+
detach(popupObj.element);
|
|
33865
|
+
}
|
|
33871
33866
|
}
|
|
33872
33867
|
this.parent.trigger(imageUploadFailed, e);
|
|
33873
33868
|
if (uploadObj && document.body.contains(uploadObj.element)) {
|
|
@@ -33884,7 +33879,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33884
33879
|
this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
33885
33880
|
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
33886
33881
|
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
33887
|
-
if (!_this.parent.inputElement.contains(imgElem)) {
|
|
33882
|
+
if (!_this.parent.inputElement.contains(imgElem) && imgElem.id) {
|
|
33888
33883
|
var imgHtmlElems = _this.parent.inputElement.querySelectorAll('#' + imgElem.id);
|
|
33889
33884
|
for (var i = 0; i < imgHtmlElems.length; i++) {
|
|
33890
33885
|
var imgHtmlElem = imgHtmlElems[i];
|
|
@@ -33909,13 +33904,22 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33909
33904
|
});
|
|
33910
33905
|
}
|
|
33911
33906
|
this.popupCloseTime = setTimeout(function () {
|
|
33912
|
-
popupObj
|
|
33913
|
-
|
|
33914
|
-
|
|
33915
|
-
|
|
33916
|
-
|
|
33917
|
-
|
|
33918
|
-
|
|
33907
|
+
if (popupObj) {
|
|
33908
|
+
_this.parent.isBlur = false;
|
|
33909
|
+
popupObj.destroy();
|
|
33910
|
+
if (!isNullOrUndefined(popupObj.element)) {
|
|
33911
|
+
detach(popupObj.element);
|
|
33912
|
+
}
|
|
33913
|
+
}
|
|
33914
|
+
if (!_this.parent.inputElement.contains(imgElem) && (imgElem.id || imgElem.alt)) {
|
|
33915
|
+
var selector = imgElem.id ? "#" + imgElem.id : "[alt=\"" + imgElem.alt + "\"]";
|
|
33916
|
+
if (selector) {
|
|
33917
|
+
var imgHtmlElems = _this.parent.inputElement.querySelectorAll(selector);
|
|
33918
|
+
for (var i = 0; i < imgHtmlElems.length; i++) {
|
|
33919
|
+
var imgHtmlElem = imgHtmlElems[i];
|
|
33920
|
+
if (imgHtmlElem && imgHtmlElem.style && imgHtmlElem.style.opacity === '0.5') {
|
|
33921
|
+
imgHtmlElem.style.opacity = '1';
|
|
33922
|
+
}
|
|
33919
33923
|
}
|
|
33920
33924
|
}
|
|
33921
33925
|
}
|
|
@@ -33997,8 +34001,10 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
33997
34001
|
}
|
|
33998
34002
|
};
|
|
33999
34003
|
PasteCleanup.prototype.radioRender = function () {
|
|
34000
|
-
this.keepRadioButton = new RadioButton({
|
|
34001
|
-
|
|
34004
|
+
this.keepRadioButton = new RadioButton({
|
|
34005
|
+
label: this.i10n.getConstant('keepFormat'),
|
|
34006
|
+
name: 'pasteOption', checked: true
|
|
34007
|
+
});
|
|
34002
34008
|
this.keepRadioButton.isStringTemplate = true;
|
|
34003
34009
|
var keepFormatElement = this.parent.element.querySelector('#keepFormating');
|
|
34004
34010
|
this.keepRadioButton.appendTo(keepFormatElement);
|
|
@@ -34689,7 +34695,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
34689
34695
|
/**
|
|
34690
34696
|
* `Resize` module is used to resize the editor
|
|
34691
34697
|
*/
|
|
34692
|
-
var Resize = /** @
|
|
34698
|
+
var Resize = /** @class */ (function () {
|
|
34693
34699
|
function Resize(parent) {
|
|
34694
34700
|
this.parent = parent;
|
|
34695
34701
|
this.addEventListener();
|
|
@@ -34721,13 +34727,24 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
34721
34727
|
this.iframeElement = this.parent.contentModule.getDocument().querySelectorAll('iframe');
|
|
34722
34728
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
34723
34729
|
this.iframeElement.forEach(function (iframe) {
|
|
34724
|
-
EventHandler.add(iframe
|
|
34730
|
+
EventHandler.add(iframe, 'load', _this.onIFrameLoad, _this);
|
|
34725
34731
|
});
|
|
34726
34732
|
}
|
|
34727
34733
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
34728
34734
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
34729
34735
|
EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
|
|
34730
34736
|
};
|
|
34737
|
+
Resize.prototype.onIFrameLoad = function (e) {
|
|
34738
|
+
var iframe = e.target;
|
|
34739
|
+
if (iframe.nodeName === 'IFRAME' && iframe.contentDocument) {
|
|
34740
|
+
EventHandler.add(iframe.contentDocument, 'mouseup', this.stopResize, this);
|
|
34741
|
+
}
|
|
34742
|
+
};
|
|
34743
|
+
Resize.prototype.removeMouseUpEventListener = function (iframe) {
|
|
34744
|
+
if (iframe.contentDocument) {
|
|
34745
|
+
EventHandler.remove(iframe.contentDocument, 'mouseup', this.stopResize);
|
|
34746
|
+
}
|
|
34747
|
+
};
|
|
34731
34748
|
Resize.prototype.resizeStart = function (e) {
|
|
34732
34749
|
var _this = this;
|
|
34733
34750
|
this.isResizing = false;
|
|
@@ -34834,7 +34851,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
34834
34851
|
}
|
|
34835
34852
|
if (!isNullOrUndefined(this.iframeElement)) {
|
|
34836
34853
|
this.iframeElement.forEach(function (iframe) {
|
|
34837
|
-
|
|
34854
|
+
_this.removeMouseUpEventListener(iframe);
|
|
34838
34855
|
});
|
|
34839
34856
|
}
|
|
34840
34857
|
if (this.resizer) {
|
|
@@ -34868,7 +34885,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
34868
34885
|
/**
|
|
34869
34886
|
* `FileManager` module is used to display the directories and images inside the editor.
|
|
34870
34887
|
*/
|
|
34871
|
-
var FileManager = /** @
|
|
34888
|
+
var FileManager = /** @class */ (function () {
|
|
34872
34889
|
function FileManager(parent, locator) {
|
|
34873
34890
|
FileManager$1.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$2);
|
|
34874
34891
|
this.parent = parent;
|
|
@@ -34897,13 +34914,13 @@ var FileManager = /** @__PURE__ @class */ (function () {
|
|
|
34897
34914
|
var dlgHeader = this.parent.localeObj.getConstant('fileDialogHeader');
|
|
34898
34915
|
var dlgCancel = this.i10n.getConstant('dialogCancel');
|
|
34899
34916
|
this.dlgButtons = [{
|
|
34900
|
-
|
|
34901
|
-
|
|
34902
|
-
|
|
34903
|
-
|
|
34904
|
-
|
|
34905
|
-
|
|
34906
|
-
|
|
34917
|
+
click: this.insertImageBoundFn,
|
|
34918
|
+
buttonModel: { content: dlgInsert, cssClass: 'e-flat e-insertImage', isPrimary: true, disabled: true }
|
|
34919
|
+
},
|
|
34920
|
+
{
|
|
34921
|
+
click: this.cancelDialogBoundFn,
|
|
34922
|
+
buttonModel: { cssClass: 'e-flat e-cancel', content: dlgCancel }
|
|
34923
|
+
}];
|
|
34907
34924
|
this.selectObj = { selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
34908
34925
|
var dlgTarget = this.parent.createElement('div', {
|
|
34909
34926
|
className: 'e-rte-file-manager-dialog', id: this.parent.getID() + '_file-manager-dialog',
|
|
@@ -35125,7 +35142,7 @@ var FileManager = /** @__PURE__ @class */ (function () {
|
|
|
35125
35142
|
/**
|
|
35126
35143
|
* `FullScreen` module is used to maximize and minimize screen
|
|
35127
35144
|
*/
|
|
35128
|
-
var FullScreen = /** @
|
|
35145
|
+
var FullScreen = /** @class */ (function () {
|
|
35129
35146
|
function FullScreen(parent) {
|
|
35130
35147
|
this.parent = parent;
|
|
35131
35148
|
this.addEventListener();
|
|
@@ -35347,7 +35364,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
|
|
|
35347
35364
|
}
|
|
35348
35365
|
}
|
|
35349
35366
|
|
|
35350
|
-
var FormatPainter = /** @
|
|
35367
|
+
var FormatPainter = /** @class */ (function () {
|
|
35351
35368
|
function FormatPainter(parent) {
|
|
35352
35369
|
this.isSticky = false;
|
|
35353
35370
|
this.isActive = false;
|
|
@@ -35506,7 +35523,7 @@ var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
|
35506
35523
|
return FormatPainter;
|
|
35507
35524
|
}());
|
|
35508
35525
|
|
|
35509
|
-
var EmojiPicker = /** @
|
|
35526
|
+
var EmojiPicker = /** @class */ (function () {
|
|
35510
35527
|
function EmojiPicker(parent, serviceLocator) {
|
|
35511
35528
|
this.noResultsFoundCount = 0;
|
|
35512
35529
|
this.parent = parent;
|
|
@@ -36387,7 +36404,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
|
36387
36404
|
/**
|
|
36388
36405
|
* ImportExport module called when import and export content in RichTextEditor
|
|
36389
36406
|
*/
|
|
36390
|
-
var ImportExport = /** @
|
|
36407
|
+
var ImportExport = /** @class */ (function () {
|
|
36391
36408
|
function ImportExport(parent) {
|
|
36392
36409
|
this.parent = parent;
|
|
36393
36410
|
this.addEventListener();
|
|
@@ -36458,26 +36475,26 @@ var ImportExport = /** @__PURE__ @class */ (function () {
|
|
|
36458
36475
|
body: JSON.stringify({ html: actionBeginArgs.exportValue })
|
|
36459
36476
|
})
|
|
36460
36477
|
.then(function (response) {
|
|
36461
|
-
|
|
36462
|
-
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36478
|
+
if (!response.ok) {
|
|
36479
|
+
throw new Error("HTTP error! Status: " + response.status);
|
|
36480
|
+
}
|
|
36481
|
+
return response.blob().then(function (blob) { return ({ blob: blob, filename: filename }); });
|
|
36482
|
+
})
|
|
36466
36483
|
.then(function (_a) {
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36484
|
+
var blob = _a.blob, filename = _a.filename;
|
|
36485
|
+
var url = window.URL.createObjectURL(blob);
|
|
36486
|
+
var a = document.createElement('a');
|
|
36487
|
+
a.href = url;
|
|
36488
|
+
a.download = filename;
|
|
36489
|
+
document.body.appendChild(a);
|
|
36490
|
+
a.click();
|
|
36491
|
+
document.body.removeChild(a);
|
|
36492
|
+
window.URL.revokeObjectURL(url);
|
|
36493
|
+
_this.parent.trigger(actionComplete, { requestType: args.member });
|
|
36494
|
+
})
|
|
36478
36495
|
.catch(function (error) {
|
|
36479
|
-
|
|
36480
|
-
|
|
36496
|
+
console.error('Fetch error:', error);
|
|
36497
|
+
});
|
|
36481
36498
|
}
|
|
36482
36499
|
});
|
|
36483
36500
|
};
|
|
@@ -36706,7 +36723,7 @@ var executeGroup = {
|
|
|
36706
36723
|
* @hidden
|
|
36707
36724
|
* @deprecated
|
|
36708
36725
|
*/
|
|
36709
|
-
var ServiceLocator = /** @
|
|
36726
|
+
var ServiceLocator = /** @class */ (function () {
|
|
36710
36727
|
function ServiceLocator() {
|
|
36711
36728
|
this.services = {};
|
|
36712
36729
|
}
|
|
@@ -36753,7 +36770,7 @@ var ServiceLocator = /** @__PURE__ @class */ (function () {
|
|
|
36753
36770
|
* @hidden
|
|
36754
36771
|
* @deprecated
|
|
36755
36772
|
*/
|
|
36756
|
-
var RendererFactory = /** @
|
|
36773
|
+
var RendererFactory = /** @class */ (function () {
|
|
36757
36774
|
function RendererFactory() {
|
|
36758
36775
|
this.rendererMap = {};
|
|
36759
36776
|
}
|
|
@@ -36818,7 +36835,7 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
36818
36835
|
/**
|
|
36819
36836
|
* Configures the toolbar settings of the RichTextEditor.
|
|
36820
36837
|
*/
|
|
36821
|
-
var ToolbarSettings = /** @
|
|
36838
|
+
var ToolbarSettings = /** @class */ (function (_super) {
|
|
36822
36839
|
__extends$5(ToolbarSettings, _super);
|
|
36823
36840
|
function ToolbarSettings() {
|
|
36824
36841
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36843,7 +36860,7 @@ var ToolbarSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
36843
36860
|
/**
|
|
36844
36861
|
* Configures the importWord settings of the RichTextEditor.
|
|
36845
36862
|
*/
|
|
36846
|
-
var ImportWord = /** @
|
|
36863
|
+
var ImportWord = /** @class */ (function (_super) {
|
|
36847
36864
|
__extends$5(ImportWord, _super);
|
|
36848
36865
|
function ImportWord() {
|
|
36849
36866
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36856,7 +36873,7 @@ var ImportWord = /** @__PURE__ @class */ (function (_super) {
|
|
|
36856
36873
|
/**
|
|
36857
36874
|
* Configures the export word of the RichTextEditor.
|
|
36858
36875
|
*/
|
|
36859
|
-
var ExportWord = /** @
|
|
36876
|
+
var ExportWord = /** @class */ (function (_super) {
|
|
36860
36877
|
__extends$5(ExportWord, _super);
|
|
36861
36878
|
function ExportWord() {
|
|
36862
36879
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36875,7 +36892,7 @@ var ExportWord = /** @__PURE__ @class */ (function (_super) {
|
|
|
36875
36892
|
/**
|
|
36876
36893
|
* Configures the export settings of the RichTextEditor.
|
|
36877
36894
|
*/
|
|
36878
|
-
var ExportPdf = /** @
|
|
36895
|
+
var ExportPdf = /** @class */ (function (_super) {
|
|
36879
36896
|
__extends$5(ExportPdf, _super);
|
|
36880
36897
|
function ExportPdf() {
|
|
36881
36898
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36894,7 +36911,7 @@ var ExportPdf = /** @__PURE__ @class */ (function (_super) {
|
|
|
36894
36911
|
/**
|
|
36895
36912
|
* Configures the image settings of the RichTextEditor.
|
|
36896
36913
|
*/
|
|
36897
|
-
var ImageSettings = /** @
|
|
36914
|
+
var ImageSettings = /** @class */ (function (_super) {
|
|
36898
36915
|
__extends$5(ImageSettings, _super);
|
|
36899
36916
|
function ImageSettings() {
|
|
36900
36917
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36946,7 +36963,7 @@ var ImageSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
36946
36963
|
/**
|
|
36947
36964
|
* Configures the audio settings of the RichTextEditor.
|
|
36948
36965
|
*/
|
|
36949
|
-
var AudioSettings = /** @
|
|
36966
|
+
var AudioSettings = /** @class */ (function (_super) {
|
|
36950
36967
|
__extends$5(AudioSettings, _super);
|
|
36951
36968
|
function AudioSettings() {
|
|
36952
36969
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -36974,7 +36991,7 @@ var AudioSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
36974
36991
|
/**
|
|
36975
36992
|
* Configures the video settings of the RichTextEditor.
|
|
36976
36993
|
*/
|
|
36977
|
-
var VideoSettings = /** @
|
|
36994
|
+
var VideoSettings = /** @class */ (function (_super) {
|
|
36978
36995
|
__extends$5(VideoSettings, _super);
|
|
36979
36996
|
function VideoSettings() {
|
|
36980
36997
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37026,7 +37043,7 @@ var VideoSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37026
37043
|
/**
|
|
37027
37044
|
* Configures the file manager settings of the RichTextEditor.
|
|
37028
37045
|
*/
|
|
37029
|
-
var FileManagerSettings = /** @
|
|
37046
|
+
var FileManagerSettings = /** @class */ (function (_super) {
|
|
37030
37047
|
__extends$5(FileManagerSettings, _super);
|
|
37031
37048
|
function FileManagerSettings() {
|
|
37032
37049
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37087,7 +37104,7 @@ var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37087
37104
|
], FileManagerSettings.prototype, "view", void 0);
|
|
37088
37105
|
return FileManagerSettings;
|
|
37089
37106
|
}(ChildProperty));
|
|
37090
|
-
var TableSettings = /** @
|
|
37107
|
+
var TableSettings = /** @class */ (function (_super) {
|
|
37091
37108
|
__extends$5(TableSettings, _super);
|
|
37092
37109
|
function TableSettings() {
|
|
37093
37110
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37112,7 +37129,7 @@ var TableSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37112
37129
|
/**
|
|
37113
37130
|
* Configures the quick toolbar settings of the RichTextEditor.
|
|
37114
37131
|
*/
|
|
37115
|
-
var QuickToolbarSettings = /** @
|
|
37132
|
+
var QuickToolbarSettings = /** @class */ (function (_super) {
|
|
37116
37133
|
__extends$5(QuickToolbarSettings, _super);
|
|
37117
37134
|
function QuickToolbarSettings() {
|
|
37118
37135
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37149,7 +37166,7 @@ var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37149
37166
|
/**
|
|
37150
37167
|
* Configure the format painter settings of the Rich Text Editor.
|
|
37151
37168
|
*/
|
|
37152
|
-
var FormatPainterSettings = /** @
|
|
37169
|
+
var FormatPainterSettings = /** @class */ (function (_super) {
|
|
37153
37170
|
__extends$5(FormatPainterSettings, _super);
|
|
37154
37171
|
function FormatPainterSettings() {
|
|
37155
37172
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37165,7 +37182,7 @@ var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37165
37182
|
/**
|
|
37166
37183
|
* Specifies the emoji picker options in Rich Text Editor with the following properties.
|
|
37167
37184
|
*/
|
|
37168
|
-
var EmojiSettings = /** @
|
|
37185
|
+
var EmojiSettings = /** @class */ (function (_super) {
|
|
37169
37186
|
__extends$5(EmojiSettings, _super);
|
|
37170
37187
|
function EmojiSettings() {
|
|
37171
37188
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37181,7 +37198,7 @@ var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37181
37198
|
/**
|
|
37182
37199
|
* Configures the Paste Cleanup settings of the RichTextEditor.
|
|
37183
37200
|
*/
|
|
37184
|
-
var PasteCleanupSettings = /** @
|
|
37201
|
+
var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
37185
37202
|
__extends$5(PasteCleanupSettings, _super);
|
|
37186
37203
|
function PasteCleanupSettings() {
|
|
37187
37204
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37209,7 +37226,7 @@ var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
37209
37226
|
/**
|
|
37210
37227
|
* Configures the font family settings of the RichTextEditor.
|
|
37211
37228
|
*/
|
|
37212
|
-
var FontFamily = /** @
|
|
37229
|
+
var FontFamily = /** @class */ (function (_super) {
|
|
37213
37230
|
__extends$5(FontFamily, _super);
|
|
37214
37231
|
function FontFamily() {
|
|
37215
37232
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37228,7 +37245,7 @@ var FontFamily = /** @__PURE__ @class */ (function (_super) {
|
|
|
37228
37245
|
/**
|
|
37229
37246
|
* Configures the font size settings of the RichTextEditor.
|
|
37230
37247
|
*/
|
|
37231
|
-
var FontSize = /** @
|
|
37248
|
+
var FontSize = /** @class */ (function (_super) {
|
|
37232
37249
|
__extends$5(FontSize, _super);
|
|
37233
37250
|
function FontSize() {
|
|
37234
37251
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37247,7 +37264,7 @@ var FontSize = /** @__PURE__ @class */ (function (_super) {
|
|
|
37247
37264
|
/**
|
|
37248
37265
|
* Configures the format settings of the RichTextEditor.
|
|
37249
37266
|
*/
|
|
37250
|
-
var Format = /** @
|
|
37267
|
+
var Format = /** @class */ (function (_super) {
|
|
37251
37268
|
__extends$5(Format, _super);
|
|
37252
37269
|
function Format() {
|
|
37253
37270
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37266,7 +37283,7 @@ var Format = /** @__PURE__ @class */ (function (_super) {
|
|
|
37266
37283
|
/**
|
|
37267
37284
|
* Configures the font Color settings of the RichTextEditor.
|
|
37268
37285
|
*/
|
|
37269
|
-
var FontColor = /** @
|
|
37286
|
+
var FontColor = /** @class */ (function (_super) {
|
|
37270
37287
|
__extends$5(FontColor, _super);
|
|
37271
37288
|
function FontColor() {
|
|
37272
37289
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37291,7 +37308,7 @@ var FontColor = /** @__PURE__ @class */ (function (_super) {
|
|
|
37291
37308
|
/**
|
|
37292
37309
|
* Configures the background Color settings of the RichTextEditor.
|
|
37293
37310
|
*/
|
|
37294
|
-
var BackgroundColor = /** @
|
|
37311
|
+
var BackgroundColor = /** @class */ (function (_super) {
|
|
37295
37312
|
__extends$5(BackgroundColor, _super);
|
|
37296
37313
|
function BackgroundColor() {
|
|
37297
37314
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37316,7 +37333,7 @@ var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
|
|
|
37316
37333
|
/**
|
|
37317
37334
|
* Configures the numberFormatList settings of the RichTextEditor.
|
|
37318
37335
|
*/
|
|
37319
|
-
var NumberFormatList = /** @
|
|
37336
|
+
var NumberFormatList = /** @class */ (function (_super) {
|
|
37320
37337
|
__extends$5(NumberFormatList, _super);
|
|
37321
37338
|
function NumberFormatList() {
|
|
37322
37339
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37329,7 +37346,7 @@ var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
|
|
|
37329
37346
|
/**
|
|
37330
37347
|
* Configures the bulletFormatList settings of the RichTextEditor.
|
|
37331
37348
|
*/
|
|
37332
|
-
var BulletFormatList = /** @
|
|
37349
|
+
var BulletFormatList = /** @class */ (function (_super) {
|
|
37333
37350
|
__extends$5(BulletFormatList, _super);
|
|
37334
37351
|
function BulletFormatList() {
|
|
37335
37352
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37362,7 +37379,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
37362
37379
|
/**
|
|
37363
37380
|
* Objects used for configuring the iframe resources properties.
|
|
37364
37381
|
*/
|
|
37365
|
-
var Resources = /** @
|
|
37382
|
+
var Resources = /** @class */ (function (_super) {
|
|
37366
37383
|
__extends$6(Resources, _super);
|
|
37367
37384
|
function Resources() {
|
|
37368
37385
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37378,7 +37395,7 @@ var Resources = /** @__PURE__ @class */ (function (_super) {
|
|
|
37378
37395
|
/**
|
|
37379
37396
|
* Configures the iframe settings of the RTE.
|
|
37380
37397
|
*/
|
|
37381
|
-
var IFrameSettings = /** @
|
|
37398
|
+
var IFrameSettings = /** @class */ (function (_super) {
|
|
37382
37399
|
__extends$6(IFrameSettings, _super);
|
|
37383
37400
|
function IFrameSettings() {
|
|
37384
37401
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37423,7 +37440,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
37423
37440
|
/**
|
|
37424
37441
|
* Configures the inlineMode property of the RTE.
|
|
37425
37442
|
*/
|
|
37426
|
-
var InlineMode = /** @
|
|
37443
|
+
var InlineMode = /** @class */ (function (_super) {
|
|
37427
37444
|
__extends$7(InlineMode, _super);
|
|
37428
37445
|
function InlineMode() {
|
|
37429
37446
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -37440,7 +37457,7 @@ var InlineMode = /** @__PURE__ @class */ (function (_super) {
|
|
|
37440
37457
|
/**
|
|
37441
37458
|
* `EnterKey` module is used to handle enter key press actions.
|
|
37442
37459
|
*/
|
|
37443
|
-
var EnterKeyAction = /** @
|
|
37460
|
+
var EnterKeyAction = /** @class */ (function () {
|
|
37444
37461
|
function EnterKeyAction(parent) {
|
|
37445
37462
|
this.parent = parent;
|
|
37446
37463
|
this.addEventListener();
|
|
@@ -37588,7 +37605,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37588
37605
|
if ((_this.parent.enterKey === 'P' && !shiftKey_1) || (_this.parent.enterKey === 'DIV' && !shiftKey_1) ||
|
|
37589
37606
|
(_this.parent.shiftEnterKey === 'P' && shiftKey_1) ||
|
|
37590
37607
|
(_this.parent.shiftEnterKey === 'DIV' && shiftKey_1)) {
|
|
37591
|
-
if ((_this.range.startOffset === 1 && _this.parent.inputElement.childNodes.length === 1 && _this.parent.inputElement.childNodes[0].nodeName === 'TABLE')
|
|
37608
|
+
if ((_this.range.startOffset === 1 && _this.parent.inputElement.childNodes.length === 1 && _this.parent.inputElement.childNodes[0].nodeName === 'TABLE')) {
|
|
37592
37609
|
var newElem = _this.createInsertElement(shiftKey_1);
|
|
37593
37610
|
newElem.appendChild(_this.parent.createElement('BR'));
|
|
37594
37611
|
_this.parent.inputElement.appendChild(newElem);
|
|
@@ -37620,7 +37637,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37620
37637
|
}
|
|
37621
37638
|
if (_this.range.startOffset !== 0 && _this.range.endOffset !== 0 &&
|
|
37622
37639
|
_this.range.startContainer === _this.range.endContainer && !(!isNullOrUndefined(nearBlockNode.childNodes[0])
|
|
37623
|
-
|
|
37640
|
+
&& (nearBlockNode.childNodes[0].nodeName === 'IMG' || nearBlockNode.querySelectorAll('img, audio, video').length > 0))) {
|
|
37624
37641
|
var startNodeText = _this.range.startContainer.textContent;
|
|
37625
37642
|
var splitFirstText = startNodeText.substring(0, _this.range.startOffset);
|
|
37626
37643
|
var lastCharBeforeCursor = splitFirstText.charCodeAt(_this.range.startOffset - 1);
|
|
@@ -37647,8 +37664,9 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37647
37664
|
(_this.range.startContainer.nodeName === '#text' && !isNullOrUndefined(_this.range.startContainer.textContent[_this.range.startOffset]) &&
|
|
37648
37665
|
_this.range.startContainer.textContent[_this.range.startOffset].includes('\u200B') && _this.range.startContainer.textContent[_this.range.startOffset] === '\u200B' &&
|
|
37649
37666
|
_this.parent.inputElement.textContent[0] !== '\u200B'));
|
|
37667
|
+
var 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_1;
|
|
37650
37668
|
// eslint-disable-next-line max-len
|
|
37651
|
-
if (!preventZeroWithSpace && !fireFoxEnterAtMiddle && ((_this.range.startOffset === 0 && _this.range.endOffset === 0) || isFocusedFirst) &&
|
|
37669
|
+
if (!preventEnterkeyShiftKey && !preventZeroWithSpace && !fireFoxEnterAtMiddle && ((_this.range.startOffset === 0 && _this.range.endOffset === 0) || isFocusedFirst) &&
|
|
37652
37670
|
!(!isNullOrUndefined(_this.range.startContainer.previousSibling) &&
|
|
37653
37671
|
(_this.range.startContainer.previousSibling.nodeName === 'IMG' || _this.range.startContainer.previousSibling.nodeName === 'BR'))) {
|
|
37654
37672
|
var isNearBlockLengthZero = void 0;
|
|
@@ -37713,7 +37731,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37713
37731
|
}
|
|
37714
37732
|
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
37715
37733
|
}
|
|
37716
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
37734
|
+
else if (nearBlockNode !== _this.parent.inputElement && nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
37717
37735
|
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
37718
37736
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
37719
37737
|
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, nearBlockNode, false).cloneNode(true);
|
|
@@ -37769,6 +37787,36 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37769
37787
|
_this.parent.videoModule.hideVideoQuickToolbar();
|
|
37770
37788
|
}
|
|
37771
37789
|
}
|
|
37790
|
+
else if (_this.parent.enterKey === 'BR' && shiftKey_1 && _this.range.startContainer.nodeType === Node.TEXT_NODE && _this.range.startContainer.parentElement && _this.range.startContainer.parentElement === _this.parent.inputElement) {
|
|
37791
|
+
var range = _this.range;
|
|
37792
|
+
var startContainer = range.startContainer;
|
|
37793
|
+
var startOffset = range.startOffset;
|
|
37794
|
+
var newElement = _this.parent.createElement(_this.parent.shiftEnterKey);
|
|
37795
|
+
if (startContainer.nodeType === Node.TEXT_NODE && range.endOffset !== 0 && range.startOffset !== 0) {
|
|
37796
|
+
var textNode = startContainer;
|
|
37797
|
+
if (startOffset < textNode.length) {
|
|
37798
|
+
var newTextNode = textNode.splitText(startOffset);
|
|
37799
|
+
newElement.appendChild(newTextNode);
|
|
37800
|
+
}
|
|
37801
|
+
else {
|
|
37802
|
+
newElement.innerHTML = '<br>';
|
|
37803
|
+
}
|
|
37804
|
+
textNode.parentNode.insertBefore(newElement, textNode.nextSibling);
|
|
37805
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElement, 0);
|
|
37806
|
+
}
|
|
37807
|
+
else if (startOffset === 0 && range.endOffset === 0) {
|
|
37808
|
+
newElement.innerHTML = '<br>';
|
|
37809
|
+
if (range.endOffset === startContainer.textContent.length) {
|
|
37810
|
+
var brElement = _this.parent.createElement('br');
|
|
37811
|
+
startContainer.parentNode.insertBefore(brElement, startContainer);
|
|
37812
|
+
}
|
|
37813
|
+
startContainer.parentNode.insertBefore(newElement, startContainer);
|
|
37814
|
+
var cursorTarget = (range.endOffset === startContainer.textContent.length)
|
|
37815
|
+
? newElement : newElement.nextSibling;
|
|
37816
|
+
startContainer.parentNode.insertBefore(newElement, startContainer);
|
|
37817
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), cursorTarget, 0);
|
|
37818
|
+
}
|
|
37819
|
+
}
|
|
37772
37820
|
else {
|
|
37773
37821
|
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, nearBlockNode, true);
|
|
37774
37822
|
if (!isNullOrUndefined(newElem.childNodes[0]) && newElem.childNodes[0].nodeName === '#text' &&
|
|
@@ -37840,7 +37888,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37840
37888
|
_this.range.startContainer.textContent.length : currentParent.textContent.length;
|
|
37841
37889
|
var isImageElement = (_this.range.startContainer.nodeName === 'IMG' || (_this.range.startContainer.childNodes.length > 0
|
|
37842
37890
|
&& !isNullOrUndefined(_this.range.startContainer.childNodes[_this.range.startOffset]) && _this.range.startContainer.childNodes[_this.range.startOffset].nodeName === 'IMG') || (_this.range.startContainer.nodeType === 1 &&
|
|
37843
|
-
|
|
37891
|
+
_this.range.startContainer.querySelector('img') !== null));
|
|
37844
37892
|
if (currentParent !== _this.parent.inputElement &&
|
|
37845
37893
|
_this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
|
|
37846
37894
|
_this.range.startOffset === _this.range.endOffset &&
|
|
@@ -37933,7 +37981,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
37933
37981
|
EnterKeyAction.prototype.removeBRElement = function (currentElement) {
|
|
37934
37982
|
if (Browser.userAgent.indexOf('Firefox') !== -1 &&
|
|
37935
37983
|
this.range.endOffset === currentElement.textContent.length && (currentElement.textContent.length !== 0 ||
|
|
37936
|
-
|
|
37984
|
+
currentElement.querySelectorAll('BR').length > 1) &&
|
|
37937
37985
|
!isNullOrUndefined(currentElement.lastChild) && currentElement.lastChild.nodeName === 'BR') {
|
|
37938
37986
|
detach(currentElement.lastChild);
|
|
37939
37987
|
}
|
|
@@ -38147,7 +38195,7 @@ var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
|
38147
38195
|
};
|
|
38148
38196
|
})();
|
|
38149
38197
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
38150
|
-
__assign = Object.assign || function(t) {
|
|
38198
|
+
__assign = Object.assign || function (t) {
|
|
38151
38199
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
38152
38200
|
s = arguments[i];
|
|
38153
38201
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
@@ -38173,7 +38221,7 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
38173
38221
|
* </script>
|
|
38174
38222
|
* ```
|
|
38175
38223
|
*/
|
|
38176
|
-
var RichTextEditor = /** @
|
|
38224
|
+
var RichTextEditor = /** @class */ (function (_super) {
|
|
38177
38225
|
__extends$8(RichTextEditor, _super);
|
|
38178
38226
|
function RichTextEditor(options, element) {
|
|
38179
38227
|
var _this = _super.call(this, options, element) || this;
|
|
@@ -38553,8 +38601,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
38553
38601
|
break;
|
|
38554
38602
|
case 'insertTable':
|
|
38555
38603
|
if (isNullOrUndefined(value.width)) {
|
|
38556
|
-
value.width = {
|
|
38557
|
-
|
|
38604
|
+
value.width = {
|
|
38605
|
+
minWidth: this.tableSettings.minWidth,
|
|
38606
|
+
maxWidth: this.tableSettings.maxWidth, width: this.tableSettings.width
|
|
38607
|
+
};
|
|
38558
38608
|
}
|
|
38559
38609
|
break;
|
|
38560
38610
|
case 'insertImage': {
|
|
@@ -38573,12 +38623,16 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
38573
38623
|
url = !isNullOrUndefined(url) ? url : '';
|
|
38574
38624
|
value.url = url;
|
|
38575
38625
|
if (isNullOrUndefined(value.width)) {
|
|
38576
|
-
value.width = {
|
|
38577
|
-
|
|
38626
|
+
value.width = {
|
|
38627
|
+
minWidth: this.insertImageSettings.minWidth,
|
|
38628
|
+
maxWidth: this.insertImageSettings.maxWidth, width: this.insertImageSettings.width
|
|
38629
|
+
};
|
|
38578
38630
|
}
|
|
38579
38631
|
if (isNullOrUndefined(value.height)) {
|
|
38580
|
-
value.height = {
|
|
38581
|
-
|
|
38632
|
+
value.height = {
|
|
38633
|
+
minHeight: this.insertImageSettings.minHeight,
|
|
38634
|
+
maxHeight: this.insertImageSettings.maxHeight, height: this.insertImageSettings.height
|
|
38635
|
+
};
|
|
38582
38636
|
}
|
|
38583
38637
|
break;
|
|
38584
38638
|
}
|
|
@@ -38631,12 +38685,16 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
38631
38685
|
url = !isNullOrUndefined(url) ? url : '';
|
|
38632
38686
|
value.url = url;
|
|
38633
38687
|
if (isNullOrUndefined(value.width)) {
|
|
38634
|
-
value.width = {
|
|
38635
|
-
|
|
38688
|
+
value.width = {
|
|
38689
|
+
minWidth: this.insertVideoSettings.minWidth,
|
|
38690
|
+
maxWidth: this.insertVideoSettings.maxWidth, width: this.insertVideoSettings.width
|
|
38691
|
+
};
|
|
38636
38692
|
}
|
|
38637
38693
|
if (isNullOrUndefined(value.height)) {
|
|
38638
|
-
value.height = {
|
|
38639
|
-
|
|
38694
|
+
value.height = {
|
|
38695
|
+
minHeight: this.insertVideoSettings.minHeight,
|
|
38696
|
+
maxHeight: this.insertVideoSettings.maxHeight, height: this.insertVideoSettings.height
|
|
38697
|
+
};
|
|
38640
38698
|
}
|
|
38641
38699
|
break;
|
|
38642
38700
|
}
|
|
@@ -39050,9 +39108,12 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
39050
39108
|
};
|
|
39051
39109
|
RichTextEditor.prototype.notifyMouseUp = function (e) {
|
|
39052
39110
|
var touch = (e.touches ? e.changedTouches[0] : e);
|
|
39053
|
-
this.notify(mouseUp, {
|
|
39054
|
-
|
|
39055
|
-
|
|
39111
|
+
this.notify(mouseUp, {
|
|
39112
|
+
member: 'mouseUp', args: e,
|
|
39113
|
+
touchData: {
|
|
39114
|
+
prevClientX: this.clickPoints.clientX, prevClientY: this.clickPoints.clientY,
|
|
39115
|
+
clientX: touch.clientX, clientY: touch.clientY
|
|
39116
|
+
}
|
|
39056
39117
|
});
|
|
39057
39118
|
if (this.inputElement && ((this.editorMode === 'HTML' && ((this.inputElement.textContent.length !== 0) || e.target && !isNullOrUndefined(e.target.querySelector('li')))) ||
|
|
39058
39119
|
(this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) ||
|
|
@@ -39663,7 +39724,7 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
39663
39724
|
this.placeHolderWrapper.innerHTML = this.placeholder;
|
|
39664
39725
|
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNullOrUndefined(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
39665
39726
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNullOrUndefined(this.inputElement.firstChild.firstChild) &&
|
|
39666
|
-
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
39727
|
+
this.inputElement.firstChild.childNodes.length < 2 && this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
39667
39728
|
this.placeHolderWrapper.classList.add('enabled');
|
|
39668
39729
|
}
|
|
39669
39730
|
else {
|
|
@@ -40397,9 +40458,12 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
40397
40458
|
this.removeSelectionClassStates(this.inputElement);
|
|
40398
40459
|
this.notify(focusChange, {});
|
|
40399
40460
|
var value = this.getUpdatedValue();
|
|
40400
|
-
this.
|
|
40461
|
+
if (!this.rootContainer.classList.contains('e-source-code-enabled')) {
|
|
40462
|
+
this.setProperties({ value: value }, true);
|
|
40463
|
+
} else {
|
|
40464
|
+
this.setProperties({ value: value });
|
|
40465
|
+
}
|
|
40401
40466
|
this.valueContainer.value = this.value;
|
|
40402
|
-
this.notify(toolbarRefresh, { args: e, documentNode: document });
|
|
40403
40467
|
this.isValueChangeBlurhandler = true;
|
|
40404
40468
|
this.invokeChangeEvent();
|
|
40405
40469
|
this.isFocusOut = true;
|