@syncfusion/ej2-richtexteditor 19.3.53-6125 → 19.4.38
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 +244 -0
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +41 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +27 -0
- package/CHANGELOG.md +1021 -1019
- package/README.md +67 -67
- 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 +273 -181
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +381 -289
- 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/license +9 -9
- package/package.json +75 -75
- 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/interface.d.ts +7 -7
- 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/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 +34 -34
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +3 -3
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml.js +2 -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 +2 -2
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +1 -1
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +16 -7
- 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/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -12
- package/src/rich-text-editor/actions/enter-key.d.ts +1 -0
- package/src/rich-text-editor/actions/enter-key.js +85 -34
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
- package/src/rich-text-editor/actions/html-editor.js +5 -5
- 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 +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +10 -10
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +2 -2
- package/src/rich-text-editor/base/classes.d.ts +107 -107
- package/src/rich-text-editor/base/classes.js +107 -107
- package/src/rich-text-editor/base/constant.d.ts +120 -120
- package/src/rich-text-editor/base/constant.js +120 -120
- 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 +45 -45
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +851 -851
- package/src/rich-text-editor/base/rich-text-editor.d.ts +53 -53
- package/src/rich-text-editor/base/rich-text-editor.js +65 -65
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +1 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +8 -8
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/iframe-settings-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/toolbar-settings-model.d.ts +439 -439
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +2 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +50 -5
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +1 -1
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +1 -1
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -9
- package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
- package/src/rich-text-editor/renderer/view-source.js +6 -6
- 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 +2 -2
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +187 -187
- package/styles/rich-text-editor/_bootstrap-definition.scss +244 -244
- package/styles/rich-text-editor/_bootstrap4-definition.scss +370 -370
- package/styles/rich-text-editor/_bootstrap5-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-dark-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-definition.scss +167 -167
- package/styles/rich-text-editor/_fluent-definition.scss +168 -0
- package/styles/rich-text-editor/_highcontrast-definition.scss +167 -167
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +167 -167
- package/styles/rich-text-editor/_layout.scss +1639 -1639
- package/styles/rich-text-editor/_material-dark-definition.scss +172 -172
- package/styles/rich-text-editor/_material-definition.scss +169 -169
- package/styles/rich-text-editor/_tailwind-definition.scss +167 -167
- package/styles/rich-text-editor/_theme.scss +626 -626
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap4.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap5.scss +303 -303
- package/styles/rich-text-editor/icons/_fabric-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_fabric.scss +304 -304
- package/styles/rich-text-editor/icons/_fluent.scss +303 -0
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +304 -304
- package/styles/rich-text-editor/icons/_highcontrast.scss +304 -304
- package/styles/rich-text-editor/icons/_material-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_material.scss +304 -304
- package/styles/rich-text-editor/icons/_tailwind.scss +304 -304
- package/tslint.json +111 -0
|
@@ -3592,11 +3592,6 @@ class DropDownButtons {
|
|
|
3592
3592
|
for (const prop of Object.keys(newProp)) {
|
|
3593
3593
|
switch (prop) {
|
|
3594
3594
|
case 'fontFamily':
|
|
3595
|
-
if (this.parent.inlineMode.enable) {
|
|
3596
|
-
if (!isNullOrUndefined(this.parent.fontFamily.default)) {
|
|
3597
|
-
this.getEditNode().style.fontFamily = this.parent.fontFamily.default;
|
|
3598
|
-
}
|
|
3599
|
-
}
|
|
3600
3595
|
if (this.fontNameDropDown) {
|
|
3601
3596
|
for (const fontFamily$$1 of Object.keys(newProp.fontFamily)) {
|
|
3602
3597
|
switch (fontFamily$$1) {
|
|
@@ -3627,11 +3622,6 @@ class DropDownButtons {
|
|
|
3627
3622
|
}
|
|
3628
3623
|
break;
|
|
3629
3624
|
case 'fontSize':
|
|
3630
|
-
if (this.parent.inlineMode) {
|
|
3631
|
-
if (!isNullOrUndefined(this.parent.fontSize.default)) {
|
|
3632
|
-
this.getEditNode().style.fontSize = this.parent.fontSize.default;
|
|
3633
|
-
}
|
|
3634
|
-
}
|
|
3635
3625
|
if (this.fontSizeDropDown) {
|
|
3636
3626
|
for (const fontSize$$1 of Object.keys(newProp.fontSize)) {
|
|
3637
3627
|
switch (fontSize$$1) {
|
|
@@ -4718,12 +4708,12 @@ class Toolbar$2 {
|
|
|
4718
4708
|
}
|
|
4719
4709
|
}
|
|
4720
4710
|
|
|
4721
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4722
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4723
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4724
|
-
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;
|
|
4725
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4726
|
-
};
|
|
4711
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4712
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4713
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4714
|
+
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;
|
|
4715
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4716
|
+
};
|
|
4727
4717
|
var KeyboardEvents_1;
|
|
4728
4718
|
const keyCode = {
|
|
4729
4719
|
'backspace': 8,
|
|
@@ -5714,7 +5704,7 @@ class QuickToolbar {
|
|
|
5714
5704
|
* @deprecated
|
|
5715
5705
|
*/
|
|
5716
5706
|
showInlineQTBar(x, y, target) {
|
|
5717
|
-
if (this.parent.readonly) {
|
|
5707
|
+
if (this.parent.readonly || target.tagName.toLowerCase() === "img") {
|
|
5718
5708
|
return;
|
|
5719
5709
|
}
|
|
5720
5710
|
this.inlineQTBar.showPopup(x, y, target);
|
|
@@ -12202,8 +12192,6 @@ class InsertHtml {
|
|
|
12202
12192
|
let splitedElm;
|
|
12203
12193
|
if ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
12204
12194
|
currentNode.parentElement.textContent.trim().length === 0 && !node.classList.contains('pasteContent')) {
|
|
12205
|
-
//let newChildElem: HTMLElement = createElement(currentNode.nodeName);
|
|
12206
|
-
//currentNode.parentElement.insertBefore(newChildElem, currentNode);
|
|
12207
12195
|
splitedElm = currentNode;
|
|
12208
12196
|
}
|
|
12209
12197
|
else {
|
|
@@ -15272,7 +15260,16 @@ class UndoRedoManager {
|
|
|
15272
15260
|
* @deprecated
|
|
15273
15261
|
*/
|
|
15274
15262
|
saveData(e) {
|
|
15275
|
-
|
|
15263
|
+
let range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
15264
|
+
let currentContainer = range.startContainer;
|
|
15265
|
+
for (let i = currentContainer.childNodes.length - 1; i >= 0; i--) {
|
|
15266
|
+
if (!isNullOrUndefined(currentContainer.childNodes[i]) && currentContainer.childNodes[i].nodeName === '#text' &&
|
|
15267
|
+
currentContainer.childNodes[i].textContent.length === 0 && currentContainer.childNodes[i].nodeName !== 'IMG' &&
|
|
15268
|
+
currentContainer.childNodes[i].nodeName !== 'BR' && currentContainer.childNodes[i].nodeName && 'HR') {
|
|
15269
|
+
detach(currentContainer.childNodes[i]);
|
|
15270
|
+
}
|
|
15271
|
+
}
|
|
15272
|
+
range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
15276
15273
|
const save = new NodeSelection().save(range, this.parent.currentDocument);
|
|
15277
15274
|
const htmlText = this.parent.editableElement.innerHTML;
|
|
15278
15275
|
const changEle = { text: htmlText, range: save };
|
|
@@ -15422,7 +15419,7 @@ class MsWordPaste {
|
|
|
15422
15419
|
this.parent.observer.on(MS_WORD_CLEANUP_PLUGIN, this.wordCleanup, this);
|
|
15423
15420
|
}
|
|
15424
15421
|
wordCleanup(e) {
|
|
15425
|
-
const wordPasteStyleConfig = e.allowedStylePropertiesArray;
|
|
15422
|
+
const wordPasteStyleConfig = !isNullOrUndefined(e.allowedStylePropertiesArray) ? e.allowedStylePropertiesArray : [];
|
|
15426
15423
|
let listNodes = [];
|
|
15427
15424
|
let tempHTMLContent = e.args.clipboardData.getData('text/HTML');
|
|
15428
15425
|
const rtfData = e.args.clipboardData.getData('text/rtf');
|
|
@@ -16749,98 +16746,98 @@ class ContentRender {
|
|
|
16749
16746
|
}
|
|
16750
16747
|
}
|
|
16751
16748
|
|
|
16752
|
-
const IFRAMEHEADER = `
|
|
16753
|
-
<!DOCTYPE html>
|
|
16754
|
-
<html>
|
|
16755
|
-
<head>
|
|
16756
|
-
<meta charset='utf-8' />
|
|
16757
|
-
<style>
|
|
16758
|
-
@charset "UTF-8";
|
|
16759
|
-
body {
|
|
16760
|
-
font-family: "Roboto", sans-serif;
|
|
16761
|
-
font-size: 14px;
|
|
16762
|
-
}
|
|
16763
|
-
html, body{height: 100%;margin: 0;}
|
|
16764
|
-
body.e-cursor{cursor:default}
|
|
16765
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
16766
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
16767
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
16768
|
-
.e-rte-image {border: 0;cursor: pointer;display:
|
|
16769
|
-
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16770
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
16771
|
-
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
16772
|
-
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
16773
|
-
position: relativetext-align: center;vertical-align: bottom;}
|
|
16774
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
16775
|
-
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
16776
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
16777
|
-
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
16778
|
-
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
16779
|
-
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16780
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
16781
|
-
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
16782
|
-
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
16783
|
-
.e-imgbreak {border: 0;cursor: pointer;
|
|
16784
|
-
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16785
|
-
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
16786
|
-
img.e-img-focus::selection { background: transparent;color: transparent;}
|
|
16787
|
-
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
16788
|
-
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
16789
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16790
|
-
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
16791
|
-
border-radius: 15px; height: 20px; width: 20px; }
|
|
16792
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16793
|
-
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
16794
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
16795
|
-
.e-img-caption a:focus-visible { outline: none; }
|
|
16796
|
-
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
16797
|
-
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
16798
|
-
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
16799
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
16800
|
-
li{margin-bottom: 10px;}
|
|
16801
|
-
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
16802
|
-
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
16803
|
-
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
16804
|
-
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
16805
|
-
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
16806
|
-
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
16807
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
16808
|
-
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
16809
|
-
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
16810
|
-
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
16811
|
-
strong, b{font-weight: 700;}
|
|
16812
|
-
a{text-decoration: none;user-select: auto;}
|
|
16813
|
-
a:hover{text-decoration: underline;};
|
|
16814
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
16815
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
16816
|
-
ul:last-child{margin-bottom: 0;}
|
|
16817
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
16818
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
16819
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
16820
|
-
table th {background-color: #E0E0E0;}
|
|
16821
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
16822
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
16823
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
16824
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
16825
|
-
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
16826
|
-
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
16827
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
16828
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
16829
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
16830
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
16831
|
-
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
16832
|
-
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
16833
|
-
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
16834
|
-
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
16835
|
-
border-top: 6px solid transparent; content: ''; display: block;
|
|
16836
|
-
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
16837
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
16838
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
16839
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
16840
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
16841
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
16842
|
-
.e-rtl { direction: rtl; }
|
|
16843
|
-
</style>
|
|
16749
|
+
const IFRAMEHEADER = `
|
|
16750
|
+
<!DOCTYPE html>
|
|
16751
|
+
<html>
|
|
16752
|
+
<head>
|
|
16753
|
+
<meta charset='utf-8' />
|
|
16754
|
+
<style>
|
|
16755
|
+
@charset "UTF-8";
|
|
16756
|
+
body {
|
|
16757
|
+
font-family: "Roboto", sans-serif;
|
|
16758
|
+
font-size: 14px;
|
|
16759
|
+
}
|
|
16760
|
+
html, body{height: 100%;margin: 0;}
|
|
16761
|
+
body.e-cursor{cursor:default}
|
|
16762
|
+
span.e-selected-node {background-color: #939393;color: white;}
|
|
16763
|
+
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
16764
|
+
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
16765
|
+
.e-rte-image {border: 0;cursor: pointer;display:
|
|
16766
|
+
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16767
|
+
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
16768
|
+
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
16769
|
+
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
16770
|
+
position: relativetext-align: center;vertical-align: bottom;}
|
|
16771
|
+
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
16772
|
+
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
16773
|
+
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
16774
|
+
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
16775
|
+
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
16776
|
+
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16777
|
+
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
16778
|
+
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
16779
|
+
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
16780
|
+
.e-imgbreak {border: 0;cursor: pointer;
|
|
16781
|
+
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16782
|
+
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
16783
|
+
img.e-img-focus::selection { background: transparent;color: transparent;}
|
|
16784
|
+
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
16785
|
+
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
16786
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16787
|
+
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
16788
|
+
border-radius: 15px; height: 20px; width: 20px; }
|
|
16789
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16790
|
+
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
16791
|
+
.e-img-caption .e-img-inner { outline: 0; }
|
|
16792
|
+
.e-img-caption a:focus-visible { outline: none; }
|
|
16793
|
+
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
16794
|
+
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
16795
|
+
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
16796
|
+
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
16797
|
+
li{margin-bottom: 10px;}
|
|
16798
|
+
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
16799
|
+
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
16800
|
+
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
16801
|
+
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
16802
|
+
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
16803
|
+
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
16804
|
+
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
16805
|
+
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
16806
|
+
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
16807
|
+
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
16808
|
+
strong, b{font-weight: 700;}
|
|
16809
|
+
a{text-decoration: none;user-select: auto;}
|
|
16810
|
+
a:hover{text-decoration: underline;};
|
|
16811
|
+
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
16812
|
+
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
16813
|
+
ul:last-child{margin-bottom: 0;}
|
|
16814
|
+
table { border-collapse: collapse; empty-cells: show;}
|
|
16815
|
+
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
16816
|
+
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
16817
|
+
table th {background-color: #E0E0E0;}
|
|
16818
|
+
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
16819
|
+
table .e-cell-select {border: 1px double #4a90e2;}
|
|
16820
|
+
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
16821
|
+
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
16822
|
+
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
16823
|
+
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
16824
|
+
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
16825
|
+
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
16826
|
+
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
16827
|
+
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
16828
|
+
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
16829
|
+
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
16830
|
+
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
16831
|
+
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
16832
|
+
border-top: 6px solid transparent; content: ''; display: block;
|
|
16833
|
+
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
16834
|
+
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
16835
|
+
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
16836
|
+
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
16837
|
+
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
16838
|
+
.e-table-rhelper { background-color: #4a90e2;}
|
|
16839
|
+
.e-rtl { direction: rtl; }
|
|
16840
|
+
</style>
|
|
16844
16841
|
</head>`;
|
|
16845
16842
|
/**
|
|
16846
16843
|
* Content module is used to render Rich Text Editor content
|
|
@@ -16941,7 +16938,7 @@ class XhtmlValidation {
|
|
|
16941
16938
|
this.ImageTags();
|
|
16942
16939
|
this.removeTags();
|
|
16943
16940
|
this.RemoveUnsupported();
|
|
16944
|
-
this.currentElement.innerHTML = this.selfEncloseValidation(this.currentElement.innerHTML, this.currentElement.innerText ===
|
|
16941
|
+
this.currentElement.innerHTML = this.selfEncloseValidation(this.currentElement.innerHTML, this.currentElement.innerText === "\n" ?
|
|
16945
16942
|
this.currentElement.innerText.length : this.currentElement.innerText.trim().length);
|
|
16946
16943
|
this.parent.setProperties({ value: this.currentElement.innerHTML }, true);
|
|
16947
16944
|
}
|
|
@@ -17225,7 +17222,7 @@ class HtmlEditor {
|
|
|
17225
17222
|
e.args.action === 'enter' ||
|
|
17226
17223
|
e.args.keyCode === 13) {
|
|
17227
17224
|
this.spaceLink(e.args);
|
|
17228
|
-
if (this.parent.editorMode === 'HTML' && !
|
|
17225
|
+
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
17229
17226
|
this.parent.notify(enterHandler, { args: e.args });
|
|
17230
17227
|
}
|
|
17231
17228
|
}
|
|
@@ -17502,7 +17499,7 @@ class HtmlEditor {
|
|
|
17502
17499
|
const divElement = this.parent.createElement('div');
|
|
17503
17500
|
divElement.setAttribute('class', 'pasteContent');
|
|
17504
17501
|
divElement.style.display = 'inline';
|
|
17505
|
-
divElement.innerHTML = contentInnerElem;
|
|
17502
|
+
divElement.innerHTML = contentInnerElem.replace('¶', '&para');
|
|
17506
17503
|
const paraElem = divElement.querySelectorAll('span, p');
|
|
17507
17504
|
for (let i = 0; i < paraElem.length; i++) {
|
|
17508
17505
|
const splitTextContent = paraElem[i].innerHTML.split(' ');
|
|
@@ -20126,10 +20123,14 @@ class Image {
|
|
|
20126
20123
|
img.style.height = expectedY + 'px';
|
|
20127
20124
|
}
|
|
20128
20125
|
else if (img.style.width !== '' && img.style.height === '') {
|
|
20129
|
-
|
|
20126
|
+
let currentWidth = ((width / height * expectedY) + width / height) < (this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
20127
|
+
((width / height * expectedY) + width / height) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
20128
|
+
img.style.width = currentWidth.toString() + 'px';
|
|
20130
20129
|
}
|
|
20131
20130
|
else if (img.style.width !== '') {
|
|
20132
|
-
|
|
20131
|
+
let currentWidth = (width / height * expectedY) < (this.parent.inputElement.getBoundingClientRect().right - 32) ?
|
|
20132
|
+
(width / height * expectedY) : (this.parent.inputElement.getBoundingClientRect().right - 32);
|
|
20133
|
+
img.style.width = currentWidth + 'px';
|
|
20133
20134
|
img.style.height = expectedY + 'px';
|
|
20134
20135
|
}
|
|
20135
20136
|
else {
|
|
@@ -20237,7 +20238,7 @@ class Image {
|
|
|
20237
20238
|
}
|
|
20238
20239
|
resizeImgDupPos(e) {
|
|
20239
20240
|
this.imgDupPos = {
|
|
20240
|
-
width: (e.style.
|
|
20241
|
+
width: (e.style.width !== '') ? this.imgEle.style.width : e.width + 'px',
|
|
20241
20242
|
height: (e.style.height !== '') ? this.imgEle.style.height : e.height + 'px'
|
|
20242
20243
|
};
|
|
20243
20244
|
}
|
|
@@ -20405,6 +20406,27 @@ class Image {
|
|
|
20405
20406
|
const src = this.deletedImg[i].src;
|
|
20406
20407
|
this.imageRemovePost(src);
|
|
20407
20408
|
}
|
|
20409
|
+
if (range.startContainer.nodeType === 3) {
|
|
20410
|
+
if (originalEvent.code === 'Backspace') {
|
|
20411
|
+
if (range.startContainer.previousElementSibling && range.startOffset === 0 &&
|
|
20412
|
+
range.startContainer.previousElementSibling.classList.contains(CLS_CAPTION) &&
|
|
20413
|
+
range.startContainer.previousElementSibling.classList.contains(CLS_CAPINLINE)) {
|
|
20414
|
+
detach(range.startContainer.previousElementSibling);
|
|
20415
|
+
}
|
|
20416
|
+
}
|
|
20417
|
+
else {
|
|
20418
|
+
if (range.startContainer.nextElementSibling &&
|
|
20419
|
+
range.endContainer.textContent.length === range.endOffset &&
|
|
20420
|
+
range.startContainer.nextElementSibling.classList.contains(CLS_CAPTION) &&
|
|
20421
|
+
range.startContainer.nextElementSibling.classList.contains(CLS_CAPINLINE)) {
|
|
20422
|
+
detach(range.startContainer.nextElementSibling);
|
|
20423
|
+
}
|
|
20424
|
+
}
|
|
20425
|
+
}
|
|
20426
|
+
else if ((range.startContainer.nodeType === 1 &&
|
|
20427
|
+
range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE))) {
|
|
20428
|
+
detach(range.startContainer.querySelector('.' + CLS_CAPTION + '.' + CLS_CAPINLINE));
|
|
20429
|
+
}
|
|
20408
20430
|
break;
|
|
20409
20431
|
case 'insert-image':
|
|
20410
20432
|
this.openDialog(true, originalEvent, save, selectNodeEle, selectParentEle);
|
|
@@ -20609,7 +20631,7 @@ class Image {
|
|
|
20609
20631
|
const target = args.target;
|
|
20610
20632
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
20611
20633
|
const isPopupOpen = this.quickToolObj.imageQTBar.element.classList.contains('e-rte-pop');
|
|
20612
|
-
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule
|
|
20634
|
+
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule) {
|
|
20613
20635
|
if (isPopupOpen) {
|
|
20614
20636
|
return;
|
|
20615
20637
|
}
|
|
@@ -20848,6 +20870,9 @@ class Image {
|
|
|
20848
20870
|
imageRemovePost(src) {
|
|
20849
20871
|
const proxy = this;
|
|
20850
20872
|
let absoluteUrl = '';
|
|
20873
|
+
if (isNullOrUndefined(this.parent.insertImageSettings.removeUrl) || this.parent.insertImageSettings.removeUrl === '') {
|
|
20874
|
+
return;
|
|
20875
|
+
}
|
|
20851
20876
|
if (src.indexOf('http://') > -1 || src.indexOf('https://') > -1) {
|
|
20852
20877
|
absoluteUrl = src;
|
|
20853
20878
|
}
|
|
@@ -21684,6 +21709,7 @@ class Image {
|
|
|
21684
21709
|
imageTag.addEventListener('load', () => {
|
|
21685
21710
|
this.parent.trigger(actionComplete, e);
|
|
21686
21711
|
});
|
|
21712
|
+
detach(parentElement);
|
|
21687
21713
|
}
|
|
21688
21714
|
/**
|
|
21689
21715
|
* Rendering uploader and popup for drag and drop
|
|
@@ -21718,6 +21744,9 @@ class Image {
|
|
|
21718
21744
|
this.popupObj.destroy();
|
|
21719
21745
|
detach(this.popupObj.element);
|
|
21720
21746
|
this.popupObj = null;
|
|
21747
|
+
if (!this.parent.inlineMode.enable) {
|
|
21748
|
+
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(false);
|
|
21749
|
+
}
|
|
21721
21750
|
}
|
|
21722
21751
|
});
|
|
21723
21752
|
this.popupObj.element.style.display = 'none';
|
|
@@ -21749,6 +21778,10 @@ class Image {
|
|
|
21749
21778
|
isUploading = false;
|
|
21750
21779
|
detach(imageElement);
|
|
21751
21780
|
this.popupObj.close();
|
|
21781
|
+
this.quickToolObj.imageQTBar.hidePopup();
|
|
21782
|
+
setTimeout(() => {
|
|
21783
|
+
this.uploadObj.destroy();
|
|
21784
|
+
}, 900);
|
|
21752
21785
|
},
|
|
21753
21786
|
beforeUpload: (args) => {
|
|
21754
21787
|
if (this.parent.isServerRendered) {
|
|
@@ -21760,6 +21793,9 @@ class Image {
|
|
|
21760
21793
|
if (beforeUploadArgs.cancel) {
|
|
21761
21794
|
return;
|
|
21762
21795
|
}
|
|
21796
|
+
if (!this.parent.inlineMode.enable) {
|
|
21797
|
+
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
21798
|
+
}
|
|
21763
21799
|
/* eslint-disable */
|
|
21764
21800
|
this.uploadObj.currentRequestHeader = beforeUploadArgs.currentRequest ?
|
|
21765
21801
|
beforeUploadArgs.currentRequest : this.uploadObj.currentRequestHeader;
|
|
@@ -21772,6 +21808,9 @@ class Image {
|
|
|
21772
21808
|
}
|
|
21773
21809
|
else {
|
|
21774
21810
|
this.parent.trigger(beforeImageUpload, args);
|
|
21811
|
+
if (!this.parent.inlineMode.enable) {
|
|
21812
|
+
this.parent.toolbarModule.baseToolbar.toolbarObj.disable(true);
|
|
21813
|
+
}
|
|
21775
21814
|
}
|
|
21776
21815
|
},
|
|
21777
21816
|
uploading: (e) => {
|
|
@@ -21814,6 +21853,9 @@ class Image {
|
|
|
21814
21853
|
}, 900);
|
|
21815
21854
|
},
|
|
21816
21855
|
success: (e) => {
|
|
21856
|
+
if (e.operation === "cancel") {
|
|
21857
|
+
return;
|
|
21858
|
+
}
|
|
21817
21859
|
isUploading = false;
|
|
21818
21860
|
this.parent.inputElement.contentEditable = 'true';
|
|
21819
21861
|
const args = {
|
|
@@ -23681,12 +23723,12 @@ const executeGroup = {
|
|
|
23681
23723
|
}
|
|
23682
23724
|
};
|
|
23683
23725
|
|
|
23684
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23685
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23686
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23687
|
-
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;
|
|
23688
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23689
|
-
};
|
|
23726
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23727
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23728
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23729
|
+
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;
|
|
23730
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23731
|
+
};
|
|
23690
23732
|
/**
|
|
23691
23733
|
* Configures the toolbar settings of the RichTextEditor.
|
|
23692
23734
|
*/
|
|
@@ -23975,12 +24017,12 @@ __decorate$2([
|
|
|
23975
24017
|
Property(bulletFormatList)
|
|
23976
24018
|
], BulletFormatList.prototype, "types", void 0);
|
|
23977
24019
|
|
|
23978
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23979
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23980
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23981
|
-
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;
|
|
23982
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23983
|
-
};
|
|
24020
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24021
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24022
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24023
|
+
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;
|
|
24024
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24025
|
+
};
|
|
23984
24026
|
/**
|
|
23985
24027
|
* Objects used for configuring the iframe resources properties.
|
|
23986
24028
|
*/
|
|
@@ -24007,12 +24049,12 @@ __decorate$3([
|
|
|
24007
24049
|
Complex({}, Resources)
|
|
24008
24050
|
], IFrameSettings.prototype, "resources", void 0);
|
|
24009
24051
|
|
|
24010
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24011
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24012
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24013
|
-
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;
|
|
24014
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24015
|
-
};
|
|
24052
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24053
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24054
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24055
|
+
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;
|
|
24056
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24057
|
+
};
|
|
24016
24058
|
/**
|
|
24017
24059
|
* Configures the inlineMode property of the RTE.
|
|
24018
24060
|
*/
|
|
@@ -24053,9 +24095,20 @@ class EnterKeyAction {
|
|
|
24053
24095
|
}
|
|
24054
24096
|
enterHandler(e) {
|
|
24055
24097
|
this.getRangeNode();
|
|
24098
|
+
let isTableEnter = true;
|
|
24099
|
+
if (!isNullOrUndefined(this.startNode.closest('TABLE')) && !isNullOrUndefined(this.endNode.closest('TABLE'))) {
|
|
24100
|
+
isTableEnter = false;
|
|
24101
|
+
let curElement = this.startNode;
|
|
24102
|
+
let blockElement = curElement;
|
|
24103
|
+
while (!this.parent.formatter.editorManager.domNode.isBlockNode(curElement)) {
|
|
24104
|
+
blockElement = curElement;
|
|
24105
|
+
curElement = curElement.parentElement;
|
|
24106
|
+
}
|
|
24107
|
+
isTableEnter = blockElement.tagName === 'TD' ? false : true;
|
|
24108
|
+
}
|
|
24056
24109
|
if (e.args.which === 13 && e.args.code === 'Enter') {
|
|
24057
|
-
if (isNullOrUndefined(this.startNode.closest('LI')) && isNullOrUndefined(this.endNode.closest('LI')) &&
|
|
24058
|
-
isNullOrUndefined(this.
|
|
24110
|
+
if (isNullOrUndefined(this.startNode.closest('LI')) && isNullOrUndefined(this.endNode.closest('LI')) && isTableEnter &&
|
|
24111
|
+
isNullOrUndefined(this.startNode.closest('PRE')) && isNullOrUndefined(this.endNode.closest('PRE'))) {
|
|
24059
24112
|
const shiftKey = e.args.shiftKey;
|
|
24060
24113
|
const actionBeginArgs = {
|
|
24061
24114
|
cancel: false,
|
|
@@ -24113,12 +24166,32 @@ class EnterKeyAction {
|
|
|
24113
24166
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.range.startContainer.childNodes[this.range.startOffset], 0);
|
|
24114
24167
|
this.getRangeNode();
|
|
24115
24168
|
}
|
|
24116
|
-
if (this.parent.enterKey === 'P' || this.parent.enterKey === 'DIV' ||
|
|
24169
|
+
if ((this.parent.enterKey === 'P' && !shiftKey) || (this.parent.enterKey === 'DIV' && !shiftKey) ||
|
|
24117
24170
|
(this.parent.shiftEnterKey === 'P' && shiftKey) ||
|
|
24118
24171
|
(this.parent.shiftEnterKey === 'DIV' && shiftKey)) {
|
|
24119
|
-
|
|
24172
|
+
let nearBlockNode;
|
|
24173
|
+
if (isTableEnter && this.parent.formatter.editorManager.domNode.isBlockNode(this.startNode)) {
|
|
24174
|
+
nearBlockNode = this.startNode;
|
|
24175
|
+
}
|
|
24176
|
+
else {
|
|
24177
|
+
nearBlockNode = this.parent.formatter.editorManager.domNode.blockParentNode(this.startNode);
|
|
24178
|
+
}
|
|
24120
24179
|
let isImageNode = false;
|
|
24121
|
-
|
|
24180
|
+
let isFocusedFirst = false;
|
|
24181
|
+
if (this.range.startOffset != 0 && this.range.endOffset != 0 && this.range.startContainer === this.range.endContainer &&
|
|
24182
|
+
!(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG')) {
|
|
24183
|
+
let startNodeText = this.range.startContainer.textContent;
|
|
24184
|
+
let splitFirstText = startNodeText.substring(0, this.range.startOffset);
|
|
24185
|
+
if (splitFirstText.charCodeAt(this.range.startOffset - 1) != 160 && splitFirstText.trim().length === 0) {
|
|
24186
|
+
isFocusedFirst = true;
|
|
24187
|
+
}
|
|
24188
|
+
}
|
|
24189
|
+
else if (this.range.startOffset === 0 && this.range.endOffset === 0) {
|
|
24190
|
+
isFocusedFirst = true;
|
|
24191
|
+
}
|
|
24192
|
+
if (((this.range.startOffset === 0 && this.range.endOffset === 0) || isFocusedFirst) &&
|
|
24193
|
+
!(!isNullOrUndefined(this.range.startContainer.previousSibling) &&
|
|
24194
|
+
(this.range.startContainer.previousSibling.nodeName === 'IMG' || this.range.startContainer.previousSibling.nodeName === 'BR'))) {
|
|
24122
24195
|
let isNearBlockLengthZero;
|
|
24123
24196
|
let newElem;
|
|
24124
24197
|
if (this.range.startContainer.nodeName === 'IMG') {
|
|
@@ -24127,7 +24200,7 @@ class EnterKeyAction {
|
|
|
24127
24200
|
isNearBlockLengthZero = false;
|
|
24128
24201
|
}
|
|
24129
24202
|
else {
|
|
24130
|
-
if (nearBlockNode.textContent.length !== 0) {
|
|
24203
|
+
if (nearBlockNode.textContent.trim().length !== 0) {
|
|
24131
24204
|
newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, nearBlockNode, false).cloneNode(true);
|
|
24132
24205
|
isNearBlockLengthZero = false;
|
|
24133
24206
|
}
|
|
@@ -24176,7 +24249,18 @@ class EnterKeyAction {
|
|
|
24176
24249
|
}
|
|
24177
24250
|
if (newElem.textContent.trim().length === 0) {
|
|
24178
24251
|
const brElm = this.parent.createElement('br');
|
|
24179
|
-
this.startNode.
|
|
24252
|
+
if (this.startNode.nodeName === 'A') {
|
|
24253
|
+
let startParentElem = this.startNode.parentElement;
|
|
24254
|
+
this.startNode.parentElement.insertBefore(brElm, this.startNode);
|
|
24255
|
+
detach(this.startNode);
|
|
24256
|
+
this.startNode = startParentElem;
|
|
24257
|
+
}
|
|
24258
|
+
else {
|
|
24259
|
+
this.startNode.appendChild(brElm);
|
|
24260
|
+
}
|
|
24261
|
+
if (newElem.childNodes[0].textContent === '\n') {
|
|
24262
|
+
detach(newElem.childNodes[0]);
|
|
24263
|
+
}
|
|
24180
24264
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.startNode, 0);
|
|
24181
24265
|
}
|
|
24182
24266
|
if (((this.parent.enterKey === 'P' || this.parent.enterKey === 'DIV') && !shiftKey) || ((this.parent.shiftEnterKey === 'DIV' ||
|
|
@@ -24187,12 +24271,13 @@ class EnterKeyAction {
|
|
|
24187
24271
|
}
|
|
24188
24272
|
this.parent.formatter.editorManager.domNode.insertAfter(insertElm, newElem);
|
|
24189
24273
|
detach(newElem);
|
|
24190
|
-
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.parent.formatter.editorManager.domNode.isBlockNode(this.startNode) ?
|
|
24274
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), this.parent.formatter.editorManager.domNode.isBlockNode(this.startNode) ?
|
|
24275
|
+
insertElm : this.startNode, 0);
|
|
24191
24276
|
}
|
|
24192
24277
|
}
|
|
24193
24278
|
e.args.preventDefault();
|
|
24194
24279
|
}
|
|
24195
|
-
if (this.parent.enterKey === 'BR' && !shiftKey) {
|
|
24280
|
+
if ((this.parent.enterKey === 'BR' && !shiftKey) || (this.parent.shiftEnterKey === 'BR' && shiftKey)) {
|
|
24196
24281
|
let currentParent;
|
|
24197
24282
|
if (!this.parent.formatter.editorManager.domNode.isBlockNode(this.startNode)) {
|
|
24198
24283
|
let currentNode = this.startNode;
|
|
@@ -24207,11 +24292,16 @@ class EnterKeyAction {
|
|
|
24207
24292
|
else {
|
|
24208
24293
|
currentParent = this.startNode;
|
|
24209
24294
|
}
|
|
24210
|
-
let
|
|
24295
|
+
let currentParentLastChild = currentParent.lastChild;
|
|
24296
|
+
while (!isNullOrUndefined(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text')) {
|
|
24297
|
+
currentParentLastChild = currentParentLastChild.lastChild;
|
|
24298
|
+
}
|
|
24299
|
+
const isLastNodeLength = this.range.startContainer === currentParentLastChild ?
|
|
24300
|
+
this.range.startContainer.textContent.length : currentParent.textContent.length;
|
|
24211
24301
|
if (currentParent !== this.parent.inputElement &&
|
|
24212
24302
|
this.parent.formatter.editorManager.domNode.isBlockNode(currentParent) &&
|
|
24213
24303
|
this.range.startOffset === this.range.endOffset &&
|
|
24214
|
-
this.range.startOffset ===
|
|
24304
|
+
this.range.startOffset === isLastNodeLength) {
|
|
24215
24305
|
const outerBRElem = this.parent.createElement('br');
|
|
24216
24306
|
this.parent.formatter.editorManager.domNode.insertAfter(outerBRElem, currentParent);
|
|
24217
24307
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), outerBRElem, 0);
|
|
@@ -24238,37 +24328,15 @@ class EnterKeyAction {
|
|
|
24238
24328
|
currentFocusElem = currentFocusElem.lastChild;
|
|
24239
24329
|
}
|
|
24240
24330
|
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), currentFocusElem, 0);
|
|
24241
|
-
|
|
24331
|
+
|
|
24242
24332
|
}
|
|
24243
24333
|
else {
|
|
24244
|
-
|
|
24245
|
-
newElem.parentElement.insertBefore(outerBRElem, newElem);
|
|
24246
|
-
this.insertFocusContent();
|
|
24334
|
+
this.insertBRElement();
|
|
24247
24335
|
}
|
|
24248
24336
|
}
|
|
24249
24337
|
}
|
|
24250
24338
|
else {
|
|
24251
|
-
|
|
24252
|
-
if (this.startNode.nodeName === 'BR' && this.endNode.nodeName === 'BR' && this.range.startOffset === 0 && this.range.startOffset === this.range.endOffset) {
|
|
24253
|
-
this.parent.formatter.editorManager.domNode.insertAfter(brElm, this.startNode);
|
|
24254
|
-
isEmptyBrInserted = true;
|
|
24255
|
-
}
|
|
24256
|
-
else {
|
|
24257
|
-
if (this.startNode === this.parent.inputElement && !isNullOrUndefined(this.range.startContainer.previousSibling) &&
|
|
24258
|
-
this.range.startContainer.previousSibling.nodeName === 'BR' && this.range.startContainer.textContent.length === 0) {
|
|
24259
|
-
isEmptyBrInserted = true;
|
|
24260
|
-
}
|
|
24261
|
-
this.range.insertNode(brElm);
|
|
24262
|
-
}
|
|
24263
|
-
if (isEmptyBrInserted || (!isNullOrUndefined(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNullOrUndefined(brElm.nextSibling) && brElm.nextSibling.textContent.length > 0)) {
|
|
24264
|
-
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), !isNullOrUndefined(brElm.nextSibling) ? brElm.nextSibling : brElm, 0);
|
|
24265
|
-
isEmptyBrInserted = false;
|
|
24266
|
-
}
|
|
24267
|
-
else {
|
|
24268
|
-
const brElm2 = this.parent.createElement('br');
|
|
24269
|
-
this.range.insertNode(brElm2);
|
|
24270
|
-
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), brElm, 0);
|
|
24271
|
-
}
|
|
24339
|
+
this.insertBRElement();
|
|
24272
24340
|
}
|
|
24273
24341
|
e.args.preventDefault();
|
|
24274
24342
|
}
|
|
@@ -24278,6 +24346,30 @@ class EnterKeyAction {
|
|
|
24278
24346
|
}
|
|
24279
24347
|
}
|
|
24280
24348
|
}
|
|
24349
|
+
insertBRElement() {
|
|
24350
|
+
let isEmptyBrInserted = false;
|
|
24351
|
+
const brElm = this.parent.createElement('br');
|
|
24352
|
+
if (this.startNode.nodeName === 'BR' && this.endNode.nodeName === 'BR' && this.range.startOffset === 0 && this.range.startOffset === this.range.endOffset) {
|
|
24353
|
+
this.parent.formatter.editorManager.domNode.insertAfter(brElm, this.startNode);
|
|
24354
|
+
isEmptyBrInserted = true;
|
|
24355
|
+
}
|
|
24356
|
+
else {
|
|
24357
|
+
if (this.startNode === this.parent.inputElement && !isNullOrUndefined(this.range.startContainer.previousSibling) &&
|
|
24358
|
+
this.range.startContainer.previousSibling.nodeName === 'BR' && this.range.startContainer.textContent.length === 0) {
|
|
24359
|
+
isEmptyBrInserted = true;
|
|
24360
|
+
}
|
|
24361
|
+
this.range.insertNode(brElm);
|
|
24362
|
+
}
|
|
24363
|
+
if (isEmptyBrInserted || (!isNullOrUndefined(brElm.nextElementSibling) && brElm.nextElementSibling.tagName === 'BR') || (!isNullOrUndefined(brElm.nextSibling) && brElm.nextSibling.textContent.length > 0)) {
|
|
24364
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), !isNullOrUndefined(brElm.nextSibling) ? brElm.nextSibling : brElm, 0);
|
|
24365
|
+
isEmptyBrInserted = false;
|
|
24366
|
+
}
|
|
24367
|
+
else {
|
|
24368
|
+
const brElm2 = this.parent.createElement('br');
|
|
24369
|
+
this.range.insertNode(brElm2);
|
|
24370
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), brElm, 0);
|
|
24371
|
+
}
|
|
24372
|
+
}
|
|
24281
24373
|
insertFocusContent() {
|
|
24282
24374
|
if (this.range.startContainer.textContent.length === 0) {
|
|
24283
24375
|
if (this.range.startContainer.nodeName === '#text') {
|
|
@@ -24300,12 +24392,12 @@ class EnterKeyAction {
|
|
|
24300
24392
|
}
|
|
24301
24393
|
}
|
|
24302
24394
|
|
|
24303
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24304
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24305
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24306
|
-
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;
|
|
24307
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24308
|
-
};
|
|
24395
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24396
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24397
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24398
|
+
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;
|
|
24399
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24400
|
+
};
|
|
24309
24401
|
/**
|
|
24310
24402
|
* Represents the Rich Text Editor component.
|
|
24311
24403
|
* ```html
|
|
@@ -25675,7 +25767,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
25675
25767
|
this.setProperties({ value: this.valueTemplate });
|
|
25676
25768
|
}
|
|
25677
25769
|
else {
|
|
25678
|
-
const compiledTemplate = compile(this.valueTemplate)(
|
|
25770
|
+
const compiledTemplate = compile(this.valueTemplate)("", this, 'valueTemplate');
|
|
25679
25771
|
for (let i = 0; i < compiledTemplate.length; i++) {
|
|
25680
25772
|
const item = compiledTemplate[i];
|
|
25681
25773
|
append([item], this.element);
|