@syncfusion/ej2-richtexteditor 18.1.57 → 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 -600
- 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 +231 -106
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +236 -111
- 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 +2 -2
- package/src/editor-manager/plugin/inserthtml.js +2 -2
- 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 +24 -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 +107 -102
- package/src/rich-text-editor/base/constant.js +107 -102
- 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 +41 -40
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +659 -651
- package/src/rich-text-editor/base/rich-text-editor.d.ts +71 -48
- package/src/rich-text-editor/base/rich-text-editor.js +90 -35
- 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 +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 +56 -14
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +1 -1
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/table-module.js +1 -1
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +8 -8
- package/src/rich-text-editor/renderer/toolbar-renderer.js +8 -8
- 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
|
|
@@ -4821,12 +4826,22 @@ class QuickToolbar {
|
|
|
4821
4826
|
EventHandler.add(this.inlineQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
4822
4827
|
}
|
|
4823
4828
|
}
|
|
4829
|
+
/**
|
|
4830
|
+
* Method for showing the inline quick toolbar
|
|
4831
|
+
* @hidden
|
|
4832
|
+
* @deprecated
|
|
4833
|
+
*/
|
|
4824
4834
|
showInlineQTBar(x, y, target) {
|
|
4825
4835
|
if (this.parent.readonly) {
|
|
4826
4836
|
return;
|
|
4827
4837
|
}
|
|
4828
4838
|
this.inlineQTBar.showPopup(x, y, target);
|
|
4829
4839
|
}
|
|
4840
|
+
/**
|
|
4841
|
+
* Method for hidding the inline quick toolbar
|
|
4842
|
+
* @hidden
|
|
4843
|
+
* @deprecated
|
|
4844
|
+
*/
|
|
4830
4845
|
hideInlineQTBar() {
|
|
4831
4846
|
if (this.inlineQTBar && !hasClass(this.inlineQTBar.element, 'e-popup-close')) {
|
|
4832
4847
|
this.inlineQTBar.hidePopup();
|
|
@@ -5718,6 +5733,7 @@ class Formatter {
|
|
|
5718
5733
|
onKeyHandler(self, e) {
|
|
5719
5734
|
this.editorManager.observer.notify(KEY_UP, {
|
|
5720
5735
|
event: e, callBack: () => {
|
|
5736
|
+
self.notify(contentChanged, {});
|
|
5721
5737
|
this.enableUndo(self);
|
|
5722
5738
|
}
|
|
5723
5739
|
});
|
|
@@ -5728,6 +5744,7 @@ class Formatter {
|
|
|
5728
5744
|
* @deprecated
|
|
5729
5745
|
*/
|
|
5730
5746
|
onSuccess(self, events) {
|
|
5747
|
+
self.notify(contentChanged, {});
|
|
5731
5748
|
if (isNullOrUndefined(events.event) || (events && events.event.action !== 'copy')) {
|
|
5732
5749
|
this.enableUndo(self);
|
|
5733
5750
|
self.notify(execCommandCallBack, events);
|
|
@@ -9088,8 +9105,8 @@ class Lists {
|
|
|
9088
9105
|
let range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
9089
9106
|
let startNode = this.parent.domNode.getSelectedNode(range.startContainer, range.startOffset);
|
|
9090
9107
|
let endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
|
|
9091
|
-
if (startNode === endNode &&
|
|
9092
|
-
startNode.textContent.
|
|
9108
|
+
if (startNode === endNode && startNode.tagName === 'LI' && startNode.textContent.trim() === '' &&
|
|
9109
|
+
startNode.textContent.charCodeAt(0) === 65279) {
|
|
9093
9110
|
startNode.textContent = '';
|
|
9094
9111
|
}
|
|
9095
9112
|
}
|
|
@@ -9430,16 +9447,6 @@ class Lists {
|
|
|
9430
9447
|
nodesTemp.push(node);
|
|
9431
9448
|
}
|
|
9432
9449
|
}
|
|
9433
|
-
let parentList = [];
|
|
9434
|
-
for (let k = 0; k < nodesTemp.length; k++) {
|
|
9435
|
-
let nodesTempListParent = nodesTemp[k].closest('LI');
|
|
9436
|
-
if (!isNullOrUndefined(nodesTempListParent) && (nodesTemp.indexOf(nodesTempListParent.parentElement) < 0)) {
|
|
9437
|
-
if (nodesTempListParent.parentElement.innerText === nodesTemp[k].innerText) {
|
|
9438
|
-
parentList.push(nodesTempListParent.parentElement);
|
|
9439
|
-
}
|
|
9440
|
-
}
|
|
9441
|
-
}
|
|
9442
|
-
nodesTemp = parentList.concat(nodesTemp);
|
|
9443
9450
|
for (let j = nodesTemp.length - 1; j >= 0; j--) {
|
|
9444
9451
|
let h = nodesTemp[j];
|
|
9445
9452
|
let replace = '<' + tagName.toLowerCase() + ' '
|
|
@@ -13796,81 +13803,81 @@ class ContentRender {
|
|
|
13796
13803
|
}
|
|
13797
13804
|
|
|
13798
13805
|
/* tslint:disable */
|
|
13799
|
-
const IFRAMEHEADER = `
|
|
13800
|
-
<!DOCTYPE html>
|
|
13801
|
-
<html>
|
|
13802
|
-
<head>
|
|
13803
|
-
<meta charset='utf-8' />
|
|
13804
|
-
<style>
|
|
13805
|
-
@charset "UTF-8";
|
|
13806
|
-
body {
|
|
13807
|
-
font-family: "Roboto", sans-serif;
|
|
13808
|
-
font-size: 14px;
|
|
13809
|
-
}
|
|
13810
|
-
html, body{height: 100%;margin: 0;}
|
|
13811
|
-
body.e-cursor{cursor:default}
|
|
13812
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
13813
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
13814
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
13815
|
-
.e-rte-image {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13816
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
13817
|
-
.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;}
|
|
13818
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
13819
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
13820
|
-
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
13821
|
-
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
13822
|
-
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13823
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
13824
|
-
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
13825
|
-
.e-imgbreak {border: 0;cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
13826
|
-
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
13827
|
-
img::selection { background: transparent;color: transparent;}
|
|
13828
|
-
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block; background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
13829
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13830
|
-
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2; border-radius: 15px; height: 20px; width: 20px; }
|
|
13831
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
13832
|
-
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
13833
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
13834
|
-
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
13835
|
-
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;}
|
|
13836
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
13837
|
-
li{margin-bottom: 10px;}
|
|
13838
|
-
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
13839
|
-
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
13840
|
-
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
13841
|
-
h4{font-size: 1em;font-weight: 400;margin: 0;}
|
|
13842
|
-
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
13843
|
-
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
13844
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
13845
|
-
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;}
|
|
13846
|
-
strong, b{font-weight: 700;}
|
|
13847
|
-
a{text-decoration: none;user-select: auto;}
|
|
13848
|
-
a:hover{text-decoration: underline;};
|
|
13849
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
13850
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
13851
|
-
ul:last-child{margin-bottom: 0;}
|
|
13852
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
13853
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
13854
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
13855
|
-
table th {background-color: #E0E0E0;}
|
|
13856
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
13857
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
13858
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
13859
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
13860
|
-
.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; }
|
|
13861
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
13862
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
13863
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
13864
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
13865
|
-
.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; }
|
|
13866
|
-
.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; }
|
|
13867
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
13868
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
13869
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
13870
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
13871
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
13872
|
-
.e-rtl { direction: rtl; }
|
|
13873
|
-
</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>
|
|
13874
13881
|
</head>`;
|
|
13875
13882
|
/* tslint:enable */
|
|
13876
13883
|
/**
|
|
@@ -14663,6 +14670,8 @@ class PasteCleanup {
|
|
|
14663
14670
|
addClass([popupObj.element], [CLS_POPUP_OPEN, CLS_RTE_UPLOAD_POPUP]);
|
|
14664
14671
|
let timeOut = fileList.size > 1000000 ? 300 : 100;
|
|
14665
14672
|
setTimeout(() => { this.refreshPopup(imgElem, popupObj); }, timeOut);
|
|
14673
|
+
let rawFile;
|
|
14674
|
+
let beforeUploadArgs;
|
|
14666
14675
|
let uploadObj = new Uploader({
|
|
14667
14676
|
asyncSettings: {
|
|
14668
14677
|
saveUrl: this.parent.insertImageSettings.saveUrl
|
|
@@ -14674,8 +14683,24 @@ class PasteCleanup {
|
|
|
14674
14683
|
setTimeout(() => { this.popupClose(popupObj, uploadObj, imgElem, e); }, 900);
|
|
14675
14684
|
},
|
|
14676
14685
|
uploading: (e) => {
|
|
14677
|
-
this.parent.
|
|
14678
|
-
|
|
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
|
+
}
|
|
14679
14704
|
},
|
|
14680
14705
|
failure: (e) => {
|
|
14681
14706
|
setTimeout(() => { this.uploadFailure(imgElem, uploadObj, popupObj, e); }, 900);
|
|
@@ -14690,6 +14715,9 @@ class PasteCleanup {
|
|
|
14690
14715
|
},
|
|
14691
14716
|
selected: (e) => {
|
|
14692
14717
|
e.cancel = true;
|
|
14718
|
+
if (this.parent.isServerRendered) {
|
|
14719
|
+
rawFile = e.filesData;
|
|
14720
|
+
}
|
|
14693
14721
|
},
|
|
14694
14722
|
removing: () => {
|
|
14695
14723
|
this.parent.inputElement.contentEditable = 'true';
|
|
@@ -17349,19 +17377,23 @@ class Image {
|
|
|
17349
17377
|
uploadParentEle.appendChild(uploadEle);
|
|
17350
17378
|
let altText;
|
|
17351
17379
|
let rawFile;
|
|
17380
|
+
let selectArgs;
|
|
17381
|
+
let beforeUploadArgs;
|
|
17352
17382
|
this.uploadObj = new Uploader({
|
|
17353
17383
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, },
|
|
17354
17384
|
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl,
|
|
17355
17385
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
17356
17386
|
selected: (e) => {
|
|
17357
|
-
|
|
17387
|
+
proxy.isImgUploaded = true;
|
|
17388
|
+
selectArgs = e;
|
|
17389
|
+
if (this.parent.isServerRendered) {
|
|
17390
|
+
selectArgs = JSON.parse(JSON.stringify(e));
|
|
17358
17391
|
e.cancel = true;
|
|
17359
17392
|
rawFile = e.filesData;
|
|
17360
17393
|
}
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
altText = e.filesData[0].name;
|
|
17394
|
+
this.parent.trigger(imageSelected, selectArgs, (selectArgs) => {
|
|
17395
|
+
this.checkExtension(selectArgs.filesData[0]);
|
|
17396
|
+
altText = selectArgs.filesData[0].name;
|
|
17365
17397
|
if (this.parent.editorMode === 'HTML' && isNullOrUndefined(this.parent.insertImageSettings.path)) {
|
|
17366
17398
|
let reader = new FileReader();
|
|
17367
17399
|
reader.addEventListener('load', (e) => {
|
|
@@ -17380,18 +17412,33 @@ class Image {
|
|
|
17380
17412
|
};
|
|
17381
17413
|
proxy.inputUrl.setAttribute('disabled', 'true');
|
|
17382
17414
|
});
|
|
17383
|
-
reader.readAsDataURL(
|
|
17415
|
+
reader.readAsDataURL(selectArgs.filesData[0].rawFile);
|
|
17384
17416
|
}
|
|
17385
|
-
if (
|
|
17386
|
-
e.cancel = false;
|
|
17417
|
+
if (this.parent.isServerRendered) {
|
|
17387
17418
|
/* tslint:disable */
|
|
17388
|
-
this.uploadObj._internalRenderSelect(
|
|
17419
|
+
this.uploadObj._internalRenderSelect(selectArgs, rawFile);
|
|
17389
17420
|
/* tslint:enable */
|
|
17390
17421
|
}
|
|
17391
17422
|
});
|
|
17392
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
|
+
},
|
|
17393
17438
|
uploading: (e) => {
|
|
17394
|
-
this.parent.
|
|
17439
|
+
if (!this.parent.isServerRendered) {
|
|
17440
|
+
this.parent.trigger(imageUploading, e);
|
|
17441
|
+
}
|
|
17395
17442
|
},
|
|
17396
17443
|
success: (e) => {
|
|
17397
17444
|
this.parent.trigger(imageUploadSuccess, e, (e) => {
|
|
@@ -17661,6 +17708,8 @@ class Image {
|
|
|
17661
17708
|
let timeOut = dragEvent.dataTransfer.files[0].size > 1000000 ? 300 : 100;
|
|
17662
17709
|
setTimeout(() => { proxy.refreshPopup(imageElement); }, timeOut);
|
|
17663
17710
|
let range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
17711
|
+
let rawFile;
|
|
17712
|
+
let beforeUploadArgs;
|
|
17664
17713
|
this.uploadObj = new Uploader({
|
|
17665
17714
|
asyncSettings: {
|
|
17666
17715
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
@@ -17680,15 +17729,36 @@ class Image {
|
|
|
17680
17729
|
detach(imageElement);
|
|
17681
17730
|
this.popupObj.close();
|
|
17682
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
|
+
},
|
|
17683
17748
|
uploading: (e) => {
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17749
|
+
if (!this.parent.isServerRendered) {
|
|
17750
|
+
isUploading = true;
|
|
17751
|
+
this.parent.trigger(imageUploading, e);
|
|
17752
|
+
this.parent.inputElement.contentEditable = 'false';
|
|
17753
|
+
}
|
|
17687
17754
|
},
|
|
17688
17755
|
selected: (e) => {
|
|
17689
17756
|
if (isUploading) {
|
|
17690
17757
|
e.cancel = true;
|
|
17691
17758
|
}
|
|
17759
|
+
if (this.parent.isServerRendered) {
|
|
17760
|
+
rawFile = e.filesData;
|
|
17761
|
+
}
|
|
17692
17762
|
},
|
|
17693
17763
|
failure: (e) => {
|
|
17694
17764
|
isUploading = false;
|
|
@@ -19962,6 +20032,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
19962
20032
|
this.formatter.enableUndo(this);
|
|
19963
20033
|
}
|
|
19964
20034
|
this.setPlaceHolder();
|
|
20035
|
+
this.notify(contentChanged, {});
|
|
19965
20036
|
}
|
|
19966
20037
|
htmlPurifier(command, value) {
|
|
19967
20038
|
if (this.editorMode === 'HTML') {
|
|
@@ -20271,6 +20342,12 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20271
20342
|
let pastedContentLength = (isNullOrUndefined(e) || isNullOrUndefined(e.clipboardData))
|
|
20272
20343
|
? 0 : e.clipboardData.getData('text/plain').length;
|
|
20273
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
|
+
}
|
|
20274
20351
|
if (!pasteArgs.cancel && this.inputElement.contentEditable === 'true' &&
|
|
20275
20352
|
(this.maxLength === -1 || totalLength < this.maxLength)) {
|
|
20276
20353
|
if (!isNullOrUndefined(this.pasteCleanupModule)) {
|
|
@@ -20459,6 +20536,25 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20459
20536
|
}
|
|
20460
20537
|
return wrapperElm.innerHTML;
|
|
20461
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
|
+
}
|
|
20462
20558
|
/**
|
|
20463
20559
|
* For internal use only - Get the module name.
|
|
20464
20560
|
* @private
|
|
@@ -20617,7 +20713,11 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20617
20713
|
updatePanelValue() {
|
|
20618
20714
|
let value = this.value;
|
|
20619
20715
|
value = (this.enableHtmlEncode && this.value) ? decode(value) : value;
|
|
20716
|
+
let getTextArea = this.element.querySelector('.e-rte-srctextarea');
|
|
20620
20717
|
if (value) {
|
|
20718
|
+
if (getTextArea && getTextArea.style.display === 'block') {
|
|
20719
|
+
getTextArea.value = this.value;
|
|
20720
|
+
}
|
|
20621
20721
|
if (this.valueContainer) {
|
|
20622
20722
|
this.valueContainer.value = (this.enableHtmlEncode) ? this.value : value;
|
|
20623
20723
|
}
|
|
@@ -20630,6 +20730,9 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
20630
20730
|
}
|
|
20631
20731
|
}
|
|
20632
20732
|
else {
|
|
20733
|
+
if (getTextArea && getTextArea.style.display === 'block') {
|
|
20734
|
+
getTextArea.value = '';
|
|
20735
|
+
}
|
|
20633
20736
|
if (this.editorMode === 'HTML') {
|
|
20634
20737
|
this.inputElement.innerHTML = '<p><br/></p>';
|
|
20635
20738
|
}
|
|
@@ -21108,8 +21211,8 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21108
21211
|
}
|
|
21109
21212
|
this.preventDefaultResize(e);
|
|
21110
21213
|
this.trigger('focus', { event: e, isInteracted: Object.keys(e).length === 0 ? false : true });
|
|
21111
|
-
if (!isNullOrUndefined(this.saveInterval) && this.saveInterval > 0) {
|
|
21112
|
-
this.timeInterval = setInterval(this.
|
|
21214
|
+
if (!isNullOrUndefined(this.saveInterval) && this.saveInterval > 0 && !this.autoSaveOnIdle) {
|
|
21215
|
+
this.timeInterval = setInterval(this.updateValueOnIdle.bind(this), this.saveInterval);
|
|
21113
21216
|
}
|
|
21114
21217
|
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
21115
21218
|
}
|
|
@@ -21137,11 +21240,15 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21137
21240
|
}
|
|
21138
21241
|
return value;
|
|
21139
21242
|
}
|
|
21140
|
-
|
|
21243
|
+
updateValueOnIdle() {
|
|
21141
21244
|
this.setProperties({ value: this.getUpdatedValue() }, true);
|
|
21142
21245
|
this.valueContainer.value = this.value;
|
|
21143
21246
|
this.invokeChangeEvent();
|
|
21144
21247
|
}
|
|
21248
|
+
updateIntervalValue() {
|
|
21249
|
+
clearTimeout(this.idleInterval);
|
|
21250
|
+
this.idleInterval = setTimeout(this.updateValueOnIdle.bind(this), 0);
|
|
21251
|
+
}
|
|
21145
21252
|
onDocumentClick(e) {
|
|
21146
21253
|
let target = e.target;
|
|
21147
21254
|
let rteElement = closest(target, '.' + CLS_RTE);
|
|
@@ -21192,6 +21299,19 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21192
21299
|
this.isRTE = true;
|
|
21193
21300
|
}
|
|
21194
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
|
+
}
|
|
21195
21315
|
/**
|
|
21196
21316
|
* invokeChangeEvent method
|
|
21197
21317
|
* @hidden
|
|
@@ -21290,6 +21410,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21290
21410
|
wireEvents() {
|
|
21291
21411
|
this.element.addEventListener('focusin', this.onFocusHandler, true);
|
|
21292
21412
|
this.element.addEventListener('focusout', this.onBlurHandler, true);
|
|
21413
|
+
this.on(contentChanged, this.contentChanged, this);
|
|
21293
21414
|
if (this.readonly && this.enabled) {
|
|
21294
21415
|
return;
|
|
21295
21416
|
}
|
|
@@ -21364,6 +21485,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
21364
21485
|
unWireEvents() {
|
|
21365
21486
|
this.element.removeEventListener('focusin', this.onFocusHandler, true);
|
|
21366
21487
|
this.element.removeEventListener('focusout', this.onBlurHandler, true);
|
|
21488
|
+
this.off(contentChanged, this.contentChanged);
|
|
21367
21489
|
if (this.readonly && this.enabled) {
|
|
21368
21490
|
return;
|
|
21369
21491
|
}
|
|
@@ -21434,6 +21556,9 @@ __decorate$1([
|
|
|
21434
21556
|
__decorate$1([
|
|
21435
21557
|
Property(null)
|
|
21436
21558
|
], RichTextEditor.prototype, "placeholder", void 0);
|
|
21559
|
+
__decorate$1([
|
|
21560
|
+
Property(false)
|
|
21561
|
+
], RichTextEditor.prototype, "autoSaveOnIdle", void 0);
|
|
21437
21562
|
__decorate$1([
|
|
21438
21563
|
Property(false)
|
|
21439
21564
|
], RichTextEditor.prototype, "readonly", void 0);
|
|
@@ -21632,5 +21757,5 @@ RichTextEditor = __decorate$1([
|
|
|
21632
21757
|
* Rich Text Editor component exported items
|
|
21633
21758
|
*/
|
|
21634
21759
|
|
|
21635
|
-
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, 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 };
|
|
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 };
|
|
21636
21761
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|