@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41
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/.eslintrc.json +260 -0
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +40 -40
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +27 -27
- package/CHANGELOG.md +1775 -1751
- package/README.md +76 -76
- package/dist/ej2-richtexteditor.min.js +10 -0
- package/dist/ej2-richtexteditor.umd.min.js +10 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +682 -434
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +791 -543
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +11 -0
- package/dist/global/ej2-richtexteditor.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +74 -74
- package/src/common/config.js +1 -1
- package/src/common/interface.d.ts +7 -7
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +3 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +9 -9
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +16 -6
- 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 +34 -34
- package/src/editor-manager/plugin/dom-node.js +35 -48
- 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 +33 -6
- 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 +7 -4
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +2 -2
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +5 -2
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +7 -7
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +40 -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 +27 -13
- 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 +5 -5
- 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 +6 -4
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +13 -4
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +5 -5
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
- package/src/rich-text-editor/actions/html-editor.js +32 -6
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- 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 +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +73 -20
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +33 -14
- package/src/rich-text-editor/actions/toolbar.d.ts +14 -13
- package/src/rich-text-editor/actions/toolbar.js +31 -23
- 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 +126 -121
- package/src/rich-text-editor/base/classes.js +126 -121
- package/src/rich-text-editor/base/constant.d.ts +155 -150
- package/src/rich-text-editor/base/constant.js +155 -150
- 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 +59 -49
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
- package/src/rich-text-editor/base/rich-text-editor.d.ts +69 -60
- package/src/rich-text-editor/base/rich-text-editor.js +143 -80
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +12 -3
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +9 -9
- 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/default-locale.js +2 -0
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/items.js +1 -1
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- 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 +12 -3
- 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 +53 -53
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +44 -24
- 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 -1
- package/src/rich-text-editor/renderer/table-module.js +44 -31
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -15
- package/src/rich-text-editor/renderer/toolbar-renderer.js +22 -102
- 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 +6 -6
- package/src/rich-text-editor/renderer/view-source.js +9 -7
- 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/_all.scss +1 -1
- package/styles/bootstrap-dark.css +194 -52
- package/styles/bootstrap.css +197 -53
- package/styles/bootstrap4.css +194 -52
- package/styles/bootstrap5-dark.css +195 -53
- package/styles/bootstrap5.css +195 -53
- package/styles/fabric-dark.css +194 -52
- package/styles/fabric.css +194 -52
- package/styles/fluent-dark.css +197 -53
- package/styles/fluent.css +197 -53
- package/styles/highcontrast-light.css +194 -52
- package/styles/highcontrast.css +194 -52
- package/styles/material-dark.css +196 -53
- package/styles/material.css +196 -53
- package/styles/material3-dark.css +194 -52
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +194 -52
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +277 -277
- package/styles/rich-text-editor/_bootstrap-definition.scss +334 -334
- package/styles/rich-text-editor/_bootstrap4-definition.scss +460 -460
- package/styles/rich-text-editor/_bootstrap5-definition.scss +262 -262
- package/styles/rich-text-editor/_fabric-dark-definition.scss +259 -259
- package/styles/rich-text-editor/_fabric-definition.scss +257 -257
- package/styles/rich-text-editor/_fluent-definition.scss +263 -263
- package/styles/rich-text-editor/_fusionnew-definition.scss +261 -261
- package/styles/rich-text-editor/_highcontrast-definition.scss +257 -257
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +257 -257
- package/styles/rich-text-editor/_layout.scss +2147 -2072
- package/styles/rich-text-editor/_material-dark-definition.scss +262 -262
- package/styles/rich-text-editor/_material-definition.scss +260 -260
- package/styles/rich-text-editor/_material3-definition.scss +262 -262
- package/styles/rich-text-editor/_tailwind-definition.scss +257 -257
- package/styles/rich-text-editor/_theme.scss +837 -837
- package/styles/rich-text-editor/bootstrap-dark.css +194 -52
- package/styles/rich-text-editor/bootstrap.css +197 -53
- package/styles/rich-text-editor/bootstrap4.css +194 -52
- package/styles/rich-text-editor/bootstrap5-dark.css +195 -53
- package/styles/rich-text-editor/bootstrap5.css +195 -53
- package/styles/rich-text-editor/fabric-dark.css +194 -52
- package/styles/rich-text-editor/fabric.css +194 -52
- package/styles/rich-text-editor/fluent-dark.css +197 -53
- package/styles/rich-text-editor/fluent.css +197 -53
- package/styles/rich-text-editor/highcontrast-light.css +194 -52
- package/styles/rich-text-editor/highcontrast.css +194 -52
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
- package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_fabric.scss +349 -349
- package/styles/rich-text-editor/icons/_fluent.scss +348 -348
- package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
- package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
- package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_material.scss +349 -349
- package/styles/rich-text-editor/icons/_material3.scss +348 -348
- package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
- package/styles/rich-text-editor/material-dark.css +196 -53
- package/styles/rich-text-editor/material.css +196 -53
- package/styles/rich-text-editor/material3-dark.css +194 -52
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +194 -52
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +194 -52
- package/styles/rich-text-editor/tailwind.css +194 -52
- package/styles/tailwind-dark.css +194 -52
- package/styles/tailwind.css +194 -52
- package/tslint.json +111 -0
- package/src/global.d.ts +0 -1
|
@@ -738,7 +738,7 @@ const emojiPicker = 'emojiPicker';
|
|
|
738
738
|
* @hidden
|
|
739
739
|
* @deprecated
|
|
740
740
|
*/
|
|
741
|
-
const
|
|
741
|
+
const destroyTooltip = 'destroyTooltip';
|
|
742
742
|
/**
|
|
743
743
|
* @hidden
|
|
744
744
|
* @deprecated
|
|
@@ -748,18 +748,23 @@ const hidePopup = 'hidePopup';
|
|
|
748
748
|
* @hidden
|
|
749
749
|
* @deprecated
|
|
750
750
|
*/
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
const cleanupResizeElements = 'cleanupResizeElements';
|
|
752
|
+
/**
|
|
753
|
+
* @hidden
|
|
754
|
+
* @deprecated
|
|
755
|
+
*/
|
|
756
|
+
const blockEmptyNodes = `address:empty, article:empty, aside:empty, blockquote:empty,
|
|
757
|
+
details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,
|
|
758
|
+
h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,
|
|
754
759
|
noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty`;
|
|
755
760
|
/**
|
|
756
761
|
* @hidden
|
|
757
762
|
* @deprecated
|
|
758
763
|
*/
|
|
759
|
-
const inlineEmptyNodes = `a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,
|
|
760
|
-
canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,
|
|
761
|
-
ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
|
|
762
|
-
q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
|
|
764
|
+
const inlineEmptyNodes = `a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,
|
|
765
|
+
canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,
|
|
766
|
+
ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
|
|
767
|
+
q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
|
|
763
768
|
template:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty`;
|
|
764
769
|
|
|
765
770
|
/**
|
|
@@ -840,6 +845,11 @@ const CLS_FULL_SCREEN = 'e-rte-full-screen';
|
|
|
840
845
|
* @deprecated
|
|
841
846
|
*/
|
|
842
847
|
const CLS_QUICK_TB = 'e-rte-quick-toolbar';
|
|
848
|
+
/**
|
|
849
|
+
* @hidden
|
|
850
|
+
* @deprecated
|
|
851
|
+
*/
|
|
852
|
+
const CLS_TEXT_QUICK_TB = 'e-rte-text-quicktoolbar';
|
|
843
853
|
/**
|
|
844
854
|
* @hidden
|
|
845
855
|
* @deprecated
|
|
@@ -2217,7 +2227,7 @@ let windowKeys = {
|
|
|
2217
2227
|
'Number Format List': 'Ctrl+Shift+O',
|
|
2218
2228
|
'Bullet Format List': 'Ctrl+Alt+O',
|
|
2219
2229
|
'Insert Audio': 'Ctrl+Shift+A',
|
|
2220
|
-
'Insert Video': 'Ctrl+
|
|
2230
|
+
'Insert Video': 'Ctrl+Alt+V',
|
|
2221
2231
|
'Increase Indent': 'Ctrl+]',
|
|
2222
2232
|
'Decrease Indent': 'Ctrl+[',
|
|
2223
2233
|
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
@@ -2638,6 +2648,7 @@ let toolsLocale = {
|
|
|
2638
2648
|
'bulletformatlist': 'bulletFormatList',
|
|
2639
2649
|
'undo': 'undo',
|
|
2640
2650
|
'redo': 'redo',
|
|
2651
|
+
'filemanager': 'fileManager',
|
|
2641
2652
|
'superscript': 'superscript',
|
|
2642
2653
|
'subscript': 'subscript',
|
|
2643
2654
|
'createlink': 'createLink',
|
|
@@ -2704,6 +2715,7 @@ let toolsLocale = {
|
|
|
2704
2715
|
'emojiPickerTypeToFind': 'Type to find',
|
|
2705
2716
|
'emojiPickerNoResultFound': 'No results found',
|
|
2706
2717
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2718
|
+
'ImageLinkAriaLabel': 'Open in new window',
|
|
2707
2719
|
};
|
|
2708
2720
|
let fontNameLocale = [
|
|
2709
2721
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -2999,11 +3011,11 @@ function getTBarItemsIndex(items, toolbarItems) {
|
|
|
2999
3011
|
continue;
|
|
3000
3012
|
}
|
|
3001
3013
|
else {
|
|
3002
|
-
if (items[i] === 'OrderedList' && toolbarItems[j].subCommand === 'OL') {
|
|
3014
|
+
if ((items[i] === 'OrderedList' || items[i] === 'NumberFormatList') && toolbarItems[j].subCommand === 'OL') {
|
|
3003
3015
|
itemsIndex.push(j);
|
|
3004
3016
|
break;
|
|
3005
3017
|
}
|
|
3006
|
-
else if (items[i] === 'UnorderedList' && toolbarItems[j].subCommand === 'UL') {
|
|
3018
|
+
else if ((items[i] === 'UnorderedList' || items[i] === 'BulletFormatList') && toolbarItems[j].subCommand === 'UL') {
|
|
3007
3019
|
itemsIndex.push(j);
|
|
3008
3020
|
break;
|
|
3009
3021
|
}
|
|
@@ -3155,6 +3167,15 @@ function updateTextNode(value, rteObj) {
|
|
|
3155
3167
|
for (let i = 0; i < emptyBlockElem.length; i++) {
|
|
3156
3168
|
emptyBlockElem[i].innerHTML = '<br>';
|
|
3157
3169
|
}
|
|
3170
|
+
// To handle the Empty block node with \n
|
|
3171
|
+
const allPNodes = tempNode.querySelectorAll('p');
|
|
3172
|
+
for (let i = 0; i < allPNodes.length; i++) {
|
|
3173
|
+
if (allPNodes[i].textContent.trim().length === 0 && allPNodes[i].childNodes.length === 1
|
|
3174
|
+
&& allPNodes[i].childNodes[0].nodeName === '#text' &&
|
|
3175
|
+
isNullOrUndefined(allPNodes[i].childNodes[0].textContent.match(/\u00a0/g))) {
|
|
3176
|
+
allPNodes[i].innerHTML = '<br>';
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3158
3179
|
const emptyInlineElem = tempNode.querySelectorAll(inlineEmptyNodes);
|
|
3159
3180
|
for (let i = 0; i < emptyInlineElem.length; i++) {
|
|
3160
3181
|
emptyInlineElem[i].innerHTML = '​';
|
|
@@ -3341,21 +3362,19 @@ class ToolbarRenderer {
|
|
|
3341
3362
|
}
|
|
3342
3363
|
wireEvent() {
|
|
3343
3364
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3344
|
-
this.parent.on(
|
|
3365
|
+
this.parent.on(destroyTooltip, this.destroyTooltip, this);
|
|
3345
3366
|
}
|
|
3346
3367
|
destroyTooltip() {
|
|
3347
|
-
|
|
3348
|
-
|
|
3368
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3369
|
+
this.parent.contentModule.getDocument();
|
|
3370
|
+
if (!isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap')) && !isNullOrUndefined(currentDocument.querySelector('[data-tooltip-id]'))) {
|
|
3371
|
+
const tooltipTargetEle = currentDocument.querySelector('[data-tooltip-id]');
|
|
3349
3372
|
const event = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
3350
3373
|
tooltipTargetEle.dispatchEvent(event);
|
|
3351
3374
|
}
|
|
3352
3375
|
}
|
|
3353
3376
|
unWireEvent() {
|
|
3354
3377
|
this.parent.off(destroy, this.unWireEvent);
|
|
3355
|
-
if (this.popupOverlay) {
|
|
3356
|
-
EventHandler.remove(this.popupOverlay, 'click touchmove', this.onPopupOverlay);
|
|
3357
|
-
}
|
|
3358
|
-
this.removePopupContainer();
|
|
3359
3378
|
}
|
|
3360
3379
|
toolbarBeforeCreate(e) {
|
|
3361
3380
|
if (this.mode === 'Extended') {
|
|
@@ -3376,7 +3395,6 @@ class ToolbarRenderer {
|
|
|
3376
3395
|
}
|
|
3377
3396
|
dropDownSelected(args) {
|
|
3378
3397
|
this.parent.notify(dropDownSelect, args);
|
|
3379
|
-
this.onPopupOverlay();
|
|
3380
3398
|
}
|
|
3381
3399
|
beforeDropDownItemRender(args) {
|
|
3382
3400
|
if (this.parent.readonly || !this.parent.enabled) {
|
|
@@ -3413,27 +3431,11 @@ class ToolbarRenderer {
|
|
|
3413
3431
|
addClass([listEle[1], listEle[2]], 'e-disabled');
|
|
3414
3432
|
}
|
|
3415
3433
|
}
|
|
3416
|
-
if (Browser.isDevice && !args.element.parentElement.classList.contains(CLS_QUICK_DROPDOWN)) {
|
|
3417
|
-
this.popupModal(args.element.parentElement);
|
|
3418
|
-
}
|
|
3419
3434
|
this.parent.notify(selectionSave, args);
|
|
3420
3435
|
}
|
|
3421
3436
|
dropDownClose(args) {
|
|
3422
|
-
this.removePopupContainer();
|
|
3423
3437
|
this.parent.notify(selectionRestore, args);
|
|
3424
3438
|
}
|
|
3425
|
-
removePopupContainer() {
|
|
3426
|
-
if (Browser.isDevice && !isNullOrUndefined(this.popupContainer)) {
|
|
3427
|
-
const popupEle = this.popupContainer.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3428
|
-
if (popupEle) {
|
|
3429
|
-
this.popupContainer.parentNode.insertBefore(popupEle, this.popupContainer.nextSibling);
|
|
3430
|
-
popupEle.style.removeProperty('position');
|
|
3431
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3432
|
-
}
|
|
3433
|
-
detach(this.popupContainer);
|
|
3434
|
-
this.popupContainer = undefined;
|
|
3435
|
-
}
|
|
3436
|
-
}
|
|
3437
3439
|
/**
|
|
3438
3440
|
* renderToolbar method
|
|
3439
3441
|
*
|
|
@@ -3467,7 +3469,7 @@ class ToolbarRenderer {
|
|
|
3467
3469
|
openDelay: 400,
|
|
3468
3470
|
opensOn: 'Hover',
|
|
3469
3471
|
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
3470
|
-
cssClass: this.parent.
|
|
3472
|
+
cssClass: this.parent.getCssClass(),
|
|
3471
3473
|
windowCollision: true,
|
|
3472
3474
|
position: 'BottomCenter'
|
|
3473
3475
|
});
|
|
@@ -3526,7 +3528,7 @@ class ToolbarRenderer {
|
|
|
3526
3528
|
}
|
|
3527
3529
|
//Alignments preselect
|
|
3528
3530
|
let alignEle = proxy.parent.getRange().startContainer;
|
|
3529
|
-
while (alignEle !== proxy.parent.
|
|
3531
|
+
while (alignEle !== proxy.parent.inputElement && !isNullOrUndefined(alignEle.parentElement)) {
|
|
3530
3532
|
if (alignEle.nodeName === '#text') {
|
|
3531
3533
|
alignEle = alignEle.parentElement;
|
|
3532
3534
|
}
|
|
@@ -3552,7 +3554,8 @@ class ToolbarRenderer {
|
|
|
3552
3554
|
alignEle = alignEle.parentElement;
|
|
3553
3555
|
}
|
|
3554
3556
|
//image preselect
|
|
3555
|
-
const
|
|
3557
|
+
const closestNode = startNode.closest('img');
|
|
3558
|
+
const imageEle = closestNode ? closestNode : startNode.querySelector('img');
|
|
3556
3559
|
if (args.items[0].command === 'Images') {
|
|
3557
3560
|
if (!isNullOrUndefined(imageEle)) {
|
|
3558
3561
|
let index;
|
|
@@ -3664,39 +3667,6 @@ class ToolbarRenderer {
|
|
|
3664
3667
|
};
|
|
3665
3668
|
return dropDown;
|
|
3666
3669
|
}
|
|
3667
|
-
// eslint-disable-next-line
|
|
3668
|
-
onPopupOverlay(args) {
|
|
3669
|
-
if (!isNullOrUndefined(this.popupOverlay)) {
|
|
3670
|
-
closest(this.popupOverlay, '.e-popup-container').style.display = 'none';
|
|
3671
|
-
this.popupOverlay.style.display = 'none';
|
|
3672
|
-
removeClass([this.popupOverlay], 'e-popup-overlay');
|
|
3673
|
-
}
|
|
3674
|
-
}
|
|
3675
|
-
setIsModel(element) {
|
|
3676
|
-
if (!closest(element, '.e-popup-container')) {
|
|
3677
|
-
this.popupContainer = this.parent.createElement('div', {
|
|
3678
|
-
className: 'e-rte-modal-popup e-popup-container e-center'
|
|
3679
|
-
});
|
|
3680
|
-
element.parentNode.insertBefore(this.popupContainer, element);
|
|
3681
|
-
this.popupContainer.appendChild(element);
|
|
3682
|
-
this.popupContainer.style.zIndex = element.style.zIndex;
|
|
3683
|
-
this.popupContainer.style.display = 'flex';
|
|
3684
|
-
element.style.position = 'relative';
|
|
3685
|
-
addClass([element], 'e-popup-modal');
|
|
3686
|
-
this.popupOverlay = this.parent.createElement('div', { className: 'e-popup-overlay' });
|
|
3687
|
-
// eslint-disable-next-line
|
|
3688
|
-
this.popupOverlay.style.zIndex = (parseInt(element.style.zIndex, null) - 1).toString();
|
|
3689
|
-
this.popupOverlay.style.display = 'block';
|
|
3690
|
-
this.popupContainer.appendChild(this.popupOverlay);
|
|
3691
|
-
EventHandler.add(this.popupOverlay, 'click touchmove', this.onPopupOverlay, this);
|
|
3692
|
-
}
|
|
3693
|
-
else {
|
|
3694
|
-
element.parentElement.style.display = 'flex';
|
|
3695
|
-
this.popupOverlay = element.nextElementSibling;
|
|
3696
|
-
this.popupOverlay.style.display = 'block';
|
|
3697
|
-
addClass([this.popupOverlay], 'e-popup-overlay');
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
3670
|
paletteSelection(dropDownArgs, currentElement) {
|
|
3701
3671
|
const ele = dropDownArgs.element.querySelector('.e-control.e-colorpicker');
|
|
3702
3672
|
const colorbox = [].slice.call(selectAll('.e-tile', ele.parentElement));
|
|
@@ -3724,7 +3694,7 @@ class ToolbarRenderer {
|
|
|
3724
3694
|
const proxy = this;
|
|
3725
3695
|
let css = CLS_RTE_ELEMENTS + ' ' + CLS_TB_BTN + ((this.parent.inlineMode) ? (' ' + CLS_INLINE_DROPDOWN) : '');
|
|
3726
3696
|
css += (' ' + ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_DROPDOWN : CLS_FONT_COLOR_DROPDOWN));
|
|
3727
|
-
css +=
|
|
3697
|
+
css += this.parent.getCssClass(true);
|
|
3728
3698
|
const content = proxy.parent.createElement('span', { className: CLS_COLOR_CONTENT });
|
|
3729
3699
|
const inlineEle = proxy.parent.createElement('span', { className: args.cssClass });
|
|
3730
3700
|
let range;
|
|
@@ -3796,9 +3766,6 @@ class ToolbarRenderer {
|
|
|
3796
3766
|
if (focusEle) {
|
|
3797
3767
|
focusEle.focus();
|
|
3798
3768
|
}
|
|
3799
|
-
if (Browser.isDevice) {
|
|
3800
|
-
this.popupModal(dropDownArgs.element.parentElement);
|
|
3801
|
-
}
|
|
3802
3769
|
this.pickerRefresh(dropDownArgs);
|
|
3803
3770
|
},
|
|
3804
3771
|
beforeClose: (dropDownArgs) => {
|
|
@@ -3826,22 +3793,6 @@ class ToolbarRenderer {
|
|
|
3826
3793
|
},
|
|
3827
3794
|
close: (dropDownArgs) => {
|
|
3828
3795
|
proxy.parent.notify(selectionRestore, {});
|
|
3829
|
-
const dropElement = closest(dropDownArgs.element.parentElement, '.e-popup-container');
|
|
3830
|
-
if (dropElement) {
|
|
3831
|
-
dropElement.style.display = 'none';
|
|
3832
|
-
dropElement.lastElementChild.style.display = 'none';
|
|
3833
|
-
removeClass([dropElement.lastElementChild], 'e-popup-overlay');
|
|
3834
|
-
}
|
|
3835
|
-
if (Browser.isDevice && !isNullOrUndefined(dropElement)) {
|
|
3836
|
-
const popupEle = dropElement.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3837
|
-
if (popupEle) {
|
|
3838
|
-
dropElement.parentNode.insertBefore(popupEle, dropElement.nextSibling);
|
|
3839
|
-
popupEle.style.removeProperty('position');
|
|
3840
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3841
|
-
}
|
|
3842
|
-
detach(dropElement);
|
|
3843
|
-
proxy.popupContainer = undefined;
|
|
3844
|
-
}
|
|
3845
3796
|
}
|
|
3846
3797
|
});
|
|
3847
3798
|
dropDown.isStringTemplate = true;
|
|
@@ -3869,16 +3820,6 @@ class ToolbarRenderer {
|
|
|
3869
3820
|
popupElem.style.width = (popupElem.offsetWidth - 5).toString() + 'px';
|
|
3870
3821
|
}
|
|
3871
3822
|
}
|
|
3872
|
-
popupModal(element) {
|
|
3873
|
-
const popupInst = getInstance(element, Popup);
|
|
3874
|
-
popupInst.relateTo = document.body;
|
|
3875
|
-
popupInst.position = { X: 0, Y: 0 };
|
|
3876
|
-
popupInst.targetType = 'container';
|
|
3877
|
-
popupInst.collision = { X: 'fit', Y: 'fit' };
|
|
3878
|
-
popupInst.offsetY = 4;
|
|
3879
|
-
popupInst.dataBind();
|
|
3880
|
-
this.setIsModel(element);
|
|
3881
|
-
}
|
|
3882
3823
|
setColorPickerContentWidth(colorPicker) {
|
|
3883
3824
|
const colorPickerContent = colorPicker.element.nextSibling;
|
|
3884
3825
|
if (colorPickerContent.style.width === '0px') {
|
|
@@ -3916,7 +3857,7 @@ class ToolbarRenderer {
|
|
|
3916
3857
|
args.element.classList.add(CLS_COLOR_PALETTE);
|
|
3917
3858
|
args.element.classList.add(CLS_CUSTOM_TILE);
|
|
3918
3859
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
3919
|
-
const allClassName = this.parent.
|
|
3860
|
+
const allClassName = this.parent.getCssClass().split(' ');
|
|
3920
3861
|
for (let i = 0; i < allClassName.length; i++) {
|
|
3921
3862
|
if (allClassName[i].trim() !== '') {
|
|
3922
3863
|
args.element.classList.add(allClassName[i]);
|
|
@@ -4383,7 +4324,7 @@ class DropDownButtons {
|
|
|
4383
4324
|
}
|
|
4384
4325
|
});
|
|
4385
4326
|
if (this.parent.inlineMode.enable) {
|
|
4386
|
-
this.setCssClass({ cssClass: this.parent.
|
|
4327
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
4387
4328
|
}
|
|
4388
4329
|
}
|
|
4389
4330
|
getUpdateItems(items, value) {
|
|
@@ -4700,7 +4641,9 @@ class DropDownButtons {
|
|
|
4700
4641
|
this.parent.on(bindCssClass, this.setCssClass, this);
|
|
4701
4642
|
}
|
|
4702
4643
|
onIframeMouseDown() {
|
|
4703
|
-
|
|
4644
|
+
if (this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length > 0) {
|
|
4645
|
+
dispatchEvent(document, 'mousedown');
|
|
4646
|
+
}
|
|
4704
4647
|
}
|
|
4705
4648
|
removeEventListener() {
|
|
4706
4649
|
if (this.parent.isDestroyed) {
|
|
@@ -4917,6 +4860,10 @@ class Toolbar$2 {
|
|
|
4917
4860
|
case 'escape':
|
|
4918
4861
|
this.parent.contentModule.getEditPanel().focus();
|
|
4919
4862
|
break;
|
|
4863
|
+
case 'enter':
|
|
4864
|
+
if (e.target.classList.contains('e-hor-nav')) {
|
|
4865
|
+
this.adjustContentHeight(e.target, true);
|
|
4866
|
+
}
|
|
4920
4867
|
}
|
|
4921
4868
|
}
|
|
4922
4869
|
createToolbarElement() {
|
|
@@ -4972,7 +4919,7 @@ class Toolbar$2 {
|
|
|
4972
4919
|
items: this.parent.toolbarSettings.items,
|
|
4973
4920
|
mode: tBarMode,
|
|
4974
4921
|
target: ele,
|
|
4975
|
-
cssClass: this.parent.
|
|
4922
|
+
cssClass: this.parent.getCssClass()
|
|
4976
4923
|
});
|
|
4977
4924
|
if (this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
4978
4925
|
addClass([ele], ['e-rte-tb-mobile']);
|
|
@@ -5091,7 +5038,7 @@ class Toolbar$2 {
|
|
|
5091
5038
|
items: this.parent.toolbarSettings.items,
|
|
5092
5039
|
mode: this.getToolbarMode(),
|
|
5093
5040
|
target: this.tbElement,
|
|
5094
|
-
cssClass: this.parent.
|
|
5041
|
+
cssClass: this.parent.getCssClass()
|
|
5095
5042
|
});
|
|
5096
5043
|
if (!this.parent.inlineMode.enable) {
|
|
5097
5044
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
@@ -5121,7 +5068,7 @@ class Toolbar$2 {
|
|
|
5121
5068
|
});
|
|
5122
5069
|
this.refreshToolbarOverflow();
|
|
5123
5070
|
}
|
|
5124
|
-
const divEle = this.parent.element.querySelector('.
|
|
5071
|
+
const divEle = this.parent.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
5125
5072
|
const iframeEle = this.parent.element.querySelector('.e-source-content');
|
|
5126
5073
|
if ((!this.parent.iframeSettings.enable && (!isNullOrUndefined(divEle) && divEle.style.display === 'block')) ||
|
|
5127
5074
|
(this.parent.iframeSettings.enable && (!isNullOrUndefined(iframeEle) && iframeEle.style.display === 'block'))) {
|
|
@@ -5251,7 +5198,7 @@ class Toolbar$2 {
|
|
|
5251
5198
|
baseToolbar.toolbarObj.enableItems(item, isEnable);
|
|
5252
5199
|
}
|
|
5253
5200
|
}
|
|
5254
|
-
if (!select('.
|
|
5201
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element) && !muteToolbarUpdate) {
|
|
5255
5202
|
updateUndoRedoStatus(baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5256
5203
|
}
|
|
5257
5204
|
}
|
|
@@ -5424,20 +5371,24 @@ class Toolbar$2 {
|
|
|
5424
5371
|
}
|
|
5425
5372
|
toolbarClickHandler(e) {
|
|
5426
5373
|
const trg = closest(e.originalEvent.target, '.e-hor-nav');
|
|
5374
|
+
this.adjustContentHeight(trg, false);
|
|
5375
|
+
}
|
|
5376
|
+
adjustContentHeight(trg, isKeyboard) {
|
|
5427
5377
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNullOrUndefined(trg)) {
|
|
5428
5378
|
const extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
5429
5379
|
if (!isNullOrUndefined(extendedTbar)) {
|
|
5430
5380
|
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
5431
5381
|
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
5432
5382
|
}
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5383
|
+
const hasActiveClass = trg.classList.contains('e-nav-active');
|
|
5384
|
+
const isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
5385
|
+
if (isExpand) {
|
|
5386
|
+
addClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5436
5387
|
}
|
|
5437
5388
|
else {
|
|
5438
|
-
|
|
5439
|
-
this.parent.setContentHeight('toolbar', true);
|
|
5389
|
+
removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5440
5390
|
}
|
|
5391
|
+
this.parent.setContentHeight('toolbar', isExpand);
|
|
5441
5392
|
}
|
|
5442
5393
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
5443
5394
|
this.isToolbar = true;
|
|
@@ -5560,7 +5511,7 @@ class Toolbar$2 {
|
|
|
5560
5511
|
this.addEventListener();
|
|
5561
5512
|
this.renderToolbar();
|
|
5562
5513
|
this.parent.wireScrollElementsEvents();
|
|
5563
|
-
if (!select('.
|
|
5514
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
5564
5515
|
updateUndoRedoStatus(this.baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5565
5516
|
}
|
|
5566
5517
|
this.parent.notify(dynamicModule, {});
|
|
@@ -5577,12 +5528,12 @@ class Toolbar$2 {
|
|
|
5577
5528
|
}
|
|
5578
5529
|
}
|
|
5579
5530
|
|
|
5580
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5581
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5582
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5583
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5584
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5585
|
-
};
|
|
5531
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5532
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5533
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5534
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5535
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5536
|
+
};
|
|
5586
5537
|
var KeyboardEvents_1;
|
|
5587
5538
|
const keyCode = {
|
|
5588
5539
|
'backspace': 8,
|
|
@@ -5837,7 +5788,7 @@ class ColorPickerInput {
|
|
|
5837
5788
|
document.body.appendChild(fontNode);
|
|
5838
5789
|
options = {
|
|
5839
5790
|
cssClass: this.tools[item.toLocaleLowerCase()].icon
|
|
5840
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5791
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + this.parent.getCssClass(true),
|
|
5841
5792
|
value: this.tools[item.toLocaleLowerCase()].value,
|
|
5842
5793
|
command: this.tools[item.toLocaleLowerCase()].command,
|
|
5843
5794
|
subCommand: this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5864,7 +5815,7 @@ class ColorPickerInput {
|
|
|
5864
5815
|
document.body.appendChild(backNode);
|
|
5865
5816
|
options = {
|
|
5866
5817
|
cssClass: this.tools[item.toLocaleLowerCase()].icon
|
|
5867
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5818
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + this.parent.getCssClass(true),
|
|
5868
5819
|
value: this.tools[item.toLocaleLowerCase()].value,
|
|
5869
5820
|
command: this.tools[item.toLocaleLowerCase()].command,
|
|
5870
5821
|
subCommand: this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5879,7 +5830,7 @@ class ColorPickerInput {
|
|
|
5879
5830
|
}
|
|
5880
5831
|
});
|
|
5881
5832
|
if (this.parent.inlineMode.enable) {
|
|
5882
|
-
this.setCssClass({ cssClass: this.parent.
|
|
5833
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
5883
5834
|
}
|
|
5884
5835
|
}
|
|
5885
5836
|
destroy() {
|
|
@@ -6038,6 +5989,9 @@ class BaseQuickToolbar {
|
|
|
6038
5989
|
}
|
|
6039
5990
|
appendPopupContent() {
|
|
6040
5991
|
this.toolbarElement = this.parent.createElement('div', { className: CLS_QUICK_TB });
|
|
5992
|
+
if (this.element.classList.contains(CLS_TEXT_POP)) {
|
|
5993
|
+
this.toolbarElement.classList.add(CLS_TEXT_QUICK_TB);
|
|
5994
|
+
}
|
|
6041
5995
|
this.element.appendChild(this.toolbarElement);
|
|
6042
5996
|
}
|
|
6043
5997
|
/**
|
|
@@ -6229,7 +6183,7 @@ class BaseQuickToolbar {
|
|
|
6229
6183
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
6230
6184
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
6231
6185
|
}
|
|
6232
|
-
if (!this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
6186
|
+
if ((!this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
|
|
6233
6187
|
this.parent.disableToolbarItem(this.parent.toolbarSettings.items);
|
|
6234
6188
|
this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
6235
6189
|
}
|
|
@@ -6372,7 +6326,18 @@ class BaseQuickToolbar {
|
|
|
6372
6326
|
tbItems: this.quickTBarObj.toolbarObj.items
|
|
6373
6327
|
};
|
|
6374
6328
|
setToolbarStatus(options, true, this.parent);
|
|
6375
|
-
if (
|
|
6329
|
+
if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
|
|
6330
|
+
const options = {
|
|
6331
|
+
args: args,
|
|
6332
|
+
dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
|
|
6333
|
+
parent: this.parent,
|
|
6334
|
+
tbElements: selectAll('.' + CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
|
|
6335
|
+
tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
|
|
6336
|
+
};
|
|
6337
|
+
setToolbarStatus(options, true, this.parent);
|
|
6338
|
+
updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6339
|
+
}
|
|
6340
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
6376
6341
|
updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6377
6342
|
}
|
|
6378
6343
|
}
|
|
@@ -6404,7 +6369,7 @@ class BaseQuickToolbar {
|
|
|
6404
6369
|
}
|
|
6405
6370
|
this.parent.on(destroy, this.destroy, this);
|
|
6406
6371
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
6407
|
-
if (this.parent.inlineMode.enable) {
|
|
6372
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6408
6373
|
this.parent.on(toolbarUpdated, this.updateStatus, this);
|
|
6409
6374
|
}
|
|
6410
6375
|
}
|
|
@@ -6445,7 +6410,7 @@ class BaseQuickToolbar {
|
|
|
6445
6410
|
}
|
|
6446
6411
|
this.parent.off(destroy, this.destroy);
|
|
6447
6412
|
this.parent.off(modelChanged, this.onPropertyChanged);
|
|
6448
|
-
if (this.parent.inlineMode.enable) {
|
|
6413
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6449
6414
|
this.parent.off(toolbarUpdated, this.updateStatus);
|
|
6450
6415
|
}
|
|
6451
6416
|
}
|
|
@@ -6564,7 +6529,7 @@ class QuickToolbar {
|
|
|
6564
6529
|
toolbarItems: items,
|
|
6565
6530
|
mode: mode,
|
|
6566
6531
|
renderType: type,
|
|
6567
|
-
cssClass: this.parent.
|
|
6532
|
+
cssClass: this.parent.getCssClass()
|
|
6568
6533
|
};
|
|
6569
6534
|
}
|
|
6570
6535
|
/**
|
|
@@ -6777,6 +6742,9 @@ class QuickToolbar {
|
|
|
6777
6742
|
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
6778
6743
|
this.hideInlineQTBar();
|
|
6779
6744
|
}
|
|
6745
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6746
|
+
this.textQTBar.hidePopup();
|
|
6747
|
+
}
|
|
6780
6748
|
}
|
|
6781
6749
|
inlineQTBarMouseDownHandler() {
|
|
6782
6750
|
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
@@ -6790,8 +6758,8 @@ class QuickToolbar {
|
|
|
6790
6758
|
}
|
|
6791
6759
|
}
|
|
6792
6760
|
keyUpHandler(e) {
|
|
6761
|
+
const args = e.args;
|
|
6793
6762
|
if (this.parent.inlineMode.enable && !Browser.isDevice) {
|
|
6794
|
-
const args = e.args;
|
|
6795
6763
|
if (this.parent.inlineMode.onSelection) {
|
|
6796
6764
|
if (this.parent.getSelection().length > 0) {
|
|
6797
6765
|
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
@@ -6804,6 +6772,13 @@ class QuickToolbar {
|
|
|
6804
6772
|
}
|
|
6805
6773
|
this.deBounce(this.offsetX, this.offsetY, args.target);
|
|
6806
6774
|
}
|
|
6775
|
+
if (this.parent.quickToolbarSettings.text && !Browser.isDevice) {
|
|
6776
|
+
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
6777
|
+
args.keyCode === 35 || args.keyCode === 36 || args.keyCode === 37 || args.keyCode === 38 ||
|
|
6778
|
+
args.keyCode === 39 || args.keyCode === 40))) {
|
|
6779
|
+
this.textQTBar.showPopup(this.offsetX, this.offsetY, args.target, 'text');
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6807
6782
|
}
|
|
6808
6783
|
selectionChangeHandler(e) {
|
|
6809
6784
|
clearTimeout(this.deBouncer);
|
|
@@ -6962,6 +6937,15 @@ class QuickToolbar {
|
|
|
6962
6937
|
if (this.videoQTBar && !hasClass(this.videoQTBar.element, 'e-popup-close')) {
|
|
6963
6938
|
this.videoQTBar.hidePopup();
|
|
6964
6939
|
}
|
|
6940
|
+
if (this.tableQTBar && !hasClass(this.tableQTBar.element, 'e-popup-close')) {
|
|
6941
|
+
this.tableQTBar.hidePopup();
|
|
6942
|
+
}
|
|
6943
|
+
if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close')) {
|
|
6944
|
+
this.linkQTBar.hidePopup();
|
|
6945
|
+
}
|
|
6946
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6947
|
+
this.textQTBar.hidePopup();
|
|
6948
|
+
}
|
|
6965
6949
|
}
|
|
6966
6950
|
}
|
|
6967
6951
|
onIframeMouseDown() {
|
|
@@ -7014,6 +6998,9 @@ class QuickToolbar {
|
|
|
7014
6998
|
* @deprecated
|
|
7015
6999
|
*/
|
|
7016
7000
|
removeEventListener() {
|
|
7001
|
+
if (this.deBouncer) {
|
|
7002
|
+
clearTimeout(this.deBouncer);
|
|
7003
|
+
}
|
|
7017
7004
|
if (this.parent.isDestroyed) {
|
|
7018
7005
|
return;
|
|
7019
7006
|
}
|
|
@@ -7034,9 +7021,6 @@ class QuickToolbar {
|
|
|
7034
7021
|
this.parent.off(rtlMode, this.setRtl);
|
|
7035
7022
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
7036
7023
|
this.parent.off(hidePopup, this.hideQuickToolbars);
|
|
7037
|
-
if (this.deBouncer) {
|
|
7038
|
-
clearTimeout(this.deBouncer);
|
|
7039
|
-
}
|
|
7040
7024
|
}
|
|
7041
7025
|
/**
|
|
7042
7026
|
* Called internally if any of the property value changed.
|
|
@@ -7905,7 +7889,7 @@ class Formatter {
|
|
|
7905
7889
|
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
7906
7890
|
currentInsertContentLength = 1;
|
|
7907
7891
|
}
|
|
7908
|
-
const currentLength = self.getText().trim().length;
|
|
7892
|
+
const currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
7909
7893
|
const selectionLength = self.getSelection().length;
|
|
7910
7894
|
const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
7911
7895
|
if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
|
|
@@ -9211,7 +9195,7 @@ const htmlKeyConfig = {
|
|
|
9211
9195
|
'insert-link': 'ctrl+k',
|
|
9212
9196
|
'insert-image': 'ctrl+shift+i',
|
|
9213
9197
|
'insert-audio': 'ctrl+shift+a',
|
|
9214
|
-
'insert-video': 'ctrl+
|
|
9198
|
+
'insert-video': 'ctrl+alt+v',
|
|
9215
9199
|
'insert-table': 'ctrl+shift+e',
|
|
9216
9200
|
'undo': 'ctrl+z',
|
|
9217
9201
|
'redo': 'ctrl+y',
|
|
@@ -11324,19 +11308,6 @@ class DOMNode {
|
|
|
11324
11308
|
let end = this.parent.querySelector('.' + markerClassName.endSelection);
|
|
11325
11309
|
let startTextNode;
|
|
11326
11310
|
let endTextNode;
|
|
11327
|
-
if (start.textContent === '' && isNullOrUndefined(end) && action !== 'tab') {
|
|
11328
|
-
// To Do Apply Heading and Back space press in empty content.
|
|
11329
|
-
// if (isNOU(action) && save.range.startContainer.nodeType === 1 &&
|
|
11330
|
-
// (save.range.startContainer as HTMLElement).querySelectorAll('audio,video,image').length === 0) {
|
|
11331
|
-
// start.innerHTML = '<br>';
|
|
11332
|
-
// }
|
|
11333
|
-
if (start.childNodes.length === 1 && start.childNodes[0].nodeName === 'BR') {
|
|
11334
|
-
start.innerHTML = '<br>';
|
|
11335
|
-
}
|
|
11336
|
-
else {
|
|
11337
|
-
start.innerHTML = '';
|
|
11338
|
-
}
|
|
11339
|
-
}
|
|
11340
11311
|
if (this.hasClass(start, markerClassName.startSelection) && start.classList.length > 1) {
|
|
11341
11312
|
const replace = this.createTagString(DEFAULT_TAG, start, this.encode(start.textContent));
|
|
11342
11313
|
this.replaceWith(start, replace);
|
|
@@ -11459,7 +11430,7 @@ class DOMNode {
|
|
|
11459
11430
|
else if (start.tagName === 'BR') {
|
|
11460
11431
|
this.replaceWith(start, this.marker(className, this.encode(start.textContent)));
|
|
11461
11432
|
const markerStart = range.startContainer.querySelector('.' + className);
|
|
11462
|
-
markerStart.appendChild(start);
|
|
11433
|
+
markerStart.parentElement.appendChild(start);
|
|
11463
11434
|
}
|
|
11464
11435
|
else {
|
|
11465
11436
|
if (start.tagName === 'IMG') {
|
|
@@ -12767,7 +12738,7 @@ class NodeCutter {
|
|
|
12767
12738
|
if ((indexes.indexOf(range.startOffset) >= 0)
|
|
12768
12739
|
|| ((indexes.indexOf(range.startOffset - 1) >= 0) && (range.startOffset !== 1
|
|
12769
12740
|
|| (range.startOffset === 1 && new RegExp('\\s').test(str[0])))
|
|
12770
|
-
|| ((indexes[indexes.length - 1] - 1) === range.startOffset))) {
|
|
12741
|
+
|| (((indexes[indexes.length - 1] - 1) === range.startOffset) && !new RegExp('\\s').test(str[0])))) {
|
|
12771
12742
|
cursorRange = range;
|
|
12772
12743
|
this.position = 1;
|
|
12773
12744
|
}
|
|
@@ -13286,6 +13257,9 @@ class InsertHtml {
|
|
|
13286
13257
|
InsertMethods.AppendBefore(node, parentNode.firstChild, false);
|
|
13287
13258
|
}
|
|
13288
13259
|
}
|
|
13260
|
+
else if (isNullOrUndefined(preNode.previousSibling) && insertNode.tagName === 'TABLE') {
|
|
13261
|
+
parentNode.prepend(node);
|
|
13262
|
+
}
|
|
13289
13263
|
else {
|
|
13290
13264
|
parentNode.appendChild(node);
|
|
13291
13265
|
}
|
|
@@ -13463,7 +13437,7 @@ class InsertHtml {
|
|
|
13463
13437
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0 && isFirstTextNode)) {
|
|
13464
13438
|
lastSelectionNode = node.firstChild;
|
|
13465
13439
|
if (isNullOrUndefined(node.previousElementSibling)) {
|
|
13466
|
-
const firstParaElm = createElement('p');
|
|
13440
|
+
const firstParaElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13467
13441
|
node.parentElement.insertBefore(firstParaElm, node);
|
|
13468
13442
|
}
|
|
13469
13443
|
if (node.previousElementSibling.nodeName === 'BR') {
|
|
@@ -13478,7 +13452,7 @@ class InsertHtml {
|
|
|
13478
13452
|
if (node.firstChild.nodeName === '#text' ||
|
|
13479
13453
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0)) {
|
|
13480
13454
|
if (!isPreviousInlineElem) {
|
|
13481
|
-
paraElm = createElement('p');
|
|
13455
|
+
paraElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13482
13456
|
paraElm.appendChild(node.firstChild);
|
|
13483
13457
|
fragment.appendChild(paraElm);
|
|
13484
13458
|
}
|
|
@@ -14336,8 +14310,8 @@ class ImageCommand {
|
|
|
14336
14310
|
e.item.url = isNullOrUndefined(e.item.url) || e.item.url === 'undefined' ? e.item.src : e.item.url;
|
|
14337
14311
|
if (!isNullOrUndefined(e.item.selectParent) && e.item.selectParent[0].tagName === 'IMG') {
|
|
14338
14312
|
const imgEle = e.item.selectParent[0];
|
|
14339
|
-
this.setStyle(imgEle, e);
|
|
14340
14313
|
isReplaced = true;
|
|
14314
|
+
this.setStyle(imgEle, e, isReplaced);
|
|
14341
14315
|
}
|
|
14342
14316
|
else {
|
|
14343
14317
|
const imgElement = createElement('img');
|
|
@@ -14373,12 +14347,33 @@ class ImageCommand {
|
|
|
14373
14347
|
}
|
|
14374
14348
|
});
|
|
14375
14349
|
}
|
|
14350
|
+
if (e.value === 'Replace') {
|
|
14351
|
+
e.item.subCommand = 'Replace';
|
|
14352
|
+
this.callBack(e);
|
|
14353
|
+
}
|
|
14376
14354
|
}
|
|
14377
|
-
setStyle(imgElement, e) {
|
|
14355
|
+
setStyle(imgElement, e, imgReplace) {
|
|
14378
14356
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14379
14357
|
imgElement.setAttribute('src', e.item.url);
|
|
14380
14358
|
}
|
|
14381
|
-
|
|
14359
|
+
let alignClassName;
|
|
14360
|
+
if (imgReplace) {
|
|
14361
|
+
const alignClass = {
|
|
14362
|
+
'e-imgcenter': 'e-imgcenter',
|
|
14363
|
+
'e-imgright': 'e-imgright',
|
|
14364
|
+
'e-imgleft': 'e-imgleft'
|
|
14365
|
+
};
|
|
14366
|
+
const imgClassList = imgElement.classList;
|
|
14367
|
+
for (let i = 0; i < imgClassList.length; i++) {
|
|
14368
|
+
// eslint-disable-next-line
|
|
14369
|
+
if (!isNullOrUndefined(alignClass[imgClassList[i]])) {
|
|
14370
|
+
// eslint-disable-next-line
|
|
14371
|
+
alignClassName = alignClass[imgClassList[i]];
|
|
14372
|
+
}
|
|
14373
|
+
}
|
|
14374
|
+
}
|
|
14375
|
+
imgElement.setAttribute('class', 'e-rte-image' + (isNullOrUndefined(e.item.cssClass) ? '' : ' ' + e.item.cssClass)
|
|
14376
|
+
+ (isNullOrUndefined(alignClassName) ? '' : ' ' + alignClassName));
|
|
14382
14377
|
if (!isNullOrUndefined(e.item.altText)) {
|
|
14383
14378
|
imgElement.setAttribute('alt', e.item.altText);
|
|
14384
14379
|
}
|
|
@@ -14430,6 +14425,9 @@ class ImageCommand {
|
|
|
14430
14425
|
if (!isNullOrUndefined(e.item.target)) {
|
|
14431
14426
|
anchor.setAttribute('target', e.item.target);
|
|
14432
14427
|
}
|
|
14428
|
+
if (!isNullOrUndefined(e.item.ariaLabel)) {
|
|
14429
|
+
anchor.setAttribute('aria-label', e.item.ariaLabel);
|
|
14430
|
+
}
|
|
14433
14431
|
InsertHtml.Insert(this.parent.currentDocument, anchor, this.parent.editableElement);
|
|
14434
14432
|
this.callBack(e);
|
|
14435
14433
|
}
|
|
@@ -14461,9 +14459,11 @@ class ImageCommand {
|
|
|
14461
14459
|
e.item.selectNode[0].parentElement.href = e.item.url;
|
|
14462
14460
|
if (isNullOrUndefined(e.item.target)) {
|
|
14463
14461
|
e.item.selectNode[0].parentElement.removeAttribute('target');
|
|
14462
|
+
e.item.selectNode[0].parentElement.removeAttribute('aria-label');
|
|
14464
14463
|
}
|
|
14465
14464
|
else {
|
|
14466
14465
|
e.item.selectNode[0].parentElement.target = e.item.target;
|
|
14466
|
+
e.item.selectNode[0].parentElement.ariaLabel = e.item.ariaLabel;
|
|
14467
14467
|
}
|
|
14468
14468
|
this.callBack(e);
|
|
14469
14469
|
}
|
|
@@ -14728,9 +14728,19 @@ class AudioCommand {
|
|
|
14728
14728
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14729
14729
|
sourceElement.setAttribute('src', e.item.url);
|
|
14730
14730
|
}
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14731
|
+
const fileExtension = e.item.fileName ? e.item.fileName.split('.').pop().toLowerCase() :
|
|
14732
|
+
e.item.url ? e.item.url.split('.').pop().toLowerCase() : '';
|
|
14733
|
+
if (fileExtension === 'opus') {
|
|
14734
|
+
sourceElement.type = 'audio/ogg';
|
|
14735
|
+
}
|
|
14736
|
+
else if (fileExtension === 'm4a') {
|
|
14737
|
+
sourceElement.type = 'audio/mp4';
|
|
14738
|
+
}
|
|
14739
|
+
else {
|
|
14740
|
+
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
14741
|
+
'audio/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
14742
|
+
e.item.url && e.item.url.split('.').length > 0 ? 'audio/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
14743
|
+
}
|
|
14734
14744
|
}
|
|
14735
14745
|
callBack(e) {
|
|
14736
14746
|
if (e.callBack) {
|
|
@@ -16472,6 +16482,19 @@ class SelectionCommands {
|
|
|
16472
16482
|
}
|
|
16473
16483
|
else {
|
|
16474
16484
|
child = InsertMethods.unwrap(formatNode);
|
|
16485
|
+
let liElement = nodes[index].parentElement;
|
|
16486
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16487
|
+
liElement = closest(liElement, 'li');
|
|
16488
|
+
}
|
|
16489
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16490
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16491
|
+
if (format === 'bold') {
|
|
16492
|
+
liElement.style.fontWeight = 'normal';
|
|
16493
|
+
}
|
|
16494
|
+
else if (format === "italic") {
|
|
16495
|
+
liElement.style.fontStyle = 'normal';
|
|
16496
|
+
}
|
|
16497
|
+
}
|
|
16475
16498
|
}
|
|
16476
16499
|
if (child[0] && !isFontStyle) {
|
|
16477
16500
|
let nodeTraverse = child[index] ? child[index] : child[0];
|
|
@@ -16520,6 +16543,16 @@ class SelectionCommands {
|
|
|
16520
16543
|
if (child[num].nodeType !== 3 || (child[num].textContent &&
|
|
16521
16544
|
child[num].textContent.trim().length > 0)) {
|
|
16522
16545
|
child[num] = InsertMethods.Wrap(child[num], this.GetFormatNode(format, value, formatNodeTagName, formatNodeStyles));
|
|
16546
|
+
let liElement = nodes[index].parentElement;
|
|
16547
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16548
|
+
liElement = closest(liElement, 'li');
|
|
16549
|
+
}
|
|
16550
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16551
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16552
|
+
if (format === 'fontname') {
|
|
16553
|
+
liElement.style.fontFamily = value;
|
|
16554
|
+
}
|
|
16555
|
+
}
|
|
16523
16556
|
if (child[num].textContent === startText) {
|
|
16524
16557
|
if (num === 0) {
|
|
16525
16558
|
range.setStartBefore(child[num]);
|
|
@@ -16633,6 +16666,9 @@ class SelectionCommands {
|
|
|
16633
16666
|
liElement.style.color = value;
|
|
16634
16667
|
liElement.style.textDecoration = 'inherit';
|
|
16635
16668
|
}
|
|
16669
|
+
else if (format === 'fontname') {
|
|
16670
|
+
liElement.style.fontFamily = value;
|
|
16671
|
+
}
|
|
16636
16672
|
}
|
|
16637
16673
|
if (value === 'formatPainter') {
|
|
16638
16674
|
return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
|
|
@@ -16680,6 +16716,19 @@ class SelectionCommands {
|
|
|
16680
16716
|
}
|
|
16681
16717
|
else {
|
|
16682
16718
|
nodes[index] = this.applyStyles(nodes, index, element);
|
|
16719
|
+
let liElement = nodes[index].parentElement;
|
|
16720
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16721
|
+
liElement = closest(liElement, 'li');
|
|
16722
|
+
}
|
|
16723
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16724
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16725
|
+
if (format === 'bold') {
|
|
16726
|
+
liElement.style.fontWeight = 'bold';
|
|
16727
|
+
}
|
|
16728
|
+
else if (format === "italic") {
|
|
16729
|
+
liElement.style.fontStyle = 'italic';
|
|
16730
|
+
}
|
|
16731
|
+
}
|
|
16683
16732
|
}
|
|
16684
16733
|
}
|
|
16685
16734
|
}
|
|
@@ -18002,6 +18051,9 @@ class MsWordPaste {
|
|
|
18002
18051
|
resultElem = elm.querySelectorAll(keys[i]);
|
|
18003
18052
|
}
|
|
18004
18053
|
for (let j = 0; j < resultElem.length; j++) {
|
|
18054
|
+
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
18055
|
+
continue;
|
|
18056
|
+
}
|
|
18005
18057
|
const styleProperty = resultElem[j].getAttribute('style');
|
|
18006
18058
|
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '') {
|
|
18007
18059
|
const valueSplit = values[i].split(';');
|
|
@@ -18300,7 +18352,7 @@ class MsWordPaste {
|
|
|
18300
18352
|
!isNormalList) {
|
|
18301
18353
|
prevList = null;
|
|
18302
18354
|
}
|
|
18303
|
-
const pElement = createElement('p');
|
|
18355
|
+
const pElement = createElement('p', { className: 'MsoNormal' });
|
|
18304
18356
|
pElement.innerHTML = collection[index].content.join(' ');
|
|
18305
18357
|
if ((collection[index].nestedLevel === 1) && listCount === 0 && collection[index].content) {
|
|
18306
18358
|
root.appendChild(temp = createElement(collection[index].listType, { className: collection[index].class }));
|
|
@@ -19910,103 +19962,103 @@ class ContentRender {
|
|
|
19910
19962
|
}
|
|
19911
19963
|
}
|
|
19912
19964
|
|
|
19913
|
-
const IFRAMEHEADER = `
|
|
19914
|
-
<!DOCTYPE html>
|
|
19915
|
-
<html>
|
|
19916
|
-
<head>
|
|
19917
|
-
<meta charset='utf-8' />
|
|
19918
|
-
<style>
|
|
19919
|
-
@charset "UTF-8";
|
|
19920
|
-
body {
|
|
19921
|
-
font-family: "Roboto", sans-serif;
|
|
19922
|
-
font-size: 14px;
|
|
19923
|
-
}
|
|
19924
|
-
html, body{height: 100%;margin: 0;}
|
|
19925
|
-
body.e-cursor{cursor:default}
|
|
19926
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
19927
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
19928
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
19929
|
-
.e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:
|
|
19930
|
-
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19931
|
-
.e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}
|
|
19932
|
-
.e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19933
|
-
.e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}
|
|
19934
|
-
.e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}
|
|
19935
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
19936
|
-
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
19937
|
-
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
19938
|
-
position: relativetext-align: center;vertical-align: bottom;}
|
|
19939
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
19940
|
-
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
19941
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
19942
|
-
.e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
19943
|
-
.e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
19944
|
-
.e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19945
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
19946
|
-
.e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
19947
|
-
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
19948
|
-
.e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;
|
|
19949
|
-
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19950
|
-
.e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
19951
|
-
img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
|
|
19952
|
-
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
19953
|
-
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
19954
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
19955
|
-
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
19956
|
-
border-radius: 15px; height: 20px; width: 20px; }
|
|
19957
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
19958
|
-
.e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
|
|
19959
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
19960
|
-
.e-img-caption a:focus-visible { outline: none; }
|
|
19961
|
-
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
19962
|
-
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
19963
|
-
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
19964
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
19965
|
-
li{margin-bottom: 10px;}
|
|
19966
|
-
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
19967
|
-
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
19968
|
-
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
19969
|
-
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
19970
|
-
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
19971
|
-
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
19972
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
19973
|
-
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
19974
|
-
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
19975
|
-
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
19976
|
-
strong, b{font-weight: 700;}
|
|
19977
|
-
a{text-decoration: none;user-select: auto;}
|
|
19978
|
-
a:hover{text-decoration: underline;};
|
|
19979
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
19980
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
19981
|
-
ul:last-child{margin-bottom: 0;}
|
|
19982
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
19983
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}
|
|
19984
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
19985
|
-
table th {background-color: #E0E0E0;}
|
|
19986
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
19987
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
19988
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
19989
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
19990
|
-
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
19991
|
-
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
19992
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
19993
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
19994
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
19995
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
19996
|
-
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
19997
|
-
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
19998
|
-
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
19999
|
-
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
20000
|
-
border-top: 6px solid transparent; content: ''; display: block;
|
|
20001
|
-
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
20002
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
20003
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
20004
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
20005
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
20006
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
20007
|
-
.e-rtl { direction: rtl; }
|
|
20008
|
-
.e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }
|
|
20009
|
-
</style>
|
|
19965
|
+
const IFRAMEHEADER = `
|
|
19966
|
+
<!DOCTYPE html>
|
|
19967
|
+
<html>
|
|
19968
|
+
<head>
|
|
19969
|
+
<meta charset='utf-8' />
|
|
19970
|
+
<style>
|
|
19971
|
+
@charset "UTF-8";
|
|
19972
|
+
body {
|
|
19973
|
+
font-family: "Roboto", sans-serif;
|
|
19974
|
+
font-size: 14px;
|
|
19975
|
+
}
|
|
19976
|
+
html, body{height: 100%;margin: 0;}
|
|
19977
|
+
body.e-cursor{cursor:default}
|
|
19978
|
+
span.e-selected-node {background-color: #939393;color: white;}
|
|
19979
|
+
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
19980
|
+
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
19981
|
+
.e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:
|
|
19982
|
+
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19983
|
+
.e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}
|
|
19984
|
+
.e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19985
|
+
.e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}
|
|
19986
|
+
.e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}
|
|
19987
|
+
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
19988
|
+
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
19989
|
+
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
19990
|
+
position: relativetext-align: center;vertical-align: bottom;}
|
|
19991
|
+
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
19992
|
+
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
19993
|
+
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
19994
|
+
.e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
19995
|
+
.e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
19996
|
+
.e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
19997
|
+
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
19998
|
+
.e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
19999
|
+
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
20000
|
+
.e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;
|
|
20001
|
+
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
20002
|
+
.e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
20003
|
+
img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
|
|
20004
|
+
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
20005
|
+
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
20006
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
20007
|
+
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
20008
|
+
border-radius: 15px; height: 20px; width: 20px; }
|
|
20009
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
20010
|
+
.e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
|
|
20011
|
+
.e-img-caption .e-img-inner { outline: 0; }
|
|
20012
|
+
.e-img-caption a:focus-visible { outline: none; }
|
|
20013
|
+
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
20014
|
+
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
20015
|
+
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
20016
|
+
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
20017
|
+
li{margin-bottom: 10px;}
|
|
20018
|
+
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
20019
|
+
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
20020
|
+
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
20021
|
+
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
20022
|
+
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
20023
|
+
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
20024
|
+
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
20025
|
+
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
20026
|
+
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
20027
|
+
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
20028
|
+
strong, b{font-weight: 700;}
|
|
20029
|
+
a{text-decoration: none;user-select: auto;}
|
|
20030
|
+
a:hover{text-decoration: underline;};
|
|
20031
|
+
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
20032
|
+
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
20033
|
+
ul:last-child{margin-bottom: 0;}
|
|
20034
|
+
table { border-collapse: collapse; empty-cells: show;}
|
|
20035
|
+
table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}
|
|
20036
|
+
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
20037
|
+
table th {background-color: #E0E0E0;}
|
|
20038
|
+
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
20039
|
+
table .e-cell-select {border: 1px double #4a90e2;}
|
|
20040
|
+
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
20041
|
+
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
20042
|
+
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
20043
|
+
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
20044
|
+
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
20045
|
+
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
20046
|
+
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
20047
|
+
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
20048
|
+
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
20049
|
+
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
20050
|
+
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
20051
|
+
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
20052
|
+
border-top: 6px solid transparent; content: ''; display: block;
|
|
20053
|
+
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
20054
|
+
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
20055
|
+
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
20056
|
+
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
20057
|
+
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
20058
|
+
.e-table-rhelper { background-color: #4a90e2;}
|
|
20059
|
+
.e-rtl { direction: rtl; }
|
|
20060
|
+
.e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }
|
|
20061
|
+
</style>
|
|
20010
20062
|
</head>`;
|
|
20011
20063
|
/**
|
|
20012
20064
|
* Content module is used to render Rich Text Editor content
|
|
@@ -20455,7 +20507,7 @@ class HtmlEditor {
|
|
|
20455
20507
|
e.args.keyCode === 13) {
|
|
20456
20508
|
this.spaceLink(e.args);
|
|
20457
20509
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
20458
|
-
const currentLength = this.parent.getText().trim().length;
|
|
20510
|
+
const currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
20459
20511
|
const selectionLength = this.parent.getSelection().length;
|
|
20460
20512
|
const totalLength = (currentLength - selectionLength) + 1;
|
|
20461
20513
|
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
@@ -20465,6 +20517,10 @@ class HtmlEditor {
|
|
|
20465
20517
|
}
|
|
20466
20518
|
else {
|
|
20467
20519
|
this.parent.notify(enterHandler, { args: e.args });
|
|
20520
|
+
const newRange = this.parent.getRange();
|
|
20521
|
+
if (!isNullOrUndefined(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text') {
|
|
20522
|
+
newRange.startContainer.scrollIntoView({ block: "end", inline: "nearest" });
|
|
20523
|
+
}
|
|
20468
20524
|
}
|
|
20469
20525
|
}
|
|
20470
20526
|
}
|
|
@@ -20613,7 +20669,7 @@ class HtmlEditor {
|
|
|
20613
20669
|
let liElement;
|
|
20614
20670
|
let rootElement;
|
|
20615
20671
|
if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
|
|
20616
|
-
this.parent.contentModule.getText().trim().length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
20672
|
+
this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
20617
20673
|
currentRange.startContainer.parentElement.tagName !== 'TH') {
|
|
20618
20674
|
this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
|
|
20619
20675
|
if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
|
|
@@ -20828,12 +20884,34 @@ class HtmlEditor {
|
|
|
20828
20884
|
}, e, value);
|
|
20829
20885
|
}
|
|
20830
20886
|
}
|
|
20887
|
+
mouseOutHandler() {
|
|
20888
|
+
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
20889
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20890
|
+
}
|
|
20891
|
+
else {
|
|
20892
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20893
|
+
this.parent.contentModule.getDocument();
|
|
20894
|
+
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
20895
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20896
|
+
}
|
|
20897
|
+
this.tooltipTargetEle.removeAttribute('data-title');
|
|
20898
|
+
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
20899
|
+
}
|
|
20831
20900
|
onToolbarClick(args) {
|
|
20832
20901
|
let save;
|
|
20833
20902
|
let selectNodeEle;
|
|
20834
20903
|
let selectParentEle;
|
|
20835
20904
|
const item = args.item;
|
|
20836
20905
|
const closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
20906
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20907
|
+
this.parent.contentModule.getDocument();
|
|
20908
|
+
this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
|
|
20909
|
+
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
20910
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
20911
|
+
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
20912
|
+
this.tooltipTargetEle.removeAttribute('title');
|
|
20913
|
+
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
20914
|
+
}
|
|
20837
20915
|
if (item.command !== 'FormatPainter') {
|
|
20838
20916
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
20839
20917
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -21144,6 +21222,7 @@ class PasteCleanup {
|
|
|
21144
21222
|
event: e
|
|
21145
21223
|
};
|
|
21146
21224
|
let value = null;
|
|
21225
|
+
let isClipboardHTMLDataNull = false;
|
|
21147
21226
|
let imageproperties;
|
|
21148
21227
|
if (e.args && !isNullOrUndefined(e.args.clipboardData)) {
|
|
21149
21228
|
value = e.args.clipboardData.getData('text/html');
|
|
@@ -21182,6 +21261,7 @@ class PasteCleanup {
|
|
|
21182
21261
|
const divElement = this.parent.createElement('div');
|
|
21183
21262
|
divElement.innerHTML = this.splitBreakLine(value);
|
|
21184
21263
|
value = divElement.innerHTML;
|
|
21264
|
+
isClipboardHTMLDataNull = true;
|
|
21185
21265
|
}
|
|
21186
21266
|
}
|
|
21187
21267
|
else if (value.length > 0) {
|
|
@@ -21203,10 +21283,13 @@ class PasteCleanup {
|
|
|
21203
21283
|
tempDivElem.innerHTML = value;
|
|
21204
21284
|
const isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
|
|
21205
21285
|
!isNullOrUndefined(tempDivElem.querySelector('table'));
|
|
21286
|
+
this.parent.trigger(cleanupResizeElements, { value: value }, (args) => {
|
|
21287
|
+
value = args.value;
|
|
21288
|
+
});
|
|
21206
21289
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21207
21290
|
if (isValueNotEmpty) {
|
|
21208
21291
|
e.args.preventDefault();
|
|
21209
|
-
this.pasteDialog(value, args);
|
|
21292
|
+
this.pasteDialog(value, args, isClipboardHTMLDataNull);
|
|
21210
21293
|
}
|
|
21211
21294
|
else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNullOrUndefined(file)) {
|
|
21212
21295
|
this.fireFoxImageUpload();
|
|
@@ -21218,7 +21301,7 @@ class PasteCleanup {
|
|
|
21218
21301
|
}
|
|
21219
21302
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21220
21303
|
e.args.preventDefault();
|
|
21221
|
-
this.plainFormatting(value, args);
|
|
21304
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21222
21305
|
}
|
|
21223
21306
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21224
21307
|
e.args.preventDefault();
|
|
@@ -21259,13 +21342,17 @@ class PasteCleanup {
|
|
|
21259
21342
|
splitBreakLine(value) {
|
|
21260
21343
|
const enterSplitText = value.split('\n');
|
|
21261
21344
|
let contentInnerElem = '';
|
|
21345
|
+
const startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
21346
|
+
const endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
21262
21347
|
for (let i = 0; i < enterSplitText.length; i++) {
|
|
21263
21348
|
if (enterSplitText[i].trim() === '') {
|
|
21264
21349
|
contentInnerElem += getDefaultValue(this.parent);
|
|
21265
21350
|
}
|
|
21266
21351
|
else {
|
|
21267
21352
|
const contentWithSpace = this.makeSpace(enterSplitText[i]);
|
|
21268
|
-
contentInnerElem += (i === 0
|
|
21353
|
+
contentInnerElem += (i === 0 && this.parent.enterKey !== 'BR' ? '<span>' : startNode) +
|
|
21354
|
+
(contentWithSpace.trim() === '' ? '<br>' : contentWithSpace.trim()) +
|
|
21355
|
+
(enterSplitText.length - 1 === i && this.parent.enterKey === 'BR' ? '' : (i === 0 && this.parent.enterKey !== 'BR' ? '</span>' : endNode));
|
|
21269
21356
|
}
|
|
21270
21357
|
}
|
|
21271
21358
|
return contentInnerElem;
|
|
@@ -21529,10 +21616,10 @@ class PasteCleanup {
|
|
|
21529
21616
|
const range = this.nodeSelectionObj.getRange(currentDocument);
|
|
21530
21617
|
this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
|
|
21531
21618
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21532
|
-
this.pasteDialog(imageValue, pasteArgs);
|
|
21619
|
+
this.pasteDialog(imageValue, pasteArgs, false);
|
|
21533
21620
|
}
|
|
21534
21621
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21535
|
-
this.plainFormatting(imageValue, pasteArgs);
|
|
21622
|
+
this.plainFormatting(imageValue, pasteArgs, false);
|
|
21536
21623
|
}
|
|
21537
21624
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21538
21625
|
this.formatting(imageValue, false, pasteArgs);
|
|
@@ -21556,7 +21643,7 @@ class PasteCleanup {
|
|
|
21556
21643
|
const plainTextElement = this.parent.element.querySelector('#plainTextFormat');
|
|
21557
21644
|
this.plainTextRadioButton.appendTo(plainTextElement);
|
|
21558
21645
|
}
|
|
21559
|
-
selectFormatting(value, args, keepChecked, cleanChecked) {
|
|
21646
|
+
selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull) {
|
|
21560
21647
|
if (keepChecked) {
|
|
21561
21648
|
this.formatting(value, false, args);
|
|
21562
21649
|
}
|
|
@@ -21564,10 +21651,10 @@ class PasteCleanup {
|
|
|
21564
21651
|
this.formatting(value, true, args);
|
|
21565
21652
|
}
|
|
21566
21653
|
else {
|
|
21567
|
-
this.plainFormatting(value, args);
|
|
21654
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21568
21655
|
}
|
|
21569
21656
|
}
|
|
21570
|
-
pasteDialog(value, args) {
|
|
21657
|
+
pasteDialog(value, args, isClipboardHTMLDataNull) {
|
|
21571
21658
|
let isHeight = false;
|
|
21572
21659
|
const preRTEHeight = this.parent.height;
|
|
21573
21660
|
const dialogModel = {
|
|
@@ -21583,7 +21670,7 @@ class PasteCleanup {
|
|
|
21583
21670
|
const argument = this.dialogObj;
|
|
21584
21671
|
this.dialogRenderObj.close(argument);
|
|
21585
21672
|
this.dialogObj.destroy();
|
|
21586
|
-
this.selectFormatting(value, args, keepChecked, cleanChecked);
|
|
21673
|
+
this.selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull);
|
|
21587
21674
|
}
|
|
21588
21675
|
},
|
|
21589
21676
|
buttonModel: {
|
|
@@ -21644,7 +21731,7 @@ class PasteCleanup {
|
|
|
21644
21731
|
isHeight = true;
|
|
21645
21732
|
}
|
|
21646
21733
|
this.dialogObj.show();
|
|
21647
|
-
this.setCssClass({ cssClass: this.parent.
|
|
21734
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
21648
21735
|
}
|
|
21649
21736
|
updateCss(currentObj, e) {
|
|
21650
21737
|
if (currentObj && e.cssClass) {
|
|
@@ -21852,8 +21939,8 @@ class PasteCleanup {
|
|
|
21852
21939
|
return value;
|
|
21853
21940
|
}
|
|
21854
21941
|
//Plain Formatting
|
|
21855
|
-
plainFormatting(value, args) {
|
|
21856
|
-
|
|
21942
|
+
plainFormatting(value, args, isClipboardHTMLDataNull) {
|
|
21943
|
+
let clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
21857
21944
|
clipBoardElem.innerHTML = value;
|
|
21858
21945
|
this.detachInlineElements(clipBoardElem);
|
|
21859
21946
|
this.getTextContent(clipBoardElem);
|
|
@@ -21889,6 +21976,13 @@ class PasteCleanup {
|
|
|
21889
21976
|
this.saveSelection.restore();
|
|
21890
21977
|
clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
|
|
21891
21978
|
this.addTempClass(clipBoardElem);
|
|
21979
|
+
this.removingComments(clipBoardElem);
|
|
21980
|
+
if (this.parent.enterKey === 'BR' && !isClipboardHTMLDataNull) {
|
|
21981
|
+
clipBoardElem = this.reframeToBrContent(clipBoardElem);
|
|
21982
|
+
}
|
|
21983
|
+
else if (this.parent.enterKey === 'DIV') {
|
|
21984
|
+
clipBoardElem.innerHTML = clipBoardElem.innerHTML.replace(/<p class="pasteContent_RTE">/g, '<div>').replace(/<\/p>/g, '</div>');
|
|
21985
|
+
}
|
|
21892
21986
|
this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: null }, (updatedArgs) => { value = updatedArgs.value; });
|
|
21893
21987
|
clipBoardElem.innerHTML = value;
|
|
21894
21988
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, (returnArgs) => {
|
|
@@ -21903,6 +21997,41 @@ class PasteCleanup {
|
|
|
21903
21997
|
this.parent.formatter.onSuccess(this.parent, args);
|
|
21904
21998
|
}
|
|
21905
21999
|
}
|
|
22000
|
+
removingComments(elm) {
|
|
22001
|
+
let innerElement = elm.innerHTML;
|
|
22002
|
+
innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
|
|
22003
|
+
elm.innerHTML = innerElement;
|
|
22004
|
+
}
|
|
22005
|
+
reframeToBrContent(clipBoardElem) {
|
|
22006
|
+
const newClipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
22007
|
+
while (!isNullOrUndefined(clipBoardElem.firstChild)) {
|
|
22008
|
+
const brElem = this.parent.createElement('br');
|
|
22009
|
+
const currentFirstChild = clipBoardElem.firstChild;
|
|
22010
|
+
if (currentFirstChild.nodeName === '#text') {
|
|
22011
|
+
const isNextSibPresent = !isNullOrUndefined(currentFirstChild.nextSibling);
|
|
22012
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22013
|
+
if (isNextSibPresent) {
|
|
22014
|
+
newClipBoardElem.appendChild(brElem);
|
|
22015
|
+
}
|
|
22016
|
+
}
|
|
22017
|
+
else {
|
|
22018
|
+
const isCurrentNodeBRElm = currentFirstChild.nodeName === 'BR';
|
|
22019
|
+
if (isCurrentNodeBRElm) {
|
|
22020
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22021
|
+
}
|
|
22022
|
+
else {
|
|
22023
|
+
newClipBoardElem.appendChild(currentFirstChild.childNodes[0]);
|
|
22024
|
+
}
|
|
22025
|
+
if (!isNullOrUndefined(currentFirstChild) && !isNullOrUndefined(currentFirstChild.nextSibling)) {
|
|
22026
|
+
newClipBoardElem.appendChild(brElem);
|
|
22027
|
+
}
|
|
22028
|
+
if (!isCurrentNodeBRElm && !isNullOrUndefined(currentFirstChild)) {
|
|
22029
|
+
detach(currentFirstChild);
|
|
22030
|
+
}
|
|
22031
|
+
}
|
|
22032
|
+
}
|
|
22033
|
+
return newClipBoardElem;
|
|
22034
|
+
}
|
|
21906
22035
|
getTextContent(clipBoardElem) {
|
|
21907
22036
|
for (let i = 0; i < this.blockNode.length; i++) {
|
|
21908
22037
|
const inElem = clipBoardElem.querySelectorAll(this.blockNode[i]);
|
|
@@ -21950,14 +22079,16 @@ class PasteCleanup {
|
|
|
21950
22079
|
for (let i = 0; i < this.inlineNode.length; i++) {
|
|
21951
22080
|
const inElem = clipBoardElem.querySelectorAll(this.inlineNode[i]);
|
|
21952
22081
|
for (let j = 0; j < inElem.length; j++) {
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
22082
|
+
if (!(inElem[j] === clipBoardElem.firstChild && inElem[j].nodeName === 'SPAN')) {
|
|
22083
|
+
let parElem;
|
|
22084
|
+
for (let k = 0; k < inElem[j].childNodes.length; k++) {
|
|
22085
|
+
parElem = inElem[j].childNodes[k].parentElement;
|
|
22086
|
+
inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
|
|
22087
|
+
k--;
|
|
22088
|
+
}
|
|
22089
|
+
if (!isNullOrUndefined(parElem)) {
|
|
22090
|
+
detach(parElem);
|
|
22091
|
+
}
|
|
21961
22092
|
}
|
|
21962
22093
|
}
|
|
21963
22094
|
}
|
|
@@ -22314,7 +22445,7 @@ class FileManager$1 {
|
|
|
22314
22445
|
this.dialogObj.createElement = this.parent.createElement;
|
|
22315
22446
|
this.dialogObj.appendTo(dlgTarget);
|
|
22316
22447
|
this.dialogObj.show(Browser.isDevice ? true : false);
|
|
22317
|
-
this.setCssClass({ cssClass: this.parent.
|
|
22448
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
22318
22449
|
}
|
|
22319
22450
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
22320
22451
|
setCssClass(e) {
|
|
@@ -22511,7 +22642,7 @@ class FullScreen {
|
|
|
22511
22642
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22512
22643
|
}
|
|
22513
22644
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22514
|
-
this.parent.notify(
|
|
22645
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22515
22646
|
}
|
|
22516
22647
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
22517
22648
|
if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
@@ -22565,7 +22696,7 @@ class FullScreen {
|
|
|
22565
22696
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22566
22697
|
}
|
|
22567
22698
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22568
|
-
this.parent.notify(
|
|
22699
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22569
22700
|
}
|
|
22570
22701
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
22571
22702
|
const evenArgs = {
|
|
@@ -22756,7 +22887,7 @@ class FormatPainter {
|
|
|
22756
22887
|
}
|
|
22757
22888
|
onKeyDown(event) {
|
|
22758
22889
|
const originalEvent = event.args;
|
|
22759
|
-
if ((originalEvent
|
|
22890
|
+
if (!isNullOrUndefined(originalEvent) && !isNullOrUndefined(originalEvent.action) && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')
|
|
22760
22891
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
22761
22892
|
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
22762
22893
|
originalEvent.stopPropagation();
|
|
@@ -22910,6 +23041,9 @@ class EmojiPicker {
|
|
|
22910
23041
|
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
22911
23042
|
}
|
|
22912
23043
|
this.divElement = spanElement.closest('div');
|
|
23044
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
23045
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
23046
|
+
}
|
|
22913
23047
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
22914
23048
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
22915
23049
|
this.clickEvent = args.args;
|
|
@@ -23549,7 +23683,8 @@ class EmojiPicker {
|
|
|
23549
23683
|
}
|
|
23550
23684
|
onkeyPress(e) {
|
|
23551
23685
|
const originalEvent = e.args;
|
|
23552
|
-
const selection = this.parent.contentModule.
|
|
23686
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23687
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23553
23688
|
if (selection.rangeCount <= 0) {
|
|
23554
23689
|
return;
|
|
23555
23690
|
}
|
|
@@ -23569,6 +23704,10 @@ class EmojiPicker {
|
|
|
23569
23704
|
}
|
|
23570
23705
|
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
23571
23706
|
removeClass([this.divElement], 'e-active');
|
|
23707
|
+
const currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument : this.parent.contentModule.getDocument();
|
|
23708
|
+
if (this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
23709
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
23710
|
+
}
|
|
23572
23711
|
this.popupObj.hide();
|
|
23573
23712
|
}
|
|
23574
23713
|
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
@@ -23579,7 +23718,8 @@ class EmojiPicker {
|
|
|
23579
23718
|
}
|
|
23580
23719
|
onkeyUp(e) {
|
|
23581
23720
|
const originalEvent = e.args;
|
|
23582
|
-
const selection = this.parent.contentModule.
|
|
23721
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23722
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23583
23723
|
if (selection.rangeCount <= 0) {
|
|
23584
23724
|
return;
|
|
23585
23725
|
}
|
|
@@ -23605,7 +23745,7 @@ class EmojiPicker {
|
|
|
23605
23745
|
}
|
|
23606
23746
|
getCoordinates() {
|
|
23607
23747
|
let coordinates;
|
|
23608
|
-
const selection = this.parent.contentModule.
|
|
23748
|
+
const selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
23609
23749
|
const range = selection.getRangeAt(0);
|
|
23610
23750
|
let firstChild;
|
|
23611
23751
|
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
@@ -23894,7 +24034,7 @@ class Link {
|
|
|
23894
24034
|
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + parentTop + args.clientY : args.pageY;
|
|
23895
24035
|
}
|
|
23896
24036
|
if (this.quickToolObj.linkQTBar) {
|
|
23897
|
-
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer);
|
|
24037
|
+
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer, 'link');
|
|
23898
24038
|
}
|
|
23899
24039
|
}
|
|
23900
24040
|
}
|
|
@@ -23925,12 +24065,32 @@ class Link {
|
|
|
23925
24065
|
if (isPopupOpen) {
|
|
23926
24066
|
return;
|
|
23927
24067
|
}
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
24068
|
+
if (e.args.ctrlKey === false) {
|
|
24069
|
+
this.showLinkQuickToolbar({
|
|
24070
|
+
args: args,
|
|
24071
|
+
isNotify: false,
|
|
24072
|
+
type: 'Links',
|
|
24073
|
+
elements: [args.target]
|
|
24074
|
+
});
|
|
24075
|
+
}
|
|
24076
|
+
else {
|
|
24077
|
+
const selection = this.parent.formatter.editorManager.nodeSelection;
|
|
24078
|
+
const range = selection.getRange(this.parent.contentModule.getDocument());
|
|
24079
|
+
const args = {
|
|
24080
|
+
args: {
|
|
24081
|
+
item: {
|
|
24082
|
+
subCommand: 'OpenLink',
|
|
24083
|
+
command: 'Links',
|
|
24084
|
+
name: ''
|
|
24085
|
+
},
|
|
24086
|
+
originalEvent: e.args
|
|
24087
|
+
},
|
|
24088
|
+
selectNode: selection.getNodeCollection(range),
|
|
24089
|
+
selectParent: selection.getParentNodeCollection(range),
|
|
24090
|
+
selection: selection.save(range, this.parent.contentModule.getDocument())
|
|
24091
|
+
};
|
|
24092
|
+
this.parent.notify(openLink, args);
|
|
24093
|
+
}
|
|
23934
24094
|
}
|
|
23935
24095
|
else {
|
|
23936
24096
|
this.hideLinkQuickToolbar();
|
|
@@ -23987,7 +24147,7 @@ class Link {
|
|
|
23987
24147
|
}
|
|
23988
24148
|
showDialog() {
|
|
23989
24149
|
this.openDialog(false);
|
|
23990
|
-
this.setCssClass({ cssClass: this.parent.
|
|
24150
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
23991
24151
|
}
|
|
23992
24152
|
closeDialog() {
|
|
23993
24153
|
if (this.dialogObj) {
|
|
@@ -24019,22 +24179,22 @@ class Link {
|
|
|
24019
24179
|
const textPlace = this.i10n.getConstant('textPlaceholder');
|
|
24020
24180
|
const title = this.i10n.getConstant('linkTitle');
|
|
24021
24181
|
const linkDialogEle = this.parent.createElement('div', {
|
|
24022
|
-
className: 'e-rte-link-dialog' +
|
|
24182
|
+
className: 'e-rte-link-dialog' + this.parent.getCssClass(true), id: this.rteID + '_rtelink'
|
|
24023
24183
|
});
|
|
24024
24184
|
this.parent.element.appendChild(linkDialogEle);
|
|
24025
24185
|
const linkContent = this.parent.createElement('div', {
|
|
24026
|
-
className: 'e-rte-linkcontent' +
|
|
24186
|
+
className: 'e-rte-linkcontent' + this.parent.getCssClass(true), id: this.rteID + '_linkContent'
|
|
24027
24187
|
});
|
|
24028
24188
|
const htmlTextbox = (this.parent.editorMode === 'HTML') ? '<label>' + linkTooltip +
|
|
24029
|
-
'</label></div><div class="e-rte-field' +
|
|
24030
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' +
|
|
24031
|
-
'<div class="e-rte-label' +
|
|
24032
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
24033
|
-
const content = '<div class="e-rte-label' +
|
|
24034
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' +
|
|
24035
|
-
'<div class="e-rte-label' +
|
|
24036
|
-
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' +
|
|
24037
|
-
'</div><div class="e-rte-label' +
|
|
24189
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24190
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' + this.parent.getCssClass(true) + '"></div>' +
|
|
24191
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '"></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24192
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>' : '';
|
|
24193
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24194
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' + this.parent.getCssClass(true) + '"/></div>' +
|
|
24195
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
24196
|
+
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' + this.parent.getCssClass(true) + '"aria-label="' + this.i10n.getConstant('linkText') + '" placeholder="' + textPlace + '">' +
|
|
24197
|
+
'</div><div class="e-rte-label' + this.parent.getCssClass(true) + '">' + htmlTextbox;
|
|
24038
24198
|
const contentElem = parseHtml(content);
|
|
24039
24199
|
linkContent.appendChild(contentElem);
|
|
24040
24200
|
const linkTarget = linkContent.querySelector('.e-rte-linkTarget');
|
|
@@ -24043,7 +24203,7 @@ class Link {
|
|
|
24043
24203
|
const linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
24044
24204
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
24045
24205
|
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
24046
|
-
cssClass: this.parent.
|
|
24206
|
+
cssClass: this.parent.getCssClass() });
|
|
24047
24207
|
this.checkBoxObj.isStringTemplate = true;
|
|
24048
24208
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
24049
24209
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -24056,16 +24216,16 @@ class Link {
|
|
|
24056
24216
|
const dialogModel = {
|
|
24057
24217
|
header: this.i10n.getConstant('linkHeader'),
|
|
24058
24218
|
content: linkContent,
|
|
24059
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
24219
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
24060
24220
|
enableRtl: this.parent.enableRtl,
|
|
24061
24221
|
locale: this.parent.locale,
|
|
24062
24222
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
24063
24223
|
isModal: Browser.isDevice,
|
|
24064
24224
|
buttons: [{
|
|
24065
24225
|
click: this.insertlink.bind(selectObj),
|
|
24066
|
-
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' +
|
|
24226
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
24067
24227
|
},
|
|
24068
|
-
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' +
|
|
24228
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
24069
24229
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
24070
24230
|
animationSettings: { effect: 'None' },
|
|
24071
24231
|
close: (event) => {
|
|
@@ -24565,18 +24725,18 @@ class Image$1 {
|
|
|
24565
24725
|
this.resizeBtnInit();
|
|
24566
24726
|
this.imgEle = e;
|
|
24567
24727
|
addClass([this.imgEle], 'e-resize');
|
|
24568
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' +
|
|
24728
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + this.parent.getCssClass(true), id: this.rteID + '_imgResize' });
|
|
24569
24729
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24570
|
-
className: 'e-rte-imageboxmark e-rte-topLeft' +
|
|
24730
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24571
24731
|
}));
|
|
24572
24732
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24573
|
-
className: 'e-rte-imageboxmark e-rte-topRight' +
|
|
24733
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24574
24734
|
}));
|
|
24575
24735
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24576
|
-
className: 'e-rte-imageboxmark e-rte-botLeft' +
|
|
24736
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24577
24737
|
}));
|
|
24578
24738
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24579
|
-
className: 'e-rte-imageboxmark e-rte-botRight' +
|
|
24739
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24580
24740
|
}));
|
|
24581
24741
|
if (Browser.isDevice) {
|
|
24582
24742
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -24729,8 +24889,8 @@ class Image$1 {
|
|
|
24729
24889
|
img.removeAttribute('height');
|
|
24730
24890
|
}
|
|
24731
24891
|
else {
|
|
24732
|
-
img.style.width = expectedX + 'px';
|
|
24733
|
-
img.style.height = expectedX + 'px';
|
|
24892
|
+
img.style.width = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24893
|
+
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24734
24894
|
}
|
|
24735
24895
|
}
|
|
24736
24896
|
}
|
|
@@ -24758,7 +24918,6 @@ class Image$1 {
|
|
|
24758
24918
|
this.setAspectRatio(this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
24759
24919
|
this.resizeImgDupPos(this.imgEle);
|
|
24760
24920
|
this.imgResizePos(this.imgEle, this.imgResizeDiv);
|
|
24761
|
-
this.parent.setContentHeight('', false);
|
|
24762
24921
|
}
|
|
24763
24922
|
});
|
|
24764
24923
|
}
|
|
@@ -24773,7 +24932,7 @@ class Image$1 {
|
|
|
24773
24932
|
else if (isNullOrUndefined(this.parent.insertImageSettings.maxHeight)) {
|
|
24774
24933
|
this.imgEle.style.maxHeight = '';
|
|
24775
24934
|
}
|
|
24776
|
-
this.imgEle.style.maxWidth = this.parent.getInsertImgMaxWidth() + 'px';
|
|
24935
|
+
this.imgEle.style.maxWidth = (closest(this.imgEle, 'ol,ul') != null ? this.parent.getInsertImgMaxWidth() - parseInt((getComputedStyle(closest(this.imgEle, 'ol,ul')).paddingLeft), 0) : this.parent.getInsertImgMaxWidth()) + 'px';
|
|
24777
24936
|
const pageX = this.getPointX(e);
|
|
24778
24937
|
const pageY = this.getPointY(e);
|
|
24779
24938
|
const mouseX = (this.resizeBtnStat.botLeft || this.resizeBtnStat.topLeft) ? -(pageX - this.pageX) : (pageX - this.pageX);
|
|
@@ -25070,7 +25229,7 @@ class Image$1 {
|
|
|
25070
25229
|
}
|
|
25071
25230
|
showDialog() {
|
|
25072
25231
|
this.openDialog(false);
|
|
25073
|
-
this.setCssClass({ cssClass: this.parent.
|
|
25232
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
25074
25233
|
}
|
|
25075
25234
|
closeDialog() {
|
|
25076
25235
|
if (this.dialogObj) {
|
|
@@ -25276,19 +25435,19 @@ class Image$1 {
|
|
|
25276
25435
|
}
|
|
25277
25436
|
this.imagDialog(e);
|
|
25278
25437
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25279
|
-
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' +
|
|
25438
|
+
const linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + this.parent.getCssClass(true) });
|
|
25280
25439
|
const linkUrl = this.i10n.getConstant('linkurl');
|
|
25281
|
-
const content = '<div class="e-rte-field' +
|
|
25282
|
-
'<input type="text" data-role ="none" class="e-input e-img-link' +
|
|
25440
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25441
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + this.parent.getCssClass(true) + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
25283
25442
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
25284
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
25443
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>';
|
|
25285
25444
|
const contentElem = parseHtml(content);
|
|
25286
25445
|
linkWrap.appendChild(contentElem);
|
|
25287
25446
|
const linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
25288
25447
|
const inputLink = linkWrap.querySelector('.e-img-link');
|
|
25289
25448
|
const linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
25290
25449
|
this.checkBoxObj = new CheckBox({
|
|
25291
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
25450
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25292
25451
|
change: (e) => {
|
|
25293
25452
|
if (e.checked) {
|
|
25294
25453
|
target = '_blank';
|
|
@@ -25302,11 +25461,12 @@ class Image$1 {
|
|
|
25302
25461
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
25303
25462
|
this.checkBoxObj.appendTo(linkTarget);
|
|
25304
25463
|
let target = this.checkBoxObj.checked ? '_blank' : null;
|
|
25464
|
+
let imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
|
|
25305
25465
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25306
25466
|
const linkargs = {
|
|
25307
25467
|
args: e.args,
|
|
25308
25468
|
selfImage: this, selection: e.selection,
|
|
25309
|
-
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target
|
|
25469
|
+
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target, ariaLabel: imageLabel
|
|
25310
25470
|
};
|
|
25311
25471
|
this.dialogObj.setProperties({
|
|
25312
25472
|
height: 'inherit',
|
|
@@ -25319,7 +25479,7 @@ class Image$1 {
|
|
|
25319
25479
|
this.insertlink(linkargs);
|
|
25320
25480
|
},
|
|
25321
25481
|
buttonModel: {
|
|
25322
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link' +
|
|
25482
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
25323
25483
|
}
|
|
25324
25484
|
}],
|
|
25325
25485
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
@@ -25344,13 +25504,13 @@ class Image$1 {
|
|
|
25344
25504
|
this.imagDialog(e);
|
|
25345
25505
|
const altText = this.i10n.getConstant('altText');
|
|
25346
25506
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25347
|
-
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' +
|
|
25507
|
+
const altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + this.parent.getCssClass(true) });
|
|
25348
25508
|
const altHeader = this.i10n.getConstant('alternateHeader');
|
|
25349
25509
|
const linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25350
25510
|
const getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
25351
25511
|
e.selectNode[0].getAttribute('alt');
|
|
25352
|
-
const content = '<div class="e-rte-field' +
|
|
25353
|
-
'<input type="text" spellcheck="false" class="e-input e-img-alt' +
|
|
25512
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25513
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + this.parent.getCssClass(true) + '" placeholder="' + altText + '"/>' +
|
|
25354
25514
|
'</div>';
|
|
25355
25515
|
const contentElem = parseHtml(content);
|
|
25356
25516
|
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
@@ -25368,7 +25528,7 @@ class Image$1 {
|
|
|
25368
25528
|
this.insertAlt(altArgs);
|
|
25369
25529
|
},
|
|
25370
25530
|
buttonModel: {
|
|
25371
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt' +
|
|
25531
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
25372
25532
|
}
|
|
25373
25533
|
}],
|
|
25374
25534
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
@@ -25420,14 +25580,14 @@ class Image$1 {
|
|
|
25420
25580
|
}
|
|
25421
25581
|
if (e.selectNode[0].parentElement.nodeName === 'A') {
|
|
25422
25582
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25423
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25583
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25424
25584
|
subCommand: e.args.item.subCommand
|
|
25425
25585
|
});
|
|
25426
25586
|
proxy.dialogObj.hide({ returnValue: true });
|
|
25427
25587
|
return;
|
|
25428
25588
|
}
|
|
25429
25589
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25430
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25590
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25431
25591
|
subCommand: e.args.item.subCommand, selection: e.selection
|
|
25432
25592
|
});
|
|
25433
25593
|
const captionEle = closest(e.selectNode[0], '.e-img-caption');
|
|
@@ -25538,11 +25698,11 @@ class Image$1 {
|
|
|
25538
25698
|
}
|
|
25539
25699
|
else {
|
|
25540
25700
|
this.captionEle = this.parent.createElement('span', {
|
|
25541
|
-
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION +
|
|
25701
|
+
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION + this.parent.getCssClass(true),
|
|
25542
25702
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
25543
25703
|
});
|
|
25544
|
-
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' +
|
|
25545
|
-
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' +
|
|
25704
|
+
const imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
25705
|
+
const imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
25546
25706
|
attrs: { contenteditable: 'true' } });
|
|
25547
25707
|
const parent = e.selectNode[0].parentElement;
|
|
25548
25708
|
if (parent.tagName === 'A') {
|
|
@@ -25594,7 +25754,7 @@ class Image$1 {
|
|
|
25594
25754
|
this.insertSize(selectObj);
|
|
25595
25755
|
},
|
|
25596
25756
|
buttonModel: {
|
|
25597
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size' +
|
|
25757
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
25598
25758
|
}
|
|
25599
25759
|
}],
|
|
25600
25760
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
@@ -25639,7 +25799,7 @@ class Image$1 {
|
|
|
25639
25799
|
this.dialogObj.hide({ returnValue: true });
|
|
25640
25800
|
return;
|
|
25641
25801
|
}
|
|
25642
|
-
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' +
|
|
25802
|
+
const imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + this.parent.getCssClass(true), id: this.rteID + '_image' });
|
|
25643
25803
|
this.parent.element.appendChild(imgDialog);
|
|
25644
25804
|
const imgInsert = this.i10n.getConstant('dialogInsert');
|
|
25645
25805
|
const imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -25648,20 +25808,20 @@ class Image$1 {
|
|
|
25648
25808
|
const selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
25649
25809
|
const dialogModel = {
|
|
25650
25810
|
header: imgHeader,
|
|
25651
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
25811
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
25652
25812
|
enableRtl: this.parent.enableRtl,
|
|
25653
25813
|
locale: this.parent.locale,
|
|
25654
25814
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
25655
25815
|
isModal: Browser.isDevice,
|
|
25656
25816
|
buttons: [{
|
|
25657
25817
|
click: this.insertImageUrl.bind(selectObj),
|
|
25658
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' +
|
|
25818
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
|
|
25659
25819
|
},
|
|
25660
25820
|
{
|
|
25661
25821
|
click: (e) => {
|
|
25662
25822
|
this.cancelDialog(e);
|
|
25663
25823
|
},
|
|
25664
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
25824
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
25665
25825
|
}],
|
|
25666
25826
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
25667
25827
|
animationSettings: { effect: 'None' },
|
|
@@ -25684,12 +25844,12 @@ class Image$1 {
|
|
|
25684
25844
|
this.dialogObj = null;
|
|
25685
25845
|
}
|
|
25686
25846
|
};
|
|
25687
|
-
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' +
|
|
25847
|
+
const dialogContent = this.parent.createElement('div', { className: 'e-img-content' + this.parent.getCssClass(true) });
|
|
25688
25848
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
25689
25849
|
|| this.parent.editorMode === 'HTML') {
|
|
25690
25850
|
dialogContent.appendChild(this.imgUpload(e));
|
|
25691
25851
|
}
|
|
25692
|
-
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' +
|
|
25852
|
+
const linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + this.parent.getCssClass(true) });
|
|
25693
25853
|
const linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
25694
25854
|
if (this.parent.editorMode === 'HTML') {
|
|
25695
25855
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -25805,10 +25965,10 @@ class Image$1 {
|
|
|
25805
25965
|
}
|
|
25806
25966
|
// eslint-disable-next-line
|
|
25807
25967
|
imageUrlPopup(e) {
|
|
25808
|
-
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' +
|
|
25968
|
+
const imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
25809
25969
|
const placeUrl = this.i10n.getConstant('imageUrl');
|
|
25810
25970
|
this.inputUrl = this.parent.createElement('input', {
|
|
25811
|
-
className: 'e-input e-img-url' +
|
|
25971
|
+
className: 'e-input e-img-url' + this.parent.getCssClass(true),
|
|
25812
25972
|
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
25813
25973
|
});
|
|
25814
25974
|
this.inputUrl.addEventListener('input', () => {
|
|
@@ -25874,7 +26034,7 @@ class Image$1 {
|
|
|
25874
26034
|
const selectNode = e.selectNode[0];
|
|
25875
26035
|
const imgHeight = this.i10n.getConstant('imageHeight');
|
|
25876
26036
|
const imgWidth = this.i10n.getConstant('imageWidth');
|
|
25877
|
-
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' +
|
|
26037
|
+
const imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
25878
26038
|
const widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
25879
26039
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
25880
26040
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -25883,10 +26043,10 @@ class Image$1 {
|
|
|
25883
26043
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
25884
26044
|
this.changedWidthValue = null;
|
|
25885
26045
|
this.changedHeightValue = null;
|
|
25886
|
-
const content = '<div class="e-rte-label' +
|
|
25887
|
-
'</label></div><div class="e-rte-field' +
|
|
25888
|
-
'<div class="e-rte-label' +
|
|
25889
|
-
'<input type="text" id="imgheight" class="e-img-height' +
|
|
26046
|
+
const content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
26047
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" id="imgwidth" class="e-img-width' + this.parent.getCssClass(true) + '"/></div>' +
|
|
26048
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
26049
|
+
'<input type="text" id="imgheight" class="e-img-height' + this.parent.getCssClass(true) + '"/></div>';
|
|
25890
26050
|
const contentElem = parseHtml(content);
|
|
25891
26051
|
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
25892
26052
|
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
@@ -25894,7 +26054,7 @@ class Image$1 {
|
|
|
25894
26054
|
this.widthNum = new TextBox({
|
|
25895
26055
|
value: formatUnit(widthVal),
|
|
25896
26056
|
enableRtl: this.parent.enableRtl,
|
|
25897
|
-
cssClass: this.parent.
|
|
26057
|
+
cssClass: this.parent.getCssClass(),
|
|
25898
26058
|
input: (e) => {
|
|
25899
26059
|
this.inputWidthValue = formatUnit(this.inputValue(e.value));
|
|
25900
26060
|
}
|
|
@@ -25904,7 +26064,7 @@ class Image$1 {
|
|
|
25904
26064
|
this.heightNum = new TextBox({
|
|
25905
26065
|
value: formatUnit(heightVal),
|
|
25906
26066
|
enableRtl: this.parent.enableRtl,
|
|
25907
|
-
cssClass: this.parent.
|
|
26067
|
+
cssClass: this.parent.getCssClass(),
|
|
25908
26068
|
input: (e) => {
|
|
25909
26069
|
this.inputHeightValue = formatUnit(this.inputValue(e.value));
|
|
25910
26070
|
}
|
|
@@ -25975,16 +26135,16 @@ class Image$1 {
|
|
|
25975
26135
|
save = e.selection;
|
|
25976
26136
|
selectParent = e.selectParent;
|
|
25977
26137
|
}
|
|
25978
|
-
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' +
|
|
26138
|
+
const uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + this.parent.getCssClass(true) });
|
|
25979
26139
|
const deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
25980
26140
|
const imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
25981
|
-
const span = this.parent.createElement('span', { className: 'e-droptext' +
|
|
26141
|
+
const span = this.parent.createElement('span', { className: 'e-droptext' + this.parent.getCssClass(true) });
|
|
25982
26142
|
const spanMsg = this.parent.createElement('span', {
|
|
25983
|
-
className: 'e-rte-upload-text' +
|
|
26143
|
+
className: 'e-rte-upload-text' + this.parent.getCssClass(true), innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
25984
26144
|
});
|
|
25985
26145
|
span.appendChild(spanMsg);
|
|
25986
26146
|
const btnEle = this.parent.createElement('button', {
|
|
25987
|
-
className: 'e-browsebtn' +
|
|
26147
|
+
className: 'e-browsebtn' + this.parent.getCssClass(true), id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
25988
26148
|
});
|
|
25989
26149
|
span.appendChild(btnEle);
|
|
25990
26150
|
uploadParentEle.appendChild(span);
|
|
@@ -25996,7 +26156,7 @@ class Image$1 {
|
|
|
25996
26156
|
const btnClick = (Browser.isDevice) ? span : btnEle;
|
|
25997
26157
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
25998
26158
|
const uploadEle = this.parent.createElement('input', {
|
|
25999
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.
|
|
26159
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.getCssClass()
|
|
26000
26160
|
});
|
|
26001
26161
|
uploadParentEle.appendChild(uploadEle);
|
|
26002
26162
|
let altText;
|
|
@@ -26004,7 +26164,7 @@ class Image$1 {
|
|
|
26004
26164
|
let filesData;
|
|
26005
26165
|
this.uploadObj = new Uploader({
|
|
26006
26166
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
26007
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
26167
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
26008
26168
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26009
26169
|
selected: (e) => {
|
|
26010
26170
|
proxy.isImgUploaded = true;
|
|
@@ -26077,9 +26237,9 @@ class Image$1 {
|
|
|
26077
26237
|
failure: (e) => {
|
|
26078
26238
|
this.parent.trigger(imageUploadFailed, e);
|
|
26079
26239
|
},
|
|
26080
|
-
removing: () => {
|
|
26240
|
+
removing: (removeEventArgs) => {
|
|
26081
26241
|
// eslint-disable-next-line
|
|
26082
|
-
this.parent.trigger(imageRemoving,
|
|
26242
|
+
this.parent.trigger(imageRemoving, removeEventArgs, (e) => {
|
|
26083
26243
|
proxy.isImgUploaded = false;
|
|
26084
26244
|
this.dialogObj.getButtons(0).element.disabled = true;
|
|
26085
26245
|
proxy.inputUrl.removeAttribute('disabled');
|
|
@@ -26364,7 +26524,7 @@ class Image$1 {
|
|
|
26364
26524
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
26365
26525
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
26366
26526
|
},
|
|
26367
|
-
cssClass: CLS_RTE_DIALOG_UPLOAD +
|
|
26527
|
+
cssClass: CLS_RTE_DIALOG_UPLOAD + this.parent.getCssClass(true),
|
|
26368
26528
|
dropArea: this.parent.element,
|
|
26369
26529
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26370
26530
|
removing: () => {
|
|
@@ -26567,10 +26727,10 @@ class Image$1 {
|
|
|
26567
26727
|
*/
|
|
26568
26728
|
/* eslint-enable */
|
|
26569
26729
|
destroy() {
|
|
26570
|
-
this.prevSelectedImgEle = undefined;
|
|
26571
26730
|
if (isNullOrUndefined(this.parent)) {
|
|
26572
26731
|
return;
|
|
26573
26732
|
}
|
|
26733
|
+
this.prevSelectedImgEle = undefined;
|
|
26574
26734
|
this.removeEventListener();
|
|
26575
26735
|
}
|
|
26576
26736
|
moduleDestroy() {
|
|
@@ -28860,7 +29020,7 @@ class ViewSource {
|
|
|
28860
29020
|
this.parent.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.onKeyDown);
|
|
28861
29021
|
}
|
|
28862
29022
|
getSourceCode() {
|
|
28863
|
-
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA +
|
|
29023
|
+
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA + this.parent.getCssClass(true) });
|
|
28864
29024
|
}
|
|
28865
29025
|
wireEvent(element) {
|
|
28866
29026
|
this.keyboardModule = new KeyboardEvents$1(element, {
|
|
@@ -28957,8 +29117,10 @@ class ViewSource {
|
|
|
28957
29117
|
this.getPanel().style.display = 'block';
|
|
28958
29118
|
}
|
|
28959
29119
|
else {
|
|
29120
|
+
const height = this.parent.inputElement.offsetHeight;
|
|
28960
29121
|
this.contentModule.getPanel().appendChild(this.previewElement);
|
|
28961
29122
|
this.getPanel().value = this.getTextAreaValue();
|
|
29123
|
+
this.previewElement.style.height = height + 'px';
|
|
28962
29124
|
this.contentModule.getEditPanel().style.display = 'none';
|
|
28963
29125
|
this.previewElement.style.display = 'block';
|
|
28964
29126
|
}
|
|
@@ -29120,6 +29282,7 @@ class Table {
|
|
|
29120
29282
|
this.parent.on(showTableDialog, this.showDialog, this);
|
|
29121
29283
|
this.parent.on(closeTableDialog, this.closeDialog, this);
|
|
29122
29284
|
this.parent.on(docClick, this.docClick, this);
|
|
29285
|
+
this.parent.on(iframeMouseDown, this.onIframeMouseDown, this);
|
|
29123
29286
|
this.parent.on(editAreaClick, this.editAreaClickHandler, this);
|
|
29124
29287
|
this.parent.on(clearDialogObj, this.clearDialogObj, this);
|
|
29125
29288
|
this.parent.on(tableToolbarAction, this.onToolbarAction, this);
|
|
@@ -29140,6 +29303,7 @@ class Table {
|
|
|
29140
29303
|
this.parent.off(initialEnd, this.afterRender);
|
|
29141
29304
|
this.parent.off(dynamicModule, this.afterRender);
|
|
29142
29305
|
this.parent.off(docClick, this.docClick);
|
|
29306
|
+
this.parent.off(iframeMouseDown, this.onIframeMouseDown);
|
|
29143
29307
|
this.parent.off(showTableDialog, this.showDialog);
|
|
29144
29308
|
this.parent.off(closeTableDialog, this.closeDialog);
|
|
29145
29309
|
this.parent.off(editAreaClick, this.editAreaClickHandler);
|
|
@@ -29148,8 +29312,8 @@ class Table {
|
|
|
29148
29312
|
this.parent.off(dropDownSelect, this.dropdownSelect);
|
|
29149
29313
|
this.parent.off(mouseDown, this.cellSelect);
|
|
29150
29314
|
this.parent.off(tableColorPickerChanged, this.setBGColor);
|
|
29151
|
-
this.parent.off(keyUp, this.keyUp);
|
|
29152
29315
|
this.parent.off(keyDown, this.keyDown);
|
|
29316
|
+
this.parent.off(keyUp, this.keyUp);
|
|
29153
29317
|
this.parent.off(mouseUp, this.selectionTable);
|
|
29154
29318
|
this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
|
|
29155
29319
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
@@ -29345,11 +29509,12 @@ class Table {
|
|
|
29345
29509
|
name: !isInternal ? 'showDialog' : null
|
|
29346
29510
|
};
|
|
29347
29511
|
this.insertTableDialog({ self: this, args: args, selection: selection });
|
|
29512
|
+
this.parent.formatter.editorManager.nodeSelection.restore();
|
|
29348
29513
|
}
|
|
29349
29514
|
}
|
|
29350
29515
|
showDialog() {
|
|
29351
29516
|
this.openDialog(false);
|
|
29352
|
-
this.setCssClass({ cssClass: this.parent.
|
|
29517
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
29353
29518
|
}
|
|
29354
29519
|
closeDialog() {
|
|
29355
29520
|
if (this.editdlgObj) {
|
|
@@ -29539,6 +29704,10 @@ class Table {
|
|
|
29539
29704
|
tableHeader(selection, e) {
|
|
29540
29705
|
this.parent.formatter.process(this.parent, e, e.originalEvent, { selection: selection, subCommand: e.item.subCommand });
|
|
29541
29706
|
}
|
|
29707
|
+
getAnchorNode(element) {
|
|
29708
|
+
const selectParent = closest(element, 'a');
|
|
29709
|
+
return (selectParent ? selectParent : element);
|
|
29710
|
+
}
|
|
29542
29711
|
editAreaClickHandler(e) {
|
|
29543
29712
|
if (this.parent.readonly || !isNullOrUndefined(closest(e.args.target, '.e-img-caption'))) {
|
|
29544
29713
|
return;
|
|
@@ -29560,7 +29729,8 @@ class Table {
|
|
|
29560
29729
|
const closestTable = closest(target, 'table');
|
|
29561
29730
|
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
29562
29731
|
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
29563
|
-
|
|
29732
|
+
const isAnchorEle = this.getAnchorNode(target);
|
|
29733
|
+
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
29564
29734
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
29565
29735
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
29566
29736
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
@@ -29746,7 +29916,7 @@ class Table {
|
|
|
29746
29916
|
this.contentModule.getEditPanel().appendChild(rowReEle);
|
|
29747
29917
|
}
|
|
29748
29918
|
const tableReBox = this.parent.createElement('span', {
|
|
29749
|
-
className: CLS_TB_BOX_RES +
|
|
29919
|
+
className: CLS_TB_BOX_RES + this.parent.getCssClass(true), attrs: {
|
|
29750
29920
|
'data-col': columns.length.toString(), 'unselectable': 'on', 'contenteditable': 'false'
|
|
29751
29921
|
}
|
|
29752
29922
|
});
|
|
@@ -29898,7 +30068,7 @@ class Table {
|
|
|
29898
30068
|
}
|
|
29899
30069
|
appendHelper() {
|
|
29900
30070
|
this.helper = this.parent.createElement('div', {
|
|
29901
|
-
className: 'e-table-rhelper' +
|
|
30071
|
+
className: 'e-table-rhelper' + this.parent.getCssClass(true)
|
|
29902
30072
|
});
|
|
29903
30073
|
if (Browser.isDevice) {
|
|
29904
30074
|
this.helper.classList.add('e-reicon');
|
|
@@ -30257,16 +30427,16 @@ class Table {
|
|
|
30257
30427
|
this.hideTableQuickToolbar();
|
|
30258
30428
|
const header = '1X1';
|
|
30259
30429
|
const insertbtn = this.l10n.getConstant('inserttablebtn');
|
|
30260
|
-
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' +
|
|
30261
|
-
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' +
|
|
30430
|
+
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
|
|
30431
|
+
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
|
|
30262
30432
|
this.tblHeader.innerHTML = header;
|
|
30263
30433
|
this.dlgDiv.appendChild(this.tblHeader);
|
|
30264
|
-
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' +
|
|
30434
|
+
const tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' + this.parent.getCssClass(true) });
|
|
30265
30435
|
this.drawTable(tableDiv, args);
|
|
30266
30436
|
this.dlgDiv.appendChild(tableDiv);
|
|
30267
|
-
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' +
|
|
30437
|
+
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' + this.parent.getCssClass(true) }));
|
|
30268
30438
|
const btnEle = this.parent.createElement('button', {
|
|
30269
|
-
className: 'e-insert-table-btn' +
|
|
30439
|
+
className: 'e-insert-table-btn' + this.parent.getCssClass(true), id: this.rteID + '_insertTable',
|
|
30270
30440
|
attrs: { type: 'button', tabindex: '0' }
|
|
30271
30441
|
});
|
|
30272
30442
|
if (!isNullOrUndefined(this.parent.getToolbarElement().querySelector('.e-expended-nav'))) {
|
|
@@ -30274,7 +30444,7 @@ class Table {
|
|
|
30274
30444
|
}
|
|
30275
30445
|
this.dlgDiv.appendChild(btnEle);
|
|
30276
30446
|
this.createTableButton = new Button({
|
|
30277
|
-
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' +
|
|
30447
|
+
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' + this.parent.getCssClass(true),
|
|
30278
30448
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
30279
30449
|
});
|
|
30280
30450
|
this.createTableButton.isStringTemplate = true;
|
|
@@ -30302,10 +30472,15 @@ class Table {
|
|
|
30302
30472
|
});
|
|
30303
30473
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
30304
30474
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
30305
|
-
addClass([this.popupObj.element], this.parent.
|
|
30475
|
+
addClass([this.popupObj.element], this.parent.getCssClass());
|
|
30306
30476
|
}
|
|
30307
30477
|
this.popupObj.refreshPosition(target);
|
|
30308
30478
|
}
|
|
30479
|
+
onIframeMouseDown() {
|
|
30480
|
+
if (this.popupObj) {
|
|
30481
|
+
this.popupObj.hide();
|
|
30482
|
+
}
|
|
30483
|
+
}
|
|
30309
30484
|
docClick(e) {
|
|
30310
30485
|
const target = e.args.target;
|
|
30311
30486
|
// eslint-disable-next-line
|
|
@@ -30342,10 +30517,10 @@ class Table {
|
|
|
30342
30517
|
let rowDiv;
|
|
30343
30518
|
let tableCell;
|
|
30344
30519
|
for (let row = 0; row < 3; row++) {
|
|
30345
|
-
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' +
|
|
30520
|
+
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' + this.parent.getCssClass(true), attrs: { 'data-column': '' + row } });
|
|
30346
30521
|
for (let col = 0; col < 10; col++) {
|
|
30347
30522
|
const display = (row > 2) ? 'none' : 'inline-block';
|
|
30348
|
-
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' +
|
|
30523
|
+
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' + this.parent.getCssClass(true), attrs: { 'data-cell': '' + col } });
|
|
30349
30524
|
rowDiv.appendChild(tableCell);
|
|
30350
30525
|
tableCell.style.display = display;
|
|
30351
30526
|
if (col === 0 && row === 0) {
|
|
@@ -30368,13 +30543,13 @@ class Table {
|
|
|
30368
30543
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
30369
30544
|
buttons: [{
|
|
30370
30545
|
click: this.applyProperties.bind(this, args),
|
|
30371
|
-
buttonModel: { content: update, cssClass: 'e-flat e-size-update' +
|
|
30546
|
+
buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
|
|
30372
30547
|
},
|
|
30373
30548
|
{
|
|
30374
30549
|
click: (e) => {
|
|
30375
30550
|
this.cancelDialog(e);
|
|
30376
30551
|
},
|
|
30377
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30552
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30378
30553
|
}],
|
|
30379
30554
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
30380
30555
|
});
|
|
@@ -30416,10 +30591,10 @@ class Table {
|
|
|
30416
30591
|
tableCellDlgContent() {
|
|
30417
30592
|
const tableColumn = this.l10n.getConstant('columns');
|
|
30418
30593
|
const tableRow = this.l10n.getConstant('rows');
|
|
30419
|
-
const tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' +
|
|
30420
|
-
const content = '<div class="e-rte-field' +
|
|
30421
|
-
+ ' data-role ="none" id="tableColumn" class="e-table-column' +
|
|
30422
|
-
+ '<div class="e-rte-field' +
|
|
30594
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' + this.parent.getCssClass(true) });
|
|
30595
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" '
|
|
30596
|
+
+ ' data-role ="none" id="tableColumn" class="e-table-column' + this.parent.getCssClass(true) + '"/></div>'
|
|
30597
|
+
+ '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="tableRow" class="e-table-row' + this.parent.getCssClass(true) + '" /></div>';
|
|
30423
30598
|
const contentElem = parseHtml(content);
|
|
30424
30599
|
tableWrap.appendChild(contentElem);
|
|
30425
30600
|
this.columnTextBox = new NumericTextBox({
|
|
@@ -30430,7 +30605,7 @@ class Table {
|
|
|
30430
30605
|
floatLabelType: 'Auto',
|
|
30431
30606
|
max: 50,
|
|
30432
30607
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30433
|
-
cssClass: this.parent.
|
|
30608
|
+
cssClass: this.parent.getCssClass()
|
|
30434
30609
|
});
|
|
30435
30610
|
this.columnTextBox.isStringTemplate = true;
|
|
30436
30611
|
this.columnTextBox.appendTo(tableWrap.querySelector('#tableColumn'));
|
|
@@ -30442,7 +30617,7 @@ class Table {
|
|
|
30442
30617
|
floatLabelType: 'Auto',
|
|
30443
30618
|
max: 1000,
|
|
30444
30619
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30445
|
-
cssClass: this.parent.
|
|
30620
|
+
cssClass: this.parent.getCssClass()
|
|
30446
30621
|
});
|
|
30447
30622
|
this.rowTextBox.isStringTemplate = true;
|
|
30448
30623
|
this.rowTextBox.appendTo(tableWrap.querySelector('#tableRow'));
|
|
@@ -30462,7 +30637,7 @@ class Table {
|
|
|
30462
30637
|
return;
|
|
30463
30638
|
}
|
|
30464
30639
|
const tableDialog = this.parent.createElement('div', {
|
|
30465
|
-
className: 'e-rte-edit-table' +
|
|
30640
|
+
className: 'e-rte-edit-table' + this.parent.getCssClass(true), id: this.rteID + '_tabledialog'
|
|
30466
30641
|
});
|
|
30467
30642
|
this.parent.element.appendChild(tableDialog);
|
|
30468
30643
|
const insert = this.l10n.getConstant('dialogInsert');
|
|
@@ -30470,20 +30645,20 @@ class Table {
|
|
|
30470
30645
|
const header = this.l10n.getConstant('tabledialogHeader');
|
|
30471
30646
|
const dialogModel = {
|
|
30472
30647
|
header: header,
|
|
30473
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
30648
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
30474
30649
|
enableRtl: this.parent.enableRtl,
|
|
30475
30650
|
locale: this.parent.locale,
|
|
30476
30651
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'initial',
|
|
30477
30652
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
30478
30653
|
isModal: Browser.isDevice,
|
|
30479
30654
|
buttons: [{
|
|
30480
|
-
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' +
|
|
30655
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
|
|
30481
30656
|
},
|
|
30482
30657
|
{
|
|
30483
30658
|
click: (e) => {
|
|
30484
30659
|
this.cancelDialog(e);
|
|
30485
30660
|
},
|
|
30486
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30661
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30487
30662
|
}],
|
|
30488
30663
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
30489
30664
|
animationSettings: { effect: 'None' },
|
|
@@ -30556,13 +30731,13 @@ class Table {
|
|
|
30556
30731
|
const tableWidth = this.l10n.getConstant('tableWidth');
|
|
30557
30732
|
const cellPadding = this.l10n.getConstant('cellpadding');
|
|
30558
30733
|
const cellSpacing = this.l10n.getConstant('cellspacing');
|
|
30559
|
-
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' +
|
|
30734
|
+
const tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' + this.parent.getCssClass(true) });
|
|
30560
30735
|
const widthVal = closest(selectNode, 'table').getClientRects()[0].width;
|
|
30561
30736
|
const padVal = closest(selectNode, 'td').style.padding;
|
|
30562
30737
|
const brdSpcVal = closest(selectNode, 'table').getAttribute('cellspacing');
|
|
30563
|
-
const content = '<div class="e-rte-field' +
|
|
30564
|
-
+ ' /></div>' + '<div class="e-rte-field' +
|
|
30565
|
-
+ ' </div><div class="e-rte-field' +
|
|
30738
|
+
const content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="tableWidth" class="e-table-width' + this.parent.getCssClass(true) + '" '
|
|
30739
|
+
+ ' /></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="cellPadding" class="e-cell-padding' + this.parent.getCssClass(true) + '" />'
|
|
30740
|
+
+ ' </div><div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing' + this.parent.getCssClass(true) + '" /></div>';
|
|
30566
30741
|
const contentElem = parseHtml(content);
|
|
30567
30742
|
tableWrap.appendChild(contentElem);
|
|
30568
30743
|
this.tableWidthNum = new NumericTextBox({
|
|
@@ -30708,7 +30883,16 @@ class DialogRenderer {
|
|
|
30708
30883
|
getDialogPosition() {
|
|
30709
30884
|
let distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
30710
30885
|
if (distanceFromVisibleTop < 0) {
|
|
30711
|
-
|
|
30886
|
+
let topHeight = 0;
|
|
30887
|
+
let parentElement = this.parent.element;
|
|
30888
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
30889
|
+
const top = parentElement.getBoundingClientRect().top;
|
|
30890
|
+
if (top > 0) {
|
|
30891
|
+
topHeight = top;
|
|
30892
|
+
}
|
|
30893
|
+
parentElement = parentElement.parentElement;
|
|
30894
|
+
}
|
|
30895
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
30712
30896
|
return distanceFromVisibleTop.toString();
|
|
30713
30897
|
}
|
|
30714
30898
|
else {
|
|
@@ -30925,12 +31109,12 @@ const executeGroup = {
|
|
|
30925
31109
|
}
|
|
30926
31110
|
};
|
|
30927
31111
|
|
|
30928
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
30929
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
30930
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30931
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
30932
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30933
|
-
};
|
|
31112
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31113
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31114
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31115
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31116
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31117
|
+
};
|
|
30934
31118
|
/**
|
|
30935
31119
|
* Configures the toolbar settings of the RichTextEditor.
|
|
30936
31120
|
*/
|
|
@@ -31320,12 +31504,12 @@ __decorate$2([
|
|
|
31320
31504
|
Property(bulletFormatList)
|
|
31321
31505
|
], BulletFormatList.prototype, "types", void 0);
|
|
31322
31506
|
|
|
31323
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31324
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31325
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31326
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31327
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31328
|
-
};
|
|
31507
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31508
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31509
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31510
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31511
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31512
|
+
};
|
|
31329
31513
|
/**
|
|
31330
31514
|
* Objects used for configuring the iframe resources properties.
|
|
31331
31515
|
*/
|
|
@@ -31352,12 +31536,12 @@ __decorate$3([
|
|
|
31352
31536
|
Complex({}, Resources)
|
|
31353
31537
|
], IFrameSettings.prototype, "resources", void 0);
|
|
31354
31538
|
|
|
31355
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31356
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31357
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31358
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31359
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31360
|
-
};
|
|
31539
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31540
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31541
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31542
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31543
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31544
|
+
};
|
|
31361
31545
|
/**
|
|
31362
31546
|
* Configures the inlineMode property of the RTE.
|
|
31363
31547
|
*/
|
|
@@ -31605,7 +31789,8 @@ class EnterKeyAction {
|
|
|
31605
31789
|
}
|
|
31606
31790
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
31607
31791
|
}
|
|
31608
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
31792
|
+
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
31793
|
+
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
31609
31794
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
31610
31795
|
const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, false).cloneNode(true);
|
|
31611
31796
|
this.parent.formatter.editorManager.domNode.insertAfter(newElem, nearBlockNode);
|
|
@@ -31862,12 +32047,12 @@ class EnterKeyAction {
|
|
|
31862
32047
|
}
|
|
31863
32048
|
}
|
|
31864
32049
|
|
|
31865
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31866
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31867
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31868
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31869
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31870
|
-
};
|
|
32050
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
32051
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32052
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
32053
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
32054
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32055
|
+
};
|
|
31871
32056
|
/**
|
|
31872
32057
|
* Represents the Rich Text Editor component.
|
|
31873
32058
|
* ```html
|
|
@@ -32199,7 +32384,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32199
32384
|
if (tool.command === 'InsertText') {
|
|
32200
32385
|
currentInsertContentLength = value.length;
|
|
32201
32386
|
}
|
|
32202
|
-
const currentLength = this.getText().trim().length;
|
|
32387
|
+
const currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32203
32388
|
const selectionLength = this.getSelection().length;
|
|
32204
32389
|
const totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
32205
32390
|
if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
|
|
@@ -32374,7 +32559,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32374
32559
|
if (this.enableXhtml) {
|
|
32375
32560
|
this.setProperties({ value: this.getXhtml() }, true);
|
|
32376
32561
|
}
|
|
32377
|
-
if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNullOrUndefined(this.getToolbar()) &&
|
|
32562
|
+
if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNullOrUndefined(this.getToolbar()) &&
|
|
32378
32563
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
32379
32564
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
32380
32565
|
}
|
|
@@ -32384,7 +32569,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32384
32569
|
}
|
|
32385
32570
|
// eslint-disable-next-line
|
|
32386
32571
|
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
32387
|
-
this.notify(bindCssClass, { cssClass: this.
|
|
32572
|
+
this.notify(bindCssClass, { cssClass: this.getCssClass() });
|
|
32388
32573
|
this.addAudioVideoWrapper();
|
|
32389
32574
|
this.notify(tableclass, {});
|
|
32390
32575
|
this.renderComplete();
|
|
@@ -32474,7 +32659,13 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32474
32659
|
range.endContainer;
|
|
32475
32660
|
const closestLI = closest(endNode, 'LI');
|
|
32476
32661
|
let isDetached = false;
|
|
32477
|
-
|
|
32662
|
+
let currentRangeEndOffset = range.endOffset;
|
|
32663
|
+
if (currentEndContainer.nodeType === Node.TEXT_NODE) {
|
|
32664
|
+
if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
|
|
32665
|
+
currentRangeEndOffset--;
|
|
32666
|
+
}
|
|
32667
|
+
}
|
|
32668
|
+
if (!isNullOrUndefined(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
|
|
32478
32669
|
!range.collapsed && isNullOrUndefined(endNode.nextElementSibling)) {
|
|
32479
32670
|
for (let i = 0; i < closestLI.childNodes.length; i++) {
|
|
32480
32671
|
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
@@ -32553,7 +32744,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32553
32744
|
}
|
|
32554
32745
|
const notFormatPainterCopy = isNullOrUndefined(e.action) ? true : (e.action !== 'format-copy' ? true : false);
|
|
32555
32746
|
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
|
|
32556
|
-
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which
|
|
32747
|
+
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
|
|
32557
32748
|
this.formatter.saveData();
|
|
32558
32749
|
}
|
|
32559
32750
|
if (e.action !== 'insert-link' &&
|
|
@@ -32622,7 +32813,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32622
32813
|
this.formatter.onKeyHandler(this, e);
|
|
32623
32814
|
}
|
|
32624
32815
|
if (this.inputElement && this.inputElement.textContent.length !== 0
|
|
32625
|
-
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
|
|
32816
|
+
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
|
|
32626
32817
|
this.notify(toolbarRefresh, { args: e });
|
|
32627
32818
|
}
|
|
32628
32819
|
if (!isNullOrUndefined(this.placeholder)) {
|
|
@@ -32714,20 +32905,61 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32714
32905
|
return;
|
|
32715
32906
|
}
|
|
32716
32907
|
}
|
|
32717
|
-
this.notifyMouseUp(e);
|
|
32718
32908
|
if (e.detail === 3) {
|
|
32719
32909
|
const range = this.getRange();
|
|
32720
32910
|
const selection = this.formatter.editorManager.domNode.getSelection();
|
|
32721
|
-
|
|
32722
|
-
|
|
32723
|
-
|
|
32724
|
-
|
|
32725
|
-
|
|
32726
|
-
|
|
32727
|
-
|
|
32911
|
+
// To handle the triple click node selection improper range due to browser behavior.
|
|
32912
|
+
if (selection.rangeCount > 0 && !isNullOrUndefined(range.startContainer.parentElement) && (!isNullOrUndefined(range.startContainer.parentElement.nextSibling) &&
|
|
32913
|
+
(range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
|
|
32914
|
+
/\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
|
|
32915
|
+
|| range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
|
|
32916
|
+
const newRange = new Range();
|
|
32917
|
+
let start = range.startContainer;
|
|
32918
|
+
let end = range.endContainer;
|
|
32919
|
+
let isInvalid = false;
|
|
32920
|
+
const isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
|
|
32921
|
+
|| range.commonAncestorContainer.nodeName === 'LI';
|
|
32922
|
+
if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
|
|
32923
|
+
end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
|
|
32924
|
+
}
|
|
32925
|
+
else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
|
|
32926
|
+
if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
|
|
32927
|
+
end = end.previousElementSibling.lastElementChild;
|
|
32928
|
+
}
|
|
32929
|
+
else {
|
|
32930
|
+
end = closest(end.parentElement, 'li');
|
|
32931
|
+
if (end && end.nodeName === 'LI') {
|
|
32932
|
+
end = end.previousElementSibling;
|
|
32933
|
+
}
|
|
32934
|
+
}
|
|
32728
32935
|
}
|
|
32936
|
+
else {
|
|
32937
|
+
if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
|
|
32938
|
+
end.previousElementSibling.textContent.trim().length > 0) {
|
|
32939
|
+
end = end.previousElementSibling.lastChild;
|
|
32940
|
+
}
|
|
32941
|
+
else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
|
|
32942
|
+
end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
|
|
32943
|
+
}
|
|
32944
|
+
}
|
|
32945
|
+
if (!end || end === this.inputElement) {
|
|
32946
|
+
end = start;
|
|
32947
|
+
isInvalid = true;
|
|
32948
|
+
}
|
|
32949
|
+
while (end.nodeName !== '#text' && !isInvalid) {
|
|
32950
|
+
if (end.lastElementChild) {
|
|
32951
|
+
end = end.lastElementChild;
|
|
32952
|
+
}
|
|
32953
|
+
else {
|
|
32954
|
+
end = end.lastChild;
|
|
32955
|
+
}
|
|
32956
|
+
}
|
|
32957
|
+
newRange.setStart(start, 0);
|
|
32958
|
+
newRange.setEnd(end, end.textContent.length);
|
|
32959
|
+
this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
|
|
32729
32960
|
}
|
|
32730
32961
|
}
|
|
32962
|
+
this.notifyMouseUp(e);
|
|
32731
32963
|
}
|
|
32732
32964
|
/**
|
|
32733
32965
|
* @param {Function} module - specifies the module function.
|
|
@@ -32770,7 +33002,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
32770
33002
|
const currentLength = this.inputElement.textContent.length;
|
|
32771
33003
|
const selectionLength = this.getSelection().length;
|
|
32772
33004
|
const pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
32773
|
-
? 0 : e.clipboardData.getData('text/plain').length;
|
|
33005
|
+
? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32774
33006
|
const totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
32775
33007
|
if (this.editorMode === 'Markdown') {
|
|
32776
33008
|
const args = { requestType: 'Paste', editorMode: this.editorMode, event: e };
|
|
@@ -33201,7 +33433,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33201
33433
|
updatePanelValue() {
|
|
33202
33434
|
let value = this.value;
|
|
33203
33435
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
33204
|
-
const getTextArea = this.element.querySelector('.
|
|
33436
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33205
33437
|
if (value) {
|
|
33206
33438
|
if (getTextArea && getTextArea.style.display === 'block') {
|
|
33207
33439
|
getTextArea.value = this.value;
|
|
@@ -33830,6 +34062,16 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33830
34062
|
getID() {
|
|
33831
34063
|
return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
|
|
33832
34064
|
}
|
|
34065
|
+
/**
|
|
34066
|
+
* @returns {void}
|
|
34067
|
+
* getCssClass method
|
|
34068
|
+
*
|
|
34069
|
+
* @hidden
|
|
34070
|
+
* @deprecated
|
|
34071
|
+
*/
|
|
34072
|
+
getCssClass(isSpace) {
|
|
34073
|
+
return (isNullOrUndefined(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
|
|
34074
|
+
}
|
|
33833
34075
|
mouseDownHandler(e) {
|
|
33834
34076
|
const touch = (e.touches ? e.changedTouches[0] : e);
|
|
33835
34077
|
addClass([this.element], [CLS_FOCUS]);
|
|
@@ -33941,7 +34183,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33941
34183
|
}
|
|
33942
34184
|
getUpdatedValue() {
|
|
33943
34185
|
let value;
|
|
33944
|
-
const getTextArea = this.element.querySelector('.
|
|
34186
|
+
const getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33945
34187
|
if (this.editorMode === 'HTML') {
|
|
33946
34188
|
value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
|
|
33947
34189
|
this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
|
|
@@ -33972,6 +34214,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
33972
34214
|
clearTimeout(this.idleInterval);
|
|
33973
34215
|
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
33974
34216
|
}
|
|
34217
|
+
cleanupResizeElements(args) {
|
|
34218
|
+
const value = this.removeResizeElement(args.value);
|
|
34219
|
+
return value;
|
|
34220
|
+
}
|
|
33975
34221
|
removeResizeElement(value) {
|
|
33976
34222
|
let valueElementWrapper = document.createElement("div");
|
|
33977
34223
|
valueElementWrapper.innerHTML = value;
|
|
@@ -34190,6 +34436,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34190
34436
|
this.on(contentChanged, this.contentChanged, this);
|
|
34191
34437
|
this.on(resizeInitialized, this.updateResizeFlag, this);
|
|
34192
34438
|
this.on(updateTbItemsStatus, this.updateStatus, this);
|
|
34439
|
+
this.on(cleanupResizeElements, this.cleanupResizeElements, this);
|
|
34193
34440
|
if (this.readonly && this.enabled) {
|
|
34194
34441
|
return;
|
|
34195
34442
|
}
|
|
@@ -34276,6 +34523,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
34276
34523
|
this.off(contentChanged, this.contentChanged);
|
|
34277
34524
|
this.off(resizeInitialized, this.updateResizeFlag);
|
|
34278
34525
|
this.off(updateTbItemsStatus, this.updateStatus);
|
|
34526
|
+
this.off(cleanupResizeElements, this.cleanupResizeElements);
|
|
34279
34527
|
if (this.readonly && this.enabled) {
|
|
34280
34528
|
return;
|
|
34281
34529
|
}
|
|
@@ -34647,5 +34895,5 @@ RichTextEditor = __decorate$1([
|
|
|
34647
34895
|
* Rich Text Editor component exported items
|
|
34648
34896
|
*/
|
|
34649
34897
|
|
|
34650
|
-
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker,
|
|
34898
|
+
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_AUD_FOCUS, CLS_VID_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS };
|
|
34651
34899
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|