@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,12 +738,17 @@ var emojiPicker = 'emojiPicker';
|
|
|
738
738
|
* @hidden
|
|
739
739
|
* @deprecated
|
|
740
740
|
*/
|
|
741
|
-
var
|
|
741
|
+
var destroyTooltip = 'destroyTooltip';
|
|
742
742
|
/**
|
|
743
743
|
* @hidden
|
|
744
744
|
* @deprecated
|
|
745
745
|
*/
|
|
746
746
|
var hidePopup = 'hidePopup';
|
|
747
|
+
/**
|
|
748
|
+
* @hidden
|
|
749
|
+
* @deprecated
|
|
750
|
+
*/
|
|
751
|
+
var cleanupResizeElements = 'cleanupResizeElements';
|
|
747
752
|
/**
|
|
748
753
|
* @hidden
|
|
749
754
|
* @deprecated
|
|
@@ -833,6 +838,11 @@ var CLS_FULL_SCREEN = 'e-rte-full-screen';
|
|
|
833
838
|
* @deprecated
|
|
834
839
|
*/
|
|
835
840
|
var CLS_QUICK_TB = 'e-rte-quick-toolbar';
|
|
841
|
+
/**
|
|
842
|
+
* @hidden
|
|
843
|
+
* @deprecated
|
|
844
|
+
*/
|
|
845
|
+
var CLS_TEXT_QUICK_TB = 'e-rte-text-quicktoolbar';
|
|
836
846
|
/**
|
|
837
847
|
* @hidden
|
|
838
848
|
* @deprecated
|
|
@@ -2210,7 +2220,7 @@ var windowKeys = {
|
|
|
2210
2220
|
'Number Format List': 'Ctrl+Shift+O',
|
|
2211
2221
|
'Bullet Format List': 'Ctrl+Alt+O',
|
|
2212
2222
|
'Insert Audio': 'Ctrl+Shift+A',
|
|
2213
|
-
'Insert Video': 'Ctrl+
|
|
2223
|
+
'Insert Video': 'Ctrl+Alt+V',
|
|
2214
2224
|
'Increase Indent': 'Ctrl+]',
|
|
2215
2225
|
'Decrease Indent': 'Ctrl+[',
|
|
2216
2226
|
'Decrease Fontsize': 'Ctrl+Shift+<',
|
|
@@ -2631,6 +2641,7 @@ var toolsLocale = {
|
|
|
2631
2641
|
'bulletformatlist': 'bulletFormatList',
|
|
2632
2642
|
'undo': 'undo',
|
|
2633
2643
|
'redo': 'redo',
|
|
2644
|
+
'filemanager': 'fileManager',
|
|
2634
2645
|
'superscript': 'superscript',
|
|
2635
2646
|
'subscript': 'subscript',
|
|
2636
2647
|
'createlink': 'createLink',
|
|
@@ -2697,6 +2708,7 @@ var toolsLocale = {
|
|
|
2697
2708
|
'emojiPickerTypeToFind': 'Type to find',
|
|
2698
2709
|
'emojiPickerNoResultFound': 'No results found',
|
|
2699
2710
|
'emojiPickerTrySomethingElse': 'Try something else',
|
|
2711
|
+
'ImageLinkAriaLabel': 'Open in new window',
|
|
2700
2712
|
};
|
|
2701
2713
|
var fontNameLocale = [
|
|
2702
2714
|
{ locale: 'fontNameSegoeUI', value: 'Segoe UI' },
|
|
@@ -2993,11 +3005,11 @@ function getTBarItemsIndex(items, toolbarItems) {
|
|
|
2993
3005
|
continue;
|
|
2994
3006
|
}
|
|
2995
3007
|
else {
|
|
2996
|
-
if (items[i] === 'OrderedList' && toolbarItems[j].subCommand === 'OL') {
|
|
3008
|
+
if ((items[i] === 'OrderedList' || items[i] === 'NumberFormatList') && toolbarItems[j].subCommand === 'OL') {
|
|
2997
3009
|
itemsIndex.push(j);
|
|
2998
3010
|
break;
|
|
2999
3011
|
}
|
|
3000
|
-
else if (items[i] === 'UnorderedList' && toolbarItems[j].subCommand === 'UL') {
|
|
3012
|
+
else if ((items[i] === 'UnorderedList' || items[i] === 'BulletFormatList') && toolbarItems[j].subCommand === 'UL') {
|
|
3001
3013
|
itemsIndex.push(j);
|
|
3002
3014
|
break;
|
|
3003
3015
|
}
|
|
@@ -3150,6 +3162,15 @@ function updateTextNode(value, rteObj) {
|
|
|
3150
3162
|
for (var i = 0; i < emptyBlockElem.length; i++) {
|
|
3151
3163
|
emptyBlockElem[i].innerHTML = '<br>';
|
|
3152
3164
|
}
|
|
3165
|
+
// To handle the Empty block node with \n
|
|
3166
|
+
var allPNodes = tempNode.querySelectorAll('p');
|
|
3167
|
+
for (var i = 0; i < allPNodes.length; i++) {
|
|
3168
|
+
if (allPNodes[i].textContent.trim().length === 0 && allPNodes[i].childNodes.length === 1
|
|
3169
|
+
&& allPNodes[i].childNodes[0].nodeName === '#text' &&
|
|
3170
|
+
isNullOrUndefined(allPNodes[i].childNodes[0].textContent.match(/\u00a0/g))) {
|
|
3171
|
+
allPNodes[i].innerHTML = '<br>';
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3153
3174
|
var emptyInlineElem = tempNode.querySelectorAll(inlineEmptyNodes);
|
|
3154
3175
|
for (var i = 0; i < emptyInlineElem.length; i++) {
|
|
3155
3176
|
emptyInlineElem[i].innerHTML = '​';
|
|
@@ -3320,7 +3341,7 @@ function updateDropDownFontFormatLocale(self) {
|
|
|
3320
3341
|
* @hidden
|
|
3321
3342
|
* @deprecated
|
|
3322
3343
|
*/
|
|
3323
|
-
var ToolbarRenderer = /** @class */ (function () {
|
|
3344
|
+
var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
3324
3345
|
/**
|
|
3325
3346
|
* Constructor for toolbar renderer module
|
|
3326
3347
|
*
|
|
@@ -3336,21 +3357,19 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3336
3357
|
}
|
|
3337
3358
|
ToolbarRenderer.prototype.wireEvent = function () {
|
|
3338
3359
|
this.parent.on(destroy, this.unWireEvent, this);
|
|
3339
|
-
this.parent.on(
|
|
3360
|
+
this.parent.on(destroyTooltip, this.destroyTooltip, this);
|
|
3340
3361
|
};
|
|
3341
3362
|
ToolbarRenderer.prototype.destroyTooltip = function () {
|
|
3342
|
-
|
|
3343
|
-
|
|
3363
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
3364
|
+
this.parent.contentModule.getDocument();
|
|
3365
|
+
if (!isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap')) && !isNullOrUndefined(currentDocument.querySelector('[data-tooltip-id]'))) {
|
|
3366
|
+
var tooltipTargetEle = currentDocument.querySelector('[data-tooltip-id]');
|
|
3344
3367
|
var event_1 = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
3345
3368
|
tooltipTargetEle.dispatchEvent(event_1);
|
|
3346
3369
|
}
|
|
3347
3370
|
};
|
|
3348
3371
|
ToolbarRenderer.prototype.unWireEvent = function () {
|
|
3349
3372
|
this.parent.off(destroy, this.unWireEvent);
|
|
3350
|
-
if (this.popupOverlay) {
|
|
3351
|
-
EventHandler.remove(this.popupOverlay, 'click touchmove', this.onPopupOverlay);
|
|
3352
|
-
}
|
|
3353
|
-
this.removePopupContainer();
|
|
3354
3373
|
};
|
|
3355
3374
|
ToolbarRenderer.prototype.toolbarBeforeCreate = function (e) {
|
|
3356
3375
|
if (this.mode === 'Extended') {
|
|
@@ -3371,7 +3390,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3371
3390
|
};
|
|
3372
3391
|
ToolbarRenderer.prototype.dropDownSelected = function (args) {
|
|
3373
3392
|
this.parent.notify(dropDownSelect, args);
|
|
3374
|
-
this.onPopupOverlay();
|
|
3375
3393
|
};
|
|
3376
3394
|
ToolbarRenderer.prototype.beforeDropDownItemRender = function (args) {
|
|
3377
3395
|
if (this.parent.readonly || !this.parent.enabled) {
|
|
@@ -3408,27 +3426,11 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3408
3426
|
addClass([listEle[1], listEle[2]], 'e-disabled');
|
|
3409
3427
|
}
|
|
3410
3428
|
}
|
|
3411
|
-
if (Browser.isDevice && !args.element.parentElement.classList.contains(CLS_QUICK_DROPDOWN)) {
|
|
3412
|
-
this.popupModal(args.element.parentElement);
|
|
3413
|
-
}
|
|
3414
3429
|
this.parent.notify(selectionSave, args);
|
|
3415
3430
|
};
|
|
3416
3431
|
ToolbarRenderer.prototype.dropDownClose = function (args) {
|
|
3417
|
-
this.removePopupContainer();
|
|
3418
3432
|
this.parent.notify(selectionRestore, args);
|
|
3419
3433
|
};
|
|
3420
|
-
ToolbarRenderer.prototype.removePopupContainer = function () {
|
|
3421
|
-
if (Browser.isDevice && !isNullOrUndefined(this.popupContainer)) {
|
|
3422
|
-
var popupEle = this.popupContainer.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3423
|
-
if (popupEle) {
|
|
3424
|
-
this.popupContainer.parentNode.insertBefore(popupEle, this.popupContainer.nextSibling);
|
|
3425
|
-
popupEle.style.removeProperty('position');
|
|
3426
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3427
|
-
}
|
|
3428
|
-
detach(this.popupContainer);
|
|
3429
|
-
this.popupContainer = undefined;
|
|
3430
|
-
}
|
|
3431
|
-
};
|
|
3432
3434
|
/**
|
|
3433
3435
|
* renderToolbar method
|
|
3434
3436
|
*
|
|
@@ -3462,7 +3464,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3462
3464
|
openDelay: 400,
|
|
3463
3465
|
opensOn: 'Hover',
|
|
3464
3466
|
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
3465
|
-
cssClass: this.parent.
|
|
3467
|
+
cssClass: this.parent.getCssClass(),
|
|
3466
3468
|
windowCollision: true,
|
|
3467
3469
|
position: 'BottomCenter'
|
|
3468
3470
|
});
|
|
@@ -3522,7 +3524,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3522
3524
|
}
|
|
3523
3525
|
//Alignments preselect
|
|
3524
3526
|
var alignEle = proxy.parent.getRange().startContainer;
|
|
3525
|
-
while (alignEle !== proxy.parent.
|
|
3527
|
+
while (alignEle !== proxy.parent.inputElement && !isNullOrUndefined(alignEle.parentElement)) {
|
|
3526
3528
|
if (alignEle.nodeName === '#text') {
|
|
3527
3529
|
alignEle = alignEle.parentElement;
|
|
3528
3530
|
}
|
|
@@ -3548,7 +3550,8 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3548
3550
|
alignEle = alignEle.parentElement;
|
|
3549
3551
|
}
|
|
3550
3552
|
//image preselect
|
|
3551
|
-
var
|
|
3553
|
+
var closestNode = startNode.closest('img');
|
|
3554
|
+
var imageEle = closestNode ? closestNode : startNode.querySelector('img');
|
|
3552
3555
|
if (args.items[0].command === 'Images') {
|
|
3553
3556
|
if (!isNullOrUndefined(imageEle)) {
|
|
3554
3557
|
var index = void 0;
|
|
@@ -3660,39 +3663,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3660
3663
|
};
|
|
3661
3664
|
return dropDown;
|
|
3662
3665
|
};
|
|
3663
|
-
// eslint-disable-next-line
|
|
3664
|
-
ToolbarRenderer.prototype.onPopupOverlay = function (args) {
|
|
3665
|
-
if (!isNullOrUndefined(this.popupOverlay)) {
|
|
3666
|
-
closest(this.popupOverlay, '.e-popup-container').style.display = 'none';
|
|
3667
|
-
this.popupOverlay.style.display = 'none';
|
|
3668
|
-
removeClass([this.popupOverlay], 'e-popup-overlay');
|
|
3669
|
-
}
|
|
3670
|
-
};
|
|
3671
|
-
ToolbarRenderer.prototype.setIsModel = function (element) {
|
|
3672
|
-
if (!closest(element, '.e-popup-container')) {
|
|
3673
|
-
this.popupContainer = this.parent.createElement('div', {
|
|
3674
|
-
className: 'e-rte-modal-popup e-popup-container e-center'
|
|
3675
|
-
});
|
|
3676
|
-
element.parentNode.insertBefore(this.popupContainer, element);
|
|
3677
|
-
this.popupContainer.appendChild(element);
|
|
3678
|
-
this.popupContainer.style.zIndex = element.style.zIndex;
|
|
3679
|
-
this.popupContainer.style.display = 'flex';
|
|
3680
|
-
element.style.position = 'relative';
|
|
3681
|
-
addClass([element], 'e-popup-modal');
|
|
3682
|
-
this.popupOverlay = this.parent.createElement('div', { className: 'e-popup-overlay' });
|
|
3683
|
-
// eslint-disable-next-line
|
|
3684
|
-
this.popupOverlay.style.zIndex = (parseInt(element.style.zIndex, null) - 1).toString();
|
|
3685
|
-
this.popupOverlay.style.display = 'block';
|
|
3686
|
-
this.popupContainer.appendChild(this.popupOverlay);
|
|
3687
|
-
EventHandler.add(this.popupOverlay, 'click touchmove', this.onPopupOverlay, this);
|
|
3688
|
-
}
|
|
3689
|
-
else {
|
|
3690
|
-
element.parentElement.style.display = 'flex';
|
|
3691
|
-
this.popupOverlay = element.nextElementSibling;
|
|
3692
|
-
this.popupOverlay.style.display = 'block';
|
|
3693
|
-
addClass([this.popupOverlay], 'e-popup-overlay');
|
|
3694
|
-
}
|
|
3695
|
-
};
|
|
3696
3666
|
ToolbarRenderer.prototype.paletteSelection = function (dropDownArgs, currentElement) {
|
|
3697
3667
|
var ele = dropDownArgs.element.querySelector('.e-control.e-colorpicker');
|
|
3698
3668
|
var colorbox = [].slice.call(selectAll('.e-tile', ele.parentElement));
|
|
@@ -3721,7 +3691,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3721
3691
|
var proxy = this;
|
|
3722
3692
|
var css = CLS_RTE_ELEMENTS + ' ' + CLS_TB_BTN + ((this.parent.inlineMode) ? (' ' + CLS_INLINE_DROPDOWN) : '');
|
|
3723
3693
|
css += (' ' + ((item === 'backgroundcolor') ? CLS_BACKGROUND_COLOR_DROPDOWN : CLS_FONT_COLOR_DROPDOWN));
|
|
3724
|
-
css +=
|
|
3694
|
+
css += this.parent.getCssClass(true);
|
|
3725
3695
|
var content = proxy.parent.createElement('span', { className: CLS_COLOR_CONTENT });
|
|
3726
3696
|
var inlineEle = proxy.parent.createElement('span', { className: args.cssClass });
|
|
3727
3697
|
var range;
|
|
@@ -3793,9 +3763,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3793
3763
|
if (focusEle) {
|
|
3794
3764
|
focusEle.focus();
|
|
3795
3765
|
}
|
|
3796
|
-
if (Browser.isDevice) {
|
|
3797
|
-
_this.popupModal(dropDownArgs.element.parentElement);
|
|
3798
|
-
}
|
|
3799
3766
|
_this.pickerRefresh(dropDownArgs);
|
|
3800
3767
|
},
|
|
3801
3768
|
beforeClose: function (dropDownArgs) {
|
|
@@ -3823,22 +3790,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3823
3790
|
},
|
|
3824
3791
|
close: function (dropDownArgs) {
|
|
3825
3792
|
proxy.parent.notify(selectionRestore, {});
|
|
3826
|
-
var dropElement = closest(dropDownArgs.element.parentElement, '.e-popup-container');
|
|
3827
|
-
if (dropElement) {
|
|
3828
|
-
dropElement.style.display = 'none';
|
|
3829
|
-
dropElement.lastElementChild.style.display = 'none';
|
|
3830
|
-
removeClass([dropElement.lastElementChild], 'e-popup-overlay');
|
|
3831
|
-
}
|
|
3832
|
-
if (Browser.isDevice && !isNullOrUndefined(dropElement)) {
|
|
3833
|
-
var popupEle = dropElement.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
3834
|
-
if (popupEle) {
|
|
3835
|
-
dropElement.parentNode.insertBefore(popupEle, dropElement.nextSibling);
|
|
3836
|
-
popupEle.style.removeProperty('position');
|
|
3837
|
-
removeClass([popupEle], 'e-popup-modal');
|
|
3838
|
-
}
|
|
3839
|
-
detach(dropElement);
|
|
3840
|
-
proxy.popupContainer = undefined;
|
|
3841
|
-
}
|
|
3842
3793
|
}
|
|
3843
3794
|
});
|
|
3844
3795
|
dropDown.isStringTemplate = true;
|
|
@@ -3866,16 +3817,6 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3866
3817
|
popupElem.style.width = (popupElem.offsetWidth - 5).toString() + 'px';
|
|
3867
3818
|
}
|
|
3868
3819
|
};
|
|
3869
|
-
ToolbarRenderer.prototype.popupModal = function (element) {
|
|
3870
|
-
var popupInst = getInstance(element, Popup);
|
|
3871
|
-
popupInst.relateTo = document.body;
|
|
3872
|
-
popupInst.position = { X: 0, Y: 0 };
|
|
3873
|
-
popupInst.targetType = 'container';
|
|
3874
|
-
popupInst.collision = { X: 'fit', Y: 'fit' };
|
|
3875
|
-
popupInst.offsetY = 4;
|
|
3876
|
-
popupInst.dataBind();
|
|
3877
|
-
this.setIsModel(element);
|
|
3878
|
-
};
|
|
3879
3820
|
ToolbarRenderer.prototype.setColorPickerContentWidth = function (colorPicker) {
|
|
3880
3821
|
var colorPickerContent = colorPicker.element.nextSibling;
|
|
3881
3822
|
if (colorPickerContent.style.width === '0px') {
|
|
@@ -3914,7 +3855,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3914
3855
|
args.element.classList.add(CLS_COLOR_PALETTE);
|
|
3915
3856
|
args.element.classList.add(CLS_CUSTOM_TILE);
|
|
3916
3857
|
if (!isNullOrUndefined(_this.parent.cssClass)) {
|
|
3917
|
-
var allClassName = _this.parent.
|
|
3858
|
+
var allClassName = _this.parent.getCssClass().split(' ');
|
|
3918
3859
|
for (var i = 0; i < allClassName.length; i++) {
|
|
3919
3860
|
if (allClassName[i].trim() !== '') {
|
|
3920
3861
|
args.element.classList.add(allClassName[i]);
|
|
@@ -3999,7 +3940,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
3999
3940
|
/**
|
|
4000
3941
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
4001
3942
|
*/
|
|
4002
|
-
var BaseToolbar = /** @class */ (function () {
|
|
3943
|
+
var BaseToolbar = /** @__PURE__ @class */ (function () {
|
|
4003
3944
|
function BaseToolbar(parent, serviceLocator) {
|
|
4004
3945
|
this.tools = {};
|
|
4005
3946
|
this.parent = parent;
|
|
@@ -4208,7 +4149,7 @@ var BaseToolbar = /** @class */ (function () {
|
|
|
4208
4149
|
/**
|
|
4209
4150
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
4210
4151
|
*/
|
|
4211
|
-
var DropDownButtons = /** @class */ (function () {
|
|
4152
|
+
var DropDownButtons = /** @__PURE__ @class */ (function () {
|
|
4212
4153
|
function DropDownButtons(parent, serviceLocator) {
|
|
4213
4154
|
this.parent = parent;
|
|
4214
4155
|
this.locator = serviceLocator;
|
|
@@ -4390,7 +4331,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
4390
4331
|
}
|
|
4391
4332
|
});
|
|
4392
4333
|
if (this.parent.inlineMode.enable) {
|
|
4393
|
-
this.setCssClass({ cssClass: this.parent.
|
|
4334
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
4394
4335
|
}
|
|
4395
4336
|
};
|
|
4396
4337
|
DropDownButtons.prototype.getUpdateItems = function (items, value) {
|
|
@@ -4711,7 +4652,9 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
4711
4652
|
this.parent.on(bindCssClass, this.setCssClass, this);
|
|
4712
4653
|
};
|
|
4713
4654
|
DropDownButtons.prototype.onIframeMouseDown = function () {
|
|
4714
|
-
|
|
4655
|
+
if (this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length > 0) {
|
|
4656
|
+
dispatchEvent(document, 'mousedown');
|
|
4657
|
+
}
|
|
4715
4658
|
};
|
|
4716
4659
|
DropDownButtons.prototype.removeEventListener = function () {
|
|
4717
4660
|
if (this.parent.isDestroyed) {
|
|
@@ -4733,7 +4676,7 @@ var DropDownButtons = /** @class */ (function () {
|
|
|
4733
4676
|
* @hidden
|
|
4734
4677
|
* @deprecated
|
|
4735
4678
|
*/
|
|
4736
|
-
var ServiceLocator = /** @class */ (function () {
|
|
4679
|
+
var ServiceLocator = /** @__PURE__ @class */ (function () {
|
|
4737
4680
|
function ServiceLocator() {
|
|
4738
4681
|
this.services = {};
|
|
4739
4682
|
}
|
|
@@ -4777,7 +4720,7 @@ var ServiceLocator = /** @class */ (function () {
|
|
|
4777
4720
|
* @hidden
|
|
4778
4721
|
* @deprecated
|
|
4779
4722
|
*/
|
|
4780
|
-
var RendererFactory = /** @class */ (function () {
|
|
4723
|
+
var RendererFactory = /** @__PURE__ @class */ (function () {
|
|
4781
4724
|
function RendererFactory() {
|
|
4782
4725
|
this.rendererMap = {};
|
|
4783
4726
|
}
|
|
@@ -4820,7 +4763,7 @@ var RendererFactory = /** @class */ (function () {
|
|
|
4820
4763
|
/**
|
|
4821
4764
|
* `ToolbarAction` module is used to toolbar click action
|
|
4822
4765
|
*/
|
|
4823
|
-
var ToolbarAction = /** @class */ (function () {
|
|
4766
|
+
var ToolbarAction = /** @__PURE__ @class */ (function () {
|
|
4824
4767
|
function ToolbarAction(parent) {
|
|
4825
4768
|
this.parent = parent;
|
|
4826
4769
|
this.addEventListener();
|
|
@@ -4894,7 +4837,7 @@ var ToolbarAction = /** @class */ (function () {
|
|
|
4894
4837
|
/**
|
|
4895
4838
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
4896
4839
|
*/
|
|
4897
|
-
var Toolbar$2 = /** @class */ (function () {
|
|
4840
|
+
var Toolbar$2 = /** @__PURE__ @class */ (function () {
|
|
4898
4841
|
function Toolbar$$1(parent, serviceLocator) {
|
|
4899
4842
|
this.tools = {};
|
|
4900
4843
|
this.parent = parent;
|
|
@@ -4932,6 +4875,10 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
4932
4875
|
case 'escape':
|
|
4933
4876
|
this.parent.contentModule.getEditPanel().focus();
|
|
4934
4877
|
break;
|
|
4878
|
+
case 'enter':
|
|
4879
|
+
if (e.target.classList.contains('e-hor-nav')) {
|
|
4880
|
+
this.adjustContentHeight(e.target, true);
|
|
4881
|
+
}
|
|
4935
4882
|
}
|
|
4936
4883
|
};
|
|
4937
4884
|
Toolbar$$1.prototype.createToolbarElement = function () {
|
|
@@ -4987,7 +4934,7 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
4987
4934
|
items: this.parent.toolbarSettings.items,
|
|
4988
4935
|
mode: tBarMode,
|
|
4989
4936
|
target: ele,
|
|
4990
|
-
cssClass: this.parent.
|
|
4937
|
+
cssClass: this.parent.getCssClass()
|
|
4991
4938
|
});
|
|
4992
4939
|
if (this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
4993
4940
|
addClass([ele], ['e-rte-tb-mobile']);
|
|
@@ -5106,7 +5053,7 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5106
5053
|
items: this.parent.toolbarSettings.items,
|
|
5107
5054
|
mode: this.getToolbarMode(),
|
|
5108
5055
|
target: this.tbElement,
|
|
5109
|
-
cssClass: this.parent.
|
|
5056
|
+
cssClass: this.parent.getCssClass()
|
|
5110
5057
|
});
|
|
5111
5058
|
if (!this.parent.inlineMode.enable) {
|
|
5112
5059
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
@@ -5136,7 +5083,7 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5136
5083
|
});
|
|
5137
5084
|
this.refreshToolbarOverflow();
|
|
5138
5085
|
}
|
|
5139
|
-
var divEle = this.parent.element.querySelector('.
|
|
5086
|
+
var divEle = this.parent.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
5140
5087
|
var iframeEle = this.parent.element.querySelector('.e-source-content');
|
|
5141
5088
|
if ((!this.parent.iframeSettings.enable && (!isNullOrUndefined(divEle) && divEle.style.display === 'block')) ||
|
|
5142
5089
|
(this.parent.iframeSettings.enable && (!isNullOrUndefined(iframeEle) && iframeEle.style.display === 'block'))) {
|
|
@@ -5266,7 +5213,7 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5266
5213
|
baseToolbar.toolbarObj.enableItems(item, isEnable);
|
|
5267
5214
|
}
|
|
5268
5215
|
}
|
|
5269
|
-
if (!select('.
|
|
5216
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element) && !muteToolbarUpdate) {
|
|
5270
5217
|
updateUndoRedoStatus(baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5271
5218
|
}
|
|
5272
5219
|
};
|
|
@@ -5439,20 +5386,24 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5439
5386
|
};
|
|
5440
5387
|
Toolbar$$1.prototype.toolbarClickHandler = function (e) {
|
|
5441
5388
|
var trg = closest(e.originalEvent.target, '.e-hor-nav');
|
|
5389
|
+
this.adjustContentHeight(trg, false);
|
|
5390
|
+
};
|
|
5391
|
+
Toolbar$$1.prototype.adjustContentHeight = function (trg, isKeyboard) {
|
|
5442
5392
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNullOrUndefined(trg)) {
|
|
5443
5393
|
var extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
|
|
5444
5394
|
if (!isNullOrUndefined(extendedTbar)) {
|
|
5445
5395
|
setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
|
|
5446
5396
|
setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
|
|
5447
5397
|
}
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5398
|
+
var hasActiveClass = trg.classList.contains('e-nav-active');
|
|
5399
|
+
var isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
5400
|
+
if (isExpand) {
|
|
5401
|
+
addClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5451
5402
|
}
|
|
5452
5403
|
else {
|
|
5453
|
-
|
|
5454
|
-
this.parent.setContentHeight('toolbar', true);
|
|
5404
|
+
removeClass([this.tbElement], [CLS_EXPAND_OPEN]);
|
|
5455
5405
|
}
|
|
5406
|
+
this.parent.setContentHeight('toolbar', isExpand);
|
|
5456
5407
|
}
|
|
5457
5408
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
5458
5409
|
this.isToolbar = true;
|
|
@@ -5576,7 +5527,7 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5576
5527
|
this.addEventListener();
|
|
5577
5528
|
this.renderToolbar();
|
|
5578
5529
|
this.parent.wireScrollElementsEvents();
|
|
5579
|
-
if (!select('.
|
|
5530
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
5580
5531
|
updateUndoRedoStatus(this.baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
5581
5532
|
}
|
|
5582
5533
|
this.parent.notify(dynamicModule, {});
|
|
@@ -5594,25 +5545,25 @@ var Toolbar$2 = /** @class */ (function () {
|
|
|
5594
5545
|
return Toolbar$$1;
|
|
5595
5546
|
}());
|
|
5596
5547
|
|
|
5597
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
5598
|
-
var extendStatics = function (d, b) {
|
|
5599
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5600
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5601
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
5602
|
-
return extendStatics(d, b);
|
|
5603
|
-
};
|
|
5604
|
-
return function (d, b) {
|
|
5605
|
-
extendStatics(d, b);
|
|
5606
|
-
function __() { this.constructor = d; }
|
|
5607
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5608
|
-
};
|
|
5609
|
-
})();
|
|
5610
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5611
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5612
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5613
|
-
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;
|
|
5614
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5615
|
-
};
|
|
5548
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
5549
|
+
var extendStatics = function (d, b) {
|
|
5550
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5551
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5552
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
5553
|
+
return extendStatics(d, b);
|
|
5554
|
+
};
|
|
5555
|
+
return function (d, b) {
|
|
5556
|
+
extendStatics(d, b);
|
|
5557
|
+
function __() { this.constructor = d; }
|
|
5558
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5559
|
+
};
|
|
5560
|
+
})();
|
|
5561
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5562
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5563
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5564
|
+
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;
|
|
5565
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5566
|
+
};
|
|
5616
5567
|
var keyCode = {
|
|
5617
5568
|
'backspace': 8,
|
|
5618
5569
|
'tab': 9,
|
|
@@ -5680,7 +5631,7 @@ var keyCode = {
|
|
|
5680
5631
|
* @hidden
|
|
5681
5632
|
* @deprecated
|
|
5682
5633
|
*/
|
|
5683
|
-
var KeyboardEvents$1 = /** @class */ (function (_super) {
|
|
5634
|
+
var KeyboardEvents$1 = /** @__PURE__ @class */ (function (_super) {
|
|
5684
5635
|
__extends(KeyboardEvents$$1, _super);
|
|
5685
5636
|
/**
|
|
5686
5637
|
* Initializes the KeyboardEvents
|
|
@@ -5823,7 +5774,7 @@ var KeyboardEvents$1 = /** @class */ (function (_super) {
|
|
|
5823
5774
|
/**
|
|
5824
5775
|
* `Color Picker` module is used to handle ColorPicker actions.
|
|
5825
5776
|
*/
|
|
5826
|
-
var ColorPickerInput = /** @class */ (function () {
|
|
5777
|
+
var ColorPickerInput = /** @__PURE__ @class */ (function () {
|
|
5827
5778
|
function ColorPickerInput(parent, serviceLocator) {
|
|
5828
5779
|
this.tools = {};
|
|
5829
5780
|
this.parent = parent;
|
|
@@ -5874,7 +5825,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
5874
5825
|
document.body.appendChild(fontNode);
|
|
5875
5826
|
options = {
|
|
5876
5827
|
cssClass: _this.tools[item.toLocaleLowerCase()].icon
|
|
5877
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5828
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + _this.parent.getCssClass(true),
|
|
5878
5829
|
value: _this.tools[item.toLocaleLowerCase()].value,
|
|
5879
5830
|
command: _this.tools[item.toLocaleLowerCase()].command,
|
|
5880
5831
|
subCommand: _this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5901,7 +5852,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
5901
5852
|
document.body.appendChild(backNode);
|
|
5902
5853
|
options = {
|
|
5903
5854
|
cssClass: _this.tools[item.toLocaleLowerCase()].icon
|
|
5904
|
-
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS +
|
|
5855
|
+
+ ' ' + CLS_RTE_ELEMENTS + ' ' + CLS_ICONS + _this.parent.getCssClass(true),
|
|
5905
5856
|
value: _this.tools[item.toLocaleLowerCase()].value,
|
|
5906
5857
|
command: _this.tools[item.toLocaleLowerCase()].command,
|
|
5907
5858
|
subCommand: _this.tools[item.toLocaleLowerCase()].subCommand,
|
|
@@ -5916,7 +5867,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
5916
5867
|
}
|
|
5917
5868
|
});
|
|
5918
5869
|
if (this.parent.inlineMode.enable) {
|
|
5919
|
-
this.setCssClass({ cssClass: this.parent.
|
|
5870
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
5920
5871
|
}
|
|
5921
5872
|
};
|
|
5922
5873
|
ColorPickerInput.prototype.destroy = function () {
|
|
@@ -6066,7 +6017,7 @@ var ColorPickerInput = /** @class */ (function () {
|
|
|
6066
6017
|
/**
|
|
6067
6018
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
6068
6019
|
*/
|
|
6069
|
-
var BaseQuickToolbar = /** @class */ (function () {
|
|
6020
|
+
var BaseQuickToolbar = /** @__PURE__ @class */ (function () {
|
|
6070
6021
|
function BaseQuickToolbar(parent, locator) {
|
|
6071
6022
|
this.parent = parent;
|
|
6072
6023
|
this.locator = locator;
|
|
@@ -6079,6 +6030,9 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6079
6030
|
}
|
|
6080
6031
|
BaseQuickToolbar.prototype.appendPopupContent = function () {
|
|
6081
6032
|
this.toolbarElement = this.parent.createElement('div', { className: CLS_QUICK_TB });
|
|
6033
|
+
if (this.element.classList.contains(CLS_TEXT_POP)) {
|
|
6034
|
+
this.toolbarElement.classList.add(CLS_TEXT_QUICK_TB);
|
|
6035
|
+
}
|
|
6082
6036
|
this.element.appendChild(this.toolbarElement);
|
|
6083
6037
|
};
|
|
6084
6038
|
/**
|
|
@@ -6271,7 +6225,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6271
6225
|
editPanelTop = (cntEle) ? cntEle.scrollTop : 0;
|
|
6272
6226
|
editPanelHeight = (cntEle) ? cntEle.offsetHeight : 0;
|
|
6273
6227
|
}
|
|
6274
|
-
if (!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text') {
|
|
6228
|
+
if ((!_this.parent.inlineMode.enable && !closest(target, 'table') && type !== 'text' && type !== 'link') || target.tagName === 'IMG') {
|
|
6275
6229
|
_this.parent.disableToolbarItem(_this.parent.toolbarSettings.items);
|
|
6276
6230
|
_this.parent.enableToolbarItem(['Undo', 'Redo']);
|
|
6277
6231
|
}
|
|
@@ -6414,7 +6368,18 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6414
6368
|
tbItems: this.quickTBarObj.toolbarObj.items
|
|
6415
6369
|
};
|
|
6416
6370
|
setToolbarStatus(options, true, this.parent);
|
|
6417
|
-
if (
|
|
6371
|
+
if (this.parent.quickToolbarSettings.text && this.parent.quickToolbarModule.textQTBar) {
|
|
6372
|
+
var options_1 = {
|
|
6373
|
+
args: args,
|
|
6374
|
+
dropDownModule: this.parent.quickToolbarModule.textQTBar.dropDownButtons,
|
|
6375
|
+
parent: this.parent,
|
|
6376
|
+
tbElements: selectAll('.' + CLS_TB_ITEM, this.parent.quickToolbarModule.textQTBar.element),
|
|
6377
|
+
tbItems: this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items
|
|
6378
|
+
};
|
|
6379
|
+
setToolbarStatus(options_1, true, this.parent);
|
|
6380
|
+
updateUndoRedoStatus(this.parent.quickToolbarModule.textQTBar.quickTBarObj, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6381
|
+
}
|
|
6382
|
+
if (!select('.' + CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
6418
6383
|
updateUndoRedoStatus(this.parent.getBaseToolbarObject(), this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
6419
6384
|
}
|
|
6420
6385
|
};
|
|
@@ -6446,7 +6411,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6446
6411
|
}
|
|
6447
6412
|
this.parent.on(destroy, this.destroy, this);
|
|
6448
6413
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
6449
|
-
if (this.parent.inlineMode.enable) {
|
|
6414
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6450
6415
|
this.parent.on(toolbarUpdated, this.updateStatus, this);
|
|
6451
6416
|
}
|
|
6452
6417
|
};
|
|
@@ -6488,7 +6453,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6488
6453
|
}
|
|
6489
6454
|
this.parent.off(destroy, this.destroy);
|
|
6490
6455
|
this.parent.off(modelChanged, this.onPropertyChanged);
|
|
6491
|
-
if (this.parent.inlineMode.enable) {
|
|
6456
|
+
if (this.parent.inlineMode.enable || this.parent.quickToolbarSettings.text) {
|
|
6492
6457
|
this.parent.off(toolbarUpdated, this.updateStatus);
|
|
6493
6458
|
}
|
|
6494
6459
|
};
|
|
@@ -6501,7 +6466,7 @@ var BaseQuickToolbar = /** @class */ (function () {
|
|
|
6501
6466
|
* @hidden
|
|
6502
6467
|
* @deprecated
|
|
6503
6468
|
*/
|
|
6504
|
-
var PopupRenderer = /** @class */ (function () {
|
|
6469
|
+
var PopupRenderer = /** @__PURE__ @class */ (function () {
|
|
6505
6470
|
/**
|
|
6506
6471
|
* Constructor for popup renderer module
|
|
6507
6472
|
*
|
|
@@ -6570,7 +6535,7 @@ var PopupRenderer = /** @class */ (function () {
|
|
|
6570
6535
|
/**
|
|
6571
6536
|
* `Quick toolbar` module is used to handle Quick toolbar actions.
|
|
6572
6537
|
*/
|
|
6573
|
-
var QuickToolbar = /** @class */ (function () {
|
|
6538
|
+
var QuickToolbar = /** @__PURE__ @class */ (function () {
|
|
6574
6539
|
function QuickToolbar(parent, locator) {
|
|
6575
6540
|
this.parent = parent;
|
|
6576
6541
|
this.locator = locator;
|
|
@@ -6609,7 +6574,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
6609
6574
|
toolbarItems: items,
|
|
6610
6575
|
mode: mode,
|
|
6611
6576
|
renderType: type,
|
|
6612
|
-
cssClass: this.parent.
|
|
6577
|
+
cssClass: this.parent.getCssClass()
|
|
6613
6578
|
};
|
|
6614
6579
|
};
|
|
6615
6580
|
/**
|
|
@@ -6823,6 +6788,9 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
6823
6788
|
&& !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
|
|
6824
6789
|
this.hideInlineQTBar();
|
|
6825
6790
|
}
|
|
6791
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6792
|
+
this.textQTBar.hidePopup();
|
|
6793
|
+
}
|
|
6826
6794
|
};
|
|
6827
6795
|
QuickToolbar.prototype.inlineQTBarMouseDownHandler = function () {
|
|
6828
6796
|
if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
|
|
@@ -6836,8 +6804,8 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
6836
6804
|
}
|
|
6837
6805
|
};
|
|
6838
6806
|
QuickToolbar.prototype.keyUpHandler = function (e) {
|
|
6807
|
+
var args = e.args;
|
|
6839
6808
|
if (this.parent.inlineMode.enable && !Browser.isDevice) {
|
|
6840
|
-
var args = e.args;
|
|
6841
6809
|
if (this.parent.inlineMode.onSelection) {
|
|
6842
6810
|
if (this.parent.getSelection().length > 0) {
|
|
6843
6811
|
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
@@ -6850,6 +6818,13 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
6850
6818
|
}
|
|
6851
6819
|
this.deBounce(this.offsetX, this.offsetY, args.target);
|
|
6852
6820
|
}
|
|
6821
|
+
if (this.parent.quickToolbarSettings.text && !Browser.isDevice) {
|
|
6822
|
+
if ((args.ctrlKey && args.keyCode === 65) || (args.shiftKey && (args.keyCode === 33 || args.keyCode === 34 ||
|
|
6823
|
+
args.keyCode === 35 || args.keyCode === 36 || args.keyCode === 37 || args.keyCode === 38 ||
|
|
6824
|
+
args.keyCode === 39 || args.keyCode === 40))) {
|
|
6825
|
+
this.textQTBar.showPopup(this.offsetX, this.offsetY, args.target, 'text');
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6853
6828
|
};
|
|
6854
6829
|
QuickToolbar.prototype.selectionChangeHandler = function (e) {
|
|
6855
6830
|
var _this = this;
|
|
@@ -7009,6 +6984,15 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
7009
6984
|
if (this.videoQTBar && !hasClass(this.videoQTBar.element, 'e-popup-close')) {
|
|
7010
6985
|
this.videoQTBar.hidePopup();
|
|
7011
6986
|
}
|
|
6987
|
+
if (this.tableQTBar && !hasClass(this.tableQTBar.element, 'e-popup-close')) {
|
|
6988
|
+
this.tableQTBar.hidePopup();
|
|
6989
|
+
}
|
|
6990
|
+
if (this.linkQTBar && !hasClass(this.linkQTBar.element, 'e-popup-close')) {
|
|
6991
|
+
this.linkQTBar.hidePopup();
|
|
6992
|
+
}
|
|
6993
|
+
if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
|
|
6994
|
+
this.textQTBar.hidePopup();
|
|
6995
|
+
}
|
|
7012
6996
|
}
|
|
7013
6997
|
};
|
|
7014
6998
|
QuickToolbar.prototype.onIframeMouseDown = function () {
|
|
@@ -7061,6 +7045,9 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
7061
7045
|
* @deprecated
|
|
7062
7046
|
*/
|
|
7063
7047
|
QuickToolbar.prototype.removeEventListener = function () {
|
|
7048
|
+
if (this.deBouncer) {
|
|
7049
|
+
clearTimeout(this.deBouncer);
|
|
7050
|
+
}
|
|
7064
7051
|
if (this.parent.isDestroyed) {
|
|
7065
7052
|
return;
|
|
7066
7053
|
}
|
|
@@ -7081,9 +7068,6 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
7081
7068
|
this.parent.off(rtlMode, this.setRtl);
|
|
7082
7069
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
7083
7070
|
this.parent.off(hidePopup, this.hideQuickToolbars);
|
|
7084
|
-
if (this.deBouncer) {
|
|
7085
|
-
clearTimeout(this.deBouncer);
|
|
7086
|
-
}
|
|
7087
7071
|
};
|
|
7088
7072
|
/**
|
|
7089
7073
|
* Called internally if any of the property value changed.
|
|
@@ -7139,7 +7123,7 @@ var QuickToolbar = /** @class */ (function () {
|
|
|
7139
7123
|
/**
|
|
7140
7124
|
* `Count` module is used to handle Count actions.
|
|
7141
7125
|
*/
|
|
7142
|
-
var Count = /** @class */ (function () {
|
|
7126
|
+
var Count = /** @__PURE__ @class */ (function () {
|
|
7143
7127
|
function Count(parent, serviceLocator) {
|
|
7144
7128
|
this.parent = parent;
|
|
7145
7129
|
this.locator = serviceLocator;
|
|
@@ -7267,7 +7251,7 @@ var Count = /** @class */ (function () {
|
|
|
7267
7251
|
* @hidden
|
|
7268
7252
|
* @deprecated
|
|
7269
7253
|
*/
|
|
7270
|
-
var MarkdownSelection = /** @class */ (function () {
|
|
7254
|
+
var MarkdownSelection = /** @__PURE__ @class */ (function () {
|
|
7271
7255
|
function MarkdownSelection() {
|
|
7272
7256
|
}
|
|
7273
7257
|
/**
|
|
@@ -7664,7 +7648,7 @@ function getDefaultMDTbStatus() {
|
|
|
7664
7648
|
/**
|
|
7665
7649
|
* MarkdownToolbarStatus module for refresh the toolbar status
|
|
7666
7650
|
*/
|
|
7667
|
-
var MarkdownToolbarStatus = /** @class */ (function () {
|
|
7651
|
+
var MarkdownToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
7668
7652
|
function MarkdownToolbarStatus(parent) {
|
|
7669
7653
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultMDTbStatus();
|
|
7670
7654
|
this.selection = new MarkdownSelection();
|
|
@@ -7787,7 +7771,7 @@ var MarkdownToolbarStatus = /** @class */ (function () {
|
|
|
7787
7771
|
/**
|
|
7788
7772
|
* `ExecCommandCallBack` module is used to run the editor manager command
|
|
7789
7773
|
*/
|
|
7790
|
-
var ExecCommandCallBack = /** @class */ (function () {
|
|
7774
|
+
var ExecCommandCallBack = /** @__PURE__ @class */ (function () {
|
|
7791
7775
|
function ExecCommandCallBack(parent) {
|
|
7792
7776
|
this.parent = parent;
|
|
7793
7777
|
this.addEventListener();
|
|
@@ -7911,7 +7895,7 @@ var EMOJI_PICKER_ACTIONS = 'emoji_picker_actions';
|
|
|
7911
7895
|
* @hidden
|
|
7912
7896
|
* @deprecated
|
|
7913
7897
|
*/
|
|
7914
|
-
var Formatter = /** @class */ (function () {
|
|
7898
|
+
var Formatter = /** @__PURE__ @class */ (function () {
|
|
7915
7899
|
function Formatter() {
|
|
7916
7900
|
}
|
|
7917
7901
|
/**
|
|
@@ -7963,7 +7947,7 @@ var Formatter = /** @class */ (function () {
|
|
|
7963
7947
|
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
7964
7948
|
currentInsertContentLength = 1;
|
|
7965
7949
|
}
|
|
7966
|
-
var currentLength = self.getText().trim().length;
|
|
7950
|
+
var currentLength = self.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
7967
7951
|
var selectionLength = self.getSelection().length;
|
|
7968
7952
|
var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
7969
7953
|
if (!(self.maxLength === -1 || totalLength <= self.maxLength)) {
|
|
@@ -8207,7 +8191,7 @@ var INSERT_TEXT_COMMAND = 'insert-text';
|
|
|
8207
8191
|
*
|
|
8208
8192
|
* @hidden
|
|
8209
8193
|
*/
|
|
8210
|
-
var MDLists = /** @class */ (function () {
|
|
8194
|
+
var MDLists = /** @__PURE__ @class */ (function () {
|
|
8211
8195
|
/**
|
|
8212
8196
|
* Constructor for creating the Lists plugin
|
|
8213
8197
|
*
|
|
@@ -8678,7 +8662,7 @@ var MDLists = /** @class */ (function () {
|
|
|
8678
8662
|
* @hidden
|
|
8679
8663
|
* @deprecated
|
|
8680
8664
|
*/
|
|
8681
|
-
var MDFormats = /** @class */ (function () {
|
|
8665
|
+
var MDFormats = /** @__PURE__ @class */ (function () {
|
|
8682
8666
|
/**
|
|
8683
8667
|
* Constructor for creating the Formats plugin
|
|
8684
8668
|
*
|
|
@@ -8906,7 +8890,7 @@ var MDFormats = /** @class */ (function () {
|
|
|
8906
8890
|
* @hidden
|
|
8907
8891
|
* @deprecated
|
|
8908
8892
|
*/
|
|
8909
|
-
var MDSelectionFormats = /** @class */ (function () {
|
|
8893
|
+
var MDSelectionFormats = /** @__PURE__ @class */ (function () {
|
|
8910
8894
|
function MDSelectionFormats(parent) {
|
|
8911
8895
|
extend(this, this, parent, true);
|
|
8912
8896
|
this.selection = this.parent.markdownSelection;
|
|
@@ -9274,7 +9258,7 @@ var htmlKeyConfig = {
|
|
|
9274
9258
|
'insert-link': 'ctrl+k',
|
|
9275
9259
|
'insert-image': 'ctrl+shift+i',
|
|
9276
9260
|
'insert-audio': 'ctrl+shift+a',
|
|
9277
|
-
'insert-video': 'ctrl+
|
|
9261
|
+
'insert-video': 'ctrl+alt+v',
|
|
9278
9262
|
'insert-table': 'ctrl+shift+e',
|
|
9279
9263
|
'undo': 'ctrl+z',
|
|
9280
9264
|
'redo': 'ctrl+y',
|
|
@@ -9365,7 +9349,7 @@ var selfClosingTags = [
|
|
|
9365
9349
|
/**
|
|
9366
9350
|
* `Undo` module is used to handle undo actions.
|
|
9367
9351
|
*/
|
|
9368
|
-
var UndoRedoCommands = /** @class */ (function () {
|
|
9352
|
+
var UndoRedoCommands = /** @__PURE__ @class */ (function () {
|
|
9369
9353
|
function UndoRedoCommands(parent, options) {
|
|
9370
9354
|
this.undoRedoStack = [];
|
|
9371
9355
|
this.parent = parent;
|
|
@@ -9560,7 +9544,7 @@ var UndoRedoCommands = /** @class */ (function () {
|
|
|
9560
9544
|
* @hidden
|
|
9561
9545
|
* @deprecated
|
|
9562
9546
|
*/
|
|
9563
|
-
var MDLink = /** @class */ (function () {
|
|
9547
|
+
var MDLink = /** @__PURE__ @class */ (function () {
|
|
9564
9548
|
/**
|
|
9565
9549
|
* Constructor for creating the Formats plugin
|
|
9566
9550
|
*
|
|
@@ -9611,7 +9595,7 @@ var MDLink = /** @class */ (function () {
|
|
|
9611
9595
|
* @hidden
|
|
9612
9596
|
* @deprecated
|
|
9613
9597
|
*/
|
|
9614
|
-
var MDTable = /** @class */ (function () {
|
|
9598
|
+
var MDTable = /** @__PURE__ @class */ (function () {
|
|
9615
9599
|
/**
|
|
9616
9600
|
* Constructor for creating the Formats plugin
|
|
9617
9601
|
*
|
|
@@ -9840,7 +9824,7 @@ var MDTable = /** @class */ (function () {
|
|
|
9840
9824
|
* @hidden
|
|
9841
9825
|
* @deprecated
|
|
9842
9826
|
*/
|
|
9843
|
-
var ClearFormat = /** @class */ (function () {
|
|
9827
|
+
var ClearFormat = /** @__PURE__ @class */ (function () {
|
|
9844
9828
|
/**
|
|
9845
9829
|
* Constructor for creating the clear format plugin
|
|
9846
9830
|
*
|
|
@@ -9958,7 +9942,7 @@ var ClearFormat = /** @class */ (function () {
|
|
|
9958
9942
|
* @hidden
|
|
9959
9943
|
* @deprecated
|
|
9960
9944
|
*/
|
|
9961
|
-
var MDInsertText = /** @class */ (function () {
|
|
9945
|
+
var MDInsertText = /** @__PURE__ @class */ (function () {
|
|
9962
9946
|
/**
|
|
9963
9947
|
* Constructor for creating the insert text plugin
|
|
9964
9948
|
*
|
|
@@ -10008,7 +9992,7 @@ var MDInsertText = /** @class */ (function () {
|
|
|
10008
9992
|
* @hidden
|
|
10009
9993
|
* @deprecated
|
|
10010
9994
|
*/
|
|
10011
|
-
var MarkdownParser = /** @class */ (function () {
|
|
9995
|
+
var MarkdownParser = /** @__PURE__ @class */ (function () {
|
|
10012
9996
|
/**
|
|
10013
9997
|
* Constructor for creating the component
|
|
10014
9998
|
*
|
|
@@ -10104,26 +10088,26 @@ var MarkdownParser = /** @class */ (function () {
|
|
|
10104
10088
|
return MarkdownParser;
|
|
10105
10089
|
}());
|
|
10106
10090
|
|
|
10107
|
-
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
10108
|
-
var extendStatics = function (d, b) {
|
|
10109
|
-
extendStatics = Object.setPrototypeOf ||
|
|
10110
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10111
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
10112
|
-
return extendStatics(d, b);
|
|
10113
|
-
};
|
|
10114
|
-
return function (d, b) {
|
|
10115
|
-
extendStatics(d, b);
|
|
10116
|
-
function __() { this.constructor = d; }
|
|
10117
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10118
|
-
};
|
|
10119
|
-
})();
|
|
10091
|
+
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
10092
|
+
var extendStatics = function (d, b) {
|
|
10093
|
+
extendStatics = Object.setPrototypeOf ||
|
|
10094
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10095
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
10096
|
+
return extendStatics(d, b);
|
|
10097
|
+
};
|
|
10098
|
+
return function (d, b) {
|
|
10099
|
+
extendStatics(d, b);
|
|
10100
|
+
function __() { this.constructor = d; }
|
|
10101
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10102
|
+
};
|
|
10103
|
+
})();
|
|
10120
10104
|
/**
|
|
10121
10105
|
* Markdown adapter
|
|
10122
10106
|
*
|
|
10123
10107
|
* @hidden
|
|
10124
10108
|
* @deprecated
|
|
10125
10109
|
*/
|
|
10126
|
-
var MarkdownFormatter = /** @class */ (function (_super) {
|
|
10110
|
+
var MarkdownFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
10127
10111
|
__extends$1(MarkdownFormatter, _super);
|
|
10128
10112
|
function MarkdownFormatter(options) {
|
|
10129
10113
|
var _this = _super.call(this) || this;
|
|
@@ -10170,7 +10154,7 @@ var MarkdownFormatter = /** @class */ (function (_super) {
|
|
|
10170
10154
|
* @hidden
|
|
10171
10155
|
* @deprecated
|
|
10172
10156
|
*/
|
|
10173
|
-
var MarkdownRender = /** @class */ (function () {
|
|
10157
|
+
var MarkdownRender = /** @__PURE__ @class */ (function () {
|
|
10174
10158
|
/**
|
|
10175
10159
|
* Constructor for content renderer module
|
|
10176
10160
|
*
|
|
@@ -10253,7 +10237,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
10253
10237
|
/**
|
|
10254
10238
|
* `MarkdownEditor` module is used to markdown editor
|
|
10255
10239
|
*/
|
|
10256
|
-
var MarkdownEditor = /** @class */ (function () {
|
|
10240
|
+
var MarkdownEditor = /** @__PURE__ @class */ (function () {
|
|
10257
10241
|
function MarkdownEditor(parent, serviceLocator) {
|
|
10258
10242
|
this.parent = parent;
|
|
10259
10243
|
this.locator = serviceLocator;
|
|
@@ -10525,7 +10509,7 @@ var SELF_CLOSING_TAGS = ['area', 'base', 'br', 'embed', 'hr', 'img', 'input', 'p
|
|
|
10525
10509
|
/**
|
|
10526
10510
|
* `Selection` module is used to handle RTE Selections.
|
|
10527
10511
|
*/
|
|
10528
|
-
var NodeSelection = /** @class */ (function () {
|
|
10512
|
+
var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
10529
10513
|
function NodeSelection() {
|
|
10530
10514
|
this.startNodeName = [];
|
|
10531
10515
|
this.endNodeName = [];
|
|
@@ -10975,7 +10959,7 @@ var markerClassName = {
|
|
|
10975
10959
|
* @hidden
|
|
10976
10960
|
* @deprecated
|
|
10977
10961
|
*/
|
|
10978
|
-
var DOMNode = /** @class */ (function () {
|
|
10962
|
+
var DOMNode = /** @__PURE__ @class */ (function () {
|
|
10979
10963
|
/**
|
|
10980
10964
|
* Constructor for creating the DOMNode plugin
|
|
10981
10965
|
*
|
|
@@ -11413,19 +11397,6 @@ var DOMNode = /** @class */ (function () {
|
|
|
11413
11397
|
var end = this.parent.querySelector('.' + markerClassName.endSelection);
|
|
11414
11398
|
var startTextNode;
|
|
11415
11399
|
var endTextNode;
|
|
11416
|
-
if (start.textContent === '' && isNullOrUndefined(end) && action !== 'tab') {
|
|
11417
|
-
// To Do Apply Heading and Back space press in empty content.
|
|
11418
|
-
// if (isNOU(action) && save.range.startContainer.nodeType === 1 &&
|
|
11419
|
-
// (save.range.startContainer as HTMLElement).querySelectorAll('audio,video,image').length === 0) {
|
|
11420
|
-
// start.innerHTML = '<br>';
|
|
11421
|
-
// }
|
|
11422
|
-
if (start.childNodes.length === 1 && start.childNodes[0].nodeName === 'BR') {
|
|
11423
|
-
start.innerHTML = '<br>';
|
|
11424
|
-
}
|
|
11425
|
-
else {
|
|
11426
|
-
start.innerHTML = '';
|
|
11427
|
-
}
|
|
11428
|
-
}
|
|
11429
11400
|
if (this.hasClass(start, markerClassName.startSelection) && start.classList.length > 1) {
|
|
11430
11401
|
var replace = this.createTagString(DEFAULT_TAG, start, this.encode(start.textContent));
|
|
11431
11402
|
this.replaceWith(start, replace);
|
|
@@ -11548,7 +11519,7 @@ var DOMNode = /** @class */ (function () {
|
|
|
11548
11519
|
else if (start.tagName === 'BR') {
|
|
11549
11520
|
this.replaceWith(start, this.marker(className, this.encode(start.textContent)));
|
|
11550
11521
|
var markerStart = range.startContainer.querySelector('.' + className);
|
|
11551
|
-
markerStart.appendChild(start);
|
|
11522
|
+
markerStart.parentElement.appendChild(start);
|
|
11552
11523
|
}
|
|
11553
11524
|
else {
|
|
11554
11525
|
if (start.tagName === 'IMG') {
|
|
@@ -11753,7 +11724,7 @@ var DOMNode = /** @class */ (function () {
|
|
|
11753
11724
|
* @hidden
|
|
11754
11725
|
* @deprecated
|
|
11755
11726
|
*/
|
|
11756
|
-
var Lists = /** @class */ (function () {
|
|
11727
|
+
var Lists = /** @__PURE__ @class */ (function () {
|
|
11757
11728
|
/**
|
|
11758
11729
|
* Constructor for creating the Lists plugin
|
|
11759
11730
|
*
|
|
@@ -12620,7 +12591,7 @@ var Lists = /** @class */ (function () {
|
|
|
12620
12591
|
*
|
|
12621
12592
|
* @hidden
|
|
12622
12593
|
*/
|
|
12623
|
-
var InsertMethods = /** @class */ (function () {
|
|
12594
|
+
var InsertMethods = /** @__PURE__ @class */ (function () {
|
|
12624
12595
|
function InsertMethods() {
|
|
12625
12596
|
}
|
|
12626
12597
|
/**
|
|
@@ -12697,7 +12668,7 @@ var InsertMethods = /** @class */ (function () {
|
|
|
12697
12668
|
* @hidden
|
|
12698
12669
|
* @deprecated
|
|
12699
12670
|
*/
|
|
12700
|
-
var NodeCutter = /** @class */ (function () {
|
|
12671
|
+
var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
12701
12672
|
function NodeCutter() {
|
|
12702
12673
|
this.enterAction = 'P';
|
|
12703
12674
|
this.position = -1;
|
|
@@ -12861,7 +12832,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
12861
12832
|
if ((indexes.indexOf(range.startOffset) >= 0)
|
|
12862
12833
|
|| ((indexes.indexOf(range.startOffset - 1) >= 0) && (range.startOffset !== 1
|
|
12863
12834
|
|| (range.startOffset === 1 && new RegExp('\\s').test(str[0])))
|
|
12864
|
-
|| ((indexes[indexes.length - 1] - 1) === range.startOffset))) {
|
|
12835
|
+
|| (((indexes[indexes.length - 1] - 1) === range.startOffset) && !new RegExp('\\s').test(str[0])))) {
|
|
12865
12836
|
cursorRange = range;
|
|
12866
12837
|
this.position = 1;
|
|
12867
12838
|
}
|
|
@@ -12906,7 +12877,7 @@ var NodeCutter = /** @class */ (function () {
|
|
|
12906
12877
|
* @hidden
|
|
12907
12878
|
* @deprecated
|
|
12908
12879
|
*/
|
|
12909
|
-
var Formats = /** @class */ (function () {
|
|
12880
|
+
var Formats = /** @__PURE__ @class */ (function () {
|
|
12910
12881
|
/**
|
|
12911
12882
|
* Constructor for creating the Formats plugin
|
|
12912
12883
|
*
|
|
@@ -13275,7 +13246,7 @@ var Formats = /** @class */ (function () {
|
|
|
13275
13246
|
* @hidden
|
|
13276
13247
|
* @deprecated
|
|
13277
13248
|
*/
|
|
13278
|
-
var InsertHtml = /** @class */ (function () {
|
|
13249
|
+
var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
13279
13250
|
function InsertHtml() {
|
|
13280
13251
|
}
|
|
13281
13252
|
InsertHtml.Insert = function (docElement, insertNode, editNode, isExternal, enterAction) {
|
|
@@ -13384,6 +13355,9 @@ var InsertHtml = /** @class */ (function () {
|
|
|
13384
13355
|
InsertMethods.AppendBefore(node, parentNode.firstChild, false);
|
|
13385
13356
|
}
|
|
13386
13357
|
}
|
|
13358
|
+
else if (isNullOrUndefined(preNode.previousSibling) && insertNode.tagName === 'TABLE') {
|
|
13359
|
+
parentNode.prepend(node);
|
|
13360
|
+
}
|
|
13387
13361
|
else {
|
|
13388
13362
|
parentNode.appendChild(node);
|
|
13389
13363
|
}
|
|
@@ -13561,7 +13535,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
13561
13535
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0 && isFirstTextNode)) {
|
|
13562
13536
|
lastSelectionNode = node.firstChild;
|
|
13563
13537
|
if (isNullOrUndefined(node.previousElementSibling)) {
|
|
13564
|
-
var firstParaElm = createElement('p');
|
|
13538
|
+
var firstParaElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13565
13539
|
node.parentElement.insertBefore(firstParaElm, node);
|
|
13566
13540
|
}
|
|
13567
13541
|
if (node.previousElementSibling.nodeName === 'BR') {
|
|
@@ -13576,7 +13550,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
13576
13550
|
if (node.firstChild.nodeName === '#text' ||
|
|
13577
13551
|
(this.inlineNode.indexOf(node.firstChild.nodeName.toLocaleLowerCase()) >= 0)) {
|
|
13578
13552
|
if (!isPreviousInlineElem) {
|
|
13579
|
-
paraElm = createElement('p');
|
|
13553
|
+
paraElm = enterAction === 'DIV' ? createElement('div') : createElement('p');
|
|
13580
13554
|
paraElm.appendChild(node.firstChild);
|
|
13581
13555
|
fragment.appendChild(paraElm);
|
|
13582
13556
|
}
|
|
@@ -13821,7 +13795,7 @@ var InsertHtml = /** @class */ (function () {
|
|
|
13821
13795
|
* @hidden
|
|
13822
13796
|
* @deprecated
|
|
13823
13797
|
*/
|
|
13824
|
-
var LinkCommand = /** @class */ (function () {
|
|
13798
|
+
var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
13825
13799
|
/**
|
|
13826
13800
|
* Constructor for creating the Formats plugin
|
|
13827
13801
|
*
|
|
@@ -14124,7 +14098,7 @@ var LinkCommand = /** @class */ (function () {
|
|
|
14124
14098
|
* @hidden
|
|
14125
14099
|
* @deprecated
|
|
14126
14100
|
*/
|
|
14127
|
-
var Alignments = /** @class */ (function () {
|
|
14101
|
+
var Alignments = /** @__PURE__ @class */ (function () {
|
|
14128
14102
|
/**
|
|
14129
14103
|
* Constructor for creating the Formats plugin
|
|
14130
14104
|
*
|
|
@@ -14227,7 +14201,7 @@ var Alignments = /** @class */ (function () {
|
|
|
14227
14201
|
* @hidden
|
|
14228
14202
|
* @deprecated
|
|
14229
14203
|
*/
|
|
14230
|
-
var Indents = /** @class */ (function () {
|
|
14204
|
+
var Indents = /** @__PURE__ @class */ (function () {
|
|
14231
14205
|
/**
|
|
14232
14206
|
* Constructor for creating the Formats plugin
|
|
14233
14207
|
*
|
|
@@ -14363,7 +14337,7 @@ var CLASS_VIDEO_INLINE = 'e-video-inline';
|
|
|
14363
14337
|
* @hidden
|
|
14364
14338
|
* @deprecated
|
|
14365
14339
|
*/
|
|
14366
|
-
var ImageCommand = /** @class */ (function () {
|
|
14340
|
+
var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
14367
14341
|
/**
|
|
14368
14342
|
* Constructor for creating the Formats plugin
|
|
14369
14343
|
*
|
|
@@ -14439,8 +14413,8 @@ var ImageCommand = /** @class */ (function () {
|
|
|
14439
14413
|
e.item.url = isNullOrUndefined(e.item.url) || e.item.url === 'undefined' ? e.item.src : e.item.url;
|
|
14440
14414
|
if (!isNullOrUndefined(e.item.selectParent) && e.item.selectParent[0].tagName === 'IMG') {
|
|
14441
14415
|
var imgEle = e.item.selectParent[0];
|
|
14442
|
-
this.setStyle(imgEle, e);
|
|
14443
14416
|
isReplaced = true;
|
|
14417
|
+
this.setStyle(imgEle, e, isReplaced);
|
|
14444
14418
|
}
|
|
14445
14419
|
else {
|
|
14446
14420
|
var imgElement = createElement('img');
|
|
@@ -14476,12 +14450,33 @@ var ImageCommand = /** @class */ (function () {
|
|
|
14476
14450
|
}
|
|
14477
14451
|
});
|
|
14478
14452
|
}
|
|
14453
|
+
if (e.value === 'Replace') {
|
|
14454
|
+
e.item.subCommand = 'Replace';
|
|
14455
|
+
this.callBack(e);
|
|
14456
|
+
}
|
|
14479
14457
|
};
|
|
14480
|
-
ImageCommand.prototype.setStyle = function (imgElement, e) {
|
|
14458
|
+
ImageCommand.prototype.setStyle = function (imgElement, e, imgReplace) {
|
|
14481
14459
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14482
14460
|
imgElement.setAttribute('src', e.item.url);
|
|
14483
14461
|
}
|
|
14484
|
-
|
|
14462
|
+
var alignClassName;
|
|
14463
|
+
if (imgReplace) {
|
|
14464
|
+
var alignClass = {
|
|
14465
|
+
'e-imgcenter': 'e-imgcenter',
|
|
14466
|
+
'e-imgright': 'e-imgright',
|
|
14467
|
+
'e-imgleft': 'e-imgleft'
|
|
14468
|
+
};
|
|
14469
|
+
var imgClassList = imgElement.classList;
|
|
14470
|
+
for (var i = 0; i < imgClassList.length; i++) {
|
|
14471
|
+
// eslint-disable-next-line
|
|
14472
|
+
if (!isNullOrUndefined(alignClass[imgClassList[i]])) {
|
|
14473
|
+
// eslint-disable-next-line
|
|
14474
|
+
alignClassName = alignClass[imgClassList[i]];
|
|
14475
|
+
}
|
|
14476
|
+
}
|
|
14477
|
+
}
|
|
14478
|
+
imgElement.setAttribute('class', 'e-rte-image' + (isNullOrUndefined(e.item.cssClass) ? '' : ' ' + e.item.cssClass)
|
|
14479
|
+
+ (isNullOrUndefined(alignClassName) ? '' : ' ' + alignClassName));
|
|
14485
14480
|
if (!isNullOrUndefined(e.item.altText)) {
|
|
14486
14481
|
imgElement.setAttribute('alt', e.item.altText);
|
|
14487
14482
|
}
|
|
@@ -14533,6 +14528,9 @@ var ImageCommand = /** @class */ (function () {
|
|
|
14533
14528
|
if (!isNullOrUndefined(e.item.target)) {
|
|
14534
14529
|
anchor.setAttribute('target', e.item.target);
|
|
14535
14530
|
}
|
|
14531
|
+
if (!isNullOrUndefined(e.item.ariaLabel)) {
|
|
14532
|
+
anchor.setAttribute('aria-label', e.item.ariaLabel);
|
|
14533
|
+
}
|
|
14536
14534
|
InsertHtml.Insert(this.parent.currentDocument, anchor, this.parent.editableElement);
|
|
14537
14535
|
this.callBack(e);
|
|
14538
14536
|
};
|
|
@@ -14564,9 +14562,11 @@ var ImageCommand = /** @class */ (function () {
|
|
|
14564
14562
|
e.item.selectNode[0].parentElement.href = e.item.url;
|
|
14565
14563
|
if (isNullOrUndefined(e.item.target)) {
|
|
14566
14564
|
e.item.selectNode[0].parentElement.removeAttribute('target');
|
|
14565
|
+
e.item.selectNode[0].parentElement.removeAttribute('aria-label');
|
|
14567
14566
|
}
|
|
14568
14567
|
else {
|
|
14569
14568
|
e.item.selectNode[0].parentElement.target = e.item.target;
|
|
14569
|
+
e.item.selectNode[0].parentElement.ariaLabel = e.item.ariaLabel;
|
|
14570
14570
|
}
|
|
14571
14571
|
this.callBack(e);
|
|
14572
14572
|
};
|
|
@@ -14728,7 +14728,7 @@ var ImageCommand = /** @class */ (function () {
|
|
|
14728
14728
|
* @hidden
|
|
14729
14729
|
* @deprecated
|
|
14730
14730
|
*/
|
|
14731
|
-
var AudioCommand = /** @class */ (function () {
|
|
14731
|
+
var AudioCommand = /** @__PURE__ @class */ (function () {
|
|
14732
14732
|
/**
|
|
14733
14733
|
* Constructor for creating the Audio plugin
|
|
14734
14734
|
*
|
|
@@ -14833,9 +14833,19 @@ var AudioCommand = /** @class */ (function () {
|
|
|
14833
14833
|
if (!isNullOrUndefined(e.item.url)) {
|
|
14834
14834
|
sourceElement.setAttribute('src', e.item.url);
|
|
14835
14835
|
}
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14836
|
+
var fileExtension = e.item.fileName ? e.item.fileName.split('.').pop().toLowerCase() :
|
|
14837
|
+
e.item.url ? e.item.url.split('.').pop().toLowerCase() : '';
|
|
14838
|
+
if (fileExtension === 'opus') {
|
|
14839
|
+
sourceElement.type = 'audio/ogg';
|
|
14840
|
+
}
|
|
14841
|
+
else if (fileExtension === 'm4a') {
|
|
14842
|
+
sourceElement.type = 'audio/mp4';
|
|
14843
|
+
}
|
|
14844
|
+
else {
|
|
14845
|
+
sourceElement.type = e.item.fileName && e.item.fileName.split('.').length > 0 ?
|
|
14846
|
+
'audio/' + e.item.fileName.split('.')[e.item.fileName.split('.').length - 1] :
|
|
14847
|
+
e.item.url && e.item.url.split('.').length > 0 ? 'audio/' + e.item.url.split('.')[e.item.url.split('.').length - 1] : '';
|
|
14848
|
+
}
|
|
14839
14849
|
};
|
|
14840
14850
|
AudioCommand.prototype.callBack = function (e) {
|
|
14841
14851
|
if (e.callBack) {
|
|
@@ -14857,7 +14867,7 @@ var AudioCommand = /** @class */ (function () {
|
|
|
14857
14867
|
* @hidden
|
|
14858
14868
|
* @deprecated
|
|
14859
14869
|
*/
|
|
14860
|
-
var VideoCommand = /** @class */ (function () {
|
|
14870
|
+
var VideoCommand = /** @__PURE__ @class */ (function () {
|
|
14861
14871
|
/**
|
|
14862
14872
|
* Constructor for creating the Video plugin
|
|
14863
14873
|
*
|
|
@@ -15105,7 +15115,7 @@ var VideoCommand = /** @class */ (function () {
|
|
|
15105
15115
|
* @hidden
|
|
15106
15116
|
* @deprecated
|
|
15107
15117
|
*/
|
|
15108
|
-
var TableCommand = /** @class */ (function () {
|
|
15118
|
+
var TableCommand = /** @__PURE__ @class */ (function () {
|
|
15109
15119
|
/**
|
|
15110
15120
|
* Constructor for creating the Formats plugin
|
|
15111
15121
|
*
|
|
@@ -16040,7 +16050,7 @@ var TableCommand = /** @class */ (function () {
|
|
|
16040
16050
|
|
|
16041
16051
|
return TableCommand;
|
|
16042
16052
|
}());
|
|
16043
|
-
var MinMax = /** @class */ (function () {
|
|
16053
|
+
var MinMax = /** @__PURE__ @class */ (function () {
|
|
16044
16054
|
function MinMax() {
|
|
16045
16055
|
}
|
|
16046
16056
|
return MinMax;
|
|
@@ -16052,7 +16062,7 @@ var MinMax = /** @class */ (function () {
|
|
|
16052
16062
|
* @hidden
|
|
16053
16063
|
* @deprecated
|
|
16054
16064
|
*/
|
|
16055
|
-
var IsFormatted = /** @class */ (function () {
|
|
16065
|
+
var IsFormatted = /** @__PURE__ @class */ (function () {
|
|
16056
16066
|
function IsFormatted() {
|
|
16057
16067
|
}
|
|
16058
16068
|
/**
|
|
@@ -16302,7 +16312,7 @@ var IsFormatted = /** @class */ (function () {
|
|
|
16302
16312
|
/**
|
|
16303
16313
|
* `Selection` module is used to handle RTE Selections.
|
|
16304
16314
|
*/
|
|
16305
|
-
var SelectionCommands = /** @class */ (function () {
|
|
16315
|
+
var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
16306
16316
|
function SelectionCommands() {
|
|
16307
16317
|
}
|
|
16308
16318
|
/**
|
|
@@ -16589,6 +16599,19 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
16589
16599
|
}
|
|
16590
16600
|
else {
|
|
16591
16601
|
child = InsertMethods.unwrap(formatNode);
|
|
16602
|
+
var liElement = nodes[index].parentElement;
|
|
16603
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16604
|
+
liElement = closest(liElement, 'li');
|
|
16605
|
+
}
|
|
16606
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16607
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16608
|
+
if (format === 'bold') {
|
|
16609
|
+
liElement.style.fontWeight = 'normal';
|
|
16610
|
+
}
|
|
16611
|
+
else if (format === "italic") {
|
|
16612
|
+
liElement.style.fontStyle = 'normal';
|
|
16613
|
+
}
|
|
16614
|
+
}
|
|
16592
16615
|
}
|
|
16593
16616
|
if (child[0] && !isFontStyle) {
|
|
16594
16617
|
var nodeTraverse = child[index] ? child[index] : child[0];
|
|
@@ -16637,6 +16660,16 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
16637
16660
|
if (child[num].nodeType !== 3 || (child[num].textContent &&
|
|
16638
16661
|
child[num].textContent.trim().length > 0)) {
|
|
16639
16662
|
child[num] = InsertMethods.Wrap(child[num], this.GetFormatNode(format, value, formatNodeTagName, formatNodeStyles));
|
|
16663
|
+
var liElement = nodes[index].parentElement;
|
|
16664
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16665
|
+
liElement = closest(liElement, 'li');
|
|
16666
|
+
}
|
|
16667
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16668
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16669
|
+
if (format === 'fontname') {
|
|
16670
|
+
liElement.style.fontFamily = value;
|
|
16671
|
+
}
|
|
16672
|
+
}
|
|
16640
16673
|
if (child[num].textContent === startText) {
|
|
16641
16674
|
if (num === 0) {
|
|
16642
16675
|
range.setStartBefore(child[num]);
|
|
@@ -16750,6 +16783,9 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
16750
16783
|
liElement.style.color = value;
|
|
16751
16784
|
liElement.style.textDecoration = 'inherit';
|
|
16752
16785
|
}
|
|
16786
|
+
else if (format === 'fontname') {
|
|
16787
|
+
liElement.style.fontFamily = value;
|
|
16788
|
+
}
|
|
16753
16789
|
}
|
|
16754
16790
|
if (value === 'formatPainter') {
|
|
16755
16791
|
return this.insertFormatPainterElem(nodes, index, range, nodeCutter, painterValues, domNode);
|
|
@@ -16797,6 +16833,19 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
16797
16833
|
}
|
|
16798
16834
|
else {
|
|
16799
16835
|
nodes[index] = this.applyStyles(nodes, index, element);
|
|
16836
|
+
var liElement = nodes[index].parentElement;
|
|
16837
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() !== 'li') {
|
|
16838
|
+
liElement = closest(liElement, 'li');
|
|
16839
|
+
}
|
|
16840
|
+
if (!isNullOrUndefined(liElement) && liElement.tagName.toLowerCase() === 'li' &&
|
|
16841
|
+
liElement.textContent.trim() === nodes[index].textContent.trim()) {
|
|
16842
|
+
if (format === 'bold') {
|
|
16843
|
+
liElement.style.fontWeight = 'bold';
|
|
16844
|
+
}
|
|
16845
|
+
else if (format === "italic") {
|
|
16846
|
+
liElement.style.fontStyle = 'italic';
|
|
16847
|
+
}
|
|
16848
|
+
}
|
|
16800
16849
|
}
|
|
16801
16850
|
}
|
|
16802
16851
|
}
|
|
@@ -17034,7 +17083,7 @@ var SelectionCommands = /** @class */ (function () {
|
|
|
17034
17083
|
* @hidden
|
|
17035
17084
|
* @deprecated
|
|
17036
17085
|
*/
|
|
17037
|
-
var SelectionBasedExec = /** @class */ (function () {
|
|
17086
|
+
var SelectionBasedExec = /** @__PURE__ @class */ (function () {
|
|
17038
17087
|
/**
|
|
17039
17088
|
* Constructor for creating the Formats plugin
|
|
17040
17089
|
*
|
|
@@ -17083,7 +17132,7 @@ var SelectionBasedExec = /** @class */ (function () {
|
|
|
17083
17132
|
* @hidden
|
|
17084
17133
|
* @deprecated
|
|
17085
17134
|
*/
|
|
17086
|
-
var InsertHtmlExec = /** @class */ (function () {
|
|
17135
|
+
var InsertHtmlExec = /** @__PURE__ @class */ (function () {
|
|
17087
17136
|
/**
|
|
17088
17137
|
* Constructor for creating the Formats plugin
|
|
17089
17138
|
*
|
|
@@ -17130,7 +17179,7 @@ var InsertHtmlExec = /** @class */ (function () {
|
|
|
17130
17179
|
/**
|
|
17131
17180
|
* `Clear Format` module is used to handle Clear Format.
|
|
17132
17181
|
*/
|
|
17133
|
-
var ClearFormat$1 = /** @class */ (function () {
|
|
17182
|
+
var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
17134
17183
|
function ClearFormat() {
|
|
17135
17184
|
}
|
|
17136
17185
|
/**
|
|
@@ -17383,7 +17432,7 @@ var ClearFormat$1 = /** @class */ (function () {
|
|
|
17383
17432
|
* @hidden
|
|
17384
17433
|
* @deprecated
|
|
17385
17434
|
*/
|
|
17386
|
-
var ClearFormatExec = /** @class */ (function () {
|
|
17435
|
+
var ClearFormatExec = /** @__PURE__ @class */ (function () {
|
|
17387
17436
|
/**
|
|
17388
17437
|
* Constructor for creating the Formats plugin
|
|
17389
17438
|
*
|
|
@@ -17428,7 +17477,7 @@ var ClearFormatExec = /** @class */ (function () {
|
|
|
17428
17477
|
/**
|
|
17429
17478
|
* `Undo` module is used to handle undo actions.
|
|
17430
17479
|
*/
|
|
17431
|
-
var UndoRedoManager = /** @class */ (function () {
|
|
17480
|
+
var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
17432
17481
|
function UndoRedoManager(parent, options) {
|
|
17433
17482
|
this.undoRedoStack = [];
|
|
17434
17483
|
this.parent = parent;
|
|
@@ -17660,7 +17709,7 @@ var UndoRedoManager = /** @class */ (function () {
|
|
|
17660
17709
|
* @hidden
|
|
17661
17710
|
* @deprecated
|
|
17662
17711
|
*/
|
|
17663
|
-
var MsWordPaste = /** @class */ (function () {
|
|
17712
|
+
var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
17664
17713
|
function MsWordPaste(parent) {
|
|
17665
17714
|
this.olData = [
|
|
17666
17715
|
'decimal',
|
|
@@ -18128,6 +18177,9 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
18128
18177
|
resultElem = elm.querySelectorAll(keys[i]);
|
|
18129
18178
|
}
|
|
18130
18179
|
for (var j = 0; j < resultElem.length; j++) {
|
|
18180
|
+
if (resultElem[j].closest('li') && keys[i] === 'p') {
|
|
18181
|
+
continue;
|
|
18182
|
+
}
|
|
18131
18183
|
var styleProperty = resultElem[j].getAttribute('style');
|
|
18132
18184
|
if (!isNullOrUndefined(styleProperty) && styleProperty.trim() !== '') {
|
|
18133
18185
|
var valueSplit = values[i].split(';');
|
|
@@ -18426,7 +18478,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
18426
18478
|
!isNormalList) {
|
|
18427
18479
|
prevList = null;
|
|
18428
18480
|
}
|
|
18429
|
-
var pElement = createElement('p');
|
|
18481
|
+
var pElement = createElement('p', { className: 'MsoNormal' });
|
|
18430
18482
|
pElement.innerHTML = collection[index].content.join(' ');
|
|
18431
18483
|
if ((collection[index].nestedLevel === 1) && listCount === 0 && collection[index].content) {
|
|
18432
18484
|
root.appendChild(temp = createElement(collection[index].listType, { className: collection[index].class }));
|
|
@@ -18599,7 +18651,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
18599
18651
|
* @hidden
|
|
18600
18652
|
* @deprecated
|
|
18601
18653
|
*/
|
|
18602
|
-
var InsertTextExec = /** @class */ (function () {
|
|
18654
|
+
var InsertTextExec = /** @__PURE__ @class */ (function () {
|
|
18603
18655
|
/**
|
|
18604
18656
|
* Constructor for creating the InsertText plugin
|
|
18605
18657
|
*
|
|
@@ -18637,7 +18689,7 @@ var InsertTextExec = /** @class */ (function () {
|
|
|
18637
18689
|
* @deprecated
|
|
18638
18690
|
*/
|
|
18639
18691
|
var statusCollection = getDefaultHtmlTbStatus();
|
|
18640
|
-
var ToolbarStatus = /** @class */ (function () {
|
|
18692
|
+
var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
18641
18693
|
function ToolbarStatus() {
|
|
18642
18694
|
}
|
|
18643
18695
|
/**
|
|
@@ -18991,7 +19043,7 @@ var ToolbarStatus = /** @class */ (function () {
|
|
|
18991
19043
|
return ToolbarStatus;
|
|
18992
19044
|
}());
|
|
18993
19045
|
|
|
18994
|
-
var EmojiPickerAction = /** @class */ (function () {
|
|
19046
|
+
var EmojiPickerAction = /** @__PURE__ @class */ (function () {
|
|
18995
19047
|
function EmojiPickerAction(parent) {
|
|
18996
19048
|
this.parent = parent;
|
|
18997
19049
|
this.addEventListener();
|
|
@@ -19055,7 +19107,7 @@ var EmojiPickerAction = /** @class */ (function () {
|
|
|
19055
19107
|
* Base export
|
|
19056
19108
|
*/
|
|
19057
19109
|
|
|
19058
|
-
var FormatPainterActions = /** @class */ (function () {
|
|
19110
|
+
var FormatPainterActions = /** @__PURE__ @class */ (function () {
|
|
19059
19111
|
function FormatPainterActions(parent, options) {
|
|
19060
19112
|
this.INVALID_TAGS = ['A', 'AUDIO', 'IMG', 'VIDEO', 'IFRAME'];
|
|
19061
19113
|
this.parent = parent;
|
|
@@ -19680,7 +19732,7 @@ var FormatPainterActions = /** @class */ (function () {
|
|
|
19680
19732
|
* @hidden
|
|
19681
19733
|
* @deprecated
|
|
19682
19734
|
*/
|
|
19683
|
-
var EditorManager = /** @class */ (function () {
|
|
19735
|
+
var EditorManager = /** @__PURE__ @class */ (function () {
|
|
19684
19736
|
/**
|
|
19685
19737
|
* Constructor for creating the component
|
|
19686
19738
|
*
|
|
@@ -19867,26 +19919,26 @@ var EditorManager = /** @class */ (function () {
|
|
|
19867
19919
|
return EditorManager;
|
|
19868
19920
|
}());
|
|
19869
19921
|
|
|
19870
|
-
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
19871
|
-
var extendStatics = function (d, b) {
|
|
19872
|
-
extendStatics = Object.setPrototypeOf ||
|
|
19873
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19874
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
19875
|
-
return extendStatics(d, b);
|
|
19876
|
-
};
|
|
19877
|
-
return function (d, b) {
|
|
19878
|
-
extendStatics(d, b);
|
|
19879
|
-
function __() { this.constructor = d; }
|
|
19880
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19881
|
-
};
|
|
19882
|
-
})();
|
|
19922
|
+
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
19923
|
+
var extendStatics = function (d, b) {
|
|
19924
|
+
extendStatics = Object.setPrototypeOf ||
|
|
19925
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19926
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
19927
|
+
return extendStatics(d, b);
|
|
19928
|
+
};
|
|
19929
|
+
return function (d, b) {
|
|
19930
|
+
extendStatics(d, b);
|
|
19931
|
+
function __() { this.constructor = d; }
|
|
19932
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19933
|
+
};
|
|
19934
|
+
})();
|
|
19883
19935
|
/**
|
|
19884
19936
|
* HTML adapter
|
|
19885
19937
|
*
|
|
19886
19938
|
* @hidden
|
|
19887
19939
|
* @deprecated
|
|
19888
19940
|
*/
|
|
19889
|
-
var HTMLFormatter = /** @class */ (function (_super) {
|
|
19941
|
+
var HTMLFormatter = /** @__PURE__ @class */ (function (_super) {
|
|
19890
19942
|
__extends$2(HTMLFormatter, _super);
|
|
19891
19943
|
function HTMLFormatter(options) {
|
|
19892
19944
|
var _this = _super.call(this) || this;
|
|
@@ -19927,7 +19979,7 @@ var HTMLFormatter = /** @class */ (function (_super) {
|
|
|
19927
19979
|
/**
|
|
19928
19980
|
* HtmlToolbarStatus module for refresh the toolbar status
|
|
19929
19981
|
*/
|
|
19930
|
-
var HtmlToolbarStatus = /** @class */ (function () {
|
|
19982
|
+
var HtmlToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
19931
19983
|
function HtmlToolbarStatus(parent) {
|
|
19932
19984
|
this.parent = parent;
|
|
19933
19985
|
this.toolbarStatus = this.prevToolbarStatus = getDefaultHtmlTbStatus();
|
|
@@ -19974,7 +20026,7 @@ var HtmlToolbarStatus = /** @class */ (function () {
|
|
|
19974
20026
|
* @hidden
|
|
19975
20027
|
* @deprecated
|
|
19976
20028
|
*/
|
|
19977
|
-
var ContentRender = /** @class */ (function () {
|
|
20029
|
+
var ContentRender = /** @__PURE__ @class */ (function () {
|
|
19978
20030
|
/**
|
|
19979
20031
|
* Constructor for content renderer module
|
|
19980
20032
|
*
|
|
@@ -20062,19 +20114,19 @@ var ContentRender = /** @class */ (function () {
|
|
|
20062
20114
|
return ContentRender;
|
|
20063
20115
|
}());
|
|
20064
20116
|
|
|
20065
|
-
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
20066
|
-
var extendStatics = function (d, b) {
|
|
20067
|
-
extendStatics = Object.setPrototypeOf ||
|
|
20068
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20069
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
20070
|
-
return extendStatics(d, b);
|
|
20071
|
-
};
|
|
20072
|
-
return function (d, b) {
|
|
20073
|
-
extendStatics(d, b);
|
|
20074
|
-
function __() { this.constructor = d; }
|
|
20075
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
20076
|
-
};
|
|
20077
|
-
})();
|
|
20117
|
+
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
20118
|
+
var extendStatics = function (d, b) {
|
|
20119
|
+
extendStatics = Object.setPrototypeOf ||
|
|
20120
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20121
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
20122
|
+
return extendStatics(d, b);
|
|
20123
|
+
};
|
|
20124
|
+
return function (d, b) {
|
|
20125
|
+
extendStatics(d, b);
|
|
20126
|
+
function __() { this.constructor = d; }
|
|
20127
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
20128
|
+
};
|
|
20129
|
+
})();
|
|
20078
20130
|
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .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;}\n .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;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .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;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .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; }\n </style>\n </head>";
|
|
20079
20131
|
/**
|
|
20080
20132
|
* Content module is used to render Rich Text Editor content
|
|
@@ -20082,7 +20134,7 @@ var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n
|
|
|
20082
20134
|
* @hidden
|
|
20083
20135
|
* @deprecated
|
|
20084
20136
|
*/
|
|
20085
|
-
var IframeContentRender = /** @class */ (function (_super) {
|
|
20137
|
+
var IframeContentRender = /** @__PURE__ @class */ (function (_super) {
|
|
20086
20138
|
__extends$3(IframeContentRender, _super);
|
|
20087
20139
|
function IframeContentRender() {
|
|
20088
20140
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -20154,7 +20206,7 @@ var IframeContentRender = /** @class */ (function (_super) {
|
|
|
20154
20206
|
/**
|
|
20155
20207
|
* XhtmlValidation module called when set enableXhtml as true
|
|
20156
20208
|
*/
|
|
20157
|
-
var XhtmlValidation = /** @class */ (function () {
|
|
20209
|
+
var XhtmlValidation = /** @__PURE__ @class */ (function () {
|
|
20158
20210
|
function XhtmlValidation(parent) {
|
|
20159
20211
|
this.parent = parent;
|
|
20160
20212
|
this.addEventListener();
|
|
@@ -20325,7 +20377,7 @@ var XhtmlValidation = /** @class */ (function () {
|
|
|
20325
20377
|
/**
|
|
20326
20378
|
* `HtmlEditor` module is used to HTML editor
|
|
20327
20379
|
*/
|
|
20328
|
-
var HtmlEditor = /** @class */ (function () {
|
|
20380
|
+
var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
20329
20381
|
function HtmlEditor(parent, serviceLocator) {
|
|
20330
20382
|
this.rangeCollection = [];
|
|
20331
20383
|
this.isImageDelete = false;
|
|
@@ -20530,7 +20582,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
20530
20582
|
e.args.keyCode === 13) {
|
|
20531
20583
|
this.spaceLink(e.args);
|
|
20532
20584
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
20533
|
-
var currentLength = this.parent.getText().trim().length;
|
|
20585
|
+
var currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
20534
20586
|
var selectionLength = this.parent.getSelection().length;
|
|
20535
20587
|
var totalLength = (currentLength - selectionLength) + 1;
|
|
20536
20588
|
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
@@ -20540,6 +20592,10 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
20540
20592
|
}
|
|
20541
20593
|
else {
|
|
20542
20594
|
this.parent.notify(enterHandler, { args: e.args });
|
|
20595
|
+
var newRange = this.parent.getRange();
|
|
20596
|
+
if (!isNullOrUndefined(newRange.startContainer) && newRange.startContainer === this.parent.inputElement.lastChild && newRange.startContainer.nodeName !== '#text') {
|
|
20597
|
+
newRange.startContainer.scrollIntoView({ block: "end", inline: "nearest" });
|
|
20598
|
+
}
|
|
20543
20599
|
}
|
|
20544
20600
|
}
|
|
20545
20601
|
}
|
|
@@ -20688,7 +20744,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
20688
20744
|
var liElement;
|
|
20689
20745
|
var rootElement;
|
|
20690
20746
|
if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
|
|
20691
|
-
this.parent.contentModule.getText().trim().length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
20747
|
+
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' &&
|
|
20692
20748
|
currentRange.startContainer.parentElement.tagName !== 'TH') {
|
|
20693
20749
|
this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
|
|
20694
20750
|
if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
|
|
@@ -20903,6 +20959,19 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
20903
20959
|
}, e, value);
|
|
20904
20960
|
}
|
|
20905
20961
|
};
|
|
20962
|
+
HtmlEditor.prototype.mouseOutHandler = function () {
|
|
20963
|
+
if (!isNullOrUndefined(this.tooltipTargetEle)) {
|
|
20964
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20965
|
+
}
|
|
20966
|
+
else {
|
|
20967
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20968
|
+
this.parent.contentModule.getDocument();
|
|
20969
|
+
this.tooltipTargetEle = currentDocument.querySelector('[data-title]');
|
|
20970
|
+
this.tooltipTargetEle.setAttribute('title', this.tooltipTargetEle.getAttribute('data-title'));
|
|
20971
|
+
}
|
|
20972
|
+
this.tooltipTargetEle.removeAttribute('data-title');
|
|
20973
|
+
EventHandler.remove(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler);
|
|
20974
|
+
};
|
|
20906
20975
|
HtmlEditor.prototype.onToolbarClick = function (args) {
|
|
20907
20976
|
var _this = this;
|
|
20908
20977
|
var save;
|
|
@@ -20910,6 +20979,15 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
20910
20979
|
var selectParentEle;
|
|
20911
20980
|
var item = args.item;
|
|
20912
20981
|
var closestElement = closest(args.originalEvent.target, '.e-rte-quick-popup');
|
|
20982
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
20983
|
+
this.parent.contentModule.getDocument();
|
|
20984
|
+
this.tooltipTargetEle = closest(args.originalEvent.target, '[data-tooltip-id]');
|
|
20985
|
+
if (!isNullOrUndefined(this.tooltipTargetEle) && this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
20986
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
20987
|
+
this.tooltipTargetEle.setAttribute('data-title', this.tooltipTargetEle.getAttribute('title'));
|
|
20988
|
+
this.tooltipTargetEle.removeAttribute('title');
|
|
20989
|
+
EventHandler.add(this.tooltipTargetEle, 'mouseout', this.mouseOutHandler, this);
|
|
20990
|
+
}
|
|
20913
20991
|
if (item.command !== 'FormatPainter') {
|
|
20914
20992
|
if (closestElement && !closestElement.classList.contains('e-rte-inline-popup') && !closestElement.classList.contains('e-rte-text-popup')) {
|
|
20915
20993
|
if (!(item.subCommand === 'SourceCode' || item.subCommand === 'Preview' ||
|
|
@@ -21172,7 +21250,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
21172
21250
|
/**
|
|
21173
21251
|
* PasteCleanup module called when pasting content in RichTextEditor
|
|
21174
21252
|
*/
|
|
21175
|
-
var PasteCleanup = /** @class */ (function () {
|
|
21253
|
+
var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
21176
21254
|
function PasteCleanup(parent, serviceLocator) {
|
|
21177
21255
|
this.inlineNode = ['a', 'abbr', 'acronym', 'audio', 'b', 'bdi', 'bdo', 'big', 'br', 'button',
|
|
21178
21256
|
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'font', 'i', 'iframe', 'img', 'input',
|
|
@@ -21222,6 +21300,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21222
21300
|
event: e
|
|
21223
21301
|
};
|
|
21224
21302
|
var value = null;
|
|
21303
|
+
var isClipboardHTMLDataNull = false;
|
|
21225
21304
|
var imageproperties;
|
|
21226
21305
|
if (e.args && !isNullOrUndefined(e.args.clipboardData)) {
|
|
21227
21306
|
value = e.args.clipboardData.getData('text/html');
|
|
@@ -21260,6 +21339,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21260
21339
|
var divElement = this.parent.createElement('div');
|
|
21261
21340
|
divElement.innerHTML = this.splitBreakLine(value);
|
|
21262
21341
|
value = divElement.innerHTML;
|
|
21342
|
+
isClipboardHTMLDataNull = true;
|
|
21263
21343
|
}
|
|
21264
21344
|
}
|
|
21265
21345
|
else if (value.length > 0) {
|
|
@@ -21281,10 +21361,13 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21281
21361
|
tempDivElem.innerHTML = value;
|
|
21282
21362
|
var isValueNotEmpty = tempDivElem.textContent !== '' || !isNullOrUndefined(tempDivElem.querySelector('img')) ||
|
|
21283
21363
|
!isNullOrUndefined(tempDivElem.querySelector('table'));
|
|
21364
|
+
this.parent.trigger(cleanupResizeElements, { value: value }, function (args) {
|
|
21365
|
+
value = args.value;
|
|
21366
|
+
});
|
|
21284
21367
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21285
21368
|
if (isValueNotEmpty) {
|
|
21286
21369
|
e.args.preventDefault();
|
|
21287
|
-
this.pasteDialog(value, args);
|
|
21370
|
+
this.pasteDialog(value, args, isClipboardHTMLDataNull);
|
|
21288
21371
|
}
|
|
21289
21372
|
else if (Browser.userAgent.indexOf('Firefox') !== -1 && isNullOrUndefined(file)) {
|
|
21290
21373
|
this.fireFoxImageUpload();
|
|
@@ -21296,7 +21379,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21296
21379
|
}
|
|
21297
21380
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21298
21381
|
e.args.preventDefault();
|
|
21299
|
-
this.plainFormatting(value, args);
|
|
21382
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21300
21383
|
}
|
|
21301
21384
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21302
21385
|
e.args.preventDefault();
|
|
@@ -21338,13 +21421,17 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21338
21421
|
PasteCleanup.prototype.splitBreakLine = function (value) {
|
|
21339
21422
|
var enterSplitText = value.split('\n');
|
|
21340
21423
|
var contentInnerElem = '';
|
|
21424
|
+
var startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
21425
|
+
var endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
21341
21426
|
for (var i = 0; i < enterSplitText.length; i++) {
|
|
21342
21427
|
if (enterSplitText[i].trim() === '') {
|
|
21343
21428
|
contentInnerElem += getDefaultValue(this.parent);
|
|
21344
21429
|
}
|
|
21345
21430
|
else {
|
|
21346
21431
|
var contentWithSpace = this.makeSpace(enterSplitText[i]);
|
|
21347
|
-
contentInnerElem += (i === 0
|
|
21432
|
+
contentInnerElem += (i === 0 && this.parent.enterKey !== 'BR' ? '<span>' : startNode) +
|
|
21433
|
+
(contentWithSpace.trim() === '' ? '<br>' : contentWithSpace.trim()) +
|
|
21434
|
+
(enterSplitText.length - 1 === i && this.parent.enterKey === 'BR' ? '' : (i === 0 && this.parent.enterKey !== 'BR' ? '</span>' : endNode));
|
|
21348
21435
|
}
|
|
21349
21436
|
}
|
|
21350
21437
|
return contentInnerElem;
|
|
@@ -21610,10 +21697,10 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21610
21697
|
var range = this.nodeSelectionObj.getRange(currentDocument);
|
|
21611
21698
|
this.saveSelection = this.nodeSelectionObj.save(range, currentDocument);
|
|
21612
21699
|
if (this.parent.pasteCleanupSettings.prompt) {
|
|
21613
|
-
this.pasteDialog(imageValue, pasteArgs);
|
|
21700
|
+
this.pasteDialog(imageValue, pasteArgs, false);
|
|
21614
21701
|
}
|
|
21615
21702
|
else if (this.parent.pasteCleanupSettings.plainText) {
|
|
21616
|
-
this.plainFormatting(imageValue, pasteArgs);
|
|
21703
|
+
this.plainFormatting(imageValue, pasteArgs, false);
|
|
21617
21704
|
}
|
|
21618
21705
|
else if (this.parent.pasteCleanupSettings.keepFormat) {
|
|
21619
21706
|
this.formatting(imageValue, false, pasteArgs);
|
|
@@ -21637,7 +21724,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21637
21724
|
var plainTextElement = this.parent.element.querySelector('#plainTextFormat');
|
|
21638
21725
|
this.plainTextRadioButton.appendTo(plainTextElement);
|
|
21639
21726
|
};
|
|
21640
|
-
PasteCleanup.prototype.selectFormatting = function (value, args, keepChecked, cleanChecked) {
|
|
21727
|
+
PasteCleanup.prototype.selectFormatting = function (value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull) {
|
|
21641
21728
|
if (keepChecked) {
|
|
21642
21729
|
this.formatting(value, false, args);
|
|
21643
21730
|
}
|
|
@@ -21645,10 +21732,10 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21645
21732
|
this.formatting(value, true, args);
|
|
21646
21733
|
}
|
|
21647
21734
|
else {
|
|
21648
|
-
this.plainFormatting(value, args);
|
|
21735
|
+
this.plainFormatting(value, args, isClipboardHTMLDataNull);
|
|
21649
21736
|
}
|
|
21650
21737
|
};
|
|
21651
|
-
PasteCleanup.prototype.pasteDialog = function (value, args) {
|
|
21738
|
+
PasteCleanup.prototype.pasteDialog = function (value, args, isClipboardHTMLDataNull) {
|
|
21652
21739
|
var _this = this;
|
|
21653
21740
|
var isHeight = false;
|
|
21654
21741
|
var preRTEHeight = this.parent.height;
|
|
@@ -21665,7 +21752,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21665
21752
|
var argument = _this.dialogObj;
|
|
21666
21753
|
_this.dialogRenderObj.close(argument);
|
|
21667
21754
|
_this.dialogObj.destroy();
|
|
21668
|
-
_this.selectFormatting(value, args, keepChecked, cleanChecked);
|
|
21755
|
+
_this.selectFormatting(value, args, keepChecked, cleanChecked, isClipboardHTMLDataNull);
|
|
21669
21756
|
}
|
|
21670
21757
|
},
|
|
21671
21758
|
buttonModel: {
|
|
@@ -21726,7 +21813,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21726
21813
|
isHeight = true;
|
|
21727
21814
|
}
|
|
21728
21815
|
this.dialogObj.show();
|
|
21729
|
-
this.setCssClass({ cssClass: this.parent.
|
|
21816
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
21730
21817
|
};
|
|
21731
21818
|
PasteCleanup.prototype.updateCss = function (currentObj, e) {
|
|
21732
21819
|
if (currentObj && e.cssClass) {
|
|
@@ -21939,7 +22026,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21939
22026
|
return value;
|
|
21940
22027
|
};
|
|
21941
22028
|
//Plain Formatting
|
|
21942
|
-
PasteCleanup.prototype.plainFormatting = function (value, args) {
|
|
22029
|
+
PasteCleanup.prototype.plainFormatting = function (value, args, isClipboardHTMLDataNull) {
|
|
21943
22030
|
var _this = this;
|
|
21944
22031
|
var clipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
21945
22032
|
clipBoardElem.innerHTML = value;
|
|
@@ -21977,6 +22064,13 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21977
22064
|
this.saveSelection.restore();
|
|
21978
22065
|
clipBoardElem.innerHTML = this.sanitizeHelper(clipBoardElem.innerHTML);
|
|
21979
22066
|
this.addTempClass(clipBoardElem);
|
|
22067
|
+
this.removingComments(clipBoardElem);
|
|
22068
|
+
if (this.parent.enterKey === 'BR' && !isClipboardHTMLDataNull) {
|
|
22069
|
+
clipBoardElem = this.reframeToBrContent(clipBoardElem);
|
|
22070
|
+
}
|
|
22071
|
+
else if (this.parent.enterKey === 'DIV') {
|
|
22072
|
+
clipBoardElem.innerHTML = clipBoardElem.innerHTML.replace(/<p class="pasteContent_RTE">/g, '<div>').replace(/<\/p>/g, '</div>');
|
|
22073
|
+
}
|
|
21980
22074
|
this.parent.trigger(afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: null }, function (updatedArgs) { value = updatedArgs.value; });
|
|
21981
22075
|
clipBoardElem.innerHTML = value;
|
|
21982
22076
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
|
|
@@ -21991,6 +22085,41 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
21991
22085
|
this.parent.formatter.onSuccess(this.parent, args);
|
|
21992
22086
|
}
|
|
21993
22087
|
};
|
|
22088
|
+
PasteCleanup.prototype.removingComments = function (elm) {
|
|
22089
|
+
var innerElement = elm.innerHTML;
|
|
22090
|
+
innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
|
|
22091
|
+
elm.innerHTML = innerElement;
|
|
22092
|
+
};
|
|
22093
|
+
PasteCleanup.prototype.reframeToBrContent = function (clipBoardElem) {
|
|
22094
|
+
var newClipBoardElem = this.parent.createElement('div', { className: 'pasteContent', styles: 'display:inline;' });
|
|
22095
|
+
while (!isNullOrUndefined(clipBoardElem.firstChild)) {
|
|
22096
|
+
var brElem = this.parent.createElement('br');
|
|
22097
|
+
var currentFirstChild = clipBoardElem.firstChild;
|
|
22098
|
+
if (currentFirstChild.nodeName === '#text') {
|
|
22099
|
+
var isNextSibPresent = !isNullOrUndefined(currentFirstChild.nextSibling);
|
|
22100
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22101
|
+
if (isNextSibPresent) {
|
|
22102
|
+
newClipBoardElem.appendChild(brElem);
|
|
22103
|
+
}
|
|
22104
|
+
}
|
|
22105
|
+
else {
|
|
22106
|
+
var isCurrentNodeBRElm = currentFirstChild.nodeName === 'BR';
|
|
22107
|
+
if (isCurrentNodeBRElm) {
|
|
22108
|
+
newClipBoardElem.appendChild(currentFirstChild);
|
|
22109
|
+
}
|
|
22110
|
+
else {
|
|
22111
|
+
newClipBoardElem.appendChild(currentFirstChild.childNodes[0]);
|
|
22112
|
+
}
|
|
22113
|
+
if (!isNullOrUndefined(currentFirstChild) && !isNullOrUndefined(currentFirstChild.nextSibling)) {
|
|
22114
|
+
newClipBoardElem.appendChild(brElem);
|
|
22115
|
+
}
|
|
22116
|
+
if (!isCurrentNodeBRElm && !isNullOrUndefined(currentFirstChild)) {
|
|
22117
|
+
detach(currentFirstChild);
|
|
22118
|
+
}
|
|
22119
|
+
}
|
|
22120
|
+
}
|
|
22121
|
+
return newClipBoardElem;
|
|
22122
|
+
};
|
|
21994
22123
|
PasteCleanup.prototype.getTextContent = function (clipBoardElem) {
|
|
21995
22124
|
for (var i = 0; i < this.blockNode.length; i++) {
|
|
21996
22125
|
var inElem = clipBoardElem.querySelectorAll(this.blockNode[i]);
|
|
@@ -22038,14 +22167,16 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
22038
22167
|
for (var i = 0; i < this.inlineNode.length; i++) {
|
|
22039
22168
|
var inElem = clipBoardElem.querySelectorAll(this.inlineNode[i]);
|
|
22040
22169
|
for (var j = 0; j < inElem.length; j++) {
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22170
|
+
if (!(inElem[j] === clipBoardElem.firstChild && inElem[j].nodeName === 'SPAN')) {
|
|
22171
|
+
var parElem = void 0;
|
|
22172
|
+
for (var k = 0; k < inElem[j].childNodes.length; k++) {
|
|
22173
|
+
parElem = inElem[j].childNodes[k].parentElement;
|
|
22174
|
+
inElem[j].childNodes[k].parentElement.parentElement.insertBefore(inElem[j].childNodes[k], inElem[j].childNodes[k].parentElement);
|
|
22175
|
+
k--;
|
|
22176
|
+
}
|
|
22177
|
+
if (!isNullOrUndefined(parElem)) {
|
|
22178
|
+
detach(parElem);
|
|
22179
|
+
}
|
|
22049
22180
|
}
|
|
22050
22181
|
}
|
|
22051
22182
|
}
|
|
@@ -22201,7 +22332,7 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
22201
22332
|
/**
|
|
22202
22333
|
* `Resize` module is used to resize the editor
|
|
22203
22334
|
*/
|
|
22204
|
-
var Resize = /** @class */ (function () {
|
|
22335
|
+
var Resize = /** @__PURE__ @class */ (function () {
|
|
22205
22336
|
function Resize(parent) {
|
|
22206
22337
|
this.parent = parent;
|
|
22207
22338
|
this.addEventListener();
|
|
@@ -22334,7 +22465,7 @@ var Resize = /** @class */ (function () {
|
|
|
22334
22465
|
/**
|
|
22335
22466
|
* `FileManager` module is used to display the directories and images inside the editor.
|
|
22336
22467
|
*/
|
|
22337
|
-
var FileManager$1 = /** @class */ (function () {
|
|
22468
|
+
var FileManager$1 = /** @__PURE__ @class */ (function () {
|
|
22338
22469
|
function FileManager$$1(parent, locator) {
|
|
22339
22470
|
FileManager.Inject(ContextMenu, DetailsView, NavigationPane, Toolbar$1);
|
|
22340
22471
|
this.parent = parent;
|
|
@@ -22404,7 +22535,7 @@ var FileManager$1 = /** @class */ (function () {
|
|
|
22404
22535
|
this.dialogObj.createElement = this.parent.createElement;
|
|
22405
22536
|
this.dialogObj.appendTo(dlgTarget);
|
|
22406
22537
|
this.dialogObj.show(Browser.isDevice ? true : false);
|
|
22407
|
-
this.setCssClass({ cssClass: this.parent.
|
|
22538
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
22408
22539
|
};
|
|
22409
22540
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
22410
22541
|
FileManager$$1.prototype.setCssClass = function (e) {
|
|
@@ -22584,7 +22715,7 @@ var FileManager$1 = /** @class */ (function () {
|
|
|
22584
22715
|
/**
|
|
22585
22716
|
* `FullScreen` module is used to maximize and minimize screen
|
|
22586
22717
|
*/
|
|
22587
|
-
var FullScreen = /** @class */ (function () {
|
|
22718
|
+
var FullScreen = /** @__PURE__ @class */ (function () {
|
|
22588
22719
|
function FullScreen(parent) {
|
|
22589
22720
|
this.parent = parent;
|
|
22590
22721
|
this.addEventListener();
|
|
@@ -22604,7 +22735,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
22604
22735
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22605
22736
|
}
|
|
22606
22737
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22607
|
-
this.parent.notify(
|
|
22738
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22608
22739
|
}
|
|
22609
22740
|
this.scrollableParent = getScrollableParent(this.parent.element);
|
|
22610
22741
|
if (!this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
@@ -22659,7 +22790,7 @@ var FullScreen = /** @class */ (function () {
|
|
|
22659
22790
|
this.parent.quickToolbarModule.hideQuickToolbars();
|
|
22660
22791
|
}
|
|
22661
22792
|
if (this.parent.showTooltip && !isNullOrUndefined(document.querySelector('.e-tooltip-wrap'))) {
|
|
22662
|
-
this.parent.notify(
|
|
22793
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
22663
22794
|
}
|
|
22664
22795
|
if (this.parent.element.classList.contains(CLS_FULL_SCREEN)) {
|
|
22665
22796
|
var evenArgs = {
|
|
@@ -22814,7 +22945,7 @@ function setAttributes(htmlAttributes, rte, isFrame, initial) {
|
|
|
22814
22945
|
}
|
|
22815
22946
|
}
|
|
22816
22947
|
|
|
22817
|
-
var FormatPainter = /** @class */ (function () {
|
|
22948
|
+
var FormatPainter = /** @__PURE__ @class */ (function () {
|
|
22818
22949
|
function FormatPainter(parent) {
|
|
22819
22950
|
this.isSticky = false;
|
|
22820
22951
|
this.isActive = false;
|
|
@@ -22852,7 +22983,7 @@ var FormatPainter = /** @class */ (function () {
|
|
|
22852
22983
|
};
|
|
22853
22984
|
FormatPainter.prototype.onKeyDown = function (event) {
|
|
22854
22985
|
var originalEvent = event.args;
|
|
22855
|
-
if ((originalEvent
|
|
22986
|
+
if (!isNullOrUndefined(originalEvent) && !isNullOrUndefined(originalEvent.action) && (originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')
|
|
22856
22987
|
|| (originalEvent.action === 'escape' && (this.previousAction === 'format-copy' || this.previousAction === 'format-paste'))) {
|
|
22857
22988
|
if ((originalEvent.action === 'format-copy' || originalEvent.action === 'format-paste')) {
|
|
22858
22989
|
originalEvent.stopPropagation();
|
|
@@ -22969,7 +23100,7 @@ var FormatPainter = /** @class */ (function () {
|
|
|
22969
23100
|
return FormatPainter;
|
|
22970
23101
|
}());
|
|
22971
23102
|
|
|
22972
|
-
var EmojiPicker = /** @class */ (function () {
|
|
23103
|
+
var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
22973
23104
|
function EmojiPicker(parent, serviceLocator) {
|
|
22974
23105
|
this.parent = parent;
|
|
22975
23106
|
this.locator = serviceLocator;
|
|
@@ -23009,6 +23140,9 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23009
23140
|
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
23010
23141
|
}
|
|
23011
23142
|
this.divElement = spanElement.closest('div');
|
|
23143
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
23144
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
23145
|
+
}
|
|
23012
23146
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
23013
23147
|
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
23014
23148
|
this.clickEvent = args.args;
|
|
@@ -23648,7 +23782,8 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23648
23782
|
};
|
|
23649
23783
|
EmojiPicker.prototype.onkeyPress = function (e) {
|
|
23650
23784
|
var originalEvent = e.args;
|
|
23651
|
-
var selection = this.parent.contentModule.
|
|
23785
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23786
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23652
23787
|
if (selection.rangeCount <= 0) {
|
|
23653
23788
|
return;
|
|
23654
23789
|
}
|
|
@@ -23668,6 +23803,10 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23668
23803
|
}
|
|
23669
23804
|
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
23670
23805
|
removeClass([this.divElement], 'e-active');
|
|
23806
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument : this.parent.contentModule.getDocument();
|
|
23807
|
+
if (this.parent.showTooltip && !isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
23808
|
+
this.parent.notify(destroyTooltip, { args: event });
|
|
23809
|
+
}
|
|
23671
23810
|
this.popupObj.hide();
|
|
23672
23811
|
}
|
|
23673
23812
|
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
@@ -23678,7 +23817,8 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23678
23817
|
};
|
|
23679
23818
|
EmojiPicker.prototype.onkeyUp = function (e) {
|
|
23680
23819
|
var originalEvent = e.args;
|
|
23681
|
-
var selection = this.parent.contentModule.
|
|
23820
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
23821
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
23682
23822
|
if (selection.rangeCount <= 0) {
|
|
23683
23823
|
return;
|
|
23684
23824
|
}
|
|
@@ -23704,7 +23844,7 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23704
23844
|
};
|
|
23705
23845
|
EmojiPicker.prototype.getCoordinates = function () {
|
|
23706
23846
|
var coordinates;
|
|
23707
|
-
var selection = this.parent.contentModule.
|
|
23847
|
+
var selection = (this.parent.iframeSettings.enable) ? this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
23708
23848
|
var range = selection.getRangeAt(0);
|
|
23709
23849
|
var firstChild;
|
|
23710
23850
|
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
@@ -23777,7 +23917,7 @@ var EmojiPicker = /** @class */ (function () {
|
|
|
23777
23917
|
* @hidden
|
|
23778
23918
|
* @deprecated
|
|
23779
23919
|
*/
|
|
23780
|
-
var Render = /** @class */ (function () {
|
|
23920
|
+
var Render = /** @__PURE__ @class */ (function () {
|
|
23781
23921
|
/**
|
|
23782
23922
|
* Constructor for render module
|
|
23783
23923
|
*
|
|
@@ -23876,7 +24016,7 @@ var Render = /** @class */ (function () {
|
|
|
23876
24016
|
/**
|
|
23877
24017
|
* `Link` module is used to handle undo actions.
|
|
23878
24018
|
*/
|
|
23879
|
-
var Link = /** @class */ (function () {
|
|
24019
|
+
var Link = /** @__PURE__ @class */ (function () {
|
|
23880
24020
|
function Link(parent, serviceLocator) {
|
|
23881
24021
|
this.parent = parent;
|
|
23882
24022
|
this.rteID = parent.element.id;
|
|
@@ -23996,7 +24136,7 @@ var Link = /** @class */ (function () {
|
|
|
23996
24136
|
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + parentTop + args.clientY : args.pageY;
|
|
23997
24137
|
}
|
|
23998
24138
|
if (this.quickToolObj.linkQTBar) {
|
|
23999
|
-
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer);
|
|
24139
|
+
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer, 'link');
|
|
24000
24140
|
}
|
|
24001
24141
|
}
|
|
24002
24142
|
};
|
|
@@ -24027,12 +24167,32 @@ var Link = /** @class */ (function () {
|
|
|
24027
24167
|
if (isPopupOpen) {
|
|
24028
24168
|
return;
|
|
24029
24169
|
}
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24170
|
+
if (e.args.ctrlKey === false) {
|
|
24171
|
+
this.showLinkQuickToolbar({
|
|
24172
|
+
args: args,
|
|
24173
|
+
isNotify: false,
|
|
24174
|
+
type: 'Links',
|
|
24175
|
+
elements: [args.target]
|
|
24176
|
+
});
|
|
24177
|
+
}
|
|
24178
|
+
else {
|
|
24179
|
+
var selection = this.parent.formatter.editorManager.nodeSelection;
|
|
24180
|
+
var range = selection.getRange(this.parent.contentModule.getDocument());
|
|
24181
|
+
var args_1 = {
|
|
24182
|
+
args: {
|
|
24183
|
+
item: {
|
|
24184
|
+
subCommand: 'OpenLink',
|
|
24185
|
+
command: 'Links',
|
|
24186
|
+
name: ''
|
|
24187
|
+
},
|
|
24188
|
+
originalEvent: e.args
|
|
24189
|
+
},
|
|
24190
|
+
selectNode: selection.getNodeCollection(range),
|
|
24191
|
+
selectParent: selection.getParentNodeCollection(range),
|
|
24192
|
+
selection: selection.save(range, this.parent.contentModule.getDocument())
|
|
24193
|
+
};
|
|
24194
|
+
this.parent.notify(openLink, args_1);
|
|
24195
|
+
}
|
|
24036
24196
|
}
|
|
24037
24197
|
else {
|
|
24038
24198
|
this.hideLinkQuickToolbar();
|
|
@@ -24089,7 +24249,7 @@ var Link = /** @class */ (function () {
|
|
|
24089
24249
|
};
|
|
24090
24250
|
Link.prototype.showDialog = function () {
|
|
24091
24251
|
this.openDialog(false);
|
|
24092
|
-
this.setCssClass({ cssClass: this.parent.
|
|
24252
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
24093
24253
|
};
|
|
24094
24254
|
Link.prototype.closeDialog = function () {
|
|
24095
24255
|
if (this.dialogObj) {
|
|
@@ -24122,22 +24282,22 @@ var Link = /** @class */ (function () {
|
|
|
24122
24282
|
var textPlace = this.i10n.getConstant('textPlaceholder');
|
|
24123
24283
|
var title = this.i10n.getConstant('linkTitle');
|
|
24124
24284
|
var linkDialogEle = this.parent.createElement('div', {
|
|
24125
|
-
className: 'e-rte-link-dialog' +
|
|
24285
|
+
className: 'e-rte-link-dialog' + this.parent.getCssClass(true), id: this.rteID + '_rtelink'
|
|
24126
24286
|
});
|
|
24127
24287
|
this.parent.element.appendChild(linkDialogEle);
|
|
24128
24288
|
var linkContent = this.parent.createElement('div', {
|
|
24129
|
-
className: 'e-rte-linkcontent' +
|
|
24289
|
+
className: 'e-rte-linkcontent' + this.parent.getCssClass(true), id: this.rteID + '_linkContent'
|
|
24130
24290
|
});
|
|
24131
24291
|
var htmlTextbox = (this.parent.editorMode === 'HTML') ? '<label>' + linkTooltip +
|
|
24132
|
-
'</label></div><div class="e-rte-field' +
|
|
24133
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' +
|
|
24134
|
-
'<div class="e-rte-label' +
|
|
24135
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
24136
|
-
var content = '<div class="e-rte-label' +
|
|
24137
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' +
|
|
24138
|
-
'<div class="e-rte-label' +
|
|
24139
|
-
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' +
|
|
24140
|
-
'</div><div class="e-rte-label' +
|
|
24292
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24293
|
+
'<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>' +
|
|
24294
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '"></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24295
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>' : '';
|
|
24296
|
+
var content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
24297
|
+
'<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>' +
|
|
24298
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
24299
|
+
'<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 + '">' +
|
|
24300
|
+
'</div><div class="e-rte-label' + this.parent.getCssClass(true) + '">' + htmlTextbox;
|
|
24141
24301
|
var contentElem = parseHtml(content);
|
|
24142
24302
|
linkContent.appendChild(contentElem);
|
|
24143
24303
|
var linkTarget = linkContent.querySelector('.e-rte-linkTarget');
|
|
@@ -24146,7 +24306,7 @@ var Link = /** @class */ (function () {
|
|
|
24146
24306
|
var linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
24147
24307
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
24148
24308
|
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
24149
|
-
cssClass: this.parent.
|
|
24309
|
+
cssClass: this.parent.getCssClass() });
|
|
24150
24310
|
this.checkBoxObj.isStringTemplate = true;
|
|
24151
24311
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
24152
24312
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -24159,16 +24319,16 @@ var Link = /** @class */ (function () {
|
|
|
24159
24319
|
var dialogModel = {
|
|
24160
24320
|
header: this.i10n.getConstant('linkHeader'),
|
|
24161
24321
|
content: linkContent,
|
|
24162
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
24322
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
24163
24323
|
enableRtl: this.parent.enableRtl,
|
|
24164
24324
|
locale: this.parent.locale,
|
|
24165
24325
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
24166
24326
|
isModal: Browser.isDevice,
|
|
24167
24327
|
buttons: [{
|
|
24168
24328
|
click: this.insertlink.bind(selectObj),
|
|
24169
|
-
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' +
|
|
24329
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
24170
24330
|
},
|
|
24171
|
-
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' +
|
|
24331
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
24172
24332
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
24173
24333
|
animationSettings: { effect: 'None' },
|
|
24174
24334
|
close: function (event) {
|
|
@@ -24416,7 +24576,7 @@ var Link = /** @class */ (function () {
|
|
|
24416
24576
|
/**
|
|
24417
24577
|
* `Image` module is used to handle image actions.
|
|
24418
24578
|
*/
|
|
24419
|
-
var Image$1 = /** @class */ (function () {
|
|
24579
|
+
var Image$1 = /** @__PURE__ @class */ (function () {
|
|
24420
24580
|
function Image(parent, serviceLocator) {
|
|
24421
24581
|
this.isImgUploaded = false;
|
|
24422
24582
|
this.isAllowedTypes = true;
|
|
@@ -24670,18 +24830,18 @@ var Image$1 = /** @class */ (function () {
|
|
|
24670
24830
|
this.resizeBtnInit();
|
|
24671
24831
|
this.imgEle = e;
|
|
24672
24832
|
addClass([this.imgEle], 'e-resize');
|
|
24673
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' +
|
|
24833
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + this.parent.getCssClass(true), id: this.rteID + '_imgResize' });
|
|
24674
24834
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24675
|
-
className: 'e-rte-imageboxmark e-rte-topLeft' +
|
|
24835
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24676
24836
|
}));
|
|
24677
24837
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24678
|
-
className: 'e-rte-imageboxmark e-rte-topRight' +
|
|
24838
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24679
24839
|
}));
|
|
24680
24840
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24681
|
-
className: 'e-rte-imageboxmark e-rte-botLeft' +
|
|
24841
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
24682
24842
|
}));
|
|
24683
24843
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
24684
|
-
className: 'e-rte-imageboxmark e-rte-botRight' +
|
|
24844
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
24685
24845
|
}));
|
|
24686
24846
|
if (Browser.isDevice) {
|
|
24687
24847
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -24834,8 +24994,8 @@ var Image$1 = /** @class */ (function () {
|
|
|
24834
24994
|
img.removeAttribute('height');
|
|
24835
24995
|
}
|
|
24836
24996
|
else {
|
|
24837
|
-
img.style.width = expectedX + 'px';
|
|
24838
|
-
img.style.height = expectedX + 'px';
|
|
24997
|
+
img.style.width = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24998
|
+
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
24839
24999
|
}
|
|
24840
25000
|
}
|
|
24841
25001
|
};
|
|
@@ -24864,7 +25024,6 @@ var Image$1 = /** @class */ (function () {
|
|
|
24864
25024
|
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
24865
25025
|
_this.resizeImgDupPos(_this.imgEle);
|
|
24866
25026
|
_this.imgResizePos(_this.imgEle, _this.imgResizeDiv);
|
|
24867
|
-
_this.parent.setContentHeight('', false);
|
|
24868
25027
|
}
|
|
24869
25028
|
});
|
|
24870
25029
|
};
|
|
@@ -24879,7 +25038,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
24879
25038
|
else if (isNullOrUndefined(this.parent.insertImageSettings.maxHeight)) {
|
|
24880
25039
|
this.imgEle.style.maxHeight = '';
|
|
24881
25040
|
}
|
|
24882
|
-
this.imgEle.style.maxWidth = this.parent.getInsertImgMaxWidth() + 'px';
|
|
25041
|
+
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';
|
|
24883
25042
|
var pageX = this.getPointX(e);
|
|
24884
25043
|
var pageY = this.getPointY(e);
|
|
24885
25044
|
var mouseX = (this.resizeBtnStat.botLeft || this.resizeBtnStat.topLeft) ? -(pageX - this.pageX) : (pageX - this.pageX);
|
|
@@ -25176,7 +25335,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25176
25335
|
};
|
|
25177
25336
|
Image.prototype.showDialog = function () {
|
|
25178
25337
|
this.openDialog(false);
|
|
25179
|
-
this.setCssClass({ cssClass: this.parent.
|
|
25338
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
25180
25339
|
};
|
|
25181
25340
|
Image.prototype.closeDialog = function () {
|
|
25182
25341
|
if (this.dialogObj) {
|
|
@@ -25384,19 +25543,19 @@ var Image$1 = /** @class */ (function () {
|
|
|
25384
25543
|
}
|
|
25385
25544
|
this.imagDialog(e);
|
|
25386
25545
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25387
|
-
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' +
|
|
25546
|
+
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + this.parent.getCssClass(true) });
|
|
25388
25547
|
var linkUrl = this.i10n.getConstant('linkurl');
|
|
25389
|
-
var content = '<div class="e-rte-field' +
|
|
25390
|
-
'<input type="text" data-role ="none" class="e-input e-img-link' +
|
|
25548
|
+
var content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25549
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + this.parent.getCssClass(true) + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
25391
25550
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
25392
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
25551
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>';
|
|
25393
25552
|
var contentElem = parseHtml(content);
|
|
25394
25553
|
linkWrap.appendChild(contentElem);
|
|
25395
25554
|
var linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
25396
25555
|
var inputLink = linkWrap.querySelector('.e-img-link');
|
|
25397
25556
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
25398
25557
|
this.checkBoxObj = new CheckBox({
|
|
25399
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
25558
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
25400
25559
|
change: function (e) {
|
|
25401
25560
|
if (e.checked) {
|
|
25402
25561
|
target_1 = '_blank';
|
|
@@ -25410,11 +25569,12 @@ var Image$1 = /** @class */ (function () {
|
|
|
25410
25569
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
25411
25570
|
this.checkBoxObj.appendTo(linkTarget);
|
|
25412
25571
|
var target_1 = this.checkBoxObj.checked ? '_blank' : null;
|
|
25572
|
+
var imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
|
|
25413
25573
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25414
25574
|
var linkargs_1 = {
|
|
25415
25575
|
args: e.args,
|
|
25416
25576
|
selfImage: this, selection: e.selection,
|
|
25417
|
-
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target_1
|
|
25577
|
+
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target_1, ariaLabel: imageLabel
|
|
25418
25578
|
};
|
|
25419
25579
|
this.dialogObj.setProperties({
|
|
25420
25580
|
height: 'inherit',
|
|
@@ -25427,7 +25587,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25427
25587
|
_this.insertlink(linkargs_1);
|
|
25428
25588
|
},
|
|
25429
25589
|
buttonModel: {
|
|
25430
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link' +
|
|
25590
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
25431
25591
|
}
|
|
25432
25592
|
}],
|
|
25433
25593
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
@@ -25453,13 +25613,13 @@ var Image$1 = /** @class */ (function () {
|
|
|
25453
25613
|
this.imagDialog(e);
|
|
25454
25614
|
var altText = this.i10n.getConstant('altText');
|
|
25455
25615
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
25456
|
-
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' +
|
|
25616
|
+
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + this.parent.getCssClass(true) });
|
|
25457
25617
|
var altHeader = this.i10n.getConstant('alternateHeader');
|
|
25458
25618
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
25459
25619
|
var getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
25460
25620
|
e.selectNode[0].getAttribute('alt');
|
|
25461
|
-
var content = '<div class="e-rte-field' +
|
|
25462
|
-
'<input type="text" spellcheck="false" class="e-input e-img-alt' +
|
|
25621
|
+
var content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
25622
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + this.parent.getCssClass(true) + '" placeholder="' + altText + '"/>' +
|
|
25463
25623
|
'</div>';
|
|
25464
25624
|
var contentElem = parseHtml(content);
|
|
25465
25625
|
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
@@ -25477,7 +25637,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25477
25637
|
_this.insertAlt(altArgs_1);
|
|
25478
25638
|
},
|
|
25479
25639
|
buttonModel: {
|
|
25480
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt' +
|
|
25640
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
25481
25641
|
}
|
|
25482
25642
|
}],
|
|
25483
25643
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
@@ -25529,14 +25689,14 @@ var Image$1 = /** @class */ (function () {
|
|
|
25529
25689
|
}
|
|
25530
25690
|
if (e.selectNode[0].parentElement.nodeName === 'A') {
|
|
25531
25691
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25532
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25692
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25533
25693
|
subCommand: e.args.item.subCommand
|
|
25534
25694
|
});
|
|
25535
25695
|
proxy.dialogObj.hide({ returnValue: true });
|
|
25536
25696
|
return;
|
|
25537
25697
|
}
|
|
25538
25698
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
25539
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
25699
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
25540
25700
|
subCommand: e.args.item.subCommand, selection: e.selection
|
|
25541
25701
|
});
|
|
25542
25702
|
var captionEle = closest(e.selectNode[0], '.e-img-caption');
|
|
@@ -25647,11 +25807,11 @@ var Image$1 = /** @class */ (function () {
|
|
|
25647
25807
|
}
|
|
25648
25808
|
else {
|
|
25649
25809
|
this.captionEle = this.parent.createElement('span', {
|
|
25650
|
-
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION +
|
|
25810
|
+
className: CLS_CAPTION + ' ' + CLS_RTE_CAPTION + this.parent.getCssClass(true),
|
|
25651
25811
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
25652
25812
|
});
|
|
25653
|
-
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' +
|
|
25654
|
-
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' +
|
|
25813
|
+
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
25814
|
+
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
25655
25815
|
attrs: { contenteditable: 'true' } });
|
|
25656
25816
|
var parent_1 = e.selectNode[0].parentElement;
|
|
25657
25817
|
if (parent_1.tagName === 'A') {
|
|
@@ -25704,7 +25864,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25704
25864
|
_this.insertSize(selectObj_1);
|
|
25705
25865
|
},
|
|
25706
25866
|
buttonModel: {
|
|
25707
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size' +
|
|
25867
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
25708
25868
|
}
|
|
25709
25869
|
}],
|
|
25710
25870
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
@@ -25750,7 +25910,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25750
25910
|
this.dialogObj.hide({ returnValue: true });
|
|
25751
25911
|
return;
|
|
25752
25912
|
}
|
|
25753
|
-
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' +
|
|
25913
|
+
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + this.parent.getCssClass(true), id: this.rteID + '_image' });
|
|
25754
25914
|
this.parent.element.appendChild(imgDialog);
|
|
25755
25915
|
var imgInsert = this.i10n.getConstant('dialogInsert');
|
|
25756
25916
|
var imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -25759,20 +25919,20 @@ var Image$1 = /** @class */ (function () {
|
|
|
25759
25919
|
var selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
25760
25920
|
var dialogModel = {
|
|
25761
25921
|
header: imgHeader,
|
|
25762
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
25922
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
25763
25923
|
enableRtl: this.parent.enableRtl,
|
|
25764
25924
|
locale: this.parent.locale,
|
|
25765
25925
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
25766
25926
|
isModal: Browser.isDevice,
|
|
25767
25927
|
buttons: [{
|
|
25768
25928
|
click: this.insertImageUrl.bind(selectObj),
|
|
25769
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' +
|
|
25929
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
|
|
25770
25930
|
},
|
|
25771
25931
|
{
|
|
25772
25932
|
click: function (e) {
|
|
25773
25933
|
_this.cancelDialog(e);
|
|
25774
25934
|
},
|
|
25775
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
25935
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
25776
25936
|
}],
|
|
25777
25937
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
25778
25938
|
animationSettings: { effect: 'None' },
|
|
@@ -25795,12 +25955,12 @@ var Image$1 = /** @class */ (function () {
|
|
|
25795
25955
|
_this.dialogObj = null;
|
|
25796
25956
|
}
|
|
25797
25957
|
};
|
|
25798
|
-
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' +
|
|
25958
|
+
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' + this.parent.getCssClass(true) });
|
|
25799
25959
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
25800
25960
|
|| this.parent.editorMode === 'HTML') {
|
|
25801
25961
|
dialogContent.appendChild(this.imgUpload(e));
|
|
25802
25962
|
}
|
|
25803
|
-
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' +
|
|
25963
|
+
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + this.parent.getCssClass(true) });
|
|
25804
25964
|
var linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
25805
25965
|
if (this.parent.editorMode === 'HTML') {
|
|
25806
25966
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -25917,10 +26077,10 @@ var Image$1 = /** @class */ (function () {
|
|
|
25917
26077
|
// eslint-disable-next-line
|
|
25918
26078
|
Image.prototype.imageUrlPopup = function (e) {
|
|
25919
26079
|
var _this = this;
|
|
25920
|
-
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' +
|
|
26080
|
+
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
25921
26081
|
var placeUrl = this.i10n.getConstant('imageUrl');
|
|
25922
26082
|
this.inputUrl = this.parent.createElement('input', {
|
|
25923
|
-
className: 'e-input e-img-url' +
|
|
26083
|
+
className: 'e-input e-img-url' + this.parent.getCssClass(true),
|
|
25924
26084
|
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
25925
26085
|
});
|
|
25926
26086
|
this.inputUrl.addEventListener('input', function () {
|
|
@@ -25987,7 +26147,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
25987
26147
|
var selectNode = e.selectNode[0];
|
|
25988
26148
|
var imgHeight = this.i10n.getConstant('imageHeight');
|
|
25989
26149
|
var imgWidth = this.i10n.getConstant('imageWidth');
|
|
25990
|
-
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' +
|
|
26150
|
+
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
25991
26151
|
var widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
25992
26152
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
25993
26153
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -25996,10 +26156,10 @@ var Image$1 = /** @class */ (function () {
|
|
|
25996
26156
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
25997
26157
|
this.changedWidthValue = null;
|
|
25998
26158
|
this.changedHeightValue = null;
|
|
25999
|
-
var content = '<div class="e-rte-label' +
|
|
26000
|
-
'</label></div><div class="e-rte-field' +
|
|
26001
|
-
'<div class="e-rte-label' +
|
|
26002
|
-
'<input type="text" id="imgheight" class="e-img-height' +
|
|
26159
|
+
var content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
26160
|
+
'</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>' +
|
|
26161
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
26162
|
+
'<input type="text" id="imgheight" class="e-img-height' + this.parent.getCssClass(true) + '"/></div>';
|
|
26003
26163
|
var contentElem = parseHtml(content);
|
|
26004
26164
|
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
26005
26165
|
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
@@ -26007,7 +26167,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26007
26167
|
this.widthNum = new TextBox({
|
|
26008
26168
|
value: formatUnit(widthVal),
|
|
26009
26169
|
enableRtl: this.parent.enableRtl,
|
|
26010
|
-
cssClass: this.parent.
|
|
26170
|
+
cssClass: this.parent.getCssClass(),
|
|
26011
26171
|
input: function (e) {
|
|
26012
26172
|
_this.inputWidthValue = formatUnit(_this.inputValue(e.value));
|
|
26013
26173
|
}
|
|
@@ -26017,7 +26177,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26017
26177
|
this.heightNum = new TextBox({
|
|
26018
26178
|
value: formatUnit(heightVal),
|
|
26019
26179
|
enableRtl: this.parent.enableRtl,
|
|
26020
|
-
cssClass: this.parent.
|
|
26180
|
+
cssClass: this.parent.getCssClass(),
|
|
26021
26181
|
input: function (e) {
|
|
26022
26182
|
_this.inputHeightValue = formatUnit(_this.inputValue(e.value));
|
|
26023
26183
|
}
|
|
@@ -26089,16 +26249,16 @@ var Image$1 = /** @class */ (function () {
|
|
|
26089
26249
|
save = e.selection;
|
|
26090
26250
|
selectParent = e.selectParent;
|
|
26091
26251
|
}
|
|
26092
|
-
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' +
|
|
26252
|
+
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + this.parent.getCssClass(true) });
|
|
26093
26253
|
var deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
26094
26254
|
var imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
26095
|
-
var span = this.parent.createElement('span', { className: 'e-droptext' +
|
|
26255
|
+
var span = this.parent.createElement('span', { className: 'e-droptext' + this.parent.getCssClass(true) });
|
|
26096
26256
|
var spanMsg = this.parent.createElement('span', {
|
|
26097
|
-
className: 'e-rte-upload-text' +
|
|
26257
|
+
className: 'e-rte-upload-text' + this.parent.getCssClass(true), innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
26098
26258
|
});
|
|
26099
26259
|
span.appendChild(spanMsg);
|
|
26100
26260
|
var btnEle = this.parent.createElement('button', {
|
|
26101
|
-
className: 'e-browsebtn' +
|
|
26261
|
+
className: 'e-browsebtn' + this.parent.getCssClass(true), id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
26102
26262
|
});
|
|
26103
26263
|
span.appendChild(btnEle);
|
|
26104
26264
|
uploadParentEle.appendChild(span);
|
|
@@ -26110,7 +26270,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26110
26270
|
var btnClick = (Browser.isDevice) ? span : btnEle;
|
|
26111
26271
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
26112
26272
|
var uploadEle = this.parent.createElement('input', {
|
|
26113
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.
|
|
26273
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.getCssClass()
|
|
26114
26274
|
});
|
|
26115
26275
|
uploadParentEle.appendChild(uploadEle);
|
|
26116
26276
|
var altText;
|
|
@@ -26118,7 +26278,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26118
26278
|
var filesData;
|
|
26119
26279
|
this.uploadObj = new Uploader({
|
|
26120
26280
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
26121
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
26281
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
26122
26282
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26123
26283
|
selected: function (e) {
|
|
26124
26284
|
proxy.isImgUploaded = true;
|
|
@@ -26191,9 +26351,9 @@ var Image$1 = /** @class */ (function () {
|
|
|
26191
26351
|
failure: function (e) {
|
|
26192
26352
|
_this.parent.trigger(imageUploadFailed, e);
|
|
26193
26353
|
},
|
|
26194
|
-
removing: function () {
|
|
26354
|
+
removing: function (removeEventArgs) {
|
|
26195
26355
|
// eslint-disable-next-line
|
|
26196
|
-
_this.parent.trigger(imageRemoving,
|
|
26356
|
+
_this.parent.trigger(imageRemoving, removeEventArgs, function (e) {
|
|
26197
26357
|
proxy.isImgUploaded = false;
|
|
26198
26358
|
_this.dialogObj.getButtons(0).element.disabled = true;
|
|
26199
26359
|
proxy.inputUrl.removeAttribute('disabled');
|
|
@@ -26482,7 +26642,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26482
26642
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
26483
26643
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
26484
26644
|
},
|
|
26485
|
-
cssClass: CLS_RTE_DIALOG_UPLOAD +
|
|
26645
|
+
cssClass: CLS_RTE_DIALOG_UPLOAD + this.parent.getCssClass(true),
|
|
26486
26646
|
dropArea: this.parent.element,
|
|
26487
26647
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
26488
26648
|
removing: function () {
|
|
@@ -26688,10 +26848,10 @@ var Image$1 = /** @class */ (function () {
|
|
|
26688
26848
|
*/
|
|
26689
26849
|
/* eslint-enable */
|
|
26690
26850
|
Image.prototype.destroy = function () {
|
|
26691
|
-
this.prevSelectedImgEle = undefined;
|
|
26692
26851
|
if (isNullOrUndefined(this.parent)) {
|
|
26693
26852
|
return;
|
|
26694
26853
|
}
|
|
26854
|
+
this.prevSelectedImgEle = undefined;
|
|
26695
26855
|
this.removeEventListener();
|
|
26696
26856
|
};
|
|
26697
26857
|
Image.prototype.moduleDestroy = function () {
|
|
@@ -26711,7 +26871,7 @@ var Image$1 = /** @class */ (function () {
|
|
|
26711
26871
|
/**
|
|
26712
26872
|
* `Audio` module is used to handle audio actions.
|
|
26713
26873
|
*/
|
|
26714
|
-
var Audio = /** @class */ (function () {
|
|
26874
|
+
var Audio = /** @__PURE__ @class */ (function () {
|
|
26715
26875
|
function Audio(parent, serviceLocator) {
|
|
26716
26876
|
this.isAudioUploaded = false;
|
|
26717
26877
|
this.isAllowedTypes = true;
|
|
@@ -27552,7 +27712,7 @@ var Audio = /** @class */ (function () {
|
|
|
27552
27712
|
return Audio;
|
|
27553
27713
|
}());
|
|
27554
27714
|
|
|
27555
|
-
var Video = /** @class */ (function () {
|
|
27715
|
+
var Video = /** @__PURE__ @class */ (function () {
|
|
27556
27716
|
function Video(parent, serviceLocator) {
|
|
27557
27717
|
this.isVideoUploaded = false;
|
|
27558
27718
|
this.isAllowedTypes = true;
|
|
@@ -28962,7 +29122,7 @@ var Video = /** @class */ (function () {
|
|
|
28962
29122
|
* @hidden
|
|
28963
29123
|
* @deprecated
|
|
28964
29124
|
*/
|
|
28965
|
-
var ViewSource = /** @class */ (function () {
|
|
29125
|
+
var ViewSource = /** @__PURE__ @class */ (function () {
|
|
28966
29126
|
/**
|
|
28967
29127
|
* Constructor for view source module
|
|
28968
29128
|
*
|
|
@@ -28996,7 +29156,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
28996
29156
|
this.parent.formatter.editorManager.observer.off(KEY_DOWN_HANDLER, this.onKeyDown);
|
|
28997
29157
|
};
|
|
28998
29158
|
ViewSource.prototype.getSourceCode = function () {
|
|
28999
|
-
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA +
|
|
29159
|
+
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA + this.parent.getCssClass(true) });
|
|
29000
29160
|
};
|
|
29001
29161
|
ViewSource.prototype.wireEvent = function (element) {
|
|
29002
29162
|
this.keyboardModule = new KeyboardEvents$1(element, {
|
|
@@ -29093,8 +29253,10 @@ var ViewSource = /** @class */ (function () {
|
|
|
29093
29253
|
this.getPanel().style.display = 'block';
|
|
29094
29254
|
}
|
|
29095
29255
|
else {
|
|
29256
|
+
var height = this.parent.inputElement.offsetHeight;
|
|
29096
29257
|
this.contentModule.getPanel().appendChild(this.previewElement);
|
|
29097
29258
|
this.getPanel().value = this.getTextAreaValue();
|
|
29259
|
+
this.previewElement.style.height = height + 'px';
|
|
29098
29260
|
this.contentModule.getEditPanel().style.display = 'none';
|
|
29099
29261
|
this.previewElement.style.display = 'block';
|
|
29100
29262
|
}
|
|
@@ -29232,7 +29394,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
29232
29394
|
/**
|
|
29233
29395
|
* `Table` module is used to handle table actions.
|
|
29234
29396
|
*/
|
|
29235
|
-
var Table = /** @class */ (function () {
|
|
29397
|
+
var Table = /** @__PURE__ @class */ (function () {
|
|
29236
29398
|
function Table(parent, serviceLocator) {
|
|
29237
29399
|
this.ensureInsideTableList = true;
|
|
29238
29400
|
this.pageX = null;
|
|
@@ -29257,6 +29419,7 @@ var Table = /** @class */ (function () {
|
|
|
29257
29419
|
this.parent.on(showTableDialog, this.showDialog, this);
|
|
29258
29420
|
this.parent.on(closeTableDialog, this.closeDialog, this);
|
|
29259
29421
|
this.parent.on(docClick, this.docClick, this);
|
|
29422
|
+
this.parent.on(iframeMouseDown, this.onIframeMouseDown, this);
|
|
29260
29423
|
this.parent.on(editAreaClick, this.editAreaClickHandler, this);
|
|
29261
29424
|
this.parent.on(clearDialogObj, this.clearDialogObj, this);
|
|
29262
29425
|
this.parent.on(tableToolbarAction, this.onToolbarAction, this);
|
|
@@ -29277,6 +29440,7 @@ var Table = /** @class */ (function () {
|
|
|
29277
29440
|
this.parent.off(initialEnd, this.afterRender);
|
|
29278
29441
|
this.parent.off(dynamicModule, this.afterRender);
|
|
29279
29442
|
this.parent.off(docClick, this.docClick);
|
|
29443
|
+
this.parent.off(iframeMouseDown, this.onIframeMouseDown);
|
|
29280
29444
|
this.parent.off(showTableDialog, this.showDialog);
|
|
29281
29445
|
this.parent.off(closeTableDialog, this.closeDialog);
|
|
29282
29446
|
this.parent.off(editAreaClick, this.editAreaClickHandler);
|
|
@@ -29285,8 +29449,8 @@ var Table = /** @class */ (function () {
|
|
|
29285
29449
|
this.parent.off(dropDownSelect, this.dropdownSelect);
|
|
29286
29450
|
this.parent.off(mouseDown, this.cellSelect);
|
|
29287
29451
|
this.parent.off(tableColorPickerChanged, this.setBGColor);
|
|
29288
|
-
this.parent.off(keyUp, this.keyUp);
|
|
29289
29452
|
this.parent.off(keyDown, this.keyDown);
|
|
29453
|
+
this.parent.off(keyUp, this.keyUp);
|
|
29290
29454
|
this.parent.off(mouseUp, this.selectionTable);
|
|
29291
29455
|
this.parent.off(tableModulekeyUp, this.tableModulekeyUp);
|
|
29292
29456
|
this.parent.off(bindCssClass, this.setCssClass);
|
|
@@ -29482,11 +29646,12 @@ var Table = /** @class */ (function () {
|
|
|
29482
29646
|
name: !isInternal ? 'showDialog' : null
|
|
29483
29647
|
};
|
|
29484
29648
|
this.insertTableDialog({ self: this, args: args, selection: selection });
|
|
29649
|
+
this.parent.formatter.editorManager.nodeSelection.restore();
|
|
29485
29650
|
}
|
|
29486
29651
|
};
|
|
29487
29652
|
Table.prototype.showDialog = function () {
|
|
29488
29653
|
this.openDialog(false);
|
|
29489
|
-
this.setCssClass({ cssClass: this.parent.
|
|
29654
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
29490
29655
|
};
|
|
29491
29656
|
Table.prototype.closeDialog = function () {
|
|
29492
29657
|
if (this.editdlgObj) {
|
|
@@ -29676,6 +29841,10 @@ var Table = /** @class */ (function () {
|
|
|
29676
29841
|
Table.prototype.tableHeader = function (selection, e) {
|
|
29677
29842
|
this.parent.formatter.process(this.parent, e, e.originalEvent, { selection: selection, subCommand: e.item.subCommand });
|
|
29678
29843
|
};
|
|
29844
|
+
Table.prototype.getAnchorNode = function (element) {
|
|
29845
|
+
var selectParent = closest(element, 'a');
|
|
29846
|
+
return (selectParent ? selectParent : element);
|
|
29847
|
+
};
|
|
29679
29848
|
Table.prototype.editAreaClickHandler = function (e) {
|
|
29680
29849
|
if (this.parent.readonly || !isNullOrUndefined(closest(e.args.target, '.e-img-caption'))) {
|
|
29681
29850
|
return;
|
|
@@ -29697,7 +29866,8 @@ var Table = /** @class */ (function () {
|
|
|
29697
29866
|
var closestTable = closest(target, 'table');
|
|
29698
29867
|
var startNode = this.parent.getRange().startContainer.parentElement;
|
|
29699
29868
|
var endNode = this.parent.getRange().endContainer.parentElement;
|
|
29700
|
-
|
|
29869
|
+
var isAnchorEle = this.getAnchorNode(target);
|
|
29870
|
+
if (target && target.nodeName !== 'A' && isAnchorEle.nodeName !== 'A' && target.nodeName !== 'IMG' && target.nodeName !== 'VIDEO' && !target.classList.contains(CLS_CLICKELEM) &&
|
|
29701
29871
|
target.nodeName !== 'AUDIO' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
29702
29872
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
29703
29873
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
@@ -29883,7 +30053,7 @@ var Table = /** @class */ (function () {
|
|
|
29883
30053
|
this.contentModule.getEditPanel().appendChild(rowReEle);
|
|
29884
30054
|
}
|
|
29885
30055
|
var tableReBox = this.parent.createElement('span', {
|
|
29886
|
-
className: CLS_TB_BOX_RES +
|
|
30056
|
+
className: CLS_TB_BOX_RES + this.parent.getCssClass(true), attrs: {
|
|
29887
30057
|
'data-col': columns.length.toString(), 'unselectable': 'on', 'contenteditable': 'false'
|
|
29888
30058
|
}
|
|
29889
30059
|
});
|
|
@@ -30036,7 +30206,7 @@ var Table = /** @class */ (function () {
|
|
|
30036
30206
|
};
|
|
30037
30207
|
Table.prototype.appendHelper = function () {
|
|
30038
30208
|
this.helper = this.parent.createElement('div', {
|
|
30039
|
-
className: 'e-table-rhelper' +
|
|
30209
|
+
className: 'e-table-rhelper' + this.parent.getCssClass(true)
|
|
30040
30210
|
});
|
|
30041
30211
|
if (Browser.isDevice) {
|
|
30042
30212
|
this.helper.classList.add('e-reicon');
|
|
@@ -30397,16 +30567,16 @@ var Table = /** @class */ (function () {
|
|
|
30397
30567
|
this.hideTableQuickToolbar();
|
|
30398
30568
|
var header = '1X1';
|
|
30399
30569
|
var insertbtn = this.l10n.getConstant('inserttablebtn');
|
|
30400
|
-
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' +
|
|
30401
|
-
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' +
|
|
30570
|
+
this.dlgDiv = this.parent.createElement('div', { className: 'e-rte-table-popup' + this.parent.getCssClass(true), id: this.rteID + '_table' });
|
|
30571
|
+
this.tblHeader = this.parent.createElement('div', { className: 'e-rte-popup-header' + this.parent.getCssClass(true) });
|
|
30402
30572
|
this.tblHeader.innerHTML = header;
|
|
30403
30573
|
this.dlgDiv.appendChild(this.tblHeader);
|
|
30404
|
-
var tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' +
|
|
30574
|
+
var tableDiv = this.parent.createElement('div', { className: 'e-rte-table-span' + this.parent.getCssClass(true) });
|
|
30405
30575
|
this.drawTable(tableDiv, args);
|
|
30406
30576
|
this.dlgDiv.appendChild(tableDiv);
|
|
30407
|
-
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' +
|
|
30577
|
+
this.dlgDiv.appendChild(this.parent.createElement('span', { className: 'e-span-border' + this.parent.getCssClass(true) }));
|
|
30408
30578
|
var btnEle = this.parent.createElement('button', {
|
|
30409
|
-
className: 'e-insert-table-btn' +
|
|
30579
|
+
className: 'e-insert-table-btn' + this.parent.getCssClass(true), id: this.rteID + '_insertTable',
|
|
30410
30580
|
attrs: { type: 'button', tabindex: '0' }
|
|
30411
30581
|
});
|
|
30412
30582
|
if (!isNullOrUndefined(this.parent.getToolbarElement().querySelector('.e-expended-nav'))) {
|
|
@@ -30414,7 +30584,7 @@ var Table = /** @class */ (function () {
|
|
|
30414
30584
|
}
|
|
30415
30585
|
this.dlgDiv.appendChild(btnEle);
|
|
30416
30586
|
this.createTableButton = new Button({
|
|
30417
|
-
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' +
|
|
30587
|
+
iconCss: 'e-icons e-create-table', content: insertbtn, cssClass: 'e-flat' + this.parent.getCssClass(true),
|
|
30418
30588
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale
|
|
30419
30589
|
});
|
|
30420
30590
|
this.createTableButton.isStringTemplate = true;
|
|
@@ -30442,10 +30612,15 @@ var Table = /** @class */ (function () {
|
|
|
30442
30612
|
});
|
|
30443
30613
|
addClass([this.popupObj.element], 'e-popup-open');
|
|
30444
30614
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
30445
|
-
addClass([this.popupObj.element], this.parent.
|
|
30615
|
+
addClass([this.popupObj.element], this.parent.getCssClass());
|
|
30446
30616
|
}
|
|
30447
30617
|
this.popupObj.refreshPosition(target);
|
|
30448
30618
|
};
|
|
30619
|
+
Table.prototype.onIframeMouseDown = function () {
|
|
30620
|
+
if (this.popupObj) {
|
|
30621
|
+
this.popupObj.hide();
|
|
30622
|
+
}
|
|
30623
|
+
};
|
|
30449
30624
|
Table.prototype.docClick = function (e) {
|
|
30450
30625
|
var target = e.args.target;
|
|
30451
30626
|
// eslint-disable-next-line
|
|
@@ -30482,10 +30657,10 @@ var Table = /** @class */ (function () {
|
|
|
30482
30657
|
var rowDiv;
|
|
30483
30658
|
var tableCell;
|
|
30484
30659
|
for (var row = 0; row < 3; row++) {
|
|
30485
|
-
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' +
|
|
30660
|
+
rowDiv = this.parent.createElement('div', { className: 'e-rte-table-row' + this.parent.getCssClass(true), attrs: { 'data-column': '' + row } });
|
|
30486
30661
|
for (var col = 0; col < 10; col++) {
|
|
30487
30662
|
var display = (row > 2) ? 'none' : 'inline-block';
|
|
30488
|
-
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' +
|
|
30663
|
+
tableCell = this.parent.createElement('div', { className: 'e-rte-tablecell e-default' + this.parent.getCssClass(true), attrs: { 'data-cell': '' + col } });
|
|
30489
30664
|
rowDiv.appendChild(tableCell);
|
|
30490
30665
|
tableCell.style.display = display;
|
|
30491
30666
|
if (col === 0 && row === 0) {
|
|
@@ -30509,13 +30684,13 @@ var Table = /** @class */ (function () {
|
|
|
30509
30684
|
height: 'initial', width: '290px', content: editContent, header: editHeader,
|
|
30510
30685
|
buttons: [{
|
|
30511
30686
|
click: this.applyProperties.bind(this, args),
|
|
30512
|
-
buttonModel: { content: update, cssClass: 'e-flat e-size-update' +
|
|
30687
|
+
buttonModel: { content: update, cssClass: 'e-flat e-size-update' + this.parent.getCssClass(true), isPrimary: true }
|
|
30513
30688
|
},
|
|
30514
30689
|
{
|
|
30515
30690
|
click: function (e) {
|
|
30516
30691
|
_this.cancelDialog(e);
|
|
30517
30692
|
},
|
|
30518
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30693
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30519
30694
|
}],
|
|
30520
30695
|
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
30521
30696
|
});
|
|
@@ -30557,10 +30732,10 @@ var Table = /** @class */ (function () {
|
|
|
30557
30732
|
Table.prototype.tableCellDlgContent = function () {
|
|
30558
30733
|
var tableColumn = this.l10n.getConstant('columns');
|
|
30559
30734
|
var tableRow = this.l10n.getConstant('rows');
|
|
30560
|
-
var tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' +
|
|
30561
|
-
var content = '<div class="e-rte-field' +
|
|
30562
|
-
+ ' data-role ="none" id="tableColumn" class="e-table-column' +
|
|
30563
|
-
+ '<div class="e-rte-field' +
|
|
30735
|
+
var tableWrap = this.parent.createElement('div', { className: 'e-cell-wrap' + this.parent.getCssClass(true) });
|
|
30736
|
+
var content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" '
|
|
30737
|
+
+ ' data-role ="none" id="tableColumn" class="e-table-column' + this.parent.getCssClass(true) + '"/></div>'
|
|
30738
|
+
+ '<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>';
|
|
30564
30739
|
var contentElem = parseHtml(content);
|
|
30565
30740
|
tableWrap.appendChild(contentElem);
|
|
30566
30741
|
this.columnTextBox = new NumericTextBox({
|
|
@@ -30571,7 +30746,7 @@ var Table = /** @class */ (function () {
|
|
|
30571
30746
|
floatLabelType: 'Auto',
|
|
30572
30747
|
max: 50,
|
|
30573
30748
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30574
|
-
cssClass: this.parent.
|
|
30749
|
+
cssClass: this.parent.getCssClass()
|
|
30575
30750
|
});
|
|
30576
30751
|
this.columnTextBox.isStringTemplate = true;
|
|
30577
30752
|
this.columnTextBox.appendTo(tableWrap.querySelector('#tableColumn'));
|
|
@@ -30583,7 +30758,7 @@ var Table = /** @class */ (function () {
|
|
|
30583
30758
|
floatLabelType: 'Auto',
|
|
30584
30759
|
max: 1000,
|
|
30585
30760
|
enableRtl: this.parent.enableRtl, locale: this.parent.locale,
|
|
30586
|
-
cssClass: this.parent.
|
|
30761
|
+
cssClass: this.parent.getCssClass()
|
|
30587
30762
|
});
|
|
30588
30763
|
this.rowTextBox.isStringTemplate = true;
|
|
30589
30764
|
this.rowTextBox.appendTo(tableWrap.querySelector('#tableRow'));
|
|
@@ -30604,7 +30779,7 @@ var Table = /** @class */ (function () {
|
|
|
30604
30779
|
return;
|
|
30605
30780
|
}
|
|
30606
30781
|
var tableDialog = this.parent.createElement('div', {
|
|
30607
|
-
className: 'e-rte-edit-table' +
|
|
30782
|
+
className: 'e-rte-edit-table' + this.parent.getCssClass(true), id: this.rteID + '_tabledialog'
|
|
30608
30783
|
});
|
|
30609
30784
|
this.parent.element.appendChild(tableDialog);
|
|
30610
30785
|
var insert = this.l10n.getConstant('dialogInsert');
|
|
@@ -30612,20 +30787,20 @@ var Table = /** @class */ (function () {
|
|
|
30612
30787
|
var header = this.l10n.getConstant('tabledialogHeader');
|
|
30613
30788
|
var dialogModel = {
|
|
30614
30789
|
header: header,
|
|
30615
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
30790
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
30616
30791
|
enableRtl: this.parent.enableRtl,
|
|
30617
30792
|
locale: this.parent.locale,
|
|
30618
30793
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px', height: 'initial',
|
|
30619
30794
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
30620
30795
|
isModal: Browser.isDevice,
|
|
30621
30796
|
buttons: [{
|
|
30622
|
-
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' +
|
|
30797
|
+
buttonModel: { content: insert, cssClass: 'e-flat e-insert-table' + this.parent.getCssClass(true), isPrimary: true }
|
|
30623
30798
|
},
|
|
30624
30799
|
{
|
|
30625
30800
|
click: function (e) {
|
|
30626
30801
|
_this.cancelDialog(e);
|
|
30627
30802
|
},
|
|
30628
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
30803
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: cancel }
|
|
30629
30804
|
}],
|
|
30630
30805
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
30631
30806
|
animationSettings: { effect: 'None' },
|
|
@@ -30698,13 +30873,13 @@ var Table = /** @class */ (function () {
|
|
|
30698
30873
|
var tableWidth = this.l10n.getConstant('tableWidth');
|
|
30699
30874
|
var cellPadding = this.l10n.getConstant('cellpadding');
|
|
30700
30875
|
var cellSpacing = this.l10n.getConstant('cellspacing');
|
|
30701
|
-
var tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' +
|
|
30876
|
+
var tableWrap = this.parent.createElement('div', { className: 'e-table-sizewrap' + this.parent.getCssClass(true) });
|
|
30702
30877
|
var widthVal = closest(selectNode, 'table').getClientRects()[0].width;
|
|
30703
30878
|
var padVal = closest(selectNode, 'td').style.padding;
|
|
30704
30879
|
var brdSpcVal = closest(selectNode, 'table').getAttribute('cellspacing');
|
|
30705
|
-
var content = '<div class="e-rte-field' +
|
|
30706
|
-
+ ' /></div>' + '<div class="e-rte-field' +
|
|
30707
|
-
+ ' </div><div class="e-rte-field' +
|
|
30880
|
+
var 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) + '" '
|
|
30881
|
+
+ ' /></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) + '" />'
|
|
30882
|
+
+ ' </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>';
|
|
30708
30883
|
var contentElem = parseHtml(content);
|
|
30709
30884
|
tableWrap.appendChild(contentElem);
|
|
30710
30885
|
this.tableWidthNum = new NumericTextBox({
|
|
@@ -30772,7 +30947,7 @@ var Table = /** @class */ (function () {
|
|
|
30772
30947
|
/**
|
|
30773
30948
|
* Dialog Renderer
|
|
30774
30949
|
*/
|
|
30775
|
-
var DialogRenderer = /** @class */ (function () {
|
|
30950
|
+
var DialogRenderer = /** @__PURE__ @class */ (function () {
|
|
30776
30951
|
function DialogRenderer(parent) {
|
|
30777
30952
|
this.parent = parent;
|
|
30778
30953
|
this.addEventListener();
|
|
@@ -30851,7 +31026,16 @@ var DialogRenderer = /** @class */ (function () {
|
|
|
30851
31026
|
DialogRenderer.prototype.getDialogPosition = function () {
|
|
30852
31027
|
var distanceFromVisibleTop = this.parent.element.getBoundingClientRect().top;
|
|
30853
31028
|
if (distanceFromVisibleTop < 0) {
|
|
30854
|
-
|
|
31029
|
+
var topHeight = 0;
|
|
31030
|
+
var parentElement = this.parent.element;
|
|
31031
|
+
while (parentElement.nodeName !== 'BODY') {
|
|
31032
|
+
var top_1 = parentElement.getBoundingClientRect().top;
|
|
31033
|
+
if (top_1 > 0) {
|
|
31034
|
+
topHeight = top_1;
|
|
31035
|
+
}
|
|
31036
|
+
parentElement = parentElement.parentElement;
|
|
31037
|
+
}
|
|
31038
|
+
distanceFromVisibleTop = Math.abs(distanceFromVisibleTop) + topHeight;
|
|
30855
31039
|
return distanceFromVisibleTop.toString();
|
|
30856
31040
|
}
|
|
30857
31041
|
else {
|
|
@@ -31069,29 +31253,29 @@ var executeGroup = {
|
|
|
31069
31253
|
}
|
|
31070
31254
|
};
|
|
31071
31255
|
|
|
31072
|
-
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
31073
|
-
var extendStatics = function (d, b) {
|
|
31074
|
-
extendStatics = Object.setPrototypeOf ||
|
|
31075
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31076
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31077
|
-
return extendStatics(d, b);
|
|
31078
|
-
};
|
|
31079
|
-
return function (d, b) {
|
|
31080
|
-
extendStatics(d, b);
|
|
31081
|
-
function __() { this.constructor = d; }
|
|
31082
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31083
|
-
};
|
|
31084
|
-
})();
|
|
31085
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31086
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31087
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31088
|
-
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;
|
|
31089
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31090
|
-
};
|
|
31256
|
+
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
31257
|
+
var extendStatics = function (d, b) {
|
|
31258
|
+
extendStatics = Object.setPrototypeOf ||
|
|
31259
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31260
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31261
|
+
return extendStatics(d, b);
|
|
31262
|
+
};
|
|
31263
|
+
return function (d, b) {
|
|
31264
|
+
extendStatics(d, b);
|
|
31265
|
+
function __() { this.constructor = d; }
|
|
31266
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31267
|
+
};
|
|
31268
|
+
})();
|
|
31269
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31270
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31271
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31272
|
+
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;
|
|
31273
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31274
|
+
};
|
|
31091
31275
|
/**
|
|
31092
31276
|
* Configures the toolbar settings of the RichTextEditor.
|
|
31093
31277
|
*/
|
|
31094
|
-
var ToolbarSettings$1 = /** @class */ (function (_super) {
|
|
31278
|
+
var ToolbarSettings$1 = /** @__PURE__ @class */ (function (_super) {
|
|
31095
31279
|
__extends$5(ToolbarSettings$$1, _super);
|
|
31096
31280
|
function ToolbarSettings$$1() {
|
|
31097
31281
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31116,7 +31300,7 @@ var ToolbarSettings$1 = /** @class */ (function (_super) {
|
|
|
31116
31300
|
/**
|
|
31117
31301
|
* Configures the image settings of the RichTextEditor.
|
|
31118
31302
|
*/
|
|
31119
|
-
var ImageSettings = /** @class */ (function (_super) {
|
|
31303
|
+
var ImageSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31120
31304
|
__extends$5(ImageSettings, _super);
|
|
31121
31305
|
function ImageSettings() {
|
|
31122
31306
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31168,7 +31352,7 @@ var ImageSettings = /** @class */ (function (_super) {
|
|
|
31168
31352
|
/**
|
|
31169
31353
|
* Configures the audio settings of the RichTextEditor.
|
|
31170
31354
|
*/
|
|
31171
|
-
var AudioSettings = /** @class */ (function (_super) {
|
|
31355
|
+
var AudioSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31172
31356
|
__extends$5(AudioSettings, _super);
|
|
31173
31357
|
function AudioSettings() {
|
|
31174
31358
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31196,7 +31380,7 @@ var AudioSettings = /** @class */ (function (_super) {
|
|
|
31196
31380
|
/**
|
|
31197
31381
|
* Configures the video settings of the RichTextEditor.
|
|
31198
31382
|
*/
|
|
31199
|
-
var VideoSettings = /** @class */ (function (_super) {
|
|
31383
|
+
var VideoSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31200
31384
|
__extends$5(VideoSettings, _super);
|
|
31201
31385
|
function VideoSettings() {
|
|
31202
31386
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31248,7 +31432,7 @@ var VideoSettings = /** @class */ (function (_super) {
|
|
|
31248
31432
|
/**
|
|
31249
31433
|
* Configures the file manager settings of the RichTextEditor.
|
|
31250
31434
|
*/
|
|
31251
|
-
var FileManagerSettings = /** @class */ (function (_super) {
|
|
31435
|
+
var FileManagerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31252
31436
|
__extends$5(FileManagerSettings, _super);
|
|
31253
31437
|
function FileManagerSettings() {
|
|
31254
31438
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31309,7 +31493,7 @@ var FileManagerSettings = /** @class */ (function (_super) {
|
|
|
31309
31493
|
], FileManagerSettings.prototype, "view", void 0);
|
|
31310
31494
|
return FileManagerSettings;
|
|
31311
31495
|
}(ChildProperty));
|
|
31312
|
-
var TableSettings = /** @class */ (function (_super) {
|
|
31496
|
+
var TableSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31313
31497
|
__extends$5(TableSettings, _super);
|
|
31314
31498
|
function TableSettings() {
|
|
31315
31499
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31334,7 +31518,7 @@ var TableSettings = /** @class */ (function (_super) {
|
|
|
31334
31518
|
/**
|
|
31335
31519
|
* Configures the quick toolbar settings of the RichTextEditor.
|
|
31336
31520
|
*/
|
|
31337
|
-
var QuickToolbarSettings = /** @class */ (function (_super) {
|
|
31521
|
+
var QuickToolbarSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31338
31522
|
__extends$5(QuickToolbarSettings, _super);
|
|
31339
31523
|
function QuickToolbarSettings() {
|
|
31340
31524
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31371,7 +31555,7 @@ var QuickToolbarSettings = /** @class */ (function (_super) {
|
|
|
31371
31555
|
/**
|
|
31372
31556
|
* Configure the format painter settings of the Rich Text Editor.
|
|
31373
31557
|
*/
|
|
31374
|
-
var FormatPainterSettings = /** @class */ (function (_super) {
|
|
31558
|
+
var FormatPainterSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31375
31559
|
__extends$5(FormatPainterSettings, _super);
|
|
31376
31560
|
function FormatPainterSettings() {
|
|
31377
31561
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31387,7 +31571,7 @@ var FormatPainterSettings = /** @class */ (function (_super) {
|
|
|
31387
31571
|
/**
|
|
31388
31572
|
* Specifies the emoji picker options in Rich Text Editor with the following properties.
|
|
31389
31573
|
*/
|
|
31390
|
-
var EmojiSettings = /** @class */ (function (_super) {
|
|
31574
|
+
var EmojiSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31391
31575
|
__extends$5(EmojiSettings, _super);
|
|
31392
31576
|
function EmojiSettings() {
|
|
31393
31577
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31403,7 +31587,7 @@ var EmojiSettings = /** @class */ (function (_super) {
|
|
|
31403
31587
|
/**
|
|
31404
31588
|
* Configures the Paste Cleanup settings of the RichTextEditor.
|
|
31405
31589
|
*/
|
|
31406
|
-
var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
31590
|
+
var PasteCleanupSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31407
31591
|
__extends$5(PasteCleanupSettings, _super);
|
|
31408
31592
|
function PasteCleanupSettings() {
|
|
31409
31593
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31431,7 +31615,7 @@ var PasteCleanupSettings = /** @class */ (function (_super) {
|
|
|
31431
31615
|
/**
|
|
31432
31616
|
* Configures the font family settings of the RichTextEditor.
|
|
31433
31617
|
*/
|
|
31434
|
-
var FontFamily = /** @class */ (function (_super) {
|
|
31618
|
+
var FontFamily = /** @__PURE__ @class */ (function (_super) {
|
|
31435
31619
|
__extends$5(FontFamily, _super);
|
|
31436
31620
|
function FontFamily() {
|
|
31437
31621
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31450,7 +31634,7 @@ var FontFamily = /** @class */ (function (_super) {
|
|
|
31450
31634
|
/**
|
|
31451
31635
|
* Configures the font size settings of the RichTextEditor.
|
|
31452
31636
|
*/
|
|
31453
|
-
var FontSize = /** @class */ (function (_super) {
|
|
31637
|
+
var FontSize = /** @__PURE__ @class */ (function (_super) {
|
|
31454
31638
|
__extends$5(FontSize, _super);
|
|
31455
31639
|
function FontSize() {
|
|
31456
31640
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31469,7 +31653,7 @@ var FontSize = /** @class */ (function (_super) {
|
|
|
31469
31653
|
/**
|
|
31470
31654
|
* Configures the format settings of the RichTextEditor.
|
|
31471
31655
|
*/
|
|
31472
|
-
var Format = /** @class */ (function (_super) {
|
|
31656
|
+
var Format = /** @__PURE__ @class */ (function (_super) {
|
|
31473
31657
|
__extends$5(Format, _super);
|
|
31474
31658
|
function Format() {
|
|
31475
31659
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31488,7 +31672,7 @@ var Format = /** @class */ (function (_super) {
|
|
|
31488
31672
|
/**
|
|
31489
31673
|
* Configures the font Color settings of the RichTextEditor.
|
|
31490
31674
|
*/
|
|
31491
|
-
var FontColor = /** @class */ (function (_super) {
|
|
31675
|
+
var FontColor = /** @__PURE__ @class */ (function (_super) {
|
|
31492
31676
|
__extends$5(FontColor, _super);
|
|
31493
31677
|
function FontColor() {
|
|
31494
31678
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31513,7 +31697,7 @@ var FontColor = /** @class */ (function (_super) {
|
|
|
31513
31697
|
/**
|
|
31514
31698
|
* Configures the background Color settings of the RichTextEditor.
|
|
31515
31699
|
*/
|
|
31516
|
-
var BackgroundColor = /** @class */ (function (_super) {
|
|
31700
|
+
var BackgroundColor = /** @__PURE__ @class */ (function (_super) {
|
|
31517
31701
|
__extends$5(BackgroundColor, _super);
|
|
31518
31702
|
function BackgroundColor() {
|
|
31519
31703
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31538,7 +31722,7 @@ var BackgroundColor = /** @class */ (function (_super) {
|
|
|
31538
31722
|
/**
|
|
31539
31723
|
* Configures the numberFormatList settings of the RichTextEditor.
|
|
31540
31724
|
*/
|
|
31541
|
-
var NumberFormatList = /** @class */ (function (_super) {
|
|
31725
|
+
var NumberFormatList = /** @__PURE__ @class */ (function (_super) {
|
|
31542
31726
|
__extends$5(NumberFormatList, _super);
|
|
31543
31727
|
function NumberFormatList() {
|
|
31544
31728
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31551,7 +31735,7 @@ var NumberFormatList = /** @class */ (function (_super) {
|
|
|
31551
31735
|
/**
|
|
31552
31736
|
* Configures the bulletFormatList settings of the RichTextEditor.
|
|
31553
31737
|
*/
|
|
31554
|
-
var BulletFormatList = /** @class */ (function (_super) {
|
|
31738
|
+
var BulletFormatList = /** @__PURE__ @class */ (function (_super) {
|
|
31555
31739
|
__extends$5(BulletFormatList, _super);
|
|
31556
31740
|
function BulletFormatList() {
|
|
31557
31741
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31562,29 +31746,29 @@ var BulletFormatList = /** @class */ (function (_super) {
|
|
|
31562
31746
|
return BulletFormatList;
|
|
31563
31747
|
}(ChildProperty));
|
|
31564
31748
|
|
|
31565
|
-
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
31566
|
-
var extendStatics = function (d, b) {
|
|
31567
|
-
extendStatics = Object.setPrototypeOf ||
|
|
31568
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31569
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31570
|
-
return extendStatics(d, b);
|
|
31571
|
-
};
|
|
31572
|
-
return function (d, b) {
|
|
31573
|
-
extendStatics(d, b);
|
|
31574
|
-
function __() { this.constructor = d; }
|
|
31575
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31576
|
-
};
|
|
31577
|
-
})();
|
|
31578
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31579
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31580
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31581
|
-
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;
|
|
31582
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31583
|
-
};
|
|
31749
|
+
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
31750
|
+
var extendStatics = function (d, b) {
|
|
31751
|
+
extendStatics = Object.setPrototypeOf ||
|
|
31752
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31753
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31754
|
+
return extendStatics(d, b);
|
|
31755
|
+
};
|
|
31756
|
+
return function (d, b) {
|
|
31757
|
+
extendStatics(d, b);
|
|
31758
|
+
function __() { this.constructor = d; }
|
|
31759
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31760
|
+
};
|
|
31761
|
+
})();
|
|
31762
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31763
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31764
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31765
|
+
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;
|
|
31766
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31767
|
+
};
|
|
31584
31768
|
/**
|
|
31585
31769
|
* Objects used for configuring the iframe resources properties.
|
|
31586
31770
|
*/
|
|
31587
|
-
var Resources = /** @class */ (function (_super) {
|
|
31771
|
+
var Resources = /** @__PURE__ @class */ (function (_super) {
|
|
31588
31772
|
__extends$6(Resources, _super);
|
|
31589
31773
|
function Resources() {
|
|
31590
31774
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31600,7 +31784,7 @@ var Resources = /** @class */ (function (_super) {
|
|
|
31600
31784
|
/**
|
|
31601
31785
|
* Configures the iframe settings of the RTE.
|
|
31602
31786
|
*/
|
|
31603
|
-
var IFrameSettings = /** @class */ (function (_super) {
|
|
31787
|
+
var IFrameSettings = /** @__PURE__ @class */ (function (_super) {
|
|
31604
31788
|
__extends$6(IFrameSettings, _super);
|
|
31605
31789
|
function IFrameSettings() {
|
|
31606
31790
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31617,29 +31801,29 @@ var IFrameSettings = /** @class */ (function (_super) {
|
|
|
31617
31801
|
return IFrameSettings;
|
|
31618
31802
|
}(ChildProperty));
|
|
31619
31803
|
|
|
31620
|
-
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
31621
|
-
var extendStatics = function (d, b) {
|
|
31622
|
-
extendStatics = Object.setPrototypeOf ||
|
|
31623
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31624
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31625
|
-
return extendStatics(d, b);
|
|
31626
|
-
};
|
|
31627
|
-
return function (d, b) {
|
|
31628
|
-
extendStatics(d, b);
|
|
31629
|
-
function __() { this.constructor = d; }
|
|
31630
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31631
|
-
};
|
|
31632
|
-
})();
|
|
31633
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31634
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31635
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31636
|
-
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;
|
|
31637
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31638
|
-
};
|
|
31804
|
+
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
31805
|
+
var extendStatics = function (d, b) {
|
|
31806
|
+
extendStatics = Object.setPrototypeOf ||
|
|
31807
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
31808
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
31809
|
+
return extendStatics(d, b);
|
|
31810
|
+
};
|
|
31811
|
+
return function (d, b) {
|
|
31812
|
+
extendStatics(d, b);
|
|
31813
|
+
function __() { this.constructor = d; }
|
|
31814
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
31815
|
+
};
|
|
31816
|
+
})();
|
|
31817
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31818
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31819
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31820
|
+
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;
|
|
31821
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31822
|
+
};
|
|
31639
31823
|
/**
|
|
31640
31824
|
* Configures the inlineMode property of the RTE.
|
|
31641
31825
|
*/
|
|
31642
|
-
var InlineMode = /** @class */ (function (_super) {
|
|
31826
|
+
var InlineMode = /** @__PURE__ @class */ (function (_super) {
|
|
31643
31827
|
__extends$7(InlineMode, _super);
|
|
31644
31828
|
function InlineMode() {
|
|
31645
31829
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -31656,7 +31840,7 @@ var InlineMode = /** @class */ (function (_super) {
|
|
|
31656
31840
|
/**
|
|
31657
31841
|
* `EnterKey` module is used to handle enter key press actions.
|
|
31658
31842
|
*/
|
|
31659
|
-
var EnterKeyAction = /** @class */ (function () {
|
|
31843
|
+
var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
31660
31844
|
function EnterKeyAction(parent) {
|
|
31661
31845
|
this.parent = parent;
|
|
31662
31846
|
this.addEventListener();
|
|
@@ -31889,7 +32073,8 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
31889
32073
|
}
|
|
31890
32074
|
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
31891
32075
|
}
|
|
31892
|
-
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG'
|
|
32076
|
+
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG' ||
|
|
32077
|
+
(nearBlockNode.querySelectorAll('video').length > 0) || (nearBlockNode.querySelectorAll('audio').length > 0) || (nearBlockNode.querySelectorAll('img').length > 0))) {
|
|
31893
32078
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
31894
32079
|
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, nearBlockNode, false).cloneNode(true);
|
|
31895
32080
|
_this.parent.formatter.editorManager.domNode.insertAfter(newElem, nearBlockNode);
|
|
@@ -32147,36 +32332,36 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
32147
32332
|
return EnterKeyAction;
|
|
32148
32333
|
}());
|
|
32149
32334
|
|
|
32150
|
-
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
32151
|
-
var extendStatics = function (d, b) {
|
|
32152
|
-
extendStatics = Object.setPrototypeOf ||
|
|
32153
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
32154
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
32155
|
-
return extendStatics(d, b);
|
|
32156
|
-
};
|
|
32157
|
-
return function (d, b) {
|
|
32158
|
-
extendStatics(d, b);
|
|
32159
|
-
function __() { this.constructor = d; }
|
|
32160
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
32161
|
-
};
|
|
32162
|
-
})();
|
|
32163
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
|
32164
|
-
__assign = Object.assign || function(t) {
|
|
32165
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32166
|
-
s = arguments[i];
|
|
32167
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
32168
|
-
t[p] = s[p];
|
|
32169
|
-
}
|
|
32170
|
-
return t;
|
|
32171
|
-
};
|
|
32172
|
-
return __assign.apply(this, arguments);
|
|
32173
|
-
};
|
|
32174
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
32175
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32176
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
32177
|
-
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;
|
|
32178
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32179
|
-
};
|
|
32335
|
+
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
32336
|
+
var extendStatics = function (d, b) {
|
|
32337
|
+
extendStatics = Object.setPrototypeOf ||
|
|
32338
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
32339
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
32340
|
+
return extendStatics(d, b);
|
|
32341
|
+
};
|
|
32342
|
+
return function (d, b) {
|
|
32343
|
+
extendStatics(d, b);
|
|
32344
|
+
function __() { this.constructor = d; }
|
|
32345
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
32346
|
+
};
|
|
32347
|
+
})();
|
|
32348
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
32349
|
+
__assign = Object.assign || function(t) {
|
|
32350
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32351
|
+
s = arguments[i];
|
|
32352
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
32353
|
+
t[p] = s[p];
|
|
32354
|
+
}
|
|
32355
|
+
return t;
|
|
32356
|
+
};
|
|
32357
|
+
return __assign.apply(this, arguments);
|
|
32358
|
+
};
|
|
32359
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
32360
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32361
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
32362
|
+
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;
|
|
32363
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32364
|
+
};
|
|
32180
32365
|
/**
|
|
32181
32366
|
* Represents the Rich Text Editor component.
|
|
32182
32367
|
* ```html
|
|
@@ -32187,7 +32372,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
32187
32372
|
* </script>
|
|
32188
32373
|
* ```
|
|
32189
32374
|
*/
|
|
32190
|
-
var RichTextEditor = /** @class */ (function (_super) {
|
|
32375
|
+
var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
32191
32376
|
__extends$4(RichTextEditor, _super);
|
|
32192
32377
|
function RichTextEditor(options, element) {
|
|
32193
32378
|
var _this = _super.call(this, options, element) || this;
|
|
@@ -32510,7 +32695,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32510
32695
|
if (tool.command === 'InsertText') {
|
|
32511
32696
|
currentInsertContentLength = value.length;
|
|
32512
32697
|
}
|
|
32513
|
-
var currentLength = this.getText().trim().length;
|
|
32698
|
+
var currentLength = this.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
32514
32699
|
var selectionLength = this.getSelection().length;
|
|
32515
32700
|
var totalLength = (currentLength - selectionLength) + currentInsertContentLength;
|
|
32516
32701
|
if (!(this.maxLength === -1 || totalLength <= this.maxLength)) {
|
|
@@ -32685,7 +32870,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32685
32870
|
if (this.enableXhtml) {
|
|
32686
32871
|
this.setProperties({ value: this.getXhtml() }, true);
|
|
32687
32872
|
}
|
|
32688
|
-
if (this.toolbarSettings.enable && this.toolbarSettings.type === 'Expand' && !isNullOrUndefined(this.getToolbar()) &&
|
|
32873
|
+
if (this.toolbarSettings.enable && (this.toolbarSettings.type === 'Expand' || this.toolbarSettings.type === 'MultiRow' || this.toolbarSettings.type === 'Scrollable') && !isNullOrUndefined(this.getToolbar()) &&
|
|
32689
32874
|
(this.toolbarSettings.items.indexOf('Undo') > -1 && this.toolbarSettings.items.indexOf('Redo') > -1)) {
|
|
32690
32875
|
this.disableToolbarItem(['Undo', 'Redo']);
|
|
32691
32876
|
}
|
|
@@ -32695,7 +32880,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32695
32880
|
}
|
|
32696
32881
|
// eslint-disable-next-line
|
|
32697
32882
|
(this.enabled && !this.readonly) ? this.eventInitializer() : this.unWireEvents();
|
|
32698
|
-
this.notify(bindCssClass, { cssClass: this.
|
|
32883
|
+
this.notify(bindCssClass, { cssClass: this.getCssClass() });
|
|
32699
32884
|
this.addAudioVideoWrapper();
|
|
32700
32885
|
this.notify(tableclass, {});
|
|
32701
32886
|
this.renderComplete();
|
|
@@ -32786,7 +32971,13 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32786
32971
|
range.endContainer;
|
|
32787
32972
|
var closestLI = closest(endNode, 'LI');
|
|
32788
32973
|
var isDetached = false;
|
|
32789
|
-
|
|
32974
|
+
var currentRangeEndOffset = range.endOffset;
|
|
32975
|
+
if (currentEndContainer.nodeType === Node.TEXT_NODE) {
|
|
32976
|
+
if (currentEndContainer.textContent.charAt(currentRangeEndOffset - 1) === '\uFEFF') {
|
|
32977
|
+
currentRangeEndOffset--;
|
|
32978
|
+
}
|
|
32979
|
+
}
|
|
32980
|
+
if (!isNullOrUndefined(closestLI) && endNode.textContent.trim().length === currentRangeEndOffset &&
|
|
32790
32981
|
!range.collapsed && isNullOrUndefined(endNode.nextElementSibling)) {
|
|
32791
32982
|
for (var i = 0; i < closestLI.childNodes.length; i++) {
|
|
32792
32983
|
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
@@ -32865,7 +33056,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32865
33056
|
}
|
|
32866
33057
|
var notFormatPainterCopy = isNullOrUndefined(e.action) ? true : (e.action !== 'format-copy' ? true : false);
|
|
32867
33058
|
if (this.formatter.getUndoRedoStack().length === 0 && notFormatPainterCopy &&
|
|
32868
|
-
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which
|
|
33059
|
+
!(e.altKey || e.shiftKey || (e.altKey && e.shiftKey && e.which == 67))) {
|
|
32869
33060
|
this.formatter.saveData();
|
|
32870
33061
|
}
|
|
32871
33062
|
if (e.action !== 'insert-link' &&
|
|
@@ -32934,7 +33125,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
32934
33125
|
this.formatter.onKeyHandler(this, e);
|
|
32935
33126
|
}
|
|
32936
33127
|
if (this.inputElement && this.inputElement.textContent.length !== 0
|
|
32937
|
-
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0) {
|
|
33128
|
+
|| this.element.querySelectorAll('.e-toolbar-item.e-active').length > 0 || this.formatter.getUndoRedoStack().length > 0) {
|
|
32938
33129
|
this.notify(toolbarRefresh, { args: e });
|
|
32939
33130
|
}
|
|
32940
33131
|
if (!isNullOrUndefined(this.placeholder)) {
|
|
@@ -33026,20 +33217,61 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
33026
33217
|
return;
|
|
33027
33218
|
}
|
|
33028
33219
|
}
|
|
33029
|
-
this.notifyMouseUp(e);
|
|
33030
33220
|
if (e.detail === 3) {
|
|
33031
33221
|
var range = this.getRange();
|
|
33032
33222
|
var selection = this.formatter.editorManager.domNode.getSelection();
|
|
33033
|
-
|
|
33034
|
-
|
|
33035
|
-
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33223
|
+
// To handle the triple click node selection improper range due to browser behavior.
|
|
33224
|
+
if (selection.rangeCount > 0 && !isNullOrUndefined(range.startContainer.parentElement) && (!isNullOrUndefined(range.startContainer.parentElement.nextSibling) &&
|
|
33225
|
+
(range.startContainer.parentElement.nextSibling.nodeType !== 3 ||
|
|
33226
|
+
/\s+$/.test(range.startContainer.parentElement.nextSibling.textContent)) || range.startOffset === range.endOffset)
|
|
33227
|
+
|| range.startContainer.parentElement.tagName.toLocaleLowerCase() === 'li') {
|
|
33228
|
+
var newRange = new Range();
|
|
33229
|
+
var start = range.startContainer;
|
|
33230
|
+
var end = range.endContainer;
|
|
33231
|
+
var isInvalid = false;
|
|
33232
|
+
var isInsideList = range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL'
|
|
33233
|
+
|| range.commonAncestorContainer.nodeName === 'LI';
|
|
33234
|
+
if (!isInsideList && end.nodeType === 1 && end.nodeName === 'LI') {
|
|
33235
|
+
end = closest(end, 'ol, ul').previousElementSibling.lastElementChild;
|
|
33236
|
+
}
|
|
33237
|
+
else if (isInsideList && end.nodeType === 1 && range.endOffset === 0) {
|
|
33238
|
+
if (end.previousElementSibling && end.previousElementSibling.lastElementChild) {
|
|
33239
|
+
end = end.previousElementSibling.lastElementChild;
|
|
33240
|
+
}
|
|
33241
|
+
else {
|
|
33242
|
+
end = closest(end.parentElement, 'li');
|
|
33243
|
+
if (end && end.nodeName === 'LI') {
|
|
33244
|
+
end = end.previousElementSibling;
|
|
33245
|
+
}
|
|
33246
|
+
}
|
|
33040
33247
|
}
|
|
33248
|
+
else {
|
|
33249
|
+
if (!closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild &&
|
|
33250
|
+
end.previousElementSibling.textContent.trim().length > 0) {
|
|
33251
|
+
end = end.previousElementSibling.lastChild;
|
|
33252
|
+
}
|
|
33253
|
+
else if (closest(end, 'li') && end.previousElementSibling && end.previousElementSibling.lastChild) {
|
|
33254
|
+
end = closest(end, 'li').parentElement.previousElementSibling.lastChild;
|
|
33255
|
+
}
|
|
33256
|
+
}
|
|
33257
|
+
if (!end || end === this.inputElement) {
|
|
33258
|
+
end = start;
|
|
33259
|
+
isInvalid = true;
|
|
33260
|
+
}
|
|
33261
|
+
while (end.nodeName !== '#text' && !isInvalid) {
|
|
33262
|
+
if (end.lastElementChild) {
|
|
33263
|
+
end = end.lastElementChild;
|
|
33264
|
+
}
|
|
33265
|
+
else {
|
|
33266
|
+
end = end.lastChild;
|
|
33267
|
+
}
|
|
33268
|
+
}
|
|
33269
|
+
newRange.setStart(start, 0);
|
|
33270
|
+
newRange.setEnd(end, end.textContent.length);
|
|
33271
|
+
this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(), newRange);
|
|
33041
33272
|
}
|
|
33042
33273
|
}
|
|
33274
|
+
this.notifyMouseUp(e);
|
|
33043
33275
|
};
|
|
33044
33276
|
/**
|
|
33045
33277
|
* @param {Function} module - specifies the module function.
|
|
@@ -33083,7 +33315,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
33083
33315
|
var currentLength = _this.inputElement.textContent.length;
|
|
33084
33316
|
var selectionLength = _this.getSelection().length;
|
|
33085
33317
|
var pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
33086
|
-
? 0 : e.clipboardData.getData('text/plain').length;
|
|
33318
|
+
? 0 : e.clipboardData.getData('text/plain').replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
33087
33319
|
var totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
33088
33320
|
if (_this.editorMode === 'Markdown') {
|
|
33089
33321
|
var args_1 = { requestType: 'Paste', editorMode: _this.editorMode, event: e };
|
|
@@ -33515,7 +33747,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
33515
33747
|
RichTextEditor.prototype.updatePanelValue = function () {
|
|
33516
33748
|
var value = this.value;
|
|
33517
33749
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
33518
|
-
var getTextArea = this.element.querySelector('.
|
|
33750
|
+
var getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
33519
33751
|
if (value) {
|
|
33520
33752
|
if (getTextArea && getTextArea.style.display === 'block') {
|
|
33521
33753
|
getTextArea.value = this.value;
|
|
@@ -34146,6 +34378,16 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34146
34378
|
RichTextEditor.prototype.getID = function () {
|
|
34147
34379
|
return (this.originalElement.tagName === 'TEXTAREA' ? this.valueContainer.id : this.element.id);
|
|
34148
34380
|
};
|
|
34381
|
+
/**
|
|
34382
|
+
* @returns {void}
|
|
34383
|
+
* getCssClass method
|
|
34384
|
+
*
|
|
34385
|
+
* @hidden
|
|
34386
|
+
* @deprecated
|
|
34387
|
+
*/
|
|
34388
|
+
RichTextEditor.prototype.getCssClass = function (isSpace) {
|
|
34389
|
+
return (isNullOrUndefined(this.cssClass) ? '' : isSpace ? ' ' + this.cssClass : this.cssClass);
|
|
34390
|
+
};
|
|
34149
34391
|
RichTextEditor.prototype.mouseDownHandler = function (e) {
|
|
34150
34392
|
var touch = (e.touches ? e.changedTouches[0] : e);
|
|
34151
34393
|
addClass([this.element], [CLS_FOCUS]);
|
|
@@ -34257,7 +34499,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34257
34499
|
};
|
|
34258
34500
|
RichTextEditor.prototype.getUpdatedValue = function () {
|
|
34259
34501
|
var value;
|
|
34260
|
-
var getTextArea = this.element.querySelector('.
|
|
34502
|
+
var getTextArea = this.element.querySelector('.' + CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
34261
34503
|
if (this.editorMode === 'HTML') {
|
|
34262
34504
|
value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
|
|
34263
34505
|
this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
|
|
@@ -34288,6 +34530,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34288
34530
|
clearTimeout(this.idleInterval);
|
|
34289
34531
|
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
34290
34532
|
};
|
|
34533
|
+
RichTextEditor.prototype.cleanupResizeElements = function (args) {
|
|
34534
|
+
var value = this.removeResizeElement(args.value);
|
|
34535
|
+
return value;
|
|
34536
|
+
};
|
|
34291
34537
|
RichTextEditor.prototype.removeResizeElement = function (value) {
|
|
34292
34538
|
var valueElementWrapper = document.createElement("div");
|
|
34293
34539
|
valueElementWrapper.innerHTML = value;
|
|
@@ -34509,6 +34755,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34509
34755
|
this.on(contentChanged, this.contentChanged, this);
|
|
34510
34756
|
this.on(resizeInitialized, this.updateResizeFlag, this);
|
|
34511
34757
|
this.on(updateTbItemsStatus, this.updateStatus, this);
|
|
34758
|
+
this.on(cleanupResizeElements, this.cleanupResizeElements, this);
|
|
34512
34759
|
if (this.readonly && this.enabled) {
|
|
34513
34760
|
return;
|
|
34514
34761
|
}
|
|
@@ -34595,6 +34842,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34595
34842
|
this.off(contentChanged, this.contentChanged);
|
|
34596
34843
|
this.off(resizeInitialized, this.updateResizeFlag);
|
|
34597
34844
|
this.off(updateTbItemsStatus, this.updateStatus);
|
|
34845
|
+
this.off(cleanupResizeElements, this.cleanupResizeElements);
|
|
34598
34846
|
if (this.readonly && this.enabled) {
|
|
34599
34847
|
return;
|
|
34600
34848
|
}
|
|
@@ -34967,5 +35215,5 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
34967
35215
|
* Rich Text Editor component exported items
|
|
34968
35216
|
*/
|
|
34969
35217
|
|
|
34970
|
-
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,
|
|
35218
|
+
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 };
|
|
34971
35219
|
//# sourceMappingURL=ej2-richtexteditor.es5.js.map
|