@syncfusion/ej2-richtexteditor 18.1.52 → 18.2.44-4568
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/CHANGELOG.md +614 -572
- package/README.md +67 -67
- 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 +353 -136
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +364 -147
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/license +9 -9
- package/package.json +50 -73
- package/src/common/interface.d.ts +6 -6
- 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 +4 -2
- package/src/editor-manager/plugin/inserthtml.js +42 -6
- 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 +4 -14
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +1 -1
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +1 -1
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- package/src/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 +2 -2
- package/src/markdown-parser/plugin/md-selection-formats.js +2 -2
- 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/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 +3 -3
- package/src/rich-text-editor/actions/keyboard-model.d.ts +13 -13
- 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 +34 -3
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +19 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +17 -7
- 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/base/classes.d.ts +102 -102
- package/src/rich-text-editor/base/classes.js +102 -102
- package/src/rich-text-editor/base/constant.d.ts +111 -101
- package/src/rich-text-editor/base/constant.js +111 -101
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +51 -40
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +659 -641
- package/src/rich-text-editor/base/rich-text-editor.d.ts +84 -52
- package/src/rich-text-editor/base/rich-text-editor.js +100 -43
- 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 +9 -8
- package/src/rich-text-editor/formatter/formatter.js +10 -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/models/iframe-settings-model.d.ts +21 -21
- package/src/rich-text-editor/models/inline-mode-model.d.ts +9 -9
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +228 -228
- 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 +3 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +8 -8
- 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 +96 -29
- 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 +5 -3
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +8 -8
- package/src/rich-text-editor/renderer/toolbar-renderer.js +21 -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 +151 -151
- package/styles/rich-text-editor/_bootstrap-definition.scss +184 -184
- package/styles/rich-text-editor/_bootstrap4-definition.scss +307 -307
- package/styles/rich-text-editor/_fabric-dark-definition.scss +150 -150
- package/styles/rich-text-editor/_fabric-definition.scss +148 -148
- package/styles/rich-text-editor/_highcontrast-definition.scss +148 -148
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +148 -148
- package/styles/rich-text-editor/_layout.scss +1332 -1332
- package/styles/rich-text-editor/_material-dark-definition.scss +151 -151
- package/styles/rich-text-editor/_material-definition.scss +150 -150
- package/styles/rich-text-editor/_theme.scss +484 -484
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +285 -285
- package/styles/rich-text-editor/icons/_bootstrap.scss +284 -284
- package/styles/rich-text-editor/icons/_bootstrap4.scss +284 -284
- package/styles/rich-text-editor/icons/_fabric-dark.scss +284 -284
- package/styles/rich-text-editor/icons/_fabric.scss +284 -284
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +284 -284
- package/styles/rich-text-editor/icons/_highcontrast.scss +284 -284
- package/styles/rich-text-editor/icons/_material-dark.scss +284 -284
- package/styles/rich-text-editor/icons/_material.scss +284 -284
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
|
@@ -28,6 +28,11 @@ const load = 'load';
|
|
|
28
28
|
* @deprecated
|
|
29
29
|
*/
|
|
30
30
|
const initialLoad = 'initial-load';
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
const contentChanged = 'content-changed';
|
|
31
36
|
/**
|
|
32
37
|
* @hidden
|
|
33
38
|
* @deprecated
|
|
@@ -448,6 +453,11 @@ const beforeDialogOpen = 'beforeDialogOpen';
|
|
|
448
453
|
* @deprecated
|
|
449
454
|
*/
|
|
450
455
|
const dialogOpen = 'dialogOpen';
|
|
456
|
+
/**
|
|
457
|
+
* @hidden
|
|
458
|
+
* @deprecated
|
|
459
|
+
*/
|
|
460
|
+
const beforeDialogClose = 'beforeDialogClose';
|
|
451
461
|
/**
|
|
452
462
|
* @hidden
|
|
453
463
|
* @deprecated
|
|
@@ -2248,6 +2258,12 @@ class ToolbarRenderer {
|
|
|
2248
2258
|
}
|
|
2249
2259
|
removePopupContainer() {
|
|
2250
2260
|
if (Browser.isDevice && !isNullOrUndefined(this.popupContainer)) {
|
|
2261
|
+
let popupEle = this.popupContainer.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
2262
|
+
if (popupEle) {
|
|
2263
|
+
this.popupContainer.parentNode.insertBefore(popupEle, this.popupContainer.nextSibling);
|
|
2264
|
+
popupEle.style.removeProperty('position');
|
|
2265
|
+
removeClass([popupEle], 'e-popup-modal');
|
|
2266
|
+
}
|
|
2251
2267
|
detach(this.popupContainer);
|
|
2252
2268
|
this.popupContainer = undefined;
|
|
2253
2269
|
}
|
|
@@ -2456,7 +2472,6 @@ class ToolbarRenderer {
|
|
|
2456
2472
|
|| element.parentElement.classList.contains(CLS_COLOR_CONTENT))) {
|
|
2457
2473
|
let colorpickerValue = element.classList.contains(CLS_RTE_ELEMENTS) ? element.style.borderBottomColor :
|
|
2458
2474
|
element.querySelector('.' + CLS_RTE_ELEMENTS).style.borderBottomColor;
|
|
2459
|
-
/* tslint:enable */
|
|
2460
2475
|
range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
|
|
2461
2476
|
if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' ||
|
|
2462
2477
|
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed) {
|
|
@@ -2481,7 +2496,14 @@ class ToolbarRenderer {
|
|
|
2481
2496
|
removeClass([dropElement.lastElementChild], 'e-popup-overlay');
|
|
2482
2497
|
}
|
|
2483
2498
|
if (Browser.isDevice && !isNullOrUndefined(dropElement)) {
|
|
2499
|
+
let popupEle = dropElement.querySelector('.e-dropdown-popup.e-tbar-btn.e-control');
|
|
2500
|
+
if (popupEle) {
|
|
2501
|
+
dropElement.parentNode.insertBefore(popupEle, dropElement.nextSibling);
|
|
2502
|
+
popupEle.style.removeProperty('position');
|
|
2503
|
+
removeClass([popupEle], 'e-popup-modal');
|
|
2504
|
+
}
|
|
2484
2505
|
detach(dropElement);
|
|
2506
|
+
proxy.popupContainer = undefined;
|
|
2485
2507
|
}
|
|
2486
2508
|
}
|
|
2487
2509
|
});
|
|
@@ -4804,12 +4826,22 @@ class QuickToolbar {
|
|
|
4804
4826
|
EventHandler.add(this.inlineQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
4805
4827
|
}
|
|
4806
4828
|
}
|
|
4829
|
+
/**
|
|
4830
|
+
* Method for showing the inline quick toolbar
|
|
4831
|
+
* @hidden
|
|
4832
|
+
* @deprecated
|
|
4833
|
+
*/
|
|
4807
4834
|
showInlineQTBar(x, y, target) {
|
|
4808
4835
|
if (this.parent.readonly) {
|
|
4809
4836
|
return;
|
|
4810
4837
|
}
|
|
4811
4838
|
this.inlineQTBar.showPopup(x, y, target);
|
|
4812
4839
|
}
|
|
4840
|
+
/**
|
|
4841
|
+
* Method for hidding the inline quick toolbar
|
|
4842
|
+
* @hidden
|
|
4843
|
+
* @deprecated
|
|
4844
|
+
*/
|
|
4813
4845
|
hideInlineQTBar() {
|
|
4814
4846
|
if (this.inlineQTBar && !hasClass(this.inlineQTBar.element, 'e-popup-close')) {
|
|
4815
4847
|
this.inlineQTBar.hidePopup();
|
|
@@ -5701,6 +5733,7 @@ class Formatter {
|
|
|
5701
5733
|
onKeyHandler(self, e) {
|
|
5702
5734
|
this.editorManager.observer.notify(KEY_UP, {
|
|
5703
5735
|
event: e, callBack: () => {
|
|
5736
|
+
self.notify(contentChanged, {});
|
|
5704
5737
|
this.enableUndo(self);
|
|
5705
5738
|
}
|
|
5706
5739
|
});
|
|
@@ -5711,6 +5744,7 @@ class Formatter {
|
|
|
5711
5744
|
* @deprecated
|
|
5712
5745
|
*/
|
|
5713
5746
|
onSuccess(self, events) {
|
|
5747
|
+
self.notify(contentChanged, {});
|
|
5714
5748
|
if (isNullOrUndefined(events.event) || (events && events.event.action !== 'copy')) {
|
|
5715
5749
|
this.enableUndo(self);
|
|
5716
5750
|
self.notify(execCommandCallBack, events);
|
|
@@ -9071,8 +9105,8 @@ class Lists {
|
|
|
9071
9105
|
let range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
9072
9106
|
let startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
|
|
9073
9107
|
let endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
|
|
9074
|
-
if (startNode === endNode &&
|
|
9075
|
-
startNode.textContent.
|
|
9108
|
+
if (startNode === endNode && startNode.tagName === 'LI' && startNode.textContent.trim() === '' &&
|
|
9109
|
+
startNode.textContent.charCodeAt(0) === 65279) {
|
|
9076
9110
|
startNode.textContent = '';
|
|
9077
9111
|
}
|
|
9078
9112
|
}
|
|
@@ -9413,16 +9447,6 @@ class Lists {
|
|
|
9413
9447
|
nodesTemp.push(node);
|
|
9414
9448
|
}
|
|
9415
9449
|
}
|
|
9416
|
-
let parentList = [];
|
|
9417
|
-
for (let k = 0; k < nodesTemp.length; k++) {
|
|
9418
|
-
let nodesTempListParent = nodesTemp[k].closest('LI');
|
|
9419
|
-
if (!isNullOrUndefined(nodesTempListParent) && (nodesTemp.indexOf(nodesTempListParent.parentElement) < 0)) {
|
|
9420
|
-
if (nodesTempListParent.parentElement.innerText === nodesTemp[k].innerText) {
|
|
9421
|
-
parentList.push(nodesTempListParent.parentElement);
|
|
9422
|
-
}
|
|
9423
|
-
}
|
|
9424
|
-
}
|
|
9425
|
-
nodesTemp = parentList.concat(nodesTemp);
|
|
9426
9450
|
for (let j = nodesTemp.length - 1; j >= 0; j--) {
|
|
9427
9451
|
let h = nodesTemp[j];
|
|
9428
9452
|
let replace = '<' + tagName.toLowerCase() + ' '
|
|
@@ -10115,7 +10139,7 @@ class InsertHtml {
|
|
|
10115
10139
|
let isCursor = range.startOffset === range.endOffset && range.startOffset === 0 &&
|
|
10116
10140
|
range.startContainer === range.endContainer;
|
|
10117
10141
|
let isCollapsed = range.collapsed;
|
|
10118
|
-
let nodes =
|
|
10142
|
+
let nodes = this.getNodeCollection(range, nodeSelection);
|
|
10119
10143
|
let closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
|
|
10120
10144
|
if (isExternal || (!isNullOrUndefined(node) && !isNullOrUndefined(node.classList) &&
|
|
10121
10145
|
node.classList.contains('pasteContent'))) {
|
|
@@ -10287,9 +10311,7 @@ class InsertHtml {
|
|
|
10287
10311
|
}
|
|
10288
10312
|
}
|
|
10289
10313
|
else {
|
|
10290
|
-
|
|
10291
|
-
let splitedElm = nodeCutter.GetSpliceNode(range, blockNode);
|
|
10292
|
-
splitedElm.parentNode.replaceChild(node, splitedElm);
|
|
10314
|
+
this.insertTempNode(range, node, nodes, nodeCutter, editNode);
|
|
10293
10315
|
let isFirstTextNode = true;
|
|
10294
10316
|
let isPreviousInlineElem;
|
|
10295
10317
|
let paraElm;
|
|
@@ -10356,6 +10378,44 @@ class InsertHtml {
|
|
|
10356
10378
|
}
|
|
10357
10379
|
this.removeEmptyElements(editNode);
|
|
10358
10380
|
}
|
|
10381
|
+
static getNodeCollection(range, nodeSelection) {
|
|
10382
|
+
let nodes = [];
|
|
10383
|
+
if (range.startOffset === range.endOffset && range.startContainer === range.endContainer &&
|
|
10384
|
+
range.startContainer.nodeName === 'TD') {
|
|
10385
|
+
nodes.push(range.startContainer.childNodes[range.endOffset]);
|
|
10386
|
+
}
|
|
10387
|
+
else {
|
|
10388
|
+
nodes = nodeSelection.getInsertNodeCollection(range);
|
|
10389
|
+
}
|
|
10390
|
+
return nodes;
|
|
10391
|
+
}
|
|
10392
|
+
static insertTempNode(range, node, nodes, nodeCutter, editNode) {
|
|
10393
|
+
if (range.startContainer === editNode && !isNullOrUndefined(range.startContainer.childNodes[range.endOffset - 1]) &&
|
|
10394
|
+
range.startContainer.childNodes[range.endOffset - 1].nodeName === 'TABLE') {
|
|
10395
|
+
if (isNullOrUndefined(range.startContainer.childNodes[range.endOffset - 1].nextSibling)) {
|
|
10396
|
+
range.startContainer.appendChild(node);
|
|
10397
|
+
}
|
|
10398
|
+
else {
|
|
10399
|
+
range.startContainer.insertBefore(node, range.startContainer.childNodes[range.endOffset - 1].nextSibling);
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10402
|
+
else if (range.startContainer === editNode && !isNullOrUndefined(range.startContainer.childNodes[range.endOffset]) &&
|
|
10403
|
+
range.startContainer.childNodes[range.endOffset].nodeName === 'TABLE') {
|
|
10404
|
+
range.startContainer.insertBefore(node, range.startContainer.childNodes[range.endOffset]);
|
|
10405
|
+
}
|
|
10406
|
+
else {
|
|
10407
|
+
let blockNode = this.getImmediateBlockNode(nodes[nodes.length - 1], editNode);
|
|
10408
|
+
if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH') {
|
|
10409
|
+
let tempSpan = createElement('span', { className: 'tempSpan' });
|
|
10410
|
+
range.insertNode(tempSpan);
|
|
10411
|
+
tempSpan.parentNode.replaceChild(node, tempSpan);
|
|
10412
|
+
}
|
|
10413
|
+
else {
|
|
10414
|
+
let splitedElm = nodeCutter.GetSpliceNode(range, blockNode);
|
|
10415
|
+
splitedElm.parentNode.replaceChild(node, splitedElm);
|
|
10416
|
+
}
|
|
10417
|
+
}
|
|
10418
|
+
}
|
|
10359
10419
|
static cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode) {
|
|
10360
10420
|
lastSelectionNode.classList.add('lastNode');
|
|
10361
10421
|
editNode.innerHTML = updateTextNode$1(editNode.innerHTML);
|
|
@@ -13743,81 +13803,81 @@ class ContentRender {
|
|
|
13743
13803
|
}
|
|
13744
13804
|
|
|
13745
13805
|
/* tslint:disable */
|
|
13746
|
-
const IFRAMEHEADER = `
|
|
13747
|
-
<!DOCTYPE html>
|
|
13748
|
-
<html>
|
|
13749
|
-
<head>
|
|
13750
|
-
<meta charset='utf-8' />
|
|
13751
|
-
<style>
|
|
13752
|
-
@charset "UTF-8";
|
|
13753
|
-
body {
|
|
13754
|
-
font-family: "Roboto", sans-serif;
|
|
13755
|
-
font-size: 14px;
|
|
13756
|
-
}
|
|
13757
|
-
html, body{height: 100%;margin: 0;}
|
|
13758
|
-
body.e-cursor{cursor:default}
|
|
13759
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
13760
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
13761
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
13762
|
-
.e-rte-image {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13763
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
13764
|
-
.e-img-caption.e-caption-inline {display: inline-block;float: none;margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));position: relativetext-align: center;vertical-align: bottom;}
|
|
13765
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
13766
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
13767
|
-
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
13768
|
-
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
13769
|
-
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13770
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
13771
|
-
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
13772
|
-
.e-imgbreak {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13773
|
-
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
13774
|
-
img::selection { background: transparent;color: transparent;}
|
|
13775
|
-
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block; background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
13776
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13777
|
-
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2; border-radius: 15px; height: 20px; width: 20px; }
|
|
13778
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13779
|
-
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
13780
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
13781
|
-
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
13782
|
-
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
13783
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
13784
|
-
li{margin-bottom: 10px;}
|
|
13785
|
-
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
13786
|
-
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
13787
|
-
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
13788
|
-
h4{font-size: 1em;font-weight: 400;margin: 0;}
|
|
13789
|
-
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
13790
|
-
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
13791
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
13792
|
-
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
13793
|
-
strong, b{font-weight: 700;}
|
|
13794
|
-
a{text-decoration: none;user-select: auto;}
|
|
13795
|
-
a:hover{text-decoration: underline;};
|
|
13796
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
13797
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
13798
|
-
ul:last-child{margin-bottom: 0;}
|
|
13799
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
13800
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
13801
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
13802
|
-
table th {background-color: #E0E0E0;}
|
|
13803
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
13804
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
13805
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
13806
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
13807
|
-
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat; bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
13808
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
13809
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
13810
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
13811
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
13812
|
-
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid; border-top: 6px solid transparent; content: ''; display: block; height: 0; position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
13813
|
-
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid; border-top: 6px solid transparent; content: ''; display: block; height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
13814
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
13815
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
13816
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
13817
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
13818
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
13819
|
-
.e-rtl { direction: rtl; }
|
|
13820
|
-
</style>
|
|
13806
|
+
const IFRAMEHEADER = `
|
|
13807
|
+
<!DOCTYPE html>
|
|
13808
|
+
<html>
|
|
13809
|
+
<head>
|
|
13810
|
+
<meta charset='utf-8' />
|
|
13811
|
+
<style>
|
|
13812
|
+
@charset "UTF-8";
|
|
13813
|
+
body {
|
|
13814
|
+
font-family: "Roboto", sans-serif;
|
|
13815
|
+
font-size: 14px;
|
|
13816
|
+
}
|
|
13817
|
+
html, body{height: 100%;margin: 0;}
|
|
13818
|
+
body.e-cursor{cursor:default}
|
|
13819
|
+
span.e-selected-node {background-color: #939393;color: white;}
|
|
13820
|
+
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
13821
|
+
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
13822
|
+
.e-rte-image {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13823
|
+
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
13824
|
+
.e-img-caption.e-caption-inline {display: inline-block;float: none;margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));position: relativetext-align: center;vertical-align: bottom;}
|
|
13825
|
+
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
13826
|
+
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
13827
|
+
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
13828
|
+
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
13829
|
+
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13830
|
+
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
13831
|
+
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
13832
|
+
.e-imgbreak {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13833
|
+
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
13834
|
+
img::selection { background: transparent;color: transparent;}
|
|
13835
|
+
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block; background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
13836
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13837
|
+
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2; border-radius: 15px; height: 20px; width: 20px; }
|
|
13838
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13839
|
+
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
13840
|
+
.e-img-caption .e-img-inner { outline: 0; }
|
|
13841
|
+
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
13842
|
+
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
13843
|
+
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
13844
|
+
li{margin-bottom: 10px;}
|
|
13845
|
+
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
13846
|
+
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
13847
|
+
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
13848
|
+
h4{font-size: 1em;font-weight: 400;margin: 0;}
|
|
13849
|
+
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
13850
|
+
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
13851
|
+
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
13852
|
+
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
13853
|
+
strong, b{font-weight: 700;}
|
|
13854
|
+
a{text-decoration: none;user-select: auto;}
|
|
13855
|
+
a:hover{text-decoration: underline;};
|
|
13856
|
+
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
13857
|
+
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
13858
|
+
ul:last-child{margin-bottom: 0;}
|
|
13859
|
+
table { border-collapse: collapse; empty-cells: show;}
|
|
13860
|
+
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
13861
|
+
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
13862
|
+
table th {background-color: #E0E0E0;}
|
|
13863
|
+
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
13864
|
+
table .e-cell-select {border: 1px double #4a90e2;}
|
|
13865
|
+
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
13866
|
+
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
13867
|
+
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat; bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
13868
|
+
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
13869
|
+
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
13870
|
+
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
13871
|
+
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
13872
|
+
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid; border-top: 6px solid transparent; content: ''; display: block; height: 0; position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
13873
|
+
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid; border-top: 6px solid transparent; content: ''; display: block; height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
13874
|
+
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
13875
|
+
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
13876
|
+
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
13877
|
+
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
13878
|
+
.e-table-rhelper { background-color: #4a90e2;}
|
|
13879
|
+
.e-rtl { direction: rtl; }
|
|
13880
|
+
</style>
|
|
13821
13881
|
</head>`;
|
|
13822
13882
|
/* tslint:enable */
|
|
13823
13883
|
/**
|
|
@@ -14610,6 +14670,8 @@ class PasteCleanup {
|
|
|
14610
14670
|
addClass([popupObj.element], [CLS_POPUP_OPEN, CLS_RTE_UPLOAD_POPUP]);
|
|
14611
14671
|
let timeOut = fileList.size > 1000000 ? 300 : 100;
|
|
14612
14672
|
setTimeout(() => { this.refreshPopup(imgElem, popupObj); }, timeOut);
|
|
14673
|
+
let rawFile;
|
|
14674
|
+
let beforeUploadArgs;
|
|
14613
14675
|
let uploadObj = new Uploader({
|
|
14614
14676
|
asyncSettings: {
|
|
14615
14677
|
saveUrl: this.parent.insertImageSettings.saveUrl
|
|
@@ -14621,8 +14683,24 @@ class PasteCleanup {
|
|
|
14621
14683
|
setTimeout(() => { this.popupClose(popupObj, uploadObj, imgElem, e); }, 900);
|
|
14622
14684
|
},
|
|
14623
14685
|
uploading: (e) => {
|
|
14624
|
-
this.parent.
|
|
14625
|
-
|
|
14686
|
+
if (!this.parent.isServerRendered) {
|
|
14687
|
+
this.parent.trigger(imageUploading, e);
|
|
14688
|
+
this.parent.inputElement.contentEditable = 'false';
|
|
14689
|
+
}
|
|
14690
|
+
},
|
|
14691
|
+
beforeUpload: (args) => {
|
|
14692
|
+
if (this.parent.isServerRendered) {
|
|
14693
|
+
args.cancel = true;
|
|
14694
|
+
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
14695
|
+
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
14696
|
+
if (beforeUploadArgs.cancel) {
|
|
14697
|
+
return;
|
|
14698
|
+
}
|
|
14699
|
+
/* tslint:disable */
|
|
14700
|
+
this.uploadObj.uploadFiles(rawFile, null);
|
|
14701
|
+
/* tslint:enable */
|
|
14702
|
+
});
|
|
14703
|
+
}
|
|
14626
14704
|
},
|
|
14627
14705
|
failure: (e) => {
|
|
14628
14706
|
setTimeout(() => { this.uploadFailure(imgElem, uploadObj, popupObj, e); }, 900);
|
|
@@ -14637,6 +14715,9 @@ class PasteCleanup {
|
|
|
14637
14715
|
},
|
|
14638
14716
|
selected: (e) => {
|
|
14639
14717
|
e.cancel = true;
|
|
14718
|
+
if (this.parent.isServerRendered) {
|
|
14719
|
+
rawFile = e.filesData;
|
|
14720
|
+
}
|
|
14640
14721
|
},
|
|
14641
14722
|
removing: () => {
|
|
14642
14723
|
this.parent.inputElement.contentEditable = 'true';
|
|
@@ -14766,6 +14847,8 @@ class PasteCleanup {
|
|
|
14766
14847
|
}
|
|
14767
14848
|
}
|
|
14768
14849
|
pasteDialog(value, args) {
|
|
14850
|
+
let isHeight = false;
|
|
14851
|
+
let preRTEHeight = this.parent.height;
|
|
14769
14852
|
let dialogModel = {
|
|
14770
14853
|
buttons: [
|
|
14771
14854
|
{
|
|
@@ -14774,6 +14857,8 @@ class PasteCleanup {
|
|
|
14774
14857
|
let keepChecked = this.parent.element.querySelector('#keepFormating').checked;
|
|
14775
14858
|
let cleanChecked = this.parent.element.querySelector('#cleanFormat').checked;
|
|
14776
14859
|
dialog.hide();
|
|
14860
|
+
this.parent.height = isHeight ? preRTEHeight : this.parent.height;
|
|
14861
|
+
isHeight = false;
|
|
14777
14862
|
let argument = isBlazor() ? null : dialog;
|
|
14778
14863
|
this.dialogRenderObj.close(argument);
|
|
14779
14864
|
dialog.destroy();
|
|
@@ -14790,6 +14875,8 @@ class PasteCleanup {
|
|
|
14790
14875
|
click: () => {
|
|
14791
14876
|
if (!dialog.isDestroyed) {
|
|
14792
14877
|
dialog.hide();
|
|
14878
|
+
this.parent.height = isHeight ? preRTEHeight : this.parent.height;
|
|
14879
|
+
isHeight = false;
|
|
14793
14880
|
let args = isBlazor() ? null : dialog;
|
|
14794
14881
|
this.dialogRenderObj.close(args);
|
|
14795
14882
|
dialog.destroy();
|
|
@@ -14826,6 +14913,10 @@ class PasteCleanup {
|
|
|
14826
14913
|
}
|
|
14827
14914
|
dialog.appendTo(rteDialogWrapper);
|
|
14828
14915
|
this.radioRender();
|
|
14916
|
+
if (this.parent.element.offsetHeight < parseInt(dialog.height.split('px')[0], null)) {
|
|
14917
|
+
this.parent.height = parseInt(dialog.height.split('px')[0], null) + 40;
|
|
14918
|
+
isHeight = true;
|
|
14919
|
+
}
|
|
14829
14920
|
dialog.show();
|
|
14830
14921
|
}
|
|
14831
14922
|
destroyDialog(rteDialogWrapper) {
|
|
@@ -16413,9 +16504,23 @@ class Image {
|
|
|
16413
16504
|
let selectNodeEle;
|
|
16414
16505
|
let selectParentEle;
|
|
16415
16506
|
this.deletedImg = [];
|
|
16507
|
+
let isCursor;
|
|
16508
|
+
let keyCodeValues = [27, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
|
|
16509
|
+
44, 45, 9, 16, 17, 18, 19, 20, 33, 34, 35, 36, 37, 38, 39, 40, 91, 92, 93, 144, 145, 182, 183];
|
|
16510
|
+
if (this.parent.editorMode === 'HTML') {
|
|
16511
|
+
range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
16512
|
+
isCursor = range.startContainer === range.endContainer && range.startOffset === range.endOffset;
|
|
16513
|
+
}
|
|
16514
|
+
if (!isCursor && this.parent.editorMode === 'HTML' && keyCodeValues.indexOf(originalEvent.which) < 0) {
|
|
16515
|
+
let nodes = this.parent.formatter.editorManager.nodeSelection.getNodeCollection(range);
|
|
16516
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
16517
|
+
if (nodes[i].nodeName === 'IMG') {
|
|
16518
|
+
this.deletedImg.push(nodes[i]);
|
|
16519
|
+
}
|
|
16520
|
+
}
|
|
16521
|
+
}
|
|
16416
16522
|
if (this.parent.editorMode === 'HTML' && ((originalEvent.which === 8 && originalEvent.code === 'Backspace') ||
|
|
16417
16523
|
(originalEvent.which === 46 && originalEvent.code === 'Delete'))) {
|
|
16418
|
-
let range = this.parent.getRange();
|
|
16419
16524
|
let isCursor = range.startContainer === range.endContainer && range.startOffset === range.endOffset;
|
|
16420
16525
|
if ((originalEvent.which === 8 && originalEvent.code === 'Backspace' && isCursor)) {
|
|
16421
16526
|
this.checkImageBack(range);
|
|
@@ -16423,14 +16528,6 @@ class Image {
|
|
|
16423
16528
|
else if ((originalEvent.which === 46 && originalEvent.code === 'Delete' && isCursor)) {
|
|
16424
16529
|
this.checkImageDel(range);
|
|
16425
16530
|
}
|
|
16426
|
-
else if (!isCursor) {
|
|
16427
|
-
let nodes = this.parent.formatter.editorManager.nodeSelection.getNodeCollection(range);
|
|
16428
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
16429
|
-
if (nodes[i].nodeName === 'IMG') {
|
|
16430
|
-
this.deletedImg.push(nodes[i]);
|
|
16431
|
-
}
|
|
16432
|
-
}
|
|
16433
|
-
}
|
|
16434
16531
|
}
|
|
16435
16532
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection) &&
|
|
16436
16533
|
originalEvent.code !== 'KeyK') {
|
|
@@ -16462,7 +16559,7 @@ class Image {
|
|
|
16462
16559
|
originalEvent: originalEvent
|
|
16463
16560
|
}
|
|
16464
16561
|
};
|
|
16465
|
-
this.deleteImg(event);
|
|
16562
|
+
this.deleteImg(event, originalEvent.keyCode);
|
|
16466
16563
|
}
|
|
16467
16564
|
if (this.parent.contentModule.getEditPanel().querySelector('.e-img-resize')) {
|
|
16468
16565
|
this.remvoeResizEle();
|
|
@@ -16506,7 +16603,7 @@ class Image {
|
|
|
16506
16603
|
if (!isNullOrUndefined(this.deletedImg) && this.deletedImg.length > 0) {
|
|
16507
16604
|
for (let i = 0; i < this.deletedImg.length; i++) {
|
|
16508
16605
|
let args = {
|
|
16509
|
-
|
|
16606
|
+
element: this.deletedImg[i],
|
|
16510
16607
|
src: this.deletedImg[i].getAttribute('src')
|
|
16511
16608
|
};
|
|
16512
16609
|
this.parent.trigger(afterImageDelete, args);
|
|
@@ -16842,11 +16939,14 @@ class Image {
|
|
|
16842
16939
|
let regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi;
|
|
16843
16940
|
return regexp.test(url);
|
|
16844
16941
|
}
|
|
16845
|
-
deleteImg(e) {
|
|
16942
|
+
deleteImg(e, keyCode) {
|
|
16846
16943
|
if (e.selectNode[0].nodeName !== 'IMG') {
|
|
16847
16944
|
return;
|
|
16848
16945
|
}
|
|
16849
|
-
let args = {
|
|
16946
|
+
let args = {
|
|
16947
|
+
element: e.selectNode[0],
|
|
16948
|
+
src: e.selectNode[0].getAttribute('src')
|
|
16949
|
+
};
|
|
16850
16950
|
if (this.parent.formatter.getUndoRedoStack().length === 0) {
|
|
16851
16951
|
this.parent.formatter.saveData();
|
|
16852
16952
|
}
|
|
@@ -16863,7 +16963,9 @@ class Image {
|
|
|
16863
16963
|
this.quickToolObj.imageQTBar.hidePopup();
|
|
16864
16964
|
}
|
|
16865
16965
|
this.cancelResizeAction();
|
|
16866
|
-
|
|
16966
|
+
if (isNullOrUndefined(keyCode)) {
|
|
16967
|
+
this.parent.trigger(afterImageDelete, args);
|
|
16968
|
+
}
|
|
16867
16969
|
}
|
|
16868
16970
|
caption(e) {
|
|
16869
16971
|
let selectNode = e.selectNode[0];
|
|
@@ -17274,15 +17376,24 @@ class Image {
|
|
|
17274
17376
|
});
|
|
17275
17377
|
uploadParentEle.appendChild(uploadEle);
|
|
17276
17378
|
let altText;
|
|
17379
|
+
let rawFile;
|
|
17380
|
+
let selectArgs;
|
|
17381
|
+
let beforeUploadArgs;
|
|
17277
17382
|
this.uploadObj = new Uploader({
|
|
17278
17383
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, },
|
|
17279
17384
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl,
|
|
17280
17385
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
17281
17386
|
selected: (e) => {
|
|
17282
17387
|
proxy.isImgUploaded = true;
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17388
|
+
selectArgs = e;
|
|
17389
|
+
if (this.parent.isServerRendered) {
|
|
17390
|
+
selectArgs = JSON.parse(JSON.stringify(e));
|
|
17391
|
+
e.cancel = true;
|
|
17392
|
+
rawFile = e.filesData;
|
|
17393
|
+
}
|
|
17394
|
+
this.parent.trigger(imageSelected, selectArgs, (selectArgs) => {
|
|
17395
|
+
this.checkExtension(selectArgs.filesData[0]);
|
|
17396
|
+
altText = selectArgs.filesData[0].name;
|
|
17286
17397
|
if (this.parent.editorMode === 'HTML' && isNullOrUndefined(this.parent.insertImageSettings.path)) {
|
|
17287
17398
|
let reader = new FileReader();
|
|
17288
17399
|
reader.addEventListener('load', (e) => {
|
|
@@ -17301,12 +17412,33 @@ class Image {
|
|
|
17301
17412
|
};
|
|
17302
17413
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
17303
17414
|
});
|
|
17304
|
-
reader.readAsDataURL(
|
|
17415
|
+
reader.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
17416
|
+
}
|
|
17417
|
+
if (this.parent.isServerRendered) {
|
|
17418
|
+
/* tslint:disable */
|
|
17419
|
+
this.uploadObj._internalRenderSelect(selectArgs, rawFile);
|
|
17420
|
+
/* tslint:enable */
|
|
17305
17421
|
}
|
|
17306
17422
|
});
|
|
17307
17423
|
},
|
|
17424
|
+
beforeUpload: (args) => {
|
|
17425
|
+
if (this.parent.isServerRendered) {
|
|
17426
|
+
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
17427
|
+
args.cancel = true;
|
|
17428
|
+
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
17429
|
+
if (beforeUploadArgs.cancel) {
|
|
17430
|
+
return;
|
|
17431
|
+
}
|
|
17432
|
+
/* tslint:disable */
|
|
17433
|
+
this.uploadObj.uploadFiles(rawFile, null);
|
|
17434
|
+
/* tslint:enable */
|
|
17435
|
+
});
|
|
17436
|
+
}
|
|
17437
|
+
},
|
|
17308
17438
|
uploading: (e) => {
|
|
17309
|
-
this.parent.
|
|
17439
|
+
if (!this.parent.isServerRendered) {
|
|
17440
|
+
this.parent.trigger(imageUploading, e);
|
|
17441
|
+
}
|
|
17310
17442
|
},
|
|
17311
17443
|
success: (e) => {
|
|
17312
17444
|
this.parent.trigger(imageUploadSuccess, e, (e) => {
|
|
@@ -17350,6 +17482,9 @@ class Image {
|
|
|
17350
17482
|
if (this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(('.' + e.type).toLocaleLowerCase()) === -1) {
|
|
17351
17483
|
this.dialogObj.getButtons(0).element.setAttribute('disabled', 'disabled');
|
|
17352
17484
|
}
|
|
17485
|
+
else {
|
|
17486
|
+
this.dialogObj.getButtons(0).element.removeAttribute('disabled');
|
|
17487
|
+
}
|
|
17353
17488
|
}
|
|
17354
17489
|
}
|
|
17355
17490
|
fileSelect() {
|
|
@@ -17573,6 +17708,8 @@ class Image {
|
|
|
17573
17708
|
let timeOut = dragEvent.dataTransfer.files[0].size > 1000000 ? 300 : 100;
|
|
17574
17709
|
setTimeout(() => { proxy.refreshPopup(imageElement); }, timeOut);
|
|
17575
17710
|
let range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
17711
|
+
let rawFile;
|
|
17712
|
+
let beforeUploadArgs;
|
|
17576
17713
|
this.uploadObj = new Uploader({
|
|
17577
17714
|
asyncSettings: {
|
|
17578
17715
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
@@ -17592,15 +17729,36 @@ class Image {
|
|
|
17592
17729
|
detach(imageElement);
|
|
17593
17730
|
this.popupObj.close();
|
|
17594
17731
|
},
|
|
17732
|
+
beforeUpload: (args) => {
|
|
17733
|
+
if (this.parent.isServerRendered) {
|
|
17734
|
+
beforeUploadArgs = JSON.parse(JSON.stringify(args));
|
|
17735
|
+
args.cancel = true;
|
|
17736
|
+
isUploading = true;
|
|
17737
|
+
this.parent.trigger(imageUploading, beforeUploadArgs, (beforeUploadArgs) => {
|
|
17738
|
+
if (beforeUploadArgs.cancel) {
|
|
17739
|
+
return;
|
|
17740
|
+
}
|
|
17741
|
+
/* tslint:disable */
|
|
17742
|
+
this.uploadObj.uploadFiles(rawFile, null);
|
|
17743
|
+
this.parent.inputElement.contentEditable = 'false';
|
|
17744
|
+
/* tslint:enable */
|
|
17745
|
+
});
|
|
17746
|
+
}
|
|
17747
|
+
},
|
|
17595
17748
|
uploading: (e) => {
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17749
|
+
if (!this.parent.isServerRendered) {
|
|
17750
|
+
isUploading = true;
|
|
17751
|
+
this.parent.trigger(imageUploading, e);
|
|
17752
|
+
this.parent.inputElement.contentEditable = 'false';
|
|
17753
|
+
}
|
|
17599
17754
|
},
|
|
17600
17755
|
selected: (e) => {
|
|
17601
17756
|
if (isUploading) {
|
|
17602
17757
|
e.cancel = true;
|
|
17603
17758
|
}
|
|
17759
|
+
if (this.parent.isServerRendered) {
|
|
17760
|
+
rawFile = e.filesData;
|
|
17761
|
+
}
|
|
17604
17762
|
},
|
|
17605
17763
|
failure: (e) => {
|
|
17606
17764
|
isUploading = false;
|
|
@@ -18085,7 +18243,8 @@ class Table {
|
|
|
18085
18243
|
let selection = this.parent.formatter.editorManager.nodeSelection.save(range, this.contentModule.getDocument());
|
|
18086
18244
|
let ele = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range)[0];
|
|
18087
18245
|
ele = (ele && ele.tagName !== 'TD' && ele.tagName !== 'TH') ? ele.parentElement : ele;
|
|
18088
|
-
if ((event.keyCode === 8 || event.keyCode === 46)
|
|
18246
|
+
if ((event.keyCode === 8 || event.keyCode === 46) ||
|
|
18247
|
+
(event.ctrlKey && event.keyCode === 88)) {
|
|
18089
18248
|
if (ele && ele.tagName === 'TBODY') {
|
|
18090
18249
|
event.preventDefault();
|
|
18091
18250
|
proxy.removeTable(selection, event, true);
|
|
@@ -18449,7 +18608,8 @@ class Table {
|
|
|
18449
18608
|
this.contentModule.getEditPanel().appendChild(tableReBox);
|
|
18450
18609
|
}
|
|
18451
18610
|
removeResizeEle() {
|
|
18452
|
-
let item = this.contentModule.getEditPanel().
|
|
18611
|
+
let item = this.parent.contentModule.getEditPanel().
|
|
18612
|
+
querySelectorAll('.e-column-resize, .e-row-resize, .e-table-box');
|
|
18453
18613
|
if (item.length > 0) {
|
|
18454
18614
|
for (let i = 0; i < item.length; i++) {
|
|
18455
18615
|
detach(item[i]);
|
|
@@ -19070,15 +19230,12 @@ class DialogRenderer {
|
|
|
19070
19230
|
*/
|
|
19071
19231
|
render(e) {
|
|
19072
19232
|
let dlgObj;
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
}
|
|
19076
|
-
if (isNullOrUndefined(e.open)) {
|
|
19077
|
-
e.open = this.open.bind(this);
|
|
19078
|
-
}
|
|
19233
|
+
e.beforeOpen = this.beforeOpen.bind(this);
|
|
19234
|
+
e.open = this.open.bind(this);
|
|
19079
19235
|
if (isNullOrUndefined(e.close)) {
|
|
19080
19236
|
e.close = this.close.bind(this);
|
|
19081
19237
|
}
|
|
19238
|
+
e.beforeClose = this.beforeClose.bind(this);
|
|
19082
19239
|
dlgObj = new Dialog(e);
|
|
19083
19240
|
dlgObj.isStringTemplate = true;
|
|
19084
19241
|
return dlgObj;
|
|
@@ -19089,6 +19246,9 @@ class DialogRenderer {
|
|
|
19089
19246
|
open(args) {
|
|
19090
19247
|
this.parent.trigger(dialogOpen, args);
|
|
19091
19248
|
}
|
|
19249
|
+
beforeClose(args) {
|
|
19250
|
+
this.parent.trigger(beforeDialogClose, args);
|
|
19251
|
+
}
|
|
19092
19252
|
/**
|
|
19093
19253
|
* dialog close method
|
|
19094
19254
|
* @hidden
|
|
@@ -19872,6 +20032,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
19872
20032
|
this.formatter.enableUndo(this);
|
|
19873
20033
|
}
|
|
19874
20034
|
this.setPlaceHolder();
|
|
20035
|
+
this.notify(contentChanged, {});
|
|
19875
20036
|
}
|
|
19876
20037
|
htmlPurifier(command, value) {
|
|
19877
20038
|
if (this.editorMode === 'HTML') {
|
|
@@ -20002,7 +20163,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20002
20163
|
this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(), range.startContainer, pointer);
|
|
20003
20164
|
}
|
|
20004
20165
|
else if ((e.code === 'Backspace' && e.which === 8) &&
|
|
20005
|
-
range.startContainer.textContent.charCodeAt(0) === 8203) {
|
|
20166
|
+
range.startContainer.textContent.charCodeAt(0) === 8203 && range.collapsed) {
|
|
20006
20167
|
let parentEle = range.startContainer.parentElement;
|
|
20007
20168
|
let index;
|
|
20008
20169
|
let i;
|
|
@@ -20014,7 +20175,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20014
20175
|
let bool = true;
|
|
20015
20176
|
let removeNodeArray = [];
|
|
20016
20177
|
for (i = index; i >= 0; i--) {
|
|
20017
|
-
if (parentEle.childNodes[i].textContent.charCodeAt(0) === 8203 && bool) {
|
|
20178
|
+
if (parentEle.childNodes[i].nodeType === 3 && parentEle.childNodes[i].textContent.charCodeAt(0) === 8203 && bool) {
|
|
20018
20179
|
removeNodeArray.push(i);
|
|
20019
20180
|
}
|
|
20020
20181
|
else {
|
|
@@ -20055,6 +20216,10 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20055
20216
|
}
|
|
20056
20217
|
keyUp(e) {
|
|
20057
20218
|
this.notify(keyUp, { member: 'keyup', args: e });
|
|
20219
|
+
if (e.code === 'KeyX' && e.which === 88 && e.keyCode === 88 && e.ctrlKey && (this.inputElement.innerHTML === '' ||
|
|
20220
|
+
this.inputElement.innerHTML === '<br>')) {
|
|
20221
|
+
this.inputElement.innerHTML = getEditValue('<p><br></p>', this);
|
|
20222
|
+
}
|
|
20058
20223
|
let allowedKeys = e.which === 32 || e.which === 13 || e.which === 8 || e.which === 46;
|
|
20059
20224
|
if (((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys) || (this.editorMode === 'Markdown'
|
|
20060
20225
|
&& ((e.key !== 'shift' && !e.ctrlKey) && e.key && e.key.length === 1 || allowedKeys)) && !this.inlineMode.enable) {
|
|
@@ -20177,6 +20342,12 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20177
20342
|
let pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
20178
20343
|
? 0 : e.clipboardData.getData('text/plain').length;
|
|
20179
20344
|
let totalLength = (currentLength - selectionLength) + pastedContentLength;
|
|
20345
|
+
if (this.editorMode === 'Markdown') {
|
|
20346
|
+
if (!(this.maxLength === -1 || totalLength < this.maxLength)) {
|
|
20347
|
+
e.preventDefault();
|
|
20348
|
+
}
|
|
20349
|
+
return;
|
|
20350
|
+
}
|
|
20180
20351
|
if (!pasteArgs.cancel && this.inputElement.contentEditable === 'true' &&
|
|
20181
20352
|
(this.maxLength === -1 || totalLength < this.maxLength)) {
|
|
20182
20353
|
if (!isNullOrUndefined(this.pasteCleanupModule)) {
|
|
@@ -20290,12 +20461,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20290
20461
|
}
|
|
20291
20462
|
this.removeHtmlAttributes();
|
|
20292
20463
|
this.removeAttributes();
|
|
20293
|
-
|
|
20294
|
-
super.destroy();
|
|
20295
|
-
}
|
|
20296
|
-
else {
|
|
20297
|
-
this.isDestroyed = true;
|
|
20298
|
-
}
|
|
20464
|
+
super.destroy();
|
|
20299
20465
|
this.isRendered = false;
|
|
20300
20466
|
if (this.enablePersistence) {
|
|
20301
20467
|
window.localStorage.removeItem(this.getModuleName() + this.element.id);
|
|
@@ -20370,6 +20536,25 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20370
20536
|
}
|
|
20371
20537
|
return wrapperElm.innerHTML;
|
|
20372
20538
|
}
|
|
20539
|
+
/**
|
|
20540
|
+
* It shows the inline quick toolbar
|
|
20541
|
+
*/
|
|
20542
|
+
showInlineToolbar() {
|
|
20543
|
+
if (this.inlineMode.enable) {
|
|
20544
|
+
let currentRange = this.getRange();
|
|
20545
|
+
let targetElm = currentRange.endContainer.nodeName === '#text' ?
|
|
20546
|
+
currentRange.endContainer.parentElement : currentRange.endContainer;
|
|
20547
|
+
let x = currentRange.getClientRects()[0].left;
|
|
20548
|
+
let y = currentRange.getClientRects()[0].top;
|
|
20549
|
+
this.quickToolbarModule.showInlineQTBar(x, y, targetElm);
|
|
20550
|
+
}
|
|
20551
|
+
}
|
|
20552
|
+
/**
|
|
20553
|
+
* It hides the inline quick toolbar
|
|
20554
|
+
*/
|
|
20555
|
+
hideInlineToolbar() {
|
|
20556
|
+
this.quickToolbarModule.hideInlineQTBar();
|
|
20557
|
+
}
|
|
20373
20558
|
/**
|
|
20374
20559
|
* For internal use only - Get the module name.
|
|
20375
20560
|
* @private
|
|
@@ -20528,7 +20713,11 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20528
20713
|
updatePanelValue() {
|
|
20529
20714
|
let value = this.value;
|
|
20530
20715
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
20716
|
+
let getTextArea = this.element.querySelector('.e-rte-srctextarea');
|
|
20531
20717
|
if (value) {
|
|
20718
|
+
if (getTextArea && getTextArea.style.display === 'block') {
|
|
20719
|
+
getTextArea.value = this.value;
|
|
20720
|
+
}
|
|
20532
20721
|
if (this.valueContainer) {
|
|
20533
20722
|
this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
|
|
20534
20723
|
}
|
|
@@ -20541,6 +20730,9 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20541
20730
|
}
|
|
20542
20731
|
}
|
|
20543
20732
|
else {
|
|
20733
|
+
if (getTextArea && getTextArea.style.display === 'block') {
|
|
20734
|
+
getTextArea.value = '';
|
|
20735
|
+
}
|
|
20544
20736
|
if (this.editorMode === 'HTML') {
|
|
20545
20737
|
this.inputElement.innerHTML = '<p><br/></p>';
|
|
20546
20738
|
}
|
|
@@ -21019,8 +21211,8 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21019
21211
|
}
|
|
21020
21212
|
this.preventDefaultResize(e);
|
|
21021
21213
|
this.trigger('focus', { event: e, isInteracted: Object.keys(e).length === 0 ? false : true });
|
|
21022
|
-
if (!isNullOrUndefined(this.saveInterval) && this.saveInterval > 0) {
|
|
21023
|
-
this.timeInterval = setInterval(this.
|
|
21214
|
+
if (!isNullOrUndefined(this.saveInterval) && this.saveInterval > 0 && !this.autoSaveOnIdle) {
|
|
21215
|
+
this.timeInterval = setInterval(this.updateValueOnIdle.bind(this), this.saveInterval);
|
|
21024
21216
|
}
|
|
21025
21217
|
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
21026
21218
|
}
|
|
@@ -21048,11 +21240,15 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21048
21240
|
}
|
|
21049
21241
|
return value;
|
|
21050
21242
|
}
|
|
21051
|
-
|
|
21243
|
+
updateValueOnIdle() {
|
|
21052
21244
|
this.setProperties({ value: this.getUpdatedValue() }, true);
|
|
21053
21245
|
this.valueContainer.value = this.value;
|
|
21054
21246
|
this.invokeChangeEvent();
|
|
21055
21247
|
}
|
|
21248
|
+
updateIntervalValue() {
|
|
21249
|
+
clearTimeout(this.idleInterval);
|
|
21250
|
+
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
21251
|
+
}
|
|
21056
21252
|
onDocumentClick(e) {
|
|
21057
21253
|
let target = e.target;
|
|
21058
21254
|
let rteElement = closest(target, '.' + CLS_RTE);
|
|
@@ -21103,6 +21299,19 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21103
21299
|
this.isRTE = true;
|
|
21104
21300
|
}
|
|
21105
21301
|
}
|
|
21302
|
+
/**
|
|
21303
|
+
* invokeChangeEvent method
|
|
21304
|
+
* @hidden
|
|
21305
|
+
* @deprecated
|
|
21306
|
+
*/
|
|
21307
|
+
contentChanged() {
|
|
21308
|
+
if (this.autoSaveOnIdle) {
|
|
21309
|
+
if (!isNullOrUndefined(this.saveInterval)) {
|
|
21310
|
+
clearTimeout(this.timeInterval);
|
|
21311
|
+
this.timeInterval = setTimeout(this.updateIntervalValue.bind(this), this.saveInterval);
|
|
21312
|
+
}
|
|
21313
|
+
}
|
|
21314
|
+
}
|
|
21106
21315
|
/**
|
|
21107
21316
|
* invokeChangeEvent method
|
|
21108
21317
|
* @hidden
|
|
@@ -21201,6 +21410,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21201
21410
|
wireEvents() {
|
|
21202
21411
|
this.element.addEventListener('focusin', this.onFocusHandler, true);
|
|
21203
21412
|
this.element.addEventListener('focusout', this.onBlurHandler, true);
|
|
21413
|
+
this.on(contentChanged, this.contentChanged, this);
|
|
21204
21414
|
if (this.readonly && this.enabled) {
|
|
21205
21415
|
return;
|
|
21206
21416
|
}
|
|
@@ -21275,6 +21485,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21275
21485
|
unWireEvents() {
|
|
21276
21486
|
this.element.removeEventListener('focusin', this.onFocusHandler, true);
|
|
21277
21487
|
this.element.removeEventListener('focusout', this.onBlurHandler, true);
|
|
21488
|
+
this.off(contentChanged, this.contentChanged);
|
|
21278
21489
|
if (this.readonly && this.enabled) {
|
|
21279
21490
|
return;
|
|
21280
21491
|
}
|
|
@@ -21345,6 +21556,9 @@ __decorate$1([
|
|
|
21345
21556
|
__decorate$1([
|
|
21346
21557
|
Property(null)
|
|
21347
21558
|
], RichTextEditor.prototype, "placeholder", void 0);
|
|
21559
|
+
__decorate$1([
|
|
21560
|
+
Property(false)
|
|
21561
|
+
], RichTextEditor.prototype, "autoSaveOnIdle", void 0);
|
|
21348
21562
|
__decorate$1([
|
|
21349
21563
|
Property(false)
|
|
21350
21564
|
], RichTextEditor.prototype, "readonly", void 0);
|
|
@@ -21426,6 +21640,9 @@ __decorate$1([
|
|
|
21426
21640
|
__decorate$1([
|
|
21427
21641
|
Event()
|
|
21428
21642
|
], RichTextEditor.prototype, "dialogOpen", void 0);
|
|
21643
|
+
__decorate$1([
|
|
21644
|
+
Event()
|
|
21645
|
+
], RichTextEditor.prototype, "beforeDialogClose", void 0);
|
|
21429
21646
|
__decorate$1([
|
|
21430
21647
|
Event()
|
|
21431
21648
|
], RichTextEditor.prototype, "dialogClose", void 0);
|
|
@@ -21540,5 +21757,5 @@ RichTextEditor = __decorate$1([
|
|
|
21540
21757
|
* Rich Text Editor component exported items
|
|
21541
21758
|
*/
|
|
21542
21759
|
|
|
21543
|
-
export { Toolbar$1 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, executeGroup, created, destroyed, load, initialLoad, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, linkToolbarAction, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, toolbarStatusUpdate, actionSuccess, updateToolbarItem, insertImage, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, imageCaption, imageSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, pasteClean, beforeDialogOpen, dialogOpen, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, afterImageDelete, drop, xhtmlValidation, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_POP, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_TB_STATIC, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, ServiceLocator, RendererFactory, EditorManager, IMAGE, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_IMAGE_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP };
|
|
21760
|
+
export { Toolbar$1 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, executeGroup, created, destroyed, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, linkToolbarAction, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, toolbarStatusUpdate, actionSuccess, updateToolbarItem, insertImage, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, imageCaption, imageSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, pasteClean, beforeDialogOpen, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, afterImageDelete, drop, xhtmlValidation, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_POP, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_TB_STATIC, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_FONT_COLOR_TARGET, CLS_BACKGROUND_COLOR_TARGET, CLS_COLOR_CONTENT, CLS_FONT_COLOR_DROPDOWN, CLS_BACKGROUND_COLOR_DROPDOWN, CLS_COLOR_PALETTE, CLS_FONT_COLOR_PICKER, CLS_BACKGROUND_COLOR_PICKER, CLS_RTE_READONLY, CLS_TABLE_SEL, CLS_TB_DASH_BOR, CLS_TB_ALT_BOR, CLS_TB_COL_RES, CLS_TB_ROW_RES, CLS_TB_BOX_RES, CLS_RTE_HIDDEN, CLS_RTE_PASTE_KEEP_FORMAT, CLS_RTE_PASTE_REMOVE_FORMAT, CLS_RTE_PASTE_PLAIN_FORMAT, CLS_RTE_PASTE_OK, CLS_RTE_PASTE_CANCEL, CLS_RTE_DIALOG_MIN_HEIGHT, CLS_RTE_RES_HANDLE, CLS_RTE_RES_EAST, CLS_RTE_IMAGE, CLS_RESIZE, CLS_IMG_FOCUS, CLS_RTE_DRAG_IMAGE, CLS_RTE_UPLOAD_POPUP, CLS_POPUP_OPEN, CLS_IMG_RESIZE, CLS_DROPAREA, CLS_IMG_INNER, CLS_UPLOAD_FILES, CLS_RTE_DIALOG_UPLOAD, CLS_RTE_RES_CNT, CLS_CUSTOM_TILE, CLS_NOCOLOR_ITEM, CLS_TABLE, CLS_TABLE_BORDER, CLS_RTE_TABLE_RESIZE, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, ServiceLocator, RendererFactory, EditorManager, IMAGE, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_IMAGE_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP };
|
|
21544
21761
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|