@syncfusion/ej2-richtexteditor 27.1.52 → 27.1.57-637881
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/README.md +1 -1
- package/dist/ej2-richtexteditor.min.js +1 -0
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +298 -83
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +299 -82
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +1 -10
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +84 -84
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -0
- package/src/common/interface.d.ts +8 -8
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +4 -4
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +11 -11
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +3 -3
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +2 -2
- package/src/editor-manager/plugin/dom-node.d.ts +36 -36
- package/src/editor-manager/plugin/dom-node.js +37 -37
- 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 +5 -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 +3 -2
- package/src/editor-manager/plugin/inserthtml.js +36 -12
- package/src/editor-manager/plugin/isformatted.d.ts +9 -9
- package/src/editor-manager/plugin/isformatted.js +9 -9
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +4 -4
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +3 -3
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +17 -1
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +3 -3
- 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 +3 -3
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +9 -9
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +2 -2
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +2 -2
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/enter-key.js +10 -5
- 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/import-export.js +1 -1
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +1 -1
- 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 +47 -23
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +9 -9
- package/src/rich-text-editor/actions/resize.d.ts +3 -0
- package/src/rich-text-editor/actions/resize.js +17 -0
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +125 -125
- package/src/rich-text-editor/base/classes.js +125 -125
- package/src/rich-text-editor/base/constant.d.ts +158 -158
- package/src/rich-text-editor/base/constant.js +158 -158
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +64 -52
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +1 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +62 -62
- package/src/rich-text-editor/base/rich-text-editor.js +48 -34
- 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 +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +2 -2
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +8 -2
- 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 +4 -4
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +64 -23
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +9 -2
- 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/slash-menu.js +1 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +4 -3
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -9
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +9 -3
- package/src/rich-text-editor/renderer/view-source.d.ts +5 -5
- package/src/rich-text-editor/renderer/view-source.js +5 -5
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +27 -22
- package/src/selection/selection.js +66 -23
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.scss +1 -1
|
@@ -4252,9 +4252,10 @@ var PASTE_SOURCE = ['word', 'excel', 'onenote'];
|
|
|
4252
4252
|
* `Selection` module is used to handle RTE Selections.
|
|
4253
4253
|
*/
|
|
4254
4254
|
var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
4255
|
-
function NodeSelection() {
|
|
4255
|
+
function NodeSelection(editElement) {
|
|
4256
4256
|
this.startNodeName = [];
|
|
4257
4257
|
this.endNodeName = [];
|
|
4258
|
+
this.editableElement = editElement;
|
|
4258
4259
|
}
|
|
4259
4260
|
NodeSelection.prototype.saveInstance = function (range, body) {
|
|
4260
4261
|
this.range = range.cloneRange();
|
|
@@ -4334,6 +4335,9 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
|
4334
4335
|
return false;
|
|
4335
4336
|
};
|
|
4336
4337
|
NodeSelection.prototype.getNode = function (startNode, endNode, nodeCollection) {
|
|
4338
|
+
if (this.editableElement && (!this.editableElement.contains(startNode) || this.editableElement === startNode)) {
|
|
4339
|
+
return null;
|
|
4340
|
+
}
|
|
4337
4341
|
if (endNode === startNode &&
|
|
4338
4342
|
(startNode.nodeType === 3 || !startNode.firstChild || nodeCollection.indexOf(startNode.firstChild) !== -1
|
|
4339
4343
|
|| this.isChildNode(nodeCollection, startNode))) {
|
|
@@ -4368,6 +4372,12 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
|
4368
4372
|
|| range.startContainer;
|
|
4369
4373
|
var endNode = range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset]
|
|
4370
4374
|
|| range.endContainer;
|
|
4375
|
+
var tableCursor = this.processedTableImageCursor(range);
|
|
4376
|
+
if (tableCursor.start || tableCursor.end) {
|
|
4377
|
+
if (tableCursor.startName === 'TABLE' || tableCursor.endName === 'TABLE') {
|
|
4378
|
+
return [];
|
|
4379
|
+
}
|
|
4380
|
+
}
|
|
4371
4381
|
if ((startNode === endNode || (startNode.nodeName === 'BR' && startNode === range.endContainer.childNodes[range.endOffset])) &&
|
|
4372
4382
|
startNode.childNodes.length === 0) {
|
|
4373
4383
|
return [startNode];
|
|
@@ -4687,6 +4697,39 @@ var NodeSelection = /** @__PURE__ @class */ (function () {
|
|
|
4687
4697
|
selection.removeAllRanges();
|
|
4688
4698
|
selection.addRange(range);
|
|
4689
4699
|
};
|
|
4700
|
+
NodeSelection.prototype.isTableOrImageStart = function (range) {
|
|
4701
|
+
var customHandlerElements = ['TABLE'];
|
|
4702
|
+
var startContainer = range.startContainer;
|
|
4703
|
+
var startOffset = range.startOffset;
|
|
4704
|
+
var isCursorAtStart = range.collapsed && (startContainer.nodeType === 1) &&
|
|
4705
|
+
startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
|
|
4706
|
+
(customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
|
|
4707
|
+
if (isCursorAtStart) {
|
|
4708
|
+
return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
|
|
4709
|
+
}
|
|
4710
|
+
else {
|
|
4711
|
+
return { start: false, startNodeName: '' };
|
|
4712
|
+
}
|
|
4713
|
+
};
|
|
4714
|
+
NodeSelection.prototype.isTableOrImageEnd = function (range) {
|
|
4715
|
+
var customHandlerElements = ['TABLE'];
|
|
4716
|
+
var startContainer = range.startContainer;
|
|
4717
|
+
var startOffset = range.startOffset;
|
|
4718
|
+
var isCursorAtEnd = range.collapsed && (startContainer.nodeType === 1) &&
|
|
4719
|
+
startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
|
|
4720
|
+
(customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
|
|
4721
|
+
if (isCursorAtEnd) {
|
|
4722
|
+
return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
|
|
4723
|
+
}
|
|
4724
|
+
else {
|
|
4725
|
+
return { end: false, endNodeName: '' };
|
|
4726
|
+
}
|
|
4727
|
+
};
|
|
4728
|
+
NodeSelection.prototype.processedTableImageCursor = function (range) {
|
|
4729
|
+
var _a = this.isTableOrImageStart(range), start = _a.start, startNodeName = _a.startNodeName;
|
|
4730
|
+
var _b = this.isTableOrImageEnd(range), end = _b.end, endNodeName = _b.endNodeName;
|
|
4731
|
+
return { start: start, startName: startNodeName, end: end, endName: endNodeName };
|
|
4732
|
+
};
|
|
4690
4733
|
return NodeSelection;
|
|
4691
4734
|
}());
|
|
4692
4735
|
|
|
@@ -5042,7 +5085,7 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
5042
5085
|
ToolbarStatus.get = function (docElement, rootNode, formatNode, fontSize, fontName, documentNode) {
|
|
5043
5086
|
var formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
5044
5087
|
var nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
5045
|
-
var nodeSelection = new NodeSelection();
|
|
5088
|
+
var nodeSelection = new NodeSelection(rootNode);
|
|
5046
5089
|
var range = nodeSelection.getRange(docElement);
|
|
5047
5090
|
var nodes = documentNode ? [documentNode] : range.collapsed ? nodeSelection.getNodeCollection(range) :
|
|
5048
5091
|
nodeSelection.getSelectionNodeCollectionBr(range);
|
|
@@ -6585,6 +6628,9 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6585
6628
|
if (document.body.contains(proxy.dialogObj.element)) {
|
|
6586
6629
|
this.selfLink.dialogObj.hide({ returnValue: false });
|
|
6587
6630
|
}
|
|
6631
|
+
if (this.selfLink.dialogObj !== null) {
|
|
6632
|
+
return;
|
|
6633
|
+
}
|
|
6588
6634
|
if (isIDevice$1() && proxy.parent.iframeSettings.enable) {
|
|
6589
6635
|
select('iframe', proxy.parent.element).contentWindow.focus();
|
|
6590
6636
|
}
|
|
@@ -6649,11 +6695,15 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
6649
6695
|
Link.prototype.openLink = function (e) {
|
|
6650
6696
|
var selectParentEle = this.getAnchorNode(e.selectParent[0]);
|
|
6651
6697
|
if (selectParentEle.classList.contains('e-rte-anchor') || selectParentEle.tagName === 'A') {
|
|
6698
|
+
var sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(selectParentEle.outerHTML);
|
|
6699
|
+
var tempEle = document.createElement('div');
|
|
6700
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
6652
6701
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
6653
|
-
url:
|
|
6702
|
+
url: tempEle.firstChild.href, text: selectParentEle.innerText,
|
|
6654
6703
|
target: selectParentEle.target === '' ? '_self' : '_blank', selectNode: e.selectNode,
|
|
6655
6704
|
subCommand: e.args.item.subCommand
|
|
6656
6705
|
});
|
|
6706
|
+
tempEle.remove();
|
|
6657
6707
|
}
|
|
6658
6708
|
};
|
|
6659
6709
|
Link.prototype.getAnchorNode = function (element) {
|
|
@@ -6878,6 +6928,18 @@ var imageResizeFactor = {
|
|
|
6878
6928
|
botRight: [1, 1],
|
|
6879
6929
|
botLeft: [-1, 1]
|
|
6880
6930
|
};
|
|
6931
|
+
/**
|
|
6932
|
+
* Resize factor for image in iframe editor.
|
|
6933
|
+
*
|
|
6934
|
+
*@hidden
|
|
6935
|
+
*
|
|
6936
|
+
*/
|
|
6937
|
+
var iframeResizeFactor = {
|
|
6938
|
+
topLeft: [-1.2, -1.2],
|
|
6939
|
+
topRight: [1.2, -1.2],
|
|
6940
|
+
botRight: [1.2, 1.2],
|
|
6941
|
+
botLeft: [-1.2, 1.2]
|
|
6942
|
+
};
|
|
6881
6943
|
/**
|
|
6882
6944
|
* Mention restrict key configuration.
|
|
6883
6945
|
*
|
|
@@ -7091,8 +7153,14 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
7091
7153
|
if (this.parent.formatter.getUndoRedoStack().length === 0) {
|
|
7092
7154
|
this.parent.formatter.saveData();
|
|
7093
7155
|
}
|
|
7094
|
-
|
|
7095
|
-
|
|
7156
|
+
if (this.parent.iframeSettings.enable) {
|
|
7157
|
+
this.pageX = e.screenX;
|
|
7158
|
+
this.pageY = e.screenY;
|
|
7159
|
+
}
|
|
7160
|
+
else {
|
|
7161
|
+
this.pageX = this.getPointX(e);
|
|
7162
|
+
this.pageY = this.getPointY(e);
|
|
7163
|
+
}
|
|
7096
7164
|
e.preventDefault();
|
|
7097
7165
|
e.stopImmediatePropagation();
|
|
7098
7166
|
this.resizeBtnInit();
|
|
@@ -7357,29 +7425,50 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
7357
7425
|
return;
|
|
7358
7426
|
}
|
|
7359
7427
|
if (this.resizeBtnStat.botRight || this.resizeBtnStat.botLeft || this.resizeBtnStat.topRight || this.resizeBtnStat.topLeft) {
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7428
|
+
if (this.parent.iframeSettings.enable) {
|
|
7429
|
+
var resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
7430
|
+
var currentScreenX = e.screenX;
|
|
7431
|
+
var currentScreenY = e.screenY;
|
|
7432
|
+
var currentWidth = this.imgEle.clientWidth;
|
|
7433
|
+
var currentHeight = this.imgEle.clientHeight;
|
|
7434
|
+
var deltaX = currentScreenX - this.pageX;
|
|
7435
|
+
var deltaY = currentScreenY - this.pageY;
|
|
7436
|
+
var width = deltaX * resizeFactor[0] + currentWidth;
|
|
7437
|
+
var height = deltaY * resizeFactor[1] + currentHeight;
|
|
7438
|
+
var dimensions = this.adjustDimensions(width, height, deltaX, deltaY, this.aspectRatio);
|
|
7439
|
+
this.pageX = currentScreenX;
|
|
7440
|
+
this.pageY = currentScreenY;
|
|
7441
|
+
this.imgDupMouseMove(dimensions.width + 'px', dimensions.height + 'px', e);
|
|
7442
|
+
this.parent.autoResize();
|
|
7443
|
+
}
|
|
7444
|
+
else {
|
|
7445
|
+
var pageX = this.getPointX(e);
|
|
7446
|
+
var pageY = this.getPointY(e);
|
|
7447
|
+
var resizeFactor = this.getResizeFactor(this.currentResizeHandler);
|
|
7448
|
+
var diffX = (pageX - this.pageX);
|
|
7449
|
+
var diffY = (pageY - this.pageY);
|
|
7450
|
+
var currentWidth = this.imgEle.clientWidth;
|
|
7451
|
+
var currentHeight = this.imgEle.clientHeight;
|
|
7452
|
+
var width = diffX * resizeFactor[0] + currentWidth;
|
|
7453
|
+
var height = diffY * resizeFactor[1] + currentHeight;
|
|
7454
|
+
var dimensions = this.adjustDimensions(width, height, diffX, diffY, this.aspectRatio);
|
|
7455
|
+
this.pageX = pageX;
|
|
7456
|
+
this.pageY = pageY;
|
|
7457
|
+
this.imgDupMouseMove(dimensions.width + 'px', dimensions.height + 'px', e);
|
|
7458
|
+
}
|
|
7373
7459
|
}
|
|
7374
7460
|
};
|
|
7375
7461
|
Image.prototype.adjustDimensions = function (width, height, diffX, diffY, aspectRatio) {
|
|
7376
7462
|
width = (width < 16) ? 16 : width;
|
|
7377
7463
|
height = (height < 16) ? 16 : height;
|
|
7378
|
-
var isWidthPrimary =
|
|
7464
|
+
var isWidthPrimary = width > height;
|
|
7379
7465
|
var dimensions = this.adjustDimensionsByAspectRatio(width, height, aspectRatio, isWidthPrimary);
|
|
7380
7466
|
return dimensions;
|
|
7381
7467
|
};
|
|
7382
7468
|
Image.prototype.getResizeFactor = function (value) {
|
|
7469
|
+
if (this.parent.iframeSettings.enable) {
|
|
7470
|
+
return iframeResizeFactor[value];
|
|
7471
|
+
}
|
|
7383
7472
|
return imageResizeFactor[value];
|
|
7384
7473
|
};
|
|
7385
7474
|
Image.prototype.findAspectRatio = function (image) {
|
|
@@ -7451,11 +7540,15 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
7451
7540
|
}
|
|
7452
7541
|
};
|
|
7453
7542
|
Image.prototype.openImgLink = function (e) {
|
|
7543
|
+
var sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(e.selectParent[0].parentNode.outerHTML);
|
|
7544
|
+
var tempEle = document.createElement('div');
|
|
7545
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
7454
7546
|
var target = e.selectParent[0].parentNode.target === '' ? '_self' : '_blank';
|
|
7455
7547
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
7456
|
-
url:
|
|
7548
|
+
url: tempEle.firstChild.href, target: target, selectNode: e.selectNode,
|
|
7457
7549
|
subCommand: e.args.item.subCommand
|
|
7458
7550
|
});
|
|
7551
|
+
tempEle.remove();
|
|
7459
7552
|
};
|
|
7460
7553
|
Image.prototype.editImgLink = function (e) {
|
|
7461
7554
|
var selectParentEle = e.selectParent[0].parentNode;
|
|
@@ -7542,7 +7635,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
7542
7635
|
}
|
|
7543
7636
|
}
|
|
7544
7637
|
if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
|
|
7545
|
-
if (selectNodeEle && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
7638
|
+
if (selectNodeEle && selectNodeEle[0] && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
7546
7639
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)) {
|
|
7547
7640
|
save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
7548
7641
|
}
|
|
@@ -7791,7 +7884,9 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
7791
7884
|
_this.parent.formatter.editorManager.nodeSelection.Clear(_this.contentModule.getDocument());
|
|
7792
7885
|
_this.parent.formatter.editorManager.nodeSelection.setSelectionContents(_this.contentModule.getDocument(), target);
|
|
7793
7886
|
_this.quickToolObj.imageQTBar.showPopup(args.pageX, pageY, target);
|
|
7794
|
-
_this.
|
|
7887
|
+
if (_this.parent.insertImageSettings.resize === true) {
|
|
7888
|
+
_this.resizeStart(e.args, target);
|
|
7889
|
+
}
|
|
7795
7890
|
}, 400);
|
|
7796
7891
|
}
|
|
7797
7892
|
else {
|
|
@@ -8468,6 +8563,9 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8468
8563
|
proxy.uploadUrl.cssClass = (proxy.parent.insertImageSettings.display === 'inline' ?
|
|
8469
8564
|
CLS_IMGINLINE : CLS_IMGBREAK);
|
|
8470
8565
|
proxy.dialogObj.hide({ returnValue: false });
|
|
8566
|
+
if (proxy.dialogObj !== null) {
|
|
8567
|
+
return;
|
|
8568
|
+
}
|
|
8471
8569
|
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, proxy.uploadUrl);
|
|
8472
8570
|
proxy.uploadUrl.url = '';
|
|
8473
8571
|
if (proxy.contentModule.getEditPanel().querySelector('.e-img-resize')) {
|
|
@@ -8498,8 +8596,11 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
8498
8596
|
maxHeight: proxy.parent.insertImageSettings.maxHeight
|
|
8499
8597
|
}
|
|
8500
8598
|
};
|
|
8501
|
-
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
8502
8599
|
proxy.dialogObj.hide({ returnValue: false });
|
|
8600
|
+
if (proxy.dialogObj !== null) {
|
|
8601
|
+
return;
|
|
8602
|
+
}
|
|
8603
|
+
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
8503
8604
|
}
|
|
8504
8605
|
};
|
|
8505
8606
|
Image.prototype.imgsizeInput = function (e) {
|
|
@@ -9265,7 +9366,9 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
9265
9366
|
if (imageElement) {
|
|
9266
9367
|
this.showImageQTbarTime = setTimeout(function () {
|
|
9267
9368
|
_this.showImageQuickToolbar(args);
|
|
9268
|
-
_this.
|
|
9369
|
+
if (_this.parent.insertImageSettings.resize) {
|
|
9370
|
+
_this.resizeStart(e.args, imageElement);
|
|
9371
|
+
}
|
|
9269
9372
|
}, 0);
|
|
9270
9373
|
}
|
|
9271
9374
|
};
|
|
@@ -10158,6 +10261,9 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
10158
10261
|
proxy.uploadUrl.cssClass = (proxy.parent.insertAudioSettings.layoutOption === 'Inline' ?
|
|
10159
10262
|
CLS_AUDIOINLINE : CLS_AUDIOBREAK);
|
|
10160
10263
|
proxy.dialogObj.hide({ returnValue: false });
|
|
10264
|
+
if (proxy.dialogObj !== null) {
|
|
10265
|
+
return;
|
|
10266
|
+
}
|
|
10161
10267
|
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, proxy.uploadUrl);
|
|
10162
10268
|
proxy.uploadUrl.url = '';
|
|
10163
10269
|
}
|
|
@@ -10176,8 +10282,11 @@ var Audio = /** @__PURE__ @class */ (function () {
|
|
|
10176
10282
|
url: url, selection: this.selection, fileName: name_1,
|
|
10177
10283
|
selectParent: this.selectParent
|
|
10178
10284
|
};
|
|
10179
|
-
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
10180
10285
|
proxy.dialogObj.hide({ returnValue: false });
|
|
10286
|
+
if (proxy.dialogObj !== null) {
|
|
10287
|
+
return;
|
|
10288
|
+
}
|
|
10289
|
+
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
10181
10290
|
}
|
|
10182
10291
|
};
|
|
10183
10292
|
/* eslint-disable */
|
|
@@ -10878,7 +10987,7 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
10878
10987
|
this.undoStack({ subCommand: (originalEvent.keyCode === 90 ? 'undo' : 'redo') });
|
|
10879
10988
|
}
|
|
10880
10989
|
if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
|
|
10881
|
-
if (selectNodeEle && (selectNodeEle[0].nodeName === 'VIDEO' || this.isEmbedVidElem(selectNodeEle[0])) && selectNodeEle.length < 1) {
|
|
10990
|
+
if (selectNodeEle && selectNodeEle[0] && (selectNodeEle[0].nodeName === 'VIDEO' || this.isEmbedVidElem(selectNodeEle[0])) && selectNodeEle.length < 1) {
|
|
10882
10991
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)) {
|
|
10883
10992
|
save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
10884
10993
|
}
|
|
@@ -11651,6 +11760,9 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11651
11760
|
maxHeight: proxy.parent.insertVideoSettings.maxHeight
|
|
11652
11761
|
};
|
|
11653
11762
|
proxy.dialogObj.hide({ returnValue: false });
|
|
11763
|
+
if (proxy.dialogObj !== null) {
|
|
11764
|
+
return;
|
|
11765
|
+
}
|
|
11654
11766
|
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, proxy.uploadUrl);
|
|
11655
11767
|
proxy.uploadUrl.url = '';
|
|
11656
11768
|
}
|
|
@@ -11677,8 +11789,11 @@ var Video = /** @__PURE__ @class */ (function () {
|
|
|
11677
11789
|
maxHeight: proxy.parent.insertVideoSettings.maxHeight
|
|
11678
11790
|
}
|
|
11679
11791
|
};
|
|
11680
|
-
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
11681
11792
|
proxy.dialogObj.hide({ returnValue: false });
|
|
11793
|
+
if (proxy.dialogObj !== null) {
|
|
11794
|
+
return;
|
|
11795
|
+
}
|
|
11796
|
+
proxy.parent.formatter.process(proxy.parent, this.args, this.args.originalEvent, value);
|
|
11682
11797
|
}
|
|
11683
11798
|
};
|
|
11684
11799
|
/* eslint-disable */
|
|
@@ -13716,7 +13831,8 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13716
13831
|
else {
|
|
13717
13832
|
var tableReBox = _this.contentModule.getEditPanel().querySelector('.e-table-box');
|
|
13718
13833
|
var tableWidth = parseInt(getComputedStyle(_this.curTable).width, 10);
|
|
13719
|
-
var tableHeight = parseInt(
|
|
13834
|
+
var tableHeight = !isNaN(parseInt(_this.curTable.style.height, 10)) ?
|
|
13835
|
+
parseInt(_this.curTable.style.height, 10) : parseInt(getComputedStyle(_this.curTable).height, 10);
|
|
13720
13836
|
var paddingSize = +getComputedStyle(_this.contentModule.getEditPanel()).paddingRight.match(/\d/g).join('');
|
|
13721
13837
|
var rteWidth = _this.contentModule.getEditPanel().offsetWidth -
|
|
13722
13838
|
(_this.contentModule.getEditPanel().offsetWidth -
|
|
@@ -13861,7 +13977,7 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
13861
13977
|
_this.curTable.style.height = tableHeight + mouseY + 'px';
|
|
13862
13978
|
if (!isNullOrUndefined(tableReBox)) {
|
|
13863
13979
|
tableReBox.classList.add('e-rbox-select');
|
|
13864
|
-
tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top +
|
|
13980
|
+
tableReBox.style.cssText = 'top: ' + (_this.calcPos(_this.curTable).top + parseInt(getComputedStyle(_this.curTable).height, 10) - 4) +
|
|
13865
13981
|
'px; left:' + (_this.calcPos(_this.curTable).left + tableWidth - 4) + 'px;';
|
|
13866
13982
|
}
|
|
13867
13983
|
if (_this.curTable.closest('li')) {
|
|
@@ -15049,7 +15165,7 @@ var SlashMenu = /** @__PURE__ @class */ (function () {
|
|
|
15049
15165
|
this.parent = options;
|
|
15050
15166
|
this.currentDocument = this.parent.element.ownerDocument;
|
|
15051
15167
|
this.L10n = serviceLocator.getService('rteLocale');
|
|
15052
|
-
this.savedSelection = new NodeSelection();
|
|
15168
|
+
this.savedSelection = new NodeSelection(this.parent.inputElement);
|
|
15053
15169
|
this.defaultItems = defaultSlashMenuDataModel;
|
|
15054
15170
|
this.injectibleItems = injectibleSlashMenuDataModel;
|
|
15055
15171
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
@@ -21206,7 +21322,7 @@ var DOMNode = /** @__PURE__ @class */ (function () {
|
|
|
21206
21322
|
*/
|
|
21207
21323
|
function DOMNode(parent, currentDocument) {
|
|
21208
21324
|
this.parent = parent;
|
|
21209
|
-
this.nodeSelection = new NodeSelection();
|
|
21325
|
+
this.nodeSelection = new NodeSelection(parent);
|
|
21210
21326
|
this.currentDocument = currentDocument;
|
|
21211
21327
|
this.tableSelection = new TableSelection(parent, currentDocument);
|
|
21212
21328
|
}
|
|
@@ -22522,7 +22638,7 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
22522
22638
|
if (e.event.which === 8) {
|
|
22523
22639
|
this.backspaceList(e);
|
|
22524
22640
|
}
|
|
22525
|
-
if ((e.event.which === 46 && e.event.action === 'delete')
|
|
22641
|
+
if ((e.event.which === 46 && e.event.action === 'delete')) {
|
|
22526
22642
|
var range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
22527
22643
|
var commonAncestor = range.commonAncestorContainer;
|
|
22528
22644
|
var startEle = range.startContainer;
|
|
@@ -24049,7 +24165,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24049
24165
|
node = insertNode;
|
|
24050
24166
|
}
|
|
24051
24167
|
}
|
|
24052
|
-
var nodeSelection = new NodeSelection();
|
|
24168
|
+
var nodeSelection = new NodeSelection(editNode);
|
|
24053
24169
|
var nodeCutter = new NodeCutter();
|
|
24054
24170
|
var range = nodeSelection.getRange(docElement);
|
|
24055
24171
|
if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
|
|
@@ -24413,6 +24529,26 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24413
24529
|
this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction);
|
|
24414
24530
|
}
|
|
24415
24531
|
this.alignCheck(editNode);
|
|
24532
|
+
var currentRange = nodeSelection.getRange(docElement);
|
|
24533
|
+
this.listCleanUp(currentRange);
|
|
24534
|
+
};
|
|
24535
|
+
InsertHtml.listCleanUp = function (range) {
|
|
24536
|
+
if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
|
|
24537
|
+
var liElems = range.startContainer.parentElement.closest('ol,ul').querySelectorAll('li');
|
|
24538
|
+
if (liElems.length > 0) {
|
|
24539
|
+
liElems.forEach(function (item) {
|
|
24540
|
+
if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === 'OL' || item.firstChild.nodeName === 'UL')) {
|
|
24541
|
+
item.style.listStyleType = 'none';
|
|
24542
|
+
}
|
|
24543
|
+
var nestedLi = Array.from(item.children).find(function (child) {
|
|
24544
|
+
return child.tagName === 'LI' && (child.parentElement && child.parentElement.tagName !== 'OL' && child.parentElement.tagName !== 'UL');
|
|
24545
|
+
});
|
|
24546
|
+
if (nestedLi) {
|
|
24547
|
+
item.parentNode.replaceChild(nestedLi, item);
|
|
24548
|
+
}
|
|
24549
|
+
});
|
|
24550
|
+
}
|
|
24551
|
+
}
|
|
24416
24552
|
};
|
|
24417
24553
|
InsertHtml.placeCursorEnd = function (lastSelectionNode, node, nodeSelection, docElement, editNode) {
|
|
24418
24554
|
lastSelectionNode = lastSelectionNode.nodeName === 'BR' ? (isNullOrUndefined(lastSelectionNode.previousSibling) ? lastSelectionNode.parentNode
|
|
@@ -24477,7 +24613,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24477
24613
|
blockNode = range.endContainer;
|
|
24478
24614
|
range.setEnd(blockNode, range.endContainer.textContent.length);
|
|
24479
24615
|
}
|
|
24480
|
-
if (blockNode && blockNode.nodeName === 'BODY' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24616
|
+
if (blockNode && blockNode.nodeName === 'BODY' || blockNode.nodeName === 'DIV' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24481
24617
|
blockNode = range.startContainer;
|
|
24482
24618
|
}
|
|
24483
24619
|
if (blockNode && blockNode.closest('LI') && editNode.contains(blockNode.closest('LI')) && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
@@ -24497,12 +24633,12 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24497
24633
|
tempSpan.parentNode.replaceChild(node, tempSpan);
|
|
24498
24634
|
}
|
|
24499
24635
|
else {
|
|
24500
|
-
var nodeSelection = new NodeSelection();
|
|
24636
|
+
var nodeSelection = new NodeSelection(editNode);
|
|
24501
24637
|
var currentNode = this.getNodeCollection(range, nodeSelection, node)[this.getNodeCollection(range, nodeSelection, node).length - 1];
|
|
24502
24638
|
var splitedElm = void 0;
|
|
24503
|
-
if ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR' ||
|
|
24639
|
+
if (currentNode && ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR' ||
|
|
24504
24640
|
(currentNode.nodeName === '#text' && !isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.nodeName === 'LI')) &&
|
|
24505
|
-
(!isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.textContent.trim().length === 0)) {
|
|
24641
|
+
(!isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.textContent.trim().length === 0))) {
|
|
24506
24642
|
splitedElm = currentNode;
|
|
24507
24643
|
if (currentNode.parentElement.nodeName === 'LI' && !isNullOrUndefined(currentNode.nextSibling) &&
|
|
24508
24644
|
currentNode.nextSibling.nodeName === 'BR') {
|
|
@@ -24515,16 +24651,20 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24515
24651
|
return;
|
|
24516
24652
|
}
|
|
24517
24653
|
}
|
|
24518
|
-
else if ((currentNode.nodeName === '#text' || currentNode.nodeName === 'BR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
24654
|
+
else if (currentNode && ((currentNode.nodeName === '#text' || currentNode.nodeName === 'BR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
24519
24655
|
(currentNode.parentElement.nodeName === 'LI' || currentNode.parentElement.closest('LI') || (blockNode === editNode && currentNode.parentElement === blockNode)) &&
|
|
24520
|
-
currentNode.parentElement.textContent.trim().length > 0) {
|
|
24656
|
+
currentNode.parentElement.textContent.trim().length > 0)) {
|
|
24521
24657
|
splitedElm = currentNode;
|
|
24522
24658
|
if (currentNode.parentElement.nodeName === 'LI' && !isNullOrUndefined(currentNode.nextSibling) &&
|
|
24523
24659
|
currentNode.nextSibling.nodeName === 'BR') {
|
|
24524
24660
|
detach(currentNode.nextSibling);
|
|
24525
24661
|
}
|
|
24526
24662
|
if (!range.collapsed) {
|
|
24663
|
+
var startContainer = range.startContainer;
|
|
24664
|
+
var startOffset = range.startOffset;
|
|
24527
24665
|
this.removeListfromPaste(range);
|
|
24666
|
+
range.setStart(startContainer, startOffset);
|
|
24667
|
+
range.setEnd(startContainer, startOffset);
|
|
24528
24668
|
}
|
|
24529
24669
|
range.insertNode(node);
|
|
24530
24670
|
this.contentsDeleted = true;
|
|
@@ -24564,9 +24704,9 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24564
24704
|
};
|
|
24565
24705
|
// eslint-disable-next-line
|
|
24566
24706
|
InsertHtml.getImmediateBlockNode = function (node, editNode) {
|
|
24567
|
-
|
|
24707
|
+
while (node && BLOCK_TAGS.indexOf(node.nodeName.toLocaleLowerCase()) < 0) {
|
|
24568
24708
|
node = node.parentNode;
|
|
24569
|
-
}
|
|
24709
|
+
}
|
|
24570
24710
|
return node;
|
|
24571
24711
|
};
|
|
24572
24712
|
InsertHtml.removingComments = function (elm) {
|
|
@@ -24682,7 +24822,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
24682
24822
|
var value = range.startContainer;
|
|
24683
24823
|
if (!isNullOrUndefined(value) && value.nodeName === 'LI' && !isNullOrUndefined(value.parentElement) && (value.parentElement.nodeName === 'OL' || value.parentElement.nodeName === 'UL') && value.textContent.trim() === '') {
|
|
24684
24824
|
value.parentElement.querySelectorAll('li').forEach(function (item) {
|
|
24685
|
-
if (item.textContent.trim() === '') {
|
|
24825
|
+
if (item.textContent.trim() === '' && item !== value) {
|
|
24686
24826
|
item.remove();
|
|
24687
24827
|
}
|
|
24688
24828
|
});
|
|
@@ -24785,7 +24925,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
24785
24925
|
}
|
|
24786
24926
|
}
|
|
24787
24927
|
else {
|
|
24788
|
-
var domSelection = new NodeSelection();
|
|
24928
|
+
var domSelection = new NodeSelection(this.parent.editableElement);
|
|
24789
24929
|
var range = domSelection.getRange(this.parent.currentDocument);
|
|
24790
24930
|
if (range.endContainer.nodeName === '#text' && range.startContainer.textContent.length === (range.endOffset + 1) &&
|
|
24791
24931
|
range.endContainer.textContent.charAt(range.endOffset) === ' ' && (!isNullOrUndefined(range.endContainer.nextSibling) && range.endContainer.nextSibling.nodeName === 'A')) {
|
|
@@ -24831,7 +24971,7 @@ var LinkCommand = /** @__PURE__ @class */ (function () {
|
|
|
24831
24971
|
}
|
|
24832
24972
|
};
|
|
24833
24973
|
LinkCommand.prototype.createLinkNode = function (e) {
|
|
24834
|
-
var domSelection = new NodeSelection();
|
|
24974
|
+
var domSelection = new NodeSelection(this.parent.editableElement);
|
|
24835
24975
|
var nodeCutter = new NodeCutter();
|
|
24836
24976
|
var range = domSelection.getRange(this.parent.currentDocument);
|
|
24837
24977
|
var nodes = this.getSelectionNodes(domSelection.getNodeCollection(range));
|
|
@@ -25406,6 +25546,8 @@ var ImageCommand = /** @__PURE__ @class */ (function () {
|
|
|
25406
25546
|
(Browser.isIE ? selectedNode.previousSibling : selectedNode.previousElementSibling);
|
|
25407
25547
|
var onImageLoadEvent_1 = function () {
|
|
25408
25548
|
if (!isNullOrUndefined(_this.parent.currentDocument)) {
|
|
25549
|
+
imgElm_1.setAttribute('width', imgElm_1.offsetWidth.toString());
|
|
25550
|
+
imgElm_1.setAttribute('height', imgElm_1.offsetHeight.toString());
|
|
25409
25551
|
e.callBack({
|
|
25410
25552
|
requestType: (e.value === 'Replace') ? (e.item.subCommand = 'Replace', 'Replace') : 'Images',
|
|
25411
25553
|
editorMode: 'HTML',
|
|
@@ -27240,7 +27382,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
27240
27382
|
if (format === 'backgroundcolor' && value === '') {
|
|
27241
27383
|
value = 'transparent';
|
|
27242
27384
|
}
|
|
27243
|
-
var domSelection = new NodeSelection();
|
|
27385
|
+
var domSelection = new NodeSelection(endNode);
|
|
27244
27386
|
var domNode = new DOMNode(endNode, docElement);
|
|
27245
27387
|
var nodeCutter = new NodeCutter();
|
|
27246
27388
|
var isFormatted = new IsFormatted();
|
|
@@ -27449,7 +27591,7 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
27449
27591
|
if (cursorNodes.length === 1 && range.startOffset === 0 && (cursorNodes[0].nodeName === 'BR' || (isNullOrUndefined(cursorNodes[0].nextSibling) ? false : cursorNodes[0].nextSibling.nodeName === 'BR'))) {
|
|
27450
27592
|
detach(cursorNodes[0].nodeName === '#text' ? cursorNodes[0].nextSibling : cursorNodes[0]);
|
|
27451
27593
|
}
|
|
27452
|
-
if (!isNullOrUndefined(cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
27594
|
+
if (!isNullOrUndefined(cursorNodes[0] && cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
27453
27595
|
indexOf((cursorNodes[0].parentElement).tagName.toLowerCase()) !== -1 && cursorNodes[0].textContent.includes('\u200B')) {
|
|
27454
27596
|
var element = this.GetFormatNode(format, value);
|
|
27455
27597
|
var tempNode = cursorNodes[0];
|
|
@@ -28362,7 +28504,7 @@ var ClearFormat$1 = /** @__PURE__ @class */ (function () {
|
|
|
28362
28504
|
ClearFormat.clear = function (docElement, endNode, enterAction, selector, command) {
|
|
28363
28505
|
this.domNode = new DOMNode(endNode, docElement);
|
|
28364
28506
|
this.defaultTag = enterAction === 'P' ? this.defaultTag : 'div';
|
|
28365
|
-
var nodeSelection = new NodeSelection();
|
|
28507
|
+
var nodeSelection = new NodeSelection(endNode);
|
|
28366
28508
|
var nodeCutter = new NodeCutter();
|
|
28367
28509
|
var range = nodeSelection.getRange(docElement);
|
|
28368
28510
|
var nodes = range.collapsed ? nodeSelection.getSelectionNodeCollection(range) :
|
|
@@ -28794,7 +28936,7 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
28794
28936
|
if (!this.parent.currentDocument) {
|
|
28795
28937
|
return;
|
|
28796
28938
|
}
|
|
28797
|
-
var range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
28939
|
+
var range = new NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
28798
28940
|
var currentContainer = this.parent.editableElement === range.startContainer.parentElement ?
|
|
28799
28941
|
range.startContainer.parentElement : range.startContainer;
|
|
28800
28942
|
for (var i = currentContainer.childNodes.length - 1; i >= 0; i--) {
|
|
@@ -28804,8 +28946,8 @@ var UndoRedoManager = /** @__PURE__ @class */ (function () {
|
|
|
28804
28946
|
detach(currentContainer.childNodes[i]);
|
|
28805
28947
|
}
|
|
28806
28948
|
}
|
|
28807
|
-
range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
28808
|
-
var save = new NodeSelection().save(range, this.parent.currentDocument);
|
|
28949
|
+
range = new NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
28950
|
+
var save = new NodeSelection(this.parent.editableElement).save(range, this.parent.currentDocument);
|
|
28809
28951
|
var clonedElement = this.parent.editableElement.cloneNode(true);
|
|
28810
28952
|
var fragment = document.createDocumentFragment();
|
|
28811
28953
|
while (clonedElement.firstChild) {
|
|
@@ -29018,6 +29160,9 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
29018
29160
|
e.callBack(elm.innerHTML, this.cropImageDimensions, source);
|
|
29019
29161
|
}
|
|
29020
29162
|
else {
|
|
29163
|
+
if (source === PASTE_SOURCE[2]) {
|
|
29164
|
+
this.handleOneNoteContent(elm);
|
|
29165
|
+
}
|
|
29021
29166
|
e.callBack(elm.innerHTML, null, source);
|
|
29022
29167
|
}
|
|
29023
29168
|
};
|
|
@@ -30012,6 +30157,18 @@ var MsWordPaste = /** @__PURE__ @class */ (function () {
|
|
|
30012
30157
|
}
|
|
30013
30158
|
return 'html';
|
|
30014
30159
|
};
|
|
30160
|
+
MsWordPaste.prototype.handleOneNoteContent = function (element) {
|
|
30161
|
+
var allListElements = element.querySelectorAll('ul, ol');
|
|
30162
|
+
if (allListElements.length > 0) {
|
|
30163
|
+
for (var i = 0; i < allListElements.length; i++) {
|
|
30164
|
+
// Removing the ul and ol parent node for the p tag
|
|
30165
|
+
var currentList = allListElements[i];
|
|
30166
|
+
if (currentList.querySelectorAll('li').length === 0 && currentList.childNodes.length > 0) {
|
|
30167
|
+
InsertMethods.unwrap(currentList);
|
|
30168
|
+
}
|
|
30169
|
+
}
|
|
30170
|
+
}
|
|
30171
|
+
};
|
|
30015
30172
|
MsWordPaste.prototype.destroy = function () {
|
|
30016
30173
|
this.removeEventListener();
|
|
30017
30174
|
};
|
|
@@ -30787,7 +30944,7 @@ var EditorManager = /** @__PURE__ @class */ (function () {
|
|
|
30787
30944
|
function EditorManager(options) {
|
|
30788
30945
|
this.currentDocument = options.document;
|
|
30789
30946
|
this.editableElement = options.editableElement;
|
|
30790
|
-
this.nodeSelection = new NodeSelection();
|
|
30947
|
+
this.nodeSelection = new NodeSelection(this.editableElement);
|
|
30791
30948
|
this.nodeCutter = new NodeCutter();
|
|
30792
30949
|
this.domNode = new DOMNode(this.editableElement, this.currentDocument);
|
|
30793
30950
|
this.observer = new Observer(this);
|
|
@@ -31474,7 +31631,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
31474
31631
|
if (this.parent.isDestroyed) {
|
|
31475
31632
|
return;
|
|
31476
31633
|
}
|
|
31477
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
31634
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
31478
31635
|
this.parent.on(initialLoad, this.instantiateRenderer, this);
|
|
31479
31636
|
this.parent.on(htmlToolbarClick, this.onToolbarClick, this);
|
|
31480
31637
|
this.parent.on(keyDown, this.onKeyDown, this);
|
|
@@ -32188,7 +32345,7 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
32188
32345
|
urlText = urlText.slice(0, urlTextRange);
|
|
32189
32346
|
// eslint-disable-next-line
|
|
32190
32347
|
var regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
|
|
32191
|
-
if (selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
32348
|
+
if (selectNodeEle[0] && selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
32192
32349
|
var selection = this.nodeSelectionObj.save(range, this.parent.contentModule.getDocument());
|
|
32193
32350
|
var url = urlText.indexOf('http') > -1 ? urlText : 'http://' + urlText;
|
|
32194
32351
|
var selectParent = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
|
|
@@ -32549,7 +32706,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
32549
32706
|
this.isDestroyed = false;
|
|
32550
32707
|
}
|
|
32551
32708
|
PasteCleanup.prototype.addEventListener = function () {
|
|
32552
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
32709
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
32553
32710
|
if (this.parent.isDestroyed) {
|
|
32554
32711
|
return;
|
|
32555
32712
|
}
|
|
@@ -32715,38 +32872,62 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
32715
32872
|
}
|
|
32716
32873
|
};
|
|
32717
32874
|
PasteCleanup.prototype.splitBreakLine = function (value) {
|
|
32718
|
-
var enterSplitText = value.split('\n');
|
|
32719
|
-
var
|
|
32875
|
+
var enterSplitText = value.split('\r\n\r\n');
|
|
32876
|
+
var finalText = '';
|
|
32720
32877
|
var startNode = this.parent.enterKey === 'P' ? '<p>' : (this.parent.enterKey === 'DIV' ? '<div>' : '');
|
|
32721
32878
|
var endNode = this.parent.enterKey === 'P' ? '</p>' : (this.parent.enterKey === 'DIV' ? '</div>' : '<br>');
|
|
32722
32879
|
for (var i = 0; i < enterSplitText.length; i++) {
|
|
32723
|
-
|
|
32724
|
-
|
|
32880
|
+
var content = enterSplitText[i];
|
|
32881
|
+
var contentWithSpace = this.makeSpace(content);
|
|
32882
|
+
var contentWithLineBreak = contentWithSpace.replace(/\r\n|\n/g, '<br>');
|
|
32883
|
+
if (i === 0) {
|
|
32884
|
+
if (this.parent.enterKey === 'BR') {
|
|
32885
|
+
finalText += (contentWithLineBreak + endNode);
|
|
32886
|
+
}
|
|
32887
|
+
else {
|
|
32888
|
+
finalText += contentWithLineBreak; // In order to merge the content in current line. No P/Div tag is added.
|
|
32889
|
+
}
|
|
32725
32890
|
}
|
|
32726
32891
|
else {
|
|
32727
|
-
|
|
32728
|
-
|
|
32729
|
-
|
|
32730
|
-
|
|
32892
|
+
if (this.parent.enterKey === 'BR') {
|
|
32893
|
+
if (i === enterSplitText.length - 1) {
|
|
32894
|
+
finalText += (contentWithLineBreak + endNode);
|
|
32895
|
+
}
|
|
32896
|
+
else {
|
|
32897
|
+
finalText += (contentWithLineBreak + endNode + endNode);
|
|
32898
|
+
}
|
|
32899
|
+
}
|
|
32900
|
+
else {
|
|
32901
|
+
finalText += startNode + contentWithLineBreak + endNode;
|
|
32902
|
+
}
|
|
32731
32903
|
}
|
|
32732
32904
|
}
|
|
32733
|
-
return
|
|
32905
|
+
return finalText;
|
|
32734
32906
|
};
|
|
32735
|
-
PasteCleanup.prototype.makeSpace = function (
|
|
32736
|
-
var
|
|
32737
|
-
|
|
32738
|
-
|
|
32739
|
-
|
|
32740
|
-
|
|
32741
|
-
|
|
32742
|
-
|
|
32907
|
+
PasteCleanup.prototype.makeSpace = function (text) {
|
|
32908
|
+
var spacedContent = '';
|
|
32909
|
+
if (text === '') {
|
|
32910
|
+
return text;
|
|
32911
|
+
}
|
|
32912
|
+
var lineBreakSplitText = text.split(' ');
|
|
32913
|
+
for (var i = 0; i < lineBreakSplitText.length; i++) {
|
|
32914
|
+
var currentText = lineBreakSplitText[i];
|
|
32915
|
+
if (currentText === '') {
|
|
32916
|
+
spacedContent += ' ';
|
|
32917
|
+
}
|
|
32918
|
+
else if (currentText === '\t') {
|
|
32919
|
+
spacedContent += ' ';
|
|
32743
32920
|
}
|
|
32744
32921
|
else {
|
|
32745
|
-
|
|
32746
|
-
|
|
32922
|
+
if (i > 0 && i < lineBreakSplitText.length) {
|
|
32923
|
+
spacedContent += ' ';
|
|
32924
|
+
}
|
|
32925
|
+
spacedContent += currentText;
|
|
32747
32926
|
}
|
|
32748
32927
|
}
|
|
32749
|
-
|
|
32928
|
+
spacedContent = spacedContent.replace(/\t/g, ' ');
|
|
32929
|
+
spacedContent = spacedContent.replace(/ /g, ' ');
|
|
32930
|
+
return spacedContent;
|
|
32750
32931
|
};
|
|
32751
32932
|
PasteCleanup.prototype.imgUploading = function (elm) {
|
|
32752
32933
|
var allImgElm = elm.querySelectorAll('.pasteContent_Img');
|
|
@@ -33714,6 +33895,8 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33714
33895
|
this.parent = parent;
|
|
33715
33896
|
this.addEventListener();
|
|
33716
33897
|
this.isDestroyed = false;
|
|
33898
|
+
this.isResizing = false;
|
|
33899
|
+
this.iframeMouseUpBoundFn = this.iframeMouseUp.bind(this);
|
|
33717
33900
|
}
|
|
33718
33901
|
Resize.prototype.addEventListener = function () {
|
|
33719
33902
|
if (this.parent.isDestroyed) {
|
|
@@ -33733,6 +33916,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33733
33916
|
this.parent.rootContainer.classList.add('e-resize-enabled');
|
|
33734
33917
|
if (this.parent.iframeSettings.enable) {
|
|
33735
33918
|
this.parent.inputElement.classList.add('e-resize-enabled');
|
|
33919
|
+
this.parent.contentModule.getDocument().addEventListener('mouseup', this.iframeMouseUpBoundFn);
|
|
33736
33920
|
}
|
|
33737
33921
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
33738
33922
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
@@ -33740,6 +33924,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33740
33924
|
};
|
|
33741
33925
|
Resize.prototype.resizeStart = function (e) {
|
|
33742
33926
|
var _this = this;
|
|
33927
|
+
this.isResizing = false;
|
|
33743
33928
|
if (e.cancelable) {
|
|
33744
33929
|
e.preventDefault();
|
|
33745
33930
|
}
|
|
@@ -33754,6 +33939,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33754
33939
|
};
|
|
33755
33940
|
Resize.prototype.performResize = function (e) {
|
|
33756
33941
|
var _this = this;
|
|
33942
|
+
this.isResizing = true;
|
|
33757
33943
|
var args = { event: e, requestType: 'editor' };
|
|
33758
33944
|
this.parent.trigger(onResize, args, function (resizingArgs) {
|
|
33759
33945
|
if (resizingArgs.cancel) {
|
|
@@ -33780,9 +33966,14 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33780
33966
|
this.parent.element.style.height = eventType.clientY - boundRect.top + 'px';
|
|
33781
33967
|
this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
|
|
33782
33968
|
}
|
|
33969
|
+
var rteContent = this.parent.element.querySelector('#' + this.parent.getID() + '_source-view');
|
|
33970
|
+
if (!isNullOrUndefined(rteContent)) {
|
|
33971
|
+
rteContent.style.height = this.parent.element.style.height;
|
|
33972
|
+
}
|
|
33783
33973
|
this.parent.refreshUI();
|
|
33784
33974
|
};
|
|
33785
33975
|
Resize.prototype.stopResize = function (e) {
|
|
33976
|
+
this.isResizing = false;
|
|
33786
33977
|
this.parent.refreshUI();
|
|
33787
33978
|
this.unwireResizeEvents();
|
|
33788
33979
|
var args = { event: e, requestType: 'editor' };
|
|
@@ -33832,6 +34023,7 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33832
34023
|
}
|
|
33833
34024
|
if (this.parent.iframeSettings.enable && !isNullOrUndefined(this.parent.inputElement)) {
|
|
33834
34025
|
this.parent.inputElement.classList.remove('e-resize-enabled');
|
|
34026
|
+
this.parent.contentModule.getDocument().removeEventListener('mouseup', this.iframeMouseUpBoundFn);
|
|
33835
34027
|
}
|
|
33836
34028
|
if (this.resizer) {
|
|
33837
34029
|
EventHandler.remove(this.resizer, 'mousedown', this.resizeStart);
|
|
@@ -33839,6 +34031,12 @@ var Resize = /** @__PURE__ @class */ (function () {
|
|
|
33839
34031
|
detach(this.resizer);
|
|
33840
34032
|
}
|
|
33841
34033
|
this.parent.off(destroy, this.destroy);
|
|
34034
|
+
this.iframeMouseUpBoundFn = null;
|
|
34035
|
+
};
|
|
34036
|
+
Resize.prototype.iframeMouseUp = function (e) {
|
|
34037
|
+
if (this.isResizing) {
|
|
34038
|
+
this.stopResize(e);
|
|
34039
|
+
}
|
|
33842
34040
|
};
|
|
33843
34041
|
/**
|
|
33844
34042
|
* For internal use only - Get the module name.
|
|
@@ -35354,7 +35552,7 @@ var ImportExport = /** @__PURE__ @class */ (function () {
|
|
|
35354
35552
|
saveUrl: this.parent.importWord.serviceUrl
|
|
35355
35553
|
},
|
|
35356
35554
|
success: function (args) {
|
|
35357
|
-
_this.parent.executeCommand('
|
|
35555
|
+
_this.parent.executeCommand('importWord', args.e.currentTarget.response, { undo: true });
|
|
35358
35556
|
}
|
|
35359
35557
|
});
|
|
35360
35558
|
this.parent.setProperties({ enableXhtml: true }, true);
|
|
@@ -36804,11 +37002,16 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
36804
37002
|
else if (!isNullOrUndefined(currentParent) && currentParent !== _this.parent.inputElement && currentParent.nodeName !== 'BR') {
|
|
36805
37003
|
if (currentParent.textContent.trim().length === 0 || (currentParent.textContent.trim().length === 1 &&
|
|
36806
37004
|
currentParent.textContent.charCodeAt(0) === 8203)) {
|
|
36807
|
-
|
|
36808
|
-
|
|
36809
|
-
|
|
36810
|
-
|
|
36811
|
-
|
|
37005
|
+
if (currentParent.childElementCount > 1 && currentParent.lastElementChild.nodeName === 'IMG') {
|
|
37006
|
+
_this.insertBRElement();
|
|
37007
|
+
}
|
|
37008
|
+
else {
|
|
37009
|
+
var newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, true).cloneNode(true);
|
|
37010
|
+
_this.parent.formatter.editorManager.domNode.insertAfter(newElem, currentParent);
|
|
37011
|
+
var outerBRElem = _this.parent.createElement('br');
|
|
37012
|
+
newElem.parentElement.insertBefore(outerBRElem, newElem);
|
|
37013
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), newElem, 0);
|
|
37014
|
+
}
|
|
36812
37015
|
}
|
|
36813
37016
|
else {
|
|
36814
37017
|
var newElem = void 0;
|
|
@@ -37380,6 +37583,17 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
37380
37583
|
* @public
|
|
37381
37584
|
*/
|
|
37382
37585
|
RichTextEditor.prototype.executeCommand = function (commandName, value, option) {
|
|
37586
|
+
if (commandName === 'importWord') {
|
|
37587
|
+
var importContainer = this.createElement('div');
|
|
37588
|
+
importContainer.innerHTML = value;
|
|
37589
|
+
var tableElement = importContainer.querySelectorAll('table:not(.e-rte-table):not(.e-rte-paste-table)');
|
|
37590
|
+
for (var i = 0; i < tableElement.length; i++) {
|
|
37591
|
+
tableElement[i].classList.add('e-rte-paste-table');
|
|
37592
|
+
}
|
|
37593
|
+
value = importContainer.innerHTML;
|
|
37594
|
+
importContainer.remove();
|
|
37595
|
+
commandName = 'insertHTML';
|
|
37596
|
+
}
|
|
37383
37597
|
value = this.htmlPurifier(commandName, value);
|
|
37384
37598
|
var internalValue;
|
|
37385
37599
|
if (this.editorMode === 'HTML') {
|
|
@@ -38847,7 +39061,10 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
38847
39061
|
var item = compiledTemplate[i];
|
|
38848
39062
|
append([item], appendElem);
|
|
38849
39063
|
}
|
|
38850
|
-
|
|
39064
|
+
var content = appendElem.innerHTML.trim();
|
|
39065
|
+
if (content.length > 0) {
|
|
39066
|
+
this.setProperties({ value: content });
|
|
39067
|
+
}
|
|
38851
39068
|
this.renderReactTemplates();
|
|
38852
39069
|
}
|
|
38853
39070
|
}
|
|
@@ -39992,5 +40209,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
39992
40209
|
return RichTextEditor;
|
|
39993
40210
|
}(Component));
|
|
39994
40211
|
|
|
39995
|
-
export { ACTION, ALIGNMENT_TYPE, ALLOWED_ACTIONKEYS, AUDIO, Alignments, Audio, AudioCommand, BLOCKQUOTE_LIST_HANDLE, BLOCK_TAGS, BaseQuickToolbar, BaseToolbar, CLASS_AUDIO, CLASS_AUDIO_BREAK, CLASS_AUDIO_FOCUS, CLASS_AUDIO_INLINE, CLASS_AUDIO_WRAP, CLASS_CAPTION, CLASS_CAPTION_INLINE, CLASS_CLICK_ELEM, CLASS_EMBED_VIDEO_WRAP, CLASS_IMAGE_BREAK, CLASS_IMAGE_CENTER, CLASS_IMAGE_INLINE, CLASS_IMAGE_LEFT, CLASS_IMAGE_RIGHT, CLASS_RTE_CAPTION, CLASS_VIDEO, CLASS_VIDEO_BREAK, CLASS_VIDEO_CENTER, CLASS_VIDEO_CLICK_ELEM, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, CLASS_VIDEO_LEFT, CLASS_VIDEO_RIGHT, CLASS_VIDEO_WRAP, CLEAR_COMMAND, CLEAR_TYPE, CLS_ACTIVE, CLS_ALIGN_TB_BTN, CLS_AUDIOBREAK, CLS_AUDIOINLINE, CLS_AUDIOWRAP, CLS_AUD_FOCUS, CLS_BACK, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_PICKER, CLS_BACKGROUND_COLOR_TARGET, CLS_BULLETFORMATLIST_TB_BTN, CLS_CAPINLINE, CLS_CAPTION, CLS_CLICKELEM, CLS_COLOR_CONTENT, CLS_COLOR_PALETTE, CLS_CONTENT, CLS_COUNT, CLS_CUSTOM_TILE, CLS_DISABLED, CLS_DROPAREA, CLS_DROPDOWN_BTN, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_POPUP, CLS_ERROR, CLS_EXPAND_OPEN, CLS_FOCUS, CLS_FONT_COLOR_DROPDOWN, CLS_FONT_COLOR_PICKER, CLS_FONT_COLOR_TARGET, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FULL_SCREEN, CLS_HIDE, CLS_HR_SEPARATOR, CLS_ICONS, CLS_IMAGE_POP, CLS_IMGBREAK, CLS_IMGCENTER, CLS_IMGINLINE, CLS_IMGLEFT, CLS_IMGRIGHT, CLS_IMG_FOCUS, CLS_IMG_INNER, CLS_IMG_RESIZE, CLS_INLINE, CLS_INLINE_DROPDOWN, CLS_INLINE_POP, CLS_LIST_PRIMARY_CONTENT, CLS_MAXIMIZE, CLS_MINIMIZE, CLS_NOCOLOR_ITEM, CLS_NUMBERFORMATLIST_TB_BTN, CLS_POP, CLS_POPUP, CLS_POPUP_OPEN, CLS_QUICK_DROPDOWN, CLS_QUICK_POP, CLS_QUICK_TB, CLS_RESIZE, CLS_RM_WHITE_SPACE, CLS_RTE, CLS_RTE_CAPTION, CLS_RTE_CONTAINER, CLS_RTE_CONTENT, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_DRAG_IMAGE, CLS_RTE_ELEMENTS, CLS_RTE_EXPAND_TB, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_HIDDEN, CLS_RTE_IMAGE, CLS_RTE_PASTE_CANCEL, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_READONLY, CLS_RTE_RES_CNT, CLS_RTE_RES_EAST, CLS_RTE_RES_HANDLE, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, CLS_RTE_TABLE_RESIZE, CLS_RTE_TB_ENABLED, CLS_RTE_UPLOAD_POPUP, CLS_RTL, CLS_SCRIPT_SHEET, CLS_SEPARATOR, CLS_SHOW, CLS_STYLE_SHEET, CLS_TABLE, CLS_TABLE_BORDER, CLS_TABLE_MULTI_CELL, CLS_TABLE_SEL, CLS_TABLE_SEL_END, CLS_TB_ALT_BOR, CLS_TB_BOX_RES, CLS_TB_BTN, CLS_TB_COL_RES, CLS_TB_DASH_BOR, CLS_TB_EXTENDED, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_INLINE, CLS_TB_IOS_FIX, CLS_TB_ITEM, CLS_TB_ROW_RES, CLS_TB_STATIC, CLS_TB_WRAP, CLS_TEXT_POP, CLS_TEXT_QUICK_TB, CLS_TOOLBAR, CLS_UPLOAD_FILES, CLS_VIDEOBREAK, CLS_VIDEOINLINE, CLS_VIDEOWRAP, CLS_VID_CLICK_ELEM, CLS_VID_FOCUS, CLS_VISIBLE, CLS_WARNING, ClearFormat, ClearFormatExec, ColorPickerInput, ContentRender, Count, DEFAULT_TAG, DELETECOLUMN, DELETEROW, DESTROY, DOMNode, DialogRenderer, DialogType, DropDownButtons, EMOJI_PICKER_ACTIONS, EditorManager, EmojiPicker, EmojiPickerAction, ExecCommandCallBack, FORMAT_PAINTER_ACTIONS, FORMAT_TYPE, FileManager, FormatPainter, FormatPainterActions, Formats, Formatter, FullScreen, HTMLFormatter, HtmlEditor, HtmlToolbarStatus, IGNORE_BLOCK_TAGS, IMAGE, INDENT_TYPE, INSERTHTML_TYPE, INSERT_COLUMN, INSERT_ROW, INSERT_TEXT_COMMAND, INSERT_TEXT_TYPE, INTERNAL_DESTROY, IframeContentRender, Image$1 as Image, ImageCommand, ImageInputSource, ImportExport, Indents, InsertHtml, InsertHtmlExec, InsertMethods, InsertTextExec, IsFormatted, KEY_DOWN, KEY_DOWN_HANDLER, KEY_UP, KEY_UP_HANDLER, KeyboardEvents, LINK, LINK_COMMAND, LISTS_COMMAND, LIST_TYPE, Link, LinkCommand, Lists, MDFormats, MDLink, MDLists, MDSelectionFormats, MDTable, MD_TABLE, MODEL_CHANGED, MODEL_CHANGED_PLUGIN, MOUSE_DOWN, MS_WORD_CLEANUP, MS_WORD_CLEANUP_PLUGIN, MarkdownEditor, MarkdownFormatter, MarkdownParser, MarkdownRender, MarkdownSelection, MarkdownToolbarStatus, MsWordPaste, NodeCutter, NodeSelection, ON_BEGIN, PASTE_SOURCE, PasteCleanup, PopupRenderer, QuickToolbar, REMOVETABLE, Render, RenderType, RendererFactory, Resize, RichTextEditor, SELECTION_TYPE, SELF_CLOSING_TAGS, SPACE_ACTION, SelectionBasedExec, SelectionCommands, ServiceLocator, SlashMenu, TABLE, TABLEHEADER, TABLE_BLOCK_TAGS, TABLE_HORIZONTAL_SPLIT, TABLE_MERGE, TABLE_MOVE, TABLE_VERTICAL_ALIGN, TABLE_VERTICAL_SPLIT, Table, TableCommand, Toolbar, ToolbarAction, ToolbarRenderer, ToolbarStatus, ToolbarType, UndoRedoCommands, UndoRedoManager, VIDEO, Video, VideoCommand, ViewSource, XhtmlValidation, actionBegin, actionComplete, actionSuccess, afterImageDelete, afterKeyDown, afterMediaDelete, afterPasteCleanup, audioDelete, audioToolbarAction, autoResize, beforeDialogClose, beforeDialogOpen, beforeDropDownItemRender, beforeDropDownOpen, beforeFileUpload, beforeImageDrop, beforeImageUpload, beforePasteCleanup, beforeQuickToolbarOpen, bindCssClass, bindOnEnd, blockEmptyNodes, checkUndo, cleanupResizeElements, clearDialogObj, closeAudioDialog, closeImageDialog, closeLinkDialog, closeTableDialog, closeTooltip, closeVideoDialog, colorPickerChanged, contentBlur, contentChanged, contentFocus, contentscroll, conversionFactors, convertToBlob, count, createTable, created, decode, destroy, destroyTooltip, destroyed, dialogClose, dialogOpen, disableFullScreen, dispatchEvent, docClick, documentClickClosedBy, drop, dropDownSelect, dynamicModule, editAreaClick, editLink, emojiPicker, enableFullScreen, enterHandler, execCommandCallBack, executeGroup, expandPopupClick, fileRemoving, fileSelected, fileUploadFailed, fileUploadSuccess, fileUploading, focusChange, formatPainterClick, formatPainterDoubleClick, getCollection, getDefaultValue, getDropDownValue, getEditValue, getFormattedFontSize, getIndex, getLocaleFontFormat, getSelectedHtml, getTBarItemsIndex, getTextNodesUnder, getTooltipText, hasClass, hidePopup, htmlKeyConfig, htmlToolbarClick, iframeMouseDown, imageAlt, imageBreak, imageCaption, imageCenter, imageDelete, imageInline, imageLeft, imageLink, imageRemoving, imageResizeFactor, imageRight, imageSelected, imageSize, imageToolbarAction, imageUploadFailed, imageUploadSuccess, imageUploading, imgModule, initialEnd, initialLoad, inlineEmptyNodes, insertAudio, insertCompleted, insertImage, insertLink, insertVideo, isEditableValueEmpty, isIDevice, keyDown, keyUp, linkToolbarAction, listConversionFilters, load, markdownFormatTags, markdownKeyConfig, markdownListsTags, markdownSelectionTags, markdownToolbarClick, markerClassName, mentionRestrictKeys, modelChanged, mouseDown, mouseUp, onExport, onHandleFontsizeChange, onImport, onResize, openLink, pageYOffset, parseHtml, paste, pasteClean, pasteCleanupGroupingTags, popupHide, quickToolbarClose, quickToolbarOpen, readOnlyMode, redo, refreshBegin, renderFileManager, renderInlineToolbar, resizeInitialized, resizeStart, resizeStop, rtlMode, sanitizeHelper, scroll, selectAll, selectRange, selectionCommand, selectionRestore, selectionSave, selfClosingTags, setAttributes, setToolbarStatus, showAudioDialog, showColorPicker, showImageDialog, showLinkDialog, showTableDialog, showVideoDialog, sourceCode, sourceCodeMouseDown, statusCollection, supportedUnits, tableColorPickerChanged, tableModulekeyUp, tableToolbarAction, tableclass, toObjectLowerCase, toolbarClick, toolbarCreated, toolbarOpen, toolbarRefresh, toolbarRenderComplete, toolbarUpdated, unLink, undo, updateDropDownFontFormatLocale, updateSource, updateTbItemsStatus, updateTextNode, updateToolbarItem, updateUndoRedoStatus, updateValueOnIdle, updatedToolbarStatus, videoDelete, videoSize, videoToolbarAction, windowResize, xhtmlValidation };
|
|
40212
|
+
export { ACTION, ALIGNMENT_TYPE, ALLOWED_ACTIONKEYS, AUDIO, Alignments, Audio, AudioCommand, BLOCKQUOTE_LIST_HANDLE, BLOCK_TAGS, BaseQuickToolbar, BaseToolbar, CLASS_AUDIO, CLASS_AUDIO_BREAK, CLASS_AUDIO_FOCUS, CLASS_AUDIO_INLINE, CLASS_AUDIO_WRAP, CLASS_CAPTION, CLASS_CAPTION_INLINE, CLASS_CLICK_ELEM, CLASS_EMBED_VIDEO_WRAP, CLASS_IMAGE_BREAK, CLASS_IMAGE_CENTER, CLASS_IMAGE_INLINE, CLASS_IMAGE_LEFT, CLASS_IMAGE_RIGHT, CLASS_RTE_CAPTION, CLASS_VIDEO, CLASS_VIDEO_BREAK, CLASS_VIDEO_CENTER, CLASS_VIDEO_CLICK_ELEM, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, CLASS_VIDEO_LEFT, CLASS_VIDEO_RIGHT, CLASS_VIDEO_WRAP, CLEAR_COMMAND, CLEAR_TYPE, CLS_ACTIVE, CLS_ALIGN_TB_BTN, CLS_AUDIOBREAK, CLS_AUDIOINLINE, CLS_AUDIOWRAP, CLS_AUD_FOCUS, CLS_BACK, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_PICKER, CLS_BACKGROUND_COLOR_TARGET, CLS_BULLETFORMATLIST_TB_BTN, CLS_CAPINLINE, CLS_CAPTION, CLS_CLICKELEM, CLS_COLOR_CONTENT, CLS_COLOR_PALETTE, CLS_CONTENT, CLS_COUNT, CLS_CUSTOM_TILE, CLS_DISABLED, CLS_DROPAREA, CLS_DROPDOWN_BTN, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_POPUP, CLS_ERROR, CLS_EXPAND_OPEN, CLS_FOCUS, CLS_FONT_COLOR_DROPDOWN, CLS_FONT_COLOR_PICKER, CLS_FONT_COLOR_TARGET, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FULL_SCREEN, CLS_HIDE, CLS_HR_SEPARATOR, CLS_ICONS, CLS_IMAGE_POP, CLS_IMGBREAK, CLS_IMGCENTER, CLS_IMGINLINE, CLS_IMGLEFT, CLS_IMGRIGHT, CLS_IMG_FOCUS, CLS_IMG_INNER, CLS_IMG_RESIZE, CLS_INLINE, CLS_INLINE_DROPDOWN, CLS_INLINE_POP, CLS_LIST_PRIMARY_CONTENT, CLS_MAXIMIZE, CLS_MINIMIZE, CLS_NOCOLOR_ITEM, CLS_NUMBERFORMATLIST_TB_BTN, CLS_POP, CLS_POPUP, CLS_POPUP_OPEN, CLS_QUICK_DROPDOWN, CLS_QUICK_POP, CLS_QUICK_TB, CLS_RESIZE, CLS_RM_WHITE_SPACE, CLS_RTE, CLS_RTE_CAPTION, CLS_RTE_CONTAINER, CLS_RTE_CONTENT, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_DRAG_IMAGE, CLS_RTE_ELEMENTS, CLS_RTE_EXPAND_TB, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_HIDDEN, CLS_RTE_IMAGE, CLS_RTE_PASTE_CANCEL, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_READONLY, CLS_RTE_RES_CNT, CLS_RTE_RES_EAST, CLS_RTE_RES_HANDLE, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, CLS_RTE_TABLE_RESIZE, CLS_RTE_TB_ENABLED, CLS_RTE_UPLOAD_POPUP, CLS_RTL, CLS_SCRIPT_SHEET, CLS_SEPARATOR, CLS_SHOW, CLS_STYLE_SHEET, CLS_TABLE, CLS_TABLE_BORDER, CLS_TABLE_MULTI_CELL, CLS_TABLE_SEL, CLS_TABLE_SEL_END, CLS_TB_ALT_BOR, CLS_TB_BOX_RES, CLS_TB_BTN, CLS_TB_COL_RES, CLS_TB_DASH_BOR, CLS_TB_EXTENDED, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_INLINE, CLS_TB_IOS_FIX, CLS_TB_ITEM, CLS_TB_ROW_RES, CLS_TB_STATIC, CLS_TB_WRAP, CLS_TEXT_POP, CLS_TEXT_QUICK_TB, CLS_TOOLBAR, CLS_UPLOAD_FILES, CLS_VIDEOBREAK, CLS_VIDEOINLINE, CLS_VIDEOWRAP, CLS_VID_CLICK_ELEM, CLS_VID_FOCUS, CLS_VISIBLE, CLS_WARNING, ClearFormat, ClearFormatExec, ColorPickerInput, ContentRender, Count, DEFAULT_TAG, DELETECOLUMN, DELETEROW, DESTROY, DOMNode, DialogRenderer, DialogType, DropDownButtons, EMOJI_PICKER_ACTIONS, EditorManager, EmojiPicker, EmojiPickerAction, ExecCommandCallBack, FORMAT_PAINTER_ACTIONS, FORMAT_TYPE, FileManager, FormatPainter, FormatPainterActions, Formats, Formatter, FullScreen, HTMLFormatter, HtmlEditor, HtmlToolbarStatus, IGNORE_BLOCK_TAGS, IMAGE, INDENT_TYPE, INSERTHTML_TYPE, INSERT_COLUMN, INSERT_ROW, INSERT_TEXT_COMMAND, INSERT_TEXT_TYPE, INTERNAL_DESTROY, IframeContentRender, Image$1 as Image, ImageCommand, ImageInputSource, ImportExport, Indents, InsertHtml, InsertHtmlExec, InsertMethods, InsertTextExec, IsFormatted, KEY_DOWN, KEY_DOWN_HANDLER, KEY_UP, KEY_UP_HANDLER, KeyboardEvents, LINK, LINK_COMMAND, LISTS_COMMAND, LIST_TYPE, Link, LinkCommand, Lists, MDFormats, MDLink, MDLists, MDSelectionFormats, MDTable, MD_TABLE, MODEL_CHANGED, MODEL_CHANGED_PLUGIN, MOUSE_DOWN, MS_WORD_CLEANUP, MS_WORD_CLEANUP_PLUGIN, MarkdownEditor, MarkdownFormatter, MarkdownParser, MarkdownRender, MarkdownSelection, MarkdownToolbarStatus, MsWordPaste, NodeCutter, NodeSelection, ON_BEGIN, PASTE_SOURCE, PasteCleanup, PopupRenderer, QuickToolbar, REMOVETABLE, Render, RenderType, RendererFactory, Resize, RichTextEditor, SELECTION_TYPE, SELF_CLOSING_TAGS, SPACE_ACTION, SelectionBasedExec, SelectionCommands, ServiceLocator, SlashMenu, TABLE, TABLEHEADER, TABLE_BLOCK_TAGS, TABLE_HORIZONTAL_SPLIT, TABLE_MERGE, TABLE_MOVE, TABLE_VERTICAL_ALIGN, TABLE_VERTICAL_SPLIT, Table, TableCommand, Toolbar, ToolbarAction, ToolbarRenderer, ToolbarStatus, ToolbarType, UndoRedoCommands, UndoRedoManager, VIDEO, Video, VideoCommand, ViewSource, XhtmlValidation, actionBegin, actionComplete, actionSuccess, afterImageDelete, afterKeyDown, afterMediaDelete, afterPasteCleanup, audioDelete, audioToolbarAction, autoResize, beforeDialogClose, beforeDialogOpen, beforeDropDownItemRender, beforeDropDownOpen, beforeFileUpload, beforeImageDrop, beforeImageUpload, beforePasteCleanup, beforeQuickToolbarOpen, bindCssClass, bindOnEnd, blockEmptyNodes, checkUndo, cleanupResizeElements, clearDialogObj, closeAudioDialog, closeImageDialog, closeLinkDialog, closeTableDialog, closeTooltip, closeVideoDialog, colorPickerChanged, contentBlur, contentChanged, contentFocus, contentscroll, conversionFactors, convertToBlob, count, createTable, created, decode, destroy, destroyTooltip, destroyed, dialogClose, dialogOpen, disableFullScreen, dispatchEvent, docClick, documentClickClosedBy, drop, dropDownSelect, dynamicModule, editAreaClick, editLink, emojiPicker, enableFullScreen, enterHandler, execCommandCallBack, executeGroup, expandPopupClick, fileRemoving, fileSelected, fileUploadFailed, fileUploadSuccess, fileUploading, focusChange, formatPainterClick, formatPainterDoubleClick, getCollection, getDefaultValue, getDropDownValue, getEditValue, getFormattedFontSize, getIndex, getLocaleFontFormat, getSelectedHtml, getTBarItemsIndex, getTextNodesUnder, getTooltipText, hasClass, hidePopup, htmlKeyConfig, htmlToolbarClick, iframeMouseDown, iframeResizeFactor, imageAlt, imageBreak, imageCaption, imageCenter, imageDelete, imageInline, imageLeft, imageLink, imageRemoving, imageResizeFactor, imageRight, imageSelected, imageSize, imageToolbarAction, imageUploadFailed, imageUploadSuccess, imageUploading, imgModule, initialEnd, initialLoad, inlineEmptyNodes, insertAudio, insertCompleted, insertImage, insertLink, insertVideo, isEditableValueEmpty, isIDevice, keyDown, keyUp, linkToolbarAction, listConversionFilters, load, markdownFormatTags, markdownKeyConfig, markdownListsTags, markdownSelectionTags, markdownToolbarClick, markerClassName, mentionRestrictKeys, modelChanged, mouseDown, mouseUp, onExport, onHandleFontsizeChange, onImport, onResize, openLink, pageYOffset, parseHtml, paste, pasteClean, pasteCleanupGroupingTags, popupHide, quickToolbarClose, quickToolbarOpen, readOnlyMode, redo, refreshBegin, renderFileManager, renderInlineToolbar, resizeInitialized, resizeStart, resizeStop, rtlMode, sanitizeHelper, scroll, selectAll, selectRange, selectionCommand, selectionRestore, selectionSave, selfClosingTags, setAttributes, setToolbarStatus, showAudioDialog, showColorPicker, showImageDialog, showLinkDialog, showTableDialog, showVideoDialog, sourceCode, sourceCodeMouseDown, statusCollection, supportedUnits, tableColorPickerChanged, tableModulekeyUp, tableToolbarAction, tableclass, toObjectLowerCase, toolbarClick, toolbarCreated, toolbarOpen, toolbarRefresh, toolbarRenderComplete, toolbarUpdated, unLink, undo, updateDropDownFontFormatLocale, updateSource, updateTbItemsStatus, updateTextNode, updateToolbarItem, updateUndoRedoStatus, updateValueOnIdle, updatedToolbarStatus, videoDelete, videoSize, videoToolbarAction, windowResize, xhtmlValidation };
|
|
39996
40213
|
//# sourceMappingURL=ej2-richtexteditor.es5.js.map
|