@syncfusion/ej2-richtexteditor 27.1.51 → 27.1.55
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/dist/ej2-richtexteditor.min.js +10 -0
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +874 -238
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +267 -120
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/common/editor-styles.d.ts +1 -0
- package/src/common/editor-styles.js +1 -0
- package/src/common/interface.d.ts +10 -0
- package/src/editor-manager/base/editor-manager.js +1 -1
- package/src/editor-manager/base/interface.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.js +1 -1
- package/src/editor-manager/plugin/image.js +2 -0
- package/src/editor-manager/plugin/indents.js +1 -1
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +49 -18
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.js +5 -4
- package/src/editor-manager/plugin/ms-word-clean-up.js +5 -0
- package/src/editor-manager/plugin/selection-commands.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +1 -1
- package/src/editor-manager/plugin/undo.js +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.js +0 -6
- package/src/rich-text-editor/actions/enter-key.js +11 -5
- package/src/rich-text-editor/actions/html-editor.js +2 -2
- package/src/rich-text-editor/actions/import-export.js +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -1
- package/src/rich-text-editor/actions/resize.d.ts +3 -0
- package/src/rich-text-editor/actions/resize.js +13 -0
- package/src/rich-text-editor/base/interface.d.ts +13 -1
- package/src/rich-text-editor/base/rich-text-editor.js +19 -4
- package/src/rich-text-editor/renderer/content-renderer.d.ts +1 -1
- package/src/rich-text-editor/renderer/content-renderer.js +9 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +21 -8
- package/src/rich-text-editor/renderer/image-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/image-module.js +26 -13
- package/src/rich-text-editor/renderer/link-module.js +6 -2
- package/src/rich-text-editor/renderer/slash-menu.js +1 -1
- package/src/rich-text-editor/renderer/video-module.js +1 -1
- package/src/selection/selection.d.ts +5 -0
- package/src/selection/selection.js +44 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Base, Property, Event, NotifyPropertyChanges, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes, getComponent, getEnumValue, Complex, Component, print, L10n, compile, Touch } from '@syncfusion/ej2-base';
|
|
1
|
+
import { isNullOrUndefined, Browser, addClass, removeClass, selectAll as selectAll$1, createElement, detach, SanitizeHtmlHelper, extend, EventHandler, closest, getInstance, formatUnit, select, Ajax, Base, Property, Event as Event$1, NotifyPropertyChanges, ChildProperty, KeyboardEvents as KeyboardEvents$1, setStyleAttribute, getUniqueID, append, debounce, Observer, prepend, attributes, getComponent, getEnumValue, Complex, Component, print, L10n, compile, Touch } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Toolbar as Toolbar$1 } from '@syncfusion/ej2-navigations';
|
|
3
3
|
import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
|
|
4
4
|
import { Tooltip, Popup, Dialog, isCollide, getScrollableParent } from '@syncfusion/ej2-popups';
|
|
@@ -3720,9 +3720,15 @@ class ContentRender {
|
|
|
3720
3720
|
id: this.parent.getID() + '_rte-edit-view',
|
|
3721
3721
|
attrs: {
|
|
3722
3722
|
'contenteditable': 'true'
|
|
3723
|
-
}
|
|
3724
|
-
innerHTML: rteContent
|
|
3723
|
+
}
|
|
3725
3724
|
});
|
|
3725
|
+
if (!isNullOrUndefined(this.parent.fontFamily.default)) {
|
|
3726
|
+
this.editableElement.style.fontFamily = this.parent.fontFamily.default;
|
|
3727
|
+
}
|
|
3728
|
+
if (!isNullOrUndefined(this.parent.fontSize.default)) {
|
|
3729
|
+
this.editableElement.style.fontSize = this.parent.fontSize.default;
|
|
3730
|
+
}
|
|
3731
|
+
this.editableElement.innerHTML = rteContent;
|
|
3726
3732
|
div.appendChild(this.editableElement);
|
|
3727
3733
|
this.setPanel(div);
|
|
3728
3734
|
rteObj.rootContainer.appendChild(div);
|
|
@@ -4245,9 +4251,10 @@ const PASTE_SOURCE = ['word', 'excel', 'onenote'];
|
|
|
4245
4251
|
* `Selection` module is used to handle RTE Selections.
|
|
4246
4252
|
*/
|
|
4247
4253
|
class NodeSelection {
|
|
4248
|
-
constructor() {
|
|
4254
|
+
constructor(editElement) {
|
|
4249
4255
|
this.startNodeName = [];
|
|
4250
4256
|
this.endNodeName = [];
|
|
4257
|
+
this.editableElement = editElement;
|
|
4251
4258
|
}
|
|
4252
4259
|
saveInstance(range, body) {
|
|
4253
4260
|
this.range = range.cloneRange();
|
|
@@ -4327,6 +4334,9 @@ class NodeSelection {
|
|
|
4327
4334
|
return false;
|
|
4328
4335
|
}
|
|
4329
4336
|
getNode(startNode, endNode, nodeCollection) {
|
|
4337
|
+
if (this.editableElement && (!this.editableElement.contains(startNode) || this.editableElement === startNode)) {
|
|
4338
|
+
return null;
|
|
4339
|
+
}
|
|
4330
4340
|
if (endNode === startNode &&
|
|
4331
4341
|
(startNode.nodeType === 3 || !startNode.firstChild || nodeCollection.indexOf(startNode.firstChild) !== -1
|
|
4332
4342
|
|| this.isChildNode(nodeCollection, startNode))) {
|
|
@@ -4361,6 +4371,12 @@ class NodeSelection {
|
|
|
4361
4371
|
|| range.startContainer;
|
|
4362
4372
|
const endNode = range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset]
|
|
4363
4373
|
|| range.endContainer;
|
|
4374
|
+
const tableCursor = this.processedTableImageCursor(range);
|
|
4375
|
+
if (tableCursor.start || tableCursor.end) {
|
|
4376
|
+
if (tableCursor.startName === 'TABLE' || tableCursor.endName === 'TABLE') {
|
|
4377
|
+
return [];
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4364
4380
|
if ((startNode === endNode || (startNode.nodeName === 'BR' && startNode === range.endContainer.childNodes[range.endOffset])) &&
|
|
4365
4381
|
startNode.childNodes.length === 0) {
|
|
4366
4382
|
return [startNode];
|
|
@@ -4680,6 +4696,39 @@ class NodeSelection {
|
|
|
4680
4696
|
selection.removeAllRanges();
|
|
4681
4697
|
selection.addRange(range);
|
|
4682
4698
|
}
|
|
4699
|
+
isTableOrImageStart(range) {
|
|
4700
|
+
const customHandlerElements = ['TABLE'];
|
|
4701
|
+
const startContainer = range.startContainer;
|
|
4702
|
+
const startOffset = range.startOffset;
|
|
4703
|
+
const isCursorAtStart = range.collapsed && (startContainer.nodeType === 1) &&
|
|
4704
|
+
startContainer.isContentEditable && startContainer.childNodes[startOffset] &&
|
|
4705
|
+
(customHandlerElements.indexOf(startContainer.childNodes[startOffset].nodeName) > -1);
|
|
4706
|
+
if (isCursorAtStart) {
|
|
4707
|
+
return { start: isCursorAtStart, startNodeName: startContainer.childNodes[startOffset].nodeName };
|
|
4708
|
+
}
|
|
4709
|
+
else {
|
|
4710
|
+
return { start: false, startNodeName: '' };
|
|
4711
|
+
}
|
|
4712
|
+
}
|
|
4713
|
+
isTableOrImageEnd(range) {
|
|
4714
|
+
const customHandlerElements = ['TABLE'];
|
|
4715
|
+
const startContainer = range.startContainer;
|
|
4716
|
+
const startOffset = range.startOffset;
|
|
4717
|
+
const isCursorAtEnd = range.collapsed && (startContainer.nodeType === 1) &&
|
|
4718
|
+
startContainer.isContentEditable && startContainer.childNodes[startOffset - 1] &&
|
|
4719
|
+
(customHandlerElements.indexOf(startContainer.childNodes[startOffset - 1].nodeName) > -1);
|
|
4720
|
+
if (isCursorAtEnd) {
|
|
4721
|
+
return { end: isCursorAtEnd, endNodeName: startContainer.childNodes[startOffset - 1].nodeName };
|
|
4722
|
+
}
|
|
4723
|
+
else {
|
|
4724
|
+
return { end: false, endNodeName: '' };
|
|
4725
|
+
}
|
|
4726
|
+
}
|
|
4727
|
+
processedTableImageCursor(range) {
|
|
4728
|
+
const { start, startNodeName } = this.isTableOrImageStart(range);
|
|
4729
|
+
const { end, endNodeName } = this.isTableOrImageEnd(range);
|
|
4730
|
+
return { start, startName: startNodeName, end, endName: endNodeName };
|
|
4731
|
+
}
|
|
4683
4732
|
}
|
|
4684
4733
|
|
|
4685
4734
|
/**
|
|
@@ -5032,7 +5081,7 @@ class ToolbarStatus {
|
|
|
5032
5081
|
static get(docElement, rootNode, formatNode, fontSize, fontName, documentNode) {
|
|
5033
5082
|
let formatCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
5034
5083
|
const nodeCollection = JSON.parse(JSON.stringify(statusCollection));
|
|
5035
|
-
const nodeSelection = new NodeSelection();
|
|
5084
|
+
const nodeSelection = new NodeSelection(rootNode);
|
|
5036
5085
|
const range = nodeSelection.getRange(docElement);
|
|
5037
5086
|
const nodes = documentNode ? [documentNode] : range.collapsed ? nodeSelection.getNodeCollection(range) :
|
|
5038
5087
|
nodeSelection.getSelectionNodeCollectionBr(range);
|
|
@@ -6514,7 +6563,7 @@ class Link {
|
|
|
6514
6563
|
// eslint-disable-next-line
|
|
6515
6564
|
insertlink(e) {
|
|
6516
6565
|
const linkEle = this.selfLink.dialogObj.element;
|
|
6517
|
-
let linkUrl = linkEle.querySelector('.e-rte-linkurl').value;
|
|
6566
|
+
let linkUrl = linkEle.querySelector('.e-rte-linkurl').value.trim();
|
|
6518
6567
|
let linkText = linkEle.querySelector('.e-rte-linkText').value;
|
|
6519
6568
|
let linkTitle;
|
|
6520
6569
|
if (this.selfLink.parent.editorMode === 'HTML') {
|
|
@@ -6630,11 +6679,15 @@ class Link {
|
|
|
6630
6679
|
openLink(e) {
|
|
6631
6680
|
const selectParentEle = this.getAnchorNode(e.selectParent[0]);
|
|
6632
6681
|
if (selectParentEle.classList.contains('e-rte-anchor') || selectParentEle.tagName === 'A') {
|
|
6682
|
+
const sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(selectParentEle.outerHTML);
|
|
6683
|
+
const tempEle = document.createElement('div');
|
|
6684
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
6633
6685
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
6634
|
-
url:
|
|
6686
|
+
url: tempEle.firstChild.href, text: selectParentEle.innerText,
|
|
6635
6687
|
target: selectParentEle.target === '' ? '_self' : '_blank', selectNode: e.selectNode,
|
|
6636
6688
|
subCommand: e.args.item.subCommand
|
|
6637
6689
|
});
|
|
6690
|
+
tempEle.remove();
|
|
6638
6691
|
}
|
|
6639
6692
|
}
|
|
6640
6693
|
getAnchorNode(element) {
|
|
@@ -7291,6 +7344,17 @@ class Image$1 {
|
|
|
7291
7344
|
return value;
|
|
7292
7345
|
}
|
|
7293
7346
|
}
|
|
7347
|
+
adjustDimensionsByAspectRatio(width, height, aspectRatio, isWidthPrimary) {
|
|
7348
|
+
if (isWidthPrimary) {
|
|
7349
|
+
height = Math.round(width / aspectRatio);
|
|
7350
|
+
width = Math.round(height * aspectRatio);
|
|
7351
|
+
}
|
|
7352
|
+
else {
|
|
7353
|
+
width = Math.round(height * aspectRatio);
|
|
7354
|
+
height = Math.round(width / aspectRatio);
|
|
7355
|
+
}
|
|
7356
|
+
return { width, height };
|
|
7357
|
+
}
|
|
7294
7358
|
pixToPerc(expected, parentEle) {
|
|
7295
7359
|
return expected / parseFloat(getComputedStyle(parentEle).width) * 100;
|
|
7296
7360
|
}
|
|
@@ -7331,23 +7395,21 @@ class Image$1 {
|
|
|
7331
7395
|
const diffY = (pageY - this.pageY);
|
|
7332
7396
|
const currentWidth = this.imgEle.clientWidth;
|
|
7333
7397
|
const currentHeight = this.imgEle.clientHeight;
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
height = (height < 16) ? 16 : height;
|
|
7338
|
-
if (Math.abs(diffX) > Math.abs(diffY)) {
|
|
7339
|
-
height = Math.round(width / this.aspectRatio);
|
|
7340
|
-
width = Math.round(height * this.aspectRatio);
|
|
7341
|
-
}
|
|
7342
|
-
else {
|
|
7343
|
-
width = Math.round(height * this.aspectRatio);
|
|
7344
|
-
height = Math.round(width / this.aspectRatio);
|
|
7345
|
-
}
|
|
7398
|
+
const width = diffX * resizeFactor[0] + currentWidth;
|
|
7399
|
+
const height = diffY * resizeFactor[1] + currentHeight;
|
|
7400
|
+
const dimensions = this.adjustDimensions(width, height, diffX, diffY, this.aspectRatio);
|
|
7346
7401
|
this.pageX = pageX;
|
|
7347
7402
|
this.pageY = pageY;
|
|
7348
|
-
this.imgDupMouseMove(width + 'px', height + 'px', e);
|
|
7403
|
+
this.imgDupMouseMove(dimensions.width + 'px', dimensions.height + 'px', e);
|
|
7349
7404
|
}
|
|
7350
7405
|
}
|
|
7406
|
+
adjustDimensions(width, height, diffX, diffY, aspectRatio) {
|
|
7407
|
+
width = (width < 16) ? 16 : width;
|
|
7408
|
+
height = (height < 16) ? 16 : height;
|
|
7409
|
+
const isWidthPrimary = Math.abs(diffX) > Math.abs(diffY);
|
|
7410
|
+
const dimensions = this.adjustDimensionsByAspectRatio(width, height, aspectRatio, isWidthPrimary);
|
|
7411
|
+
return dimensions;
|
|
7412
|
+
}
|
|
7351
7413
|
getResizeFactor(value) {
|
|
7352
7414
|
return imageResizeFactor[value];
|
|
7353
7415
|
}
|
|
@@ -7420,11 +7482,15 @@ class Image$1 {
|
|
|
7420
7482
|
}
|
|
7421
7483
|
}
|
|
7422
7484
|
openImgLink(e) {
|
|
7485
|
+
const sanitizedHTML = this.parent.htmlEditorModule.sanitizeHelper(e.selectParent[0].parentNode.outerHTML);
|
|
7486
|
+
const tempEle = document.createElement('div');
|
|
7487
|
+
tempEle.innerHTML = sanitizedHTML;
|
|
7423
7488
|
const target = e.selectParent[0].parentNode.target === '' ? '_self' : '_blank';
|
|
7424
7489
|
this.parent.formatter.process(this.parent, e.args, e.args, {
|
|
7425
|
-
url:
|
|
7490
|
+
url: tempEle.firstChild.href, target: target, selectNode: e.selectNode,
|
|
7426
7491
|
subCommand: e.args.item.subCommand
|
|
7427
7492
|
});
|
|
7493
|
+
tempEle.remove();
|
|
7428
7494
|
}
|
|
7429
7495
|
editImgLink(e) {
|
|
7430
7496
|
const selectParentEle = e.selectParent[0].parentNode;
|
|
@@ -7511,7 +7577,7 @@ class Image$1 {
|
|
|
7511
7577
|
}
|
|
7512
7578
|
}
|
|
7513
7579
|
if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
|
|
7514
|
-
if (selectNodeEle && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
7580
|
+
if (selectNodeEle && selectNodeEle[0] && selectNodeEle[0].nodeName === 'IMG' && selectNodeEle.length < 1) {
|
|
7515
7581
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)) {
|
|
7516
7582
|
save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
7517
7583
|
}
|
|
@@ -10822,7 +10888,7 @@ class Video {
|
|
|
10822
10888
|
this.undoStack({ subCommand: (originalEvent.keyCode === 90 ? 'undo' : 'redo') });
|
|
10823
10889
|
}
|
|
10824
10890
|
if (originalEvent.keyCode === 8 || originalEvent.keyCode === 46) {
|
|
10825
|
-
if (selectNodeEle && (selectNodeEle[0].nodeName === 'VIDEO' || this.isEmbedVidElem(selectNodeEle[0])) && selectNodeEle.length < 1) {
|
|
10891
|
+
if (selectNodeEle && selectNodeEle[0] && (selectNodeEle[0].nodeName === 'VIDEO' || this.isEmbedVidElem(selectNodeEle[0])) && selectNodeEle.length < 1) {
|
|
10826
10892
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)) {
|
|
10827
10893
|
save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
10828
10894
|
}
|
|
@@ -11977,7 +12043,7 @@ __decorate([
|
|
|
11977
12043
|
Property('keyup')
|
|
11978
12044
|
], KeyboardEvents.prototype, "eventName", void 0);
|
|
11979
12045
|
__decorate([
|
|
11980
|
-
Event()
|
|
12046
|
+
Event$1()
|
|
11981
12047
|
], KeyboardEvents.prototype, "keyAction", void 0);
|
|
11982
12048
|
KeyboardEvents = KeyboardEvents_1 = __decorate([
|
|
11983
12049
|
NotifyPropertyChanges
|
|
@@ -14524,128 +14590,624 @@ class DialogRenderer {
|
|
|
14524
14590
|
}
|
|
14525
14591
|
}
|
|
14526
14592
|
|
|
14593
|
+
const IFRAME_EDITOR_STYLES = `
|
|
14594
|
+
@charset "UTF-8";
|
|
14595
|
+
|
|
14596
|
+
html {
|
|
14597
|
+
height: auto;
|
|
14598
|
+
}
|
|
14599
|
+
|
|
14600
|
+
html, body {
|
|
14601
|
+
margin: 0;
|
|
14602
|
+
}
|
|
14603
|
+
|
|
14604
|
+
body {
|
|
14605
|
+
color: #333;
|
|
14606
|
+
word-wrap: break-word;
|
|
14607
|
+
}
|
|
14608
|
+
|
|
14609
|
+
.e-content {
|
|
14610
|
+
background: unset;
|
|
14611
|
+
box-sizing: border-box;
|
|
14612
|
+
min-height: 100px;
|
|
14613
|
+
outline: 0 solid transparent;
|
|
14614
|
+
padding: 16px;
|
|
14615
|
+
position: relative;
|
|
14616
|
+
overflow-x: auto;
|
|
14617
|
+
font-weight: normal;
|
|
14618
|
+
line-height: 1.5;
|
|
14619
|
+
font-size: 14px;
|
|
14620
|
+
text-align: inherit;
|
|
14621
|
+
font-family: "Roboto", "Segoe UI", "GeezaPro", "DejaVu Serif", "sans-serif", "-apple-system", "BlinkMacSystemFont";
|
|
14622
|
+
}
|
|
14623
|
+
|
|
14624
|
+
.e-content p {
|
|
14625
|
+
margin: 0 0 10px;
|
|
14626
|
+
margin-bottom: 10px;
|
|
14627
|
+
}
|
|
14628
|
+
|
|
14629
|
+
.e-content h1 {
|
|
14630
|
+
font-size: 2.857em;
|
|
14631
|
+
font-weight: 600;
|
|
14632
|
+
line-height: 1.2;
|
|
14633
|
+
margin: 10px 0;
|
|
14634
|
+
}
|
|
14635
|
+
|
|
14636
|
+
.e-content h2 {
|
|
14637
|
+
font-size: 2.285em;
|
|
14638
|
+
font-weight: 600;
|
|
14639
|
+
line-height: 1.2;
|
|
14640
|
+
margin: 10px 0;
|
|
14641
|
+
}
|
|
14642
|
+
|
|
14643
|
+
.e-content h3 {
|
|
14644
|
+
font-size: 2em;
|
|
14645
|
+
font-weight: 600;
|
|
14646
|
+
line-height: 1.2;
|
|
14647
|
+
margin: 10px 0;
|
|
14648
|
+
}
|
|
14649
|
+
|
|
14650
|
+
.e-content h4 {
|
|
14651
|
+
font-size: 1.714em;
|
|
14652
|
+
font-weight: 600;
|
|
14653
|
+
line-height: 1.2;
|
|
14654
|
+
margin: 10px 0;
|
|
14655
|
+
}
|
|
14656
|
+
|
|
14657
|
+
.e-content h5 {
|
|
14658
|
+
font-size: 1.428em;
|
|
14659
|
+
font-weight: 600;
|
|
14660
|
+
line-height: 1.2;
|
|
14661
|
+
margin: 10px 0;
|
|
14662
|
+
}
|
|
14663
|
+
|
|
14664
|
+
.e-content h6 {
|
|
14665
|
+
font-size: 1.142em;
|
|
14666
|
+
font-weight: 600;
|
|
14667
|
+
line-height: 1.5;
|
|
14668
|
+
margin: 10px 0;
|
|
14669
|
+
}
|
|
14670
|
+
|
|
14671
|
+
.e-content blockquote {
|
|
14672
|
+
margin: 10px 0;
|
|
14673
|
+
padding-left: 12px;
|
|
14674
|
+
border-left: 2px solid #5c5c5c;
|
|
14675
|
+
}
|
|
14676
|
+
|
|
14677
|
+
.e-rtl.e-content blockquote {
|
|
14678
|
+
padding-left: 0;
|
|
14679
|
+
padding-right: 12px;
|
|
14680
|
+
}
|
|
14681
|
+
|
|
14682
|
+
.e-content pre {
|
|
14683
|
+
border: 0;
|
|
14684
|
+
border-radius: 0;
|
|
14685
|
+
color: #333;
|
|
14686
|
+
font-size: inherit;
|
|
14687
|
+
line-height: inherit;
|
|
14688
|
+
margin: 0 0 10px;
|
|
14689
|
+
overflow: visible;
|
|
14690
|
+
padding: 0;
|
|
14691
|
+
white-space: pre-wrap;
|
|
14692
|
+
word-break: inherit;
|
|
14693
|
+
word-wrap: break-word;
|
|
14694
|
+
}
|
|
14695
|
+
|
|
14696
|
+
.e-content code {
|
|
14697
|
+
background: #9d9d9d26;
|
|
14698
|
+
color: #ed484c;
|
|
14699
|
+
}
|
|
14700
|
+
|
|
14701
|
+
.e-content strong,
|
|
14702
|
+
.e-content b {
|
|
14703
|
+
font-weight: bold;
|
|
14704
|
+
}
|
|
14705
|
+
|
|
14706
|
+
.e-content a {
|
|
14707
|
+
text-decoration: none;
|
|
14708
|
+
user-select: auto;
|
|
14709
|
+
}
|
|
14710
|
+
|
|
14711
|
+
.e-content a:hover {
|
|
14712
|
+
text-decoration: underline;
|
|
14713
|
+
}
|
|
14714
|
+
|
|
14715
|
+
.e-content li {
|
|
14716
|
+
margin-bottom: 10px;
|
|
14717
|
+
}
|
|
14718
|
+
|
|
14719
|
+
.e-content li ol,
|
|
14720
|
+
.e-content li ul {
|
|
14721
|
+
margin-block-start: 10px;
|
|
14722
|
+
}
|
|
14723
|
+
|
|
14724
|
+
.e-content ul {
|
|
14725
|
+
list-style-type: disc;
|
|
14726
|
+
}
|
|
14727
|
+
|
|
14728
|
+
.e-content ul ul,
|
|
14729
|
+
.e-content ol ul {
|
|
14730
|
+
list-style-type: circle;
|
|
14731
|
+
}
|
|
14732
|
+
|
|
14733
|
+
.e-content ul ul ul,
|
|
14734
|
+
.e-content ol ul ul,
|
|
14735
|
+
.e-content ul ol ul,
|
|
14736
|
+
.e-content ol ol ul {
|
|
14737
|
+
list-style-type: square;
|
|
14738
|
+
}
|
|
14739
|
+
|
|
14740
|
+
.e-rte-image,
|
|
14741
|
+
.e-rte-video {
|
|
14742
|
+
border: 0;
|
|
14743
|
+
cursor: pointer;
|
|
14744
|
+
display: block;
|
|
14745
|
+
float: none;
|
|
14746
|
+
height: auto;
|
|
14747
|
+
margin: 5px auto;
|
|
14748
|
+
max-width: 100%;
|
|
14749
|
+
position: relative;
|
|
14750
|
+
}
|
|
14751
|
+
|
|
14752
|
+
.e-content p:last-child,
|
|
14753
|
+
.e-content pre:last-child,
|
|
14754
|
+
.e-content blockquote:last-child {
|
|
14755
|
+
margin-bottom: 0;
|
|
14756
|
+
}
|
|
14757
|
+
|
|
14758
|
+
.e-content h3 + h4,
|
|
14759
|
+
.e-content h4 + h5,
|
|
14760
|
+
.e-content h5 + h6 {
|
|
14761
|
+
margin-top: 0.6em;
|
|
14762
|
+
}
|
|
14763
|
+
|
|
14764
|
+
.e-content ul:last-child {
|
|
14765
|
+
margin-bottom: 0;
|
|
14766
|
+
}
|
|
14767
|
+
|
|
14768
|
+
.e-content table {
|
|
14769
|
+
margin-bottom: 10px;
|
|
14770
|
+
border-collapse: collapse;
|
|
14771
|
+
empty-cells: show;
|
|
14772
|
+
}
|
|
14773
|
+
|
|
14774
|
+
.e-content table.e-cell-select {
|
|
14775
|
+
position: relative;
|
|
14776
|
+
}
|
|
14777
|
+
|
|
14778
|
+
.e-content table.e-cell-select::after {
|
|
14779
|
+
content: '';
|
|
14780
|
+
position: absolute;
|
|
14781
|
+
top: 0;
|
|
14782
|
+
left: 0;
|
|
14783
|
+
right: 0;
|
|
14784
|
+
bottom: 0;
|
|
14785
|
+
border: 2px solid #4a90e2;
|
|
14786
|
+
pointer-events: none;
|
|
14787
|
+
}
|
|
14788
|
+
|
|
14789
|
+
table .e-cell-select {
|
|
14790
|
+
border: 1px double #4a90e2 !important;
|
|
14791
|
+
}
|
|
14792
|
+
|
|
14793
|
+
.e-content table.e-rte-table th {
|
|
14794
|
+
background-color: #E0E0E0;
|
|
14795
|
+
}
|
|
14796
|
+
|
|
14797
|
+
.e-rte-table td,
|
|
14798
|
+
.e-rte-table th {
|
|
14799
|
+
border: 1px solid #BDBDBD;
|
|
14800
|
+
height: 20px;
|
|
14801
|
+
min-width: 20px;
|
|
14802
|
+
padding: 2px 5px;
|
|
14803
|
+
box-sizing: border-box;
|
|
14804
|
+
}
|
|
14805
|
+
|
|
14806
|
+
.e-rte-table td.e-cell-select.e-multi-cells-select,
|
|
14807
|
+
.e-rte-table th.e-cell-select.e-multi-cells-select {
|
|
14808
|
+
position: relative;
|
|
14809
|
+
}
|
|
14810
|
+
|
|
14811
|
+
.e-rte-table td.e-cell-select.e-multi-cells-select::after,
|
|
14812
|
+
.e-rte-table th.e-cell-select.e-multi-cells-select::after {
|
|
14813
|
+
background-color: rgba(13, 110, 253, 0.08);
|
|
14814
|
+
content: "";
|
|
14815
|
+
position: absolute;
|
|
14816
|
+
top: 0;
|
|
14817
|
+
left: 0;
|
|
14818
|
+
width: 100%;
|
|
14819
|
+
height: 100%;
|
|
14820
|
+
bottom: 0;
|
|
14821
|
+
pointer-events: none;
|
|
14822
|
+
right: 0;
|
|
14823
|
+
}
|
|
14824
|
+
|
|
14825
|
+
table td.e-multi-cells-select ::selection,
|
|
14826
|
+
table th.e-multi-cells-select ::selection {
|
|
14827
|
+
background-color: transparent;
|
|
14828
|
+
}
|
|
14829
|
+
|
|
14830
|
+
td.e-multi-cells-select,
|
|
14831
|
+
th.e-multi-cells-select {
|
|
14832
|
+
user-select: none !important;
|
|
14833
|
+
}
|
|
14834
|
+
|
|
14835
|
+
.e-rte-table.e-dashed-border td,
|
|
14836
|
+
.e-rte-table.e-dashed-border th {
|
|
14837
|
+
border-style: dashed;
|
|
14838
|
+
}
|
|
14839
|
+
|
|
14840
|
+
.e-rte-table .e-alternate-border tbody tr:nth-child(2n) {
|
|
14841
|
+
background-color: #F5F5F5;
|
|
14842
|
+
}
|
|
14843
|
+
|
|
14844
|
+
.e-rte-audio {
|
|
14845
|
+
border: 0;
|
|
14846
|
+
cursor: pointer;
|
|
14847
|
+
display: block;
|
|
14848
|
+
float: none;
|
|
14849
|
+
margin: 5px auto;
|
|
14850
|
+
max-width: 100%;
|
|
14851
|
+
position: relative;
|
|
14852
|
+
}
|
|
14853
|
+
|
|
14854
|
+
.e-rte-image.e-imginline,
|
|
14855
|
+
.e-rte-audio.e-audio-inline,
|
|
14856
|
+
.e-rte-video.e-video-inline {
|
|
14857
|
+
display: inline-block;
|
|
14858
|
+
float: none;
|
|
14859
|
+
margin-left: 5px;
|
|
14860
|
+
margin-right: 5px;
|
|
14861
|
+
max-width: calc(100% - (2 * 5px));
|
|
14862
|
+
padding: 1px;
|
|
14863
|
+
vertical-align: bottom;
|
|
14864
|
+
}
|
|
14865
|
+
|
|
14866
|
+
.e-rte-image.e-imgcenter,
|
|
14867
|
+
.e-rte-video.e-video-center {
|
|
14868
|
+
cursor: pointer;
|
|
14869
|
+
display: block;
|
|
14870
|
+
float: none;
|
|
14871
|
+
margin: 5px auto;
|
|
14872
|
+
max-width: 100%;
|
|
14873
|
+
position: relative;
|
|
14874
|
+
}
|
|
14875
|
+
|
|
14876
|
+
.e-rte-image.e-imgright,
|
|
14877
|
+
.e-rte-video.e-video-right {
|
|
14878
|
+
float: right;
|
|
14879
|
+
margin: 0 auto;
|
|
14880
|
+
margin-left: 5px;
|
|
14881
|
+
text-align: right;
|
|
14882
|
+
}
|
|
14883
|
+
|
|
14884
|
+
.e-rte-image.e-imgleft,
|
|
14885
|
+
.e-rte-video.e-video-left {
|
|
14886
|
+
float: left;
|
|
14887
|
+
margin: 0 auto;
|
|
14888
|
+
margin-right: 5px;
|
|
14889
|
+
text-align: left;
|
|
14890
|
+
}
|
|
14891
|
+
|
|
14892
|
+
.e-img-caption {
|
|
14893
|
+
display: inline-block;
|
|
14894
|
+
float: none;
|
|
14895
|
+
margin: 5px auto;
|
|
14896
|
+
max-width: 100%;
|
|
14897
|
+
position: relative;
|
|
14898
|
+
}
|
|
14899
|
+
|
|
14900
|
+
.e-img-caption.e-caption-inline {
|
|
14901
|
+
display: inline-block;
|
|
14902
|
+
float: none;
|
|
14903
|
+
margin: 5px auto;
|
|
14904
|
+
margin-left: 5px;
|
|
14905
|
+
margin-right: 5px;
|
|
14906
|
+
max-width: calc(100% - (2 * 5px));
|
|
14907
|
+
position: relative;
|
|
14908
|
+
text-align: center;
|
|
14909
|
+
vertical-align: bottom;
|
|
14910
|
+
}
|
|
14911
|
+
|
|
14912
|
+
.e-rte-img-caption.e-imgcenter {
|
|
14913
|
+
display: contents;
|
|
14914
|
+
margin-left: auto;
|
|
14915
|
+
margin-right: auto;
|
|
14916
|
+
}
|
|
14917
|
+
|
|
14918
|
+
.e-rte-img-caption.e-imgright {
|
|
14919
|
+
display: contents;
|
|
14920
|
+
margin-left: auto;
|
|
14921
|
+
margin-right: 0;
|
|
14922
|
+
}
|
|
14923
|
+
|
|
14924
|
+
.e-rte-img-caption.e-imgleft {
|
|
14925
|
+
display: contents;
|
|
14926
|
+
margin-left: 0;
|
|
14927
|
+
margin-right: auto;
|
|
14928
|
+
}
|
|
14929
|
+
|
|
14930
|
+
.e-img-caption.e-rte-img-caption.e-imgbreak {
|
|
14931
|
+
display: contents;
|
|
14932
|
+
}
|
|
14933
|
+
|
|
14934
|
+
.e-img-inner {
|
|
14935
|
+
box-sizing: border-box;
|
|
14936
|
+
display: block;
|
|
14937
|
+
font-size: 16px;
|
|
14938
|
+
font-weight: initial;
|
|
14939
|
+
margin: auto;
|
|
14940
|
+
opacity: .9;
|
|
14941
|
+
text-align: center;
|
|
14942
|
+
width: 100%;
|
|
14943
|
+
}
|
|
14944
|
+
|
|
14945
|
+
.e-img-wrap {
|
|
14946
|
+
display: inline-block;
|
|
14947
|
+
margin: auto;
|
|
14948
|
+
padding: 0;
|
|
14949
|
+
text-align: center;
|
|
14950
|
+
width: 100%;
|
|
14951
|
+
}
|
|
14952
|
+
|
|
14953
|
+
.e-imgleft,
|
|
14954
|
+
.e-video-left {
|
|
14955
|
+
float: left;
|
|
14956
|
+
margin: 0 5px 0 0;
|
|
14957
|
+
text-align: left;
|
|
14958
|
+
}
|
|
14959
|
+
|
|
14960
|
+
.e-imgright,
|
|
14961
|
+
.e-video-right {
|
|
14962
|
+
float: right;
|
|
14963
|
+
margin: 0 0 0 5px;
|
|
14964
|
+
text-align: right;
|
|
14965
|
+
}
|
|
14966
|
+
|
|
14967
|
+
.e-imgcenter,
|
|
14968
|
+
.e-video-center {
|
|
14969
|
+
cursor: pointer;
|
|
14970
|
+
display: block;
|
|
14971
|
+
float: none;
|
|
14972
|
+
height: auto;
|
|
14973
|
+
margin: 5px auto;
|
|
14974
|
+
max-width: 100%;
|
|
14975
|
+
position: relative;
|
|
14976
|
+
}
|
|
14977
|
+
|
|
14978
|
+
.e-control img:not(.e-resize) {
|
|
14979
|
+
border: 2px solid transparent;
|
|
14980
|
+
z-index: 1000
|
|
14981
|
+
}
|
|
14982
|
+
|
|
14983
|
+
.e-imginline,
|
|
14984
|
+
.e-audio-inline,
|
|
14985
|
+
.e-video-inline {
|
|
14986
|
+
display: inline-block;
|
|
14987
|
+
float: none;
|
|
14988
|
+
margin-left: 5px;
|
|
14989
|
+
margin-right: 5px;
|
|
14990
|
+
max-width: calc(100% - (2 * 5px));
|
|
14991
|
+
vertical-align: bottom;
|
|
14992
|
+
}
|
|
14993
|
+
|
|
14994
|
+
.e-imgbreak,
|
|
14995
|
+
.e-audio-break,
|
|
14996
|
+
.e-video-break {
|
|
14997
|
+
border: 0;
|
|
14998
|
+
cursor: pointer;
|
|
14999
|
+
display: block;
|
|
15000
|
+
float: none;
|
|
15001
|
+
height: auto;
|
|
15002
|
+
margin: 5px auto;
|
|
15003
|
+
max-width: 100%;
|
|
15004
|
+
position: relative;
|
|
15005
|
+
}
|
|
15006
|
+
|
|
15007
|
+
.e-rte-image.e-img-focus:not(.e-resize),
|
|
15008
|
+
.e-audio-focus:not(.e-resize),
|
|
15009
|
+
.e-video-focus:not(.e-resize) {
|
|
15010
|
+
border: solid 2px #4a90e2;
|
|
15011
|
+
}
|
|
15012
|
+
|
|
15013
|
+
img.e-img-focus::selection,
|
|
15014
|
+
audio.e-audio-focus::selection,
|
|
15015
|
+
.e-video-focus::selection {
|
|
15016
|
+
background: transparent;
|
|
15017
|
+
color: transparent;
|
|
15018
|
+
}
|
|
15019
|
+
|
|
15020
|
+
span.e-rte-imageboxmark,
|
|
15021
|
+
span.e-rte-videoboxmark {
|
|
15022
|
+
width: 10px;
|
|
15023
|
+
height: 10px;
|
|
15024
|
+
position: absolute;
|
|
15025
|
+
display: block;
|
|
15026
|
+
background: #4a90e2;
|
|
15027
|
+
border: 1px solid #fff;
|
|
15028
|
+
z-index: 1000;
|
|
15029
|
+
}
|
|
15030
|
+
|
|
15031
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark,
|
|
15032
|
+
.e-mob-rte.e-mob-span span.e-rte-videoboxmark {
|
|
15033
|
+
background: #4a90e2;
|
|
15034
|
+
border: 1px solid #fff;
|
|
15035
|
+
}
|
|
15036
|
+
|
|
15037
|
+
.e-mob-rte span.e-rte-imageboxmark,
|
|
15038
|
+
.e-mob-rte span.e-rte-videoboxmark {
|
|
15039
|
+
background: #fff;
|
|
15040
|
+
border: 1px solid #4a90e2;
|
|
15041
|
+
border-radius: 15px;
|
|
15042
|
+
height: 20px;
|
|
15043
|
+
width: 20px;
|
|
15044
|
+
}
|
|
15045
|
+
|
|
15046
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark,
|
|
15047
|
+
.e-mob-rte.e-mob-span span.e-rte-videoboxmark {
|
|
15048
|
+
background: #4a90e2;
|
|
15049
|
+
border: 1px solid #fff;
|
|
15050
|
+
}
|
|
15051
|
+
|
|
15052
|
+
.e-content img.e-resize,
|
|
15053
|
+
.e-content video.e-resize {
|
|
15054
|
+
z-index: 1000;
|
|
15055
|
+
}
|
|
15056
|
+
|
|
15057
|
+
.e-img-caption .e-img-inner {
|
|
15058
|
+
outline: 0;
|
|
15059
|
+
}
|
|
15060
|
+
|
|
15061
|
+
.e-rte-img-caption.e-imgleft .e-img-inner {
|
|
15062
|
+
float: left;
|
|
15063
|
+
text-align: left;
|
|
15064
|
+
}
|
|
15065
|
+
|
|
15066
|
+
.e-rte-img-caption.e-imgright .e-img-inner {
|
|
15067
|
+
float: right;
|
|
15068
|
+
text-align: right;
|
|
15069
|
+
}
|
|
15070
|
+
|
|
15071
|
+
.e-rte-img-caption.e-imgleft .e-img-wrap,
|
|
15072
|
+
.e-rte-img-caption.e-imgright .e-img-wrap {
|
|
15073
|
+
display: contents;
|
|
15074
|
+
}
|
|
15075
|
+
|
|
15076
|
+
.e-img-caption a:focus-visible {
|
|
15077
|
+
outline: none;
|
|
15078
|
+
}
|
|
15079
|
+
|
|
15080
|
+
.e-rte-img-caption .e-rte-image.e-imgright {
|
|
15081
|
+
margin-left: auto;
|
|
15082
|
+
margin-right: 0;
|
|
15083
|
+
}
|
|
15084
|
+
|
|
15085
|
+
.e-rte-img-caption .e-rte-image.e-imgleft {
|
|
15086
|
+
margin: 0;
|
|
15087
|
+
}
|
|
15088
|
+
|
|
15089
|
+
span.e-table-box {
|
|
15090
|
+
cursor: nwse-resize;
|
|
15091
|
+
display: block;
|
|
15092
|
+
height: 10px;
|
|
15093
|
+
position: absolute;
|
|
15094
|
+
width: 10px;
|
|
15095
|
+
background-color: #ffffff;
|
|
15096
|
+
border: 1px solid #BDBDBD;
|
|
15097
|
+
}
|
|
15098
|
+
|
|
15099
|
+
span.e-table-box.e-rmob {
|
|
15100
|
+
height: 14px;
|
|
15101
|
+
width: 14px;
|
|
15102
|
+
background-color: #BDBDBD;
|
|
15103
|
+
border: 1px solid #BDBDBD;
|
|
15104
|
+
}
|
|
15105
|
+
|
|
15106
|
+
.e-row-resize,
|
|
15107
|
+
.e-column-resize {
|
|
15108
|
+
background-color: transparent;
|
|
15109
|
+
background-repeat: repeat;
|
|
15110
|
+
bottom: 0;
|
|
15111
|
+
cursor: col-resize;
|
|
15112
|
+
height: 1px;
|
|
15113
|
+
overflow: visible;
|
|
15114
|
+
position: absolute;
|
|
15115
|
+
width: 1px;
|
|
15116
|
+
}
|
|
15117
|
+
|
|
15118
|
+
.e-row-resize {
|
|
15119
|
+
cursor: row-resize;
|
|
15120
|
+
height: 1px;
|
|
15121
|
+
}
|
|
15122
|
+
|
|
15123
|
+
.e-table-rhelper {
|
|
15124
|
+
cursor: col-resize;
|
|
15125
|
+
opacity: .87;
|
|
15126
|
+
position: absolute;
|
|
15127
|
+
}
|
|
15128
|
+
|
|
15129
|
+
.e-table-rhelper.e-column-helper {
|
|
15130
|
+
width: 1px;
|
|
15131
|
+
}
|
|
15132
|
+
|
|
15133
|
+
.e-table-rhelper.e-row-helper {
|
|
15134
|
+
height: 1px;
|
|
15135
|
+
}
|
|
15136
|
+
|
|
15137
|
+
.e-reicon::before {
|
|
15138
|
+
border-bottom: 6px solid transparent;
|
|
15139
|
+
border-right: 6px solid;
|
|
15140
|
+
border-top: 6px solid transparent;
|
|
15141
|
+
content: '';
|
|
15142
|
+
display: block;
|
|
15143
|
+
height: 0;
|
|
15144
|
+
position: absolute;
|
|
15145
|
+
right: 4px;
|
|
15146
|
+
top: 4px;
|
|
15147
|
+
width: 20px;
|
|
15148
|
+
}
|
|
15149
|
+
|
|
15150
|
+
.e-reicon::after {
|
|
15151
|
+
border-bottom: 6px solid transparent;
|
|
15152
|
+
border-left: 6px solid;
|
|
15153
|
+
border-top: 6px solid transparent;
|
|
15154
|
+
content: '';
|
|
15155
|
+
display: block;
|
|
15156
|
+
height: 0;
|
|
15157
|
+
left: 4px;
|
|
15158
|
+
position: absolute;
|
|
15159
|
+
top: 4px;
|
|
15160
|
+
width: 20px;
|
|
15161
|
+
z-index: 3;
|
|
15162
|
+
}
|
|
15163
|
+
|
|
15164
|
+
.e-row-helper.e-reicon::after {
|
|
15165
|
+
top: 10px;
|
|
15166
|
+
transform: rotate(90deg);
|
|
15167
|
+
}
|
|
15168
|
+
|
|
15169
|
+
.e-row-helper.e-reicon::before {
|
|
15170
|
+
left: 4px;
|
|
15171
|
+
top: -20px;
|
|
15172
|
+
transform: rotate(90deg);
|
|
15173
|
+
}
|
|
15174
|
+
|
|
15175
|
+
|
|
15176
|
+
.e-table-rhelper {
|
|
15177
|
+
background-color: #4a90e2;
|
|
15178
|
+
}
|
|
15179
|
+
|
|
15180
|
+
.e-rtl {
|
|
15181
|
+
direction: rtl;
|
|
15182
|
+
}
|
|
15183
|
+
|
|
15184
|
+
.e-rte-placeholder::before {
|
|
15185
|
+
content: attr(placeholder);
|
|
15186
|
+
opacity: 0.54;
|
|
15187
|
+
overflow: hidden;
|
|
15188
|
+
padding-top: 16px;
|
|
15189
|
+
position: absolute;
|
|
15190
|
+
text-align: start;
|
|
15191
|
+
top: 0;
|
|
15192
|
+
z-index: 1;
|
|
15193
|
+
}
|
|
15194
|
+
|
|
15195
|
+
.e-resize-enabled,
|
|
15196
|
+
.e-count-enabled {
|
|
15197
|
+
padding-bottom: 0px;
|
|
15198
|
+
}
|
|
15199
|
+
`;
|
|
15200
|
+
|
|
14527
15201
|
const IFRAMEHEADER = `
|
|
14528
|
-
<!DOCTYPE html>
|
|
15202
|
+
<!DOCTYPE html>
|
|
14529
15203
|
<html>
|
|
14530
15204
|
<head>
|
|
14531
15205
|
<meta charset='utf-8' />
|
|
14532
|
-
<style
|
|
14533
|
-
|
|
14534
|
-
body {
|
|
14535
|
-
font-family: "Roboto", sans-serif;
|
|
14536
|
-
font-size: 14px;
|
|
14537
|
-
}
|
|
14538
|
-
html, body{height: 100%;margin: 0;}
|
|
14539
|
-
body.e-cursor{cursor:default}
|
|
14540
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
14541
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
14542
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
14543
|
-
.e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:
|
|
14544
|
-
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
14545
|
-
.e-rte-audio {border: 0;cursor: pointer;display:
|
|
14546
|
-
block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
|
|
14547
|
-
.e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;
|
|
14548
|
-
margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}
|
|
14549
|
-
.e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}
|
|
14550
|
-
.e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}
|
|
14551
|
-
.e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}
|
|
14552
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
14553
|
-
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
14554
|
-
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
14555
|
-
position: relativetext-align: center;vertical-align: bottom;}
|
|
14556
|
-
.e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}
|
|
14557
|
-
.e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}
|
|
14558
|
-
.e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}
|
|
14559
|
-
.e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}
|
|
14560
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
14561
|
-
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
14562
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
14563
|
-
.e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
14564
|
-
.e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
14565
|
-
.e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
14566
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
14567
|
-
.e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
14568
|
-
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
14569
|
-
.e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;
|
|
14570
|
-
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
14571
|
-
.e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
14572
|
-
img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}
|
|
14573
|
-
span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
14574
|
-
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
14575
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
14576
|
-
.e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
14577
|
-
border-radius: 15px; height: 20px; width: 20px; }
|
|
14578
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark, .e-mob-rte.e-mob-span span.e-rte-videoboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
14579
|
-
.e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }
|
|
14580
|
-
.e-rte-content { font-size: 14px; }
|
|
14581
|
-
.e-content { font-weight: normal; line-height: 1.5; font-size: 1em; }
|
|
14582
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
14583
|
-
.e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }
|
|
14584
|
-
.e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }
|
|
14585
|
-
.e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }
|
|
14586
|
-
.e-img-caption a:focus-visible { outline: none; }
|
|
14587
|
-
.e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }
|
|
14588
|
-
.e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }
|
|
14589
|
-
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
14590
|
-
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
14591
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
14592
|
-
code{ background: #9d9d9d26; color: #ed484c;}
|
|
14593
|
-
li{margin-bottom: 10px;}
|
|
14594
|
-
table{margin-bottom: 10px;}
|
|
14595
|
-
h1{ font-size: 2.857em; font-weight: 600; line-height: 1.2; margin: 10px 0; }
|
|
14596
|
-
h2{ font-size: 2.285em; font-weight: 600; line-height: 1.2; margin: 10px 0; }
|
|
14597
|
-
h3{ font-size: 2em; font-weight: 600; line-height: 1.2; margin: 10px 0; }
|
|
14598
|
-
h4{ font-size: 1.714em; font-weight: 600; line-height: 1.2; margin: 10px 0; }
|
|
14599
|
-
h5{ font-size: 1.428em; font-weight: 600; line-height: 1.2; margin: 10px 0; }
|
|
14600
|
-
h6{ font-size: 1.142em; line-height: 600; line-height: 1.5; margin: 10px 0; }
|
|
14601
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
14602
|
-
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
14603
|
-
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
14604
|
-
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
14605
|
-
strong, b{font-weight: 700;}
|
|
14606
|
-
a{text-decoration: none;user-select: auto;}
|
|
14607
|
-
a:hover{text-decoration: underline;};
|
|
14608
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
14609
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
14610
|
-
ul:last-child{margin-bottom: 0;}
|
|
14611
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
14612
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}
|
|
14613
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
14614
|
-
table th {background-color: #E0E0E0;}
|
|
14615
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
14616
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
14617
|
-
table.e-cell-select {position: relative;}
|
|
14618
|
-
table.e-cell-select::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 2px solid #4a90e2; pointer-events: none;}
|
|
14619
|
-
table td.e-cell-select.e-multi-cells-select, table th.e-cell-select.e-multi-cells-select {border: 1px solid #dee2e6; position: relative; }
|
|
14620
|
-
table td.e-cell-select.e-multi-cells-select::after, table th.e-cell-select.e-multi-cells-select::after {background-color: rgba(13, 110, 253, 0.08); content: "";
|
|
14621
|
-
position: absolute; top: 0; left: 0; width: 100%; height: 100%; bottom: 0; pointer-events: none; right: 0;}
|
|
14622
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
14623
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
14624
|
-
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
14625
|
-
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
14626
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
14627
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
14628
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
14629
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
14630
|
-
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
14631
|
-
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
14632
|
-
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
14633
|
-
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
14634
|
-
border-top: 6px solid transparent; content: ''; display: block;
|
|
14635
|
-
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
14636
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
14637
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
14638
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
14639
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
14640
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
14641
|
-
.e-rtl { direction: rtl; }
|
|
14642
|
-
.e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }
|
|
14643
|
-
li ol, li ul { margin-block-start: 10px;}
|
|
14644
|
-
.e-resize-enabled, .e-count-enabled { padding-bottom: 0px; }
|
|
14645
|
-
td.e-multi-cells-select ::selection, th.e-multi-cells-select ::selection { background-color: transparent; }
|
|
14646
|
-
td.e-multi-cells-select, th.e-multi-cells-select { user-select: none !important; }
|
|
15206
|
+
<style>` +
|
|
15207
|
+
IFRAME_EDITOR_STYLES.replace(/[\n\t]/g, '') + `
|
|
14647
15208
|
</style>
|
|
14648
|
-
</head
|
|
15209
|
+
</head>
|
|
15210
|
+
`;
|
|
14649
15211
|
/**
|
|
14650
15212
|
* Content module is used to render Rich Text Editor content
|
|
14651
15213
|
*
|
|
@@ -14662,7 +15224,7 @@ class IframeContentRender extends ContentRender {
|
|
|
14662
15224
|
renderPanel() {
|
|
14663
15225
|
const rteObj = this.parent;
|
|
14664
15226
|
const rteContent = getEditValue(rteObj.value, rteObj);
|
|
14665
|
-
const iFrameBodyContent = '<body
|
|
15227
|
+
const iFrameBodyContent = '<body contenteditable="true">' +
|
|
14666
15228
|
rteContent + '</body></html>';
|
|
14667
15229
|
let iFrameContent = IFRAMEHEADER + iFrameBodyContent;
|
|
14668
15230
|
const iframe = this.parent.createElement('iframe', {
|
|
@@ -14682,12 +15244,23 @@ class IframeContentRender extends ContentRender {
|
|
|
14682
15244
|
iframe.setAttribute('sandbox', sandboxValues.trim());
|
|
14683
15245
|
}
|
|
14684
15246
|
rteObj.rootContainer.appendChild(iframe);
|
|
14685
|
-
iframe.contentDocument.body.id = this.parent.getID() + '_rte-edit-view';
|
|
14686
15247
|
iframe.contentDocument.body.setAttribute('aria-owns', this.parent.getID());
|
|
14687
15248
|
iframe.contentDocument.open();
|
|
14688
15249
|
iFrameContent = this.setThemeColor(iFrameContent, { color: '#333' });
|
|
14689
15250
|
iframe.contentDocument.write(iFrameContent);
|
|
14690
15251
|
iframe.contentDocument.close();
|
|
15252
|
+
const body = iframe.contentDocument.body;
|
|
15253
|
+
body.className = 'e-content';
|
|
15254
|
+
if (this.parent.height === 'auto') {
|
|
15255
|
+
body.style.overflowY = 'hidden';
|
|
15256
|
+
}
|
|
15257
|
+
if (!isNullOrUndefined(this.parent.fontFamily.default)) {
|
|
15258
|
+
body.style.fontFamily = this.parent.fontFamily.default;
|
|
15259
|
+
}
|
|
15260
|
+
if (!isNullOrUndefined(this.parent.fontSize.default)) {
|
|
15261
|
+
body.style.fontSize = this.parent.fontSize.default;
|
|
15262
|
+
}
|
|
15263
|
+
body.id = this.parent.getID() + '_rte-edit-view';
|
|
14691
15264
|
if (rteObj.enableRtl) {
|
|
14692
15265
|
this.contentPanel.contentDocument.body.setAttribute('class', 'e-rtl');
|
|
14693
15266
|
}
|
|
@@ -15023,7 +15596,7 @@ class SlashMenu {
|
|
|
15023
15596
|
this.parent = options;
|
|
15024
15597
|
this.currentDocument = this.parent.element.ownerDocument;
|
|
15025
15598
|
this.L10n = serviceLocator.getService('rteLocale');
|
|
15026
|
-
this.savedSelection = new NodeSelection();
|
|
15599
|
+
this.savedSelection = new NodeSelection(this.parent.inputElement);
|
|
15027
15600
|
this.defaultItems = defaultSlashMenuDataModel;
|
|
15028
15601
|
this.injectibleItems = injectibleSlashMenuDataModel;
|
|
15029
15602
|
this.parent.on(modelChanged, this.onPropertyChanged, this);
|
|
@@ -15373,7 +15946,7 @@ class BaseToolbar {
|
|
|
15373
15946
|
const tooltipText = items[num].tooltipText;
|
|
15374
15947
|
let shortCutKey;
|
|
15375
15948
|
const isMacDev = window.navigator.platform.toLocaleLowerCase().includes('mac');
|
|
15376
|
-
if (windowKeys[`${tooltipText}`]) {
|
|
15949
|
+
if (windowKeys[`${tooltipText}`] && (!isNullOrUndefined(items[num].id) || !isNullOrUndefined(items[num].cssClass))) {
|
|
15377
15950
|
shortCutKey = isMacDev ? windowKeys[`${tooltipText}`].replace('Ctrl+', '⌘').replace('Shift+', '⇧').replace('Alt+', '⌥') : windowKeys[`${tooltipText}`];
|
|
15378
15951
|
}
|
|
15379
15952
|
else {
|
|
@@ -15545,9 +16118,6 @@ class DropDownButtons {
|
|
|
15545
16118
|
cssClass: CLS_DROPDOWN_POPUP + ' ' + CLS_DROPDOWN_ITEMS + ' ' + CLS_FONT_NAME_TB_BTN,
|
|
15546
16119
|
itemName: 'FontName', items: fontItem, element: targetElement
|
|
15547
16120
|
});
|
|
15548
|
-
if (!isNullOrUndefined(this.parent.fontFamily.default)) {
|
|
15549
|
-
this.getEditNode().style.fontFamily = this.parent.fontFamily.default;
|
|
15550
|
-
}
|
|
15551
16121
|
break;
|
|
15552
16122
|
}
|
|
15553
16123
|
case 'fontsize': {
|
|
@@ -15571,9 +16141,6 @@ class DropDownButtons {
|
|
|
15571
16141
|
cssClass: CLS_DROPDOWN_POPUP + ' ' + CLS_DROPDOWN_ITEMS + ' ' + CLS_FONT_SIZE_TB_BTN,
|
|
15572
16142
|
itemName: 'FontSize', items: fontsize, element: targetElement
|
|
15573
16143
|
});
|
|
15574
|
-
if (!isNullOrUndefined(this.parent.fontSize.default)) {
|
|
15575
|
-
this.getEditNode().style.fontSize = this.parent.fontSize.default;
|
|
15576
|
-
}
|
|
15577
16144
|
break;
|
|
15578
16145
|
}
|
|
15579
16146
|
case 'alignments':
|
|
@@ -21111,7 +21678,7 @@ class DOMNode {
|
|
|
21111
21678
|
*/
|
|
21112
21679
|
constructor(parent, currentDocument) {
|
|
21113
21680
|
this.parent = parent;
|
|
21114
|
-
this.nodeSelection = new NodeSelection();
|
|
21681
|
+
this.nodeSelection = new NodeSelection(parent);
|
|
21115
21682
|
this.currentDocument = currentDocument;
|
|
21116
21683
|
this.tableSelection = new TableSelection(parent, currentDocument);
|
|
21117
21684
|
}
|
|
@@ -22426,7 +22993,7 @@ class Lists {
|
|
|
22426
22993
|
if (e.event.which === 8) {
|
|
22427
22994
|
this.backspaceList(e);
|
|
22428
22995
|
}
|
|
22429
|
-
if ((e.event.which === 46 && e.event.action === 'delete')
|
|
22996
|
+
if ((e.event.which === 46 && e.event.action === 'delete')) {
|
|
22430
22997
|
const range = this.parent.nodeSelection.getRange(this.parent.currentDocument);
|
|
22431
22998
|
const commonAncestor = range.commonAncestorContainer;
|
|
22432
22999
|
const startEle = range.startContainer;
|
|
@@ -22488,7 +23055,7 @@ class Lists {
|
|
|
22488
23055
|
}
|
|
22489
23056
|
if (isNested) {
|
|
22490
23057
|
this.cleanNode();
|
|
22491
|
-
this.parent.editableElement.focus();
|
|
23058
|
+
this.parent.editableElement.focus({ preventScroll: true });
|
|
22492
23059
|
}
|
|
22493
23060
|
if (!(e.event.action && e.event.action === 'indent')) {
|
|
22494
23061
|
this.saveSelection = this.domNode.saveMarker(this.saveSelection);
|
|
@@ -22797,7 +23364,7 @@ class Lists {
|
|
|
22797
23364
|
span.parentNode.replaceChild(fragment, span);
|
|
22798
23365
|
});
|
|
22799
23366
|
}
|
|
22800
|
-
this.parent.editableElement.focus();
|
|
23367
|
+
this.parent.editableElement.focus({ preventScroll: true });
|
|
22801
23368
|
if (isIDevice$1()) {
|
|
22802
23369
|
setEditFrameFocus(this.parent.editableElement, selector);
|
|
22803
23370
|
}
|
|
@@ -23031,7 +23598,8 @@ class Lists {
|
|
|
23031
23598
|
parentNode.removeAttribute('style');
|
|
23032
23599
|
}
|
|
23033
23600
|
}
|
|
23034
|
-
const
|
|
23601
|
+
const wrapperTag = isNullOrUndefined(e.enterAction) ? DEFAULT_TAG : e.enterAction;
|
|
23602
|
+
const wrapper = '<' + wrapperTag + wrapperclass + this.domNode.attributes(element) + '></' + wrapperTag + '>';
|
|
23035
23603
|
if (e.enterAction !== 'BR') {
|
|
23036
23604
|
this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
|
|
23037
23605
|
}
|
|
@@ -23944,7 +24512,7 @@ class InsertHtml {
|
|
|
23944
24512
|
node = insertNode;
|
|
23945
24513
|
}
|
|
23946
24514
|
}
|
|
23947
|
-
const nodeSelection = new NodeSelection();
|
|
24515
|
+
const nodeSelection = new NodeSelection(editNode);
|
|
23948
24516
|
const nodeCutter = new NodeCutter();
|
|
23949
24517
|
let range = nodeSelection.getRange(docElement);
|
|
23950
24518
|
if (range.startContainer === editNode && range.startContainer === range.endContainer && range.startOffset === 0 &&
|
|
@@ -24167,7 +24735,9 @@ class InsertHtml {
|
|
|
24167
24735
|
fragment.appendChild(node.firstChild);
|
|
24168
24736
|
}
|
|
24169
24737
|
if (isSingleNode) {
|
|
24170
|
-
|
|
24738
|
+
range.deleteContents();
|
|
24739
|
+
this.removeEmptyElements(editNode, true);
|
|
24740
|
+
range.insertNode(fragment);
|
|
24171
24741
|
}
|
|
24172
24742
|
else {
|
|
24173
24743
|
const startContainerParent = editNode === range.startContainer ?
|
|
@@ -24179,6 +24749,7 @@ class InsertHtml {
|
|
|
24179
24749
|
range.setEnd(startContainerParent, startIndex);
|
|
24180
24750
|
if (!isNullOrUndefined(lasNode) && lasNode !== editNode) {
|
|
24181
24751
|
detach(lasNode);
|
|
24752
|
+
this.removeEmptyElements(editNode, true);
|
|
24182
24753
|
}
|
|
24183
24754
|
// eslint-disable-next-line
|
|
24184
24755
|
!isNullOrUndefined(sibNode) ? (sibNode.parentNode === editNode ? sibNode.appendChild(fragment) : sibNode.parentNode.appendChild(fragment)) : range.insertNode(fragment);
|
|
@@ -24305,6 +24876,24 @@ class InsertHtml {
|
|
|
24305
24876
|
this.cursorPos(lastSelectionNode, node, nodeSelection, docElement, editNode, enterAction);
|
|
24306
24877
|
}
|
|
24307
24878
|
this.alignCheck(editNode);
|
|
24879
|
+
const currentRange = nodeSelection.getRange(docElement);
|
|
24880
|
+
this.listCleanUp(currentRange);
|
|
24881
|
+
}
|
|
24882
|
+
static listCleanUp(range) {
|
|
24883
|
+
if (range.startContainer.parentElement.closest('ol,ul') !== null && range.endContainer.parentElement.closest('ol,ul') !== null) {
|
|
24884
|
+
const liElems = range.startContainer.parentElement.closest('ol,ul').querySelectorAll('li');
|
|
24885
|
+
if (liElems.length > 0) {
|
|
24886
|
+
liElems.forEach((item) => {
|
|
24887
|
+
if (!isNullOrUndefined(item.firstChild) && (item.firstChild.nodeName === 'OL' || item.firstChild.nodeName === 'UL')) {
|
|
24888
|
+
item.style.listStyleType = 'none';
|
|
24889
|
+
}
|
|
24890
|
+
const nestedLi = Array.from(item.children).find((child) => child.tagName === 'LI' && (child.parentElement && child.parentElement.tagName !== 'OL' && child.parentElement.tagName !== 'UL'));
|
|
24891
|
+
if (nestedLi) {
|
|
24892
|
+
item.parentNode.replaceChild(nestedLi, item);
|
|
24893
|
+
}
|
|
24894
|
+
});
|
|
24895
|
+
}
|
|
24896
|
+
}
|
|
24308
24897
|
}
|
|
24309
24898
|
static placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode) {
|
|
24310
24899
|
lastSelectionNode = lastSelectionNode.nodeName === 'BR' ? (isNullOrUndefined(lastSelectionNode.previousSibling) ? lastSelectionNode.parentNode
|
|
@@ -24369,10 +24958,10 @@ class InsertHtml {
|
|
|
24369
24958
|
blockNode = range.endContainer;
|
|
24370
24959
|
range.setEnd(blockNode, range.endContainer.textContent.length);
|
|
24371
24960
|
}
|
|
24372
|
-
if (blockNode.nodeName === 'BODY' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24961
|
+
if (blockNode && blockNode.nodeName === 'BODY' || blockNode.nodeName === 'DIV' && range.startContainer === range.endContainer && range.startContainer.nodeType === 1) {
|
|
24373
24962
|
blockNode = range.startContainer;
|
|
24374
24963
|
}
|
|
24375
|
-
if (blockNode.closest('LI') && editNode.contains(blockNode.closest('LI')) && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24964
|
+
if (blockNode && blockNode.closest('LI') && editNode.contains(blockNode.closest('LI')) && blockNode.nodeName !== 'TD' && blockNode.nodeName !== 'TH' && blockNode.nodeName !== 'TR' && node && node.firstElementChild &&
|
|
24376
24965
|
((node).firstElementChild.tagName === 'OL' || node.firstElementChild.tagName === 'UL')) {
|
|
24377
24966
|
let liNode;
|
|
24378
24967
|
while (node.firstElementChild.lastElementChild && node.firstElementChild.lastElementChild.tagName === 'LI') {
|
|
@@ -24383,18 +24972,18 @@ class InsertHtml {
|
|
|
24383
24972
|
node.firstElementChild.insertAdjacentElement('afterend', liNode);
|
|
24384
24973
|
}
|
|
24385
24974
|
}
|
|
24386
|
-
if (blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH' || blockNode.nodeName === 'TR') {
|
|
24975
|
+
if (blockNode && blockNode.nodeName === 'TD' || blockNode.nodeName === 'TH' || blockNode.nodeName === 'TR') {
|
|
24387
24976
|
const tempSpan = createElement('span', { className: 'tempSpan' });
|
|
24388
24977
|
range.insertNode(tempSpan);
|
|
24389
24978
|
tempSpan.parentNode.replaceChild(node, tempSpan);
|
|
24390
24979
|
}
|
|
24391
24980
|
else {
|
|
24392
|
-
const nodeSelection = new NodeSelection();
|
|
24981
|
+
const nodeSelection = new NodeSelection(editNode);
|
|
24393
24982
|
const currentNode = this.getNodeCollection(range, nodeSelection, node)[this.getNodeCollection(range, nodeSelection, node).length - 1];
|
|
24394
24983
|
let splitedElm;
|
|
24395
|
-
if ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR' ||
|
|
24984
|
+
if (currentNode && ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR' ||
|
|
24396
24985
|
(currentNode.nodeName === '#text' && !isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.nodeName === 'LI')) &&
|
|
24397
|
-
(!isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.textContent.trim().length === 0)) {
|
|
24986
|
+
(!isNullOrUndefined(currentNode.parentElement) && currentNode.parentElement.textContent.trim().length === 0))) {
|
|
24398
24987
|
splitedElm = currentNode;
|
|
24399
24988
|
if (currentNode.parentElement.nodeName === 'LI' && !isNullOrUndefined(currentNode.nextSibling) &&
|
|
24400
24989
|
currentNode.nextSibling.nodeName === 'BR') {
|
|
@@ -24407,16 +24996,20 @@ class InsertHtml {
|
|
|
24407
24996
|
return;
|
|
24408
24997
|
}
|
|
24409
24998
|
}
|
|
24410
|
-
else if ((currentNode.nodeName === '#text' || currentNode.nodeName === 'BR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
24999
|
+
else if (currentNode && ((currentNode.nodeName === '#text' || currentNode.nodeName === 'BR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
24411
25000
|
(currentNode.parentElement.nodeName === 'LI' || currentNode.parentElement.closest('LI') || (blockNode === editNode && currentNode.parentElement === blockNode)) &&
|
|
24412
|
-
currentNode.parentElement.textContent.trim().length > 0) {
|
|
25001
|
+
currentNode.parentElement.textContent.trim().length > 0)) {
|
|
24413
25002
|
splitedElm = currentNode;
|
|
24414
25003
|
if (currentNode.parentElement.nodeName === 'LI' && !isNullOrUndefined(currentNode.nextSibling) &&
|
|
24415
25004
|
currentNode.nextSibling.nodeName === 'BR') {
|
|
24416
25005
|
detach(currentNode.nextSibling);
|
|
24417
25006
|
}
|
|
24418
25007
|
if (!range.collapsed) {
|
|
25008
|
+
const startContainer = range.startContainer;
|
|
25009
|
+
const startOffset = range.startOffset;
|
|
24419
25010
|
this.removeListfromPaste(range);
|
|
25011
|
+
range.setStart(startContainer, startOffset);
|
|
25012
|
+
range.setEnd(startContainer, startOffset);
|
|
24420
25013
|
}
|
|
24421
25014
|
range.insertNode(node);
|
|
24422
25015
|
this.contentsDeleted = true;
|
|
@@ -24456,9 +25049,9 @@ class InsertHtml {
|
|
|
24456
25049
|
}
|
|
24457
25050
|
// eslint-disable-next-line
|
|
24458
25051
|
static getImmediateBlockNode(node, editNode) {
|
|
24459
|
-
|
|
25052
|
+
while (node && BLOCK_TAGS.indexOf(node.nodeName.toLocaleLowerCase()) < 0) {
|
|
24460
25053
|
node = node.parentNode;
|
|
24461
|
-
}
|
|
25054
|
+
}
|
|
24462
25055
|
return node;
|
|
24463
25056
|
}
|
|
24464
25057
|
static removingComments(elm) {
|
|
@@ -24466,17 +25059,19 @@ class InsertHtml {
|
|
|
24466
25059
|
innerElement = innerElement.replace(/<!--[\s\S]*?-->/g, '');
|
|
24467
25060
|
elm.innerHTML = innerElement;
|
|
24468
25061
|
}
|
|
24469
|
-
static findDetachEmptyElem(element) {
|
|
25062
|
+
static findDetachEmptyElem(element, ignoreBlockNodes = false) {
|
|
24470
25063
|
let removableElement;
|
|
24471
25064
|
if (!isNullOrUndefined(element.parentElement)) {
|
|
24472
25065
|
const hasNbsp = element.parentElement.textContent.length > 0 && element.parentElement.textContent.match(/\u00a0/g)
|
|
24473
25066
|
&& element.parentElement.textContent.match(/\u00a0/g).length > 0;
|
|
24474
25067
|
if (!hasNbsp && element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true' &&
|
|
24475
25068
|
isNullOrUndefined(element.parentElement.querySelector('img')) && element.parentElement.nodeName !== 'TD' && element.parentElement.nodeName !== 'TH') {
|
|
24476
|
-
removableElement =
|
|
25069
|
+
removableElement = ignoreBlockNodes && BLOCK_TAGS.indexOf(element.parentElement.tagName.toLowerCase()) !== -1 ?
|
|
25070
|
+
element : this.findDetachEmptyElem(element.parentElement, ignoreBlockNodes);
|
|
24477
25071
|
}
|
|
24478
25072
|
else {
|
|
24479
|
-
removableElement = element
|
|
25073
|
+
removableElement = ignoreBlockNodes && BLOCK_TAGS.indexOf(element.tagName.toLowerCase()) !== -1 ? null :
|
|
25074
|
+
element;
|
|
24480
25075
|
}
|
|
24481
25076
|
}
|
|
24482
25077
|
else {
|
|
@@ -24484,7 +25079,7 @@ class InsertHtml {
|
|
|
24484
25079
|
}
|
|
24485
25080
|
return removableElement;
|
|
24486
25081
|
}
|
|
24487
|
-
static removeEmptyElements(element) {
|
|
25082
|
+
static removeEmptyElements(element, ignoreBlockNodes = false) {
|
|
24488
25083
|
const emptyElements = element.querySelectorAll(':empty');
|
|
24489
25084
|
const nonSvgEmptyElements = Array.from(emptyElements).filter((element) => {
|
|
24490
25085
|
// Check if the element is an SVG element or an ancestor of an SVG element
|
|
@@ -24497,7 +25092,7 @@ class InsertHtml {
|
|
|
24497
25092
|
nonSvgEmptyElements[i].style.borderBottom === '' ? true : false;
|
|
24498
25093
|
}
|
|
24499
25094
|
if (SELF_CLOSING_TAGS.indexOf(nonSvgEmptyElements[i].tagName.toLowerCase()) < 0 && lineWithDiv) {
|
|
24500
|
-
const detachableElement = this.findDetachEmptyElem(nonSvgEmptyElements[i]);
|
|
25095
|
+
const detachableElement = this.findDetachEmptyElem(nonSvgEmptyElements[i], ignoreBlockNodes);
|
|
24501
25096
|
if (!isNullOrUndefined(detachableElement)) {
|
|
24502
25097
|
detach(detachableElement);
|
|
24503
25098
|
}
|
|
@@ -24570,7 +25165,7 @@ class InsertHtml {
|
|
|
24570
25165
|
const value = range.startContainer;
|
|
24571
25166
|
if (!isNullOrUndefined(value) && value.nodeName === 'LI' && !isNullOrUndefined(value.parentElement) && (value.parentElement.nodeName === 'OL' || value.parentElement.nodeName === 'UL') && value.textContent.trim() === '') {
|
|
24572
25167
|
value.parentElement.querySelectorAll('li').forEach((item) => {
|
|
24573
|
-
if (item.textContent.trim() === '') {
|
|
25168
|
+
if (item.textContent.trim() === '' && item !== value) {
|
|
24574
25169
|
item.remove();
|
|
24575
25170
|
}
|
|
24576
25171
|
});
|
|
@@ -24672,7 +25267,7 @@ class LinkCommand {
|
|
|
24672
25267
|
}
|
|
24673
25268
|
}
|
|
24674
25269
|
else {
|
|
24675
|
-
const domSelection = new NodeSelection();
|
|
25270
|
+
const domSelection = new NodeSelection(this.parent.editableElement);
|
|
24676
25271
|
let range = domSelection.getRange(this.parent.currentDocument);
|
|
24677
25272
|
if (range.endContainer.nodeName === '#text' && range.startContainer.textContent.length === (range.endOffset + 1) &&
|
|
24678
25273
|
range.endContainer.textContent.charAt(range.endOffset) === ' ' && (!isNullOrUndefined(range.endContainer.nextSibling) && range.endContainer.nextSibling.nodeName === 'A')) {
|
|
@@ -24718,7 +25313,7 @@ class LinkCommand {
|
|
|
24718
25313
|
}
|
|
24719
25314
|
}
|
|
24720
25315
|
createLinkNode(e) {
|
|
24721
|
-
const domSelection = new NodeSelection();
|
|
25316
|
+
const domSelection = new NodeSelection(this.parent.editableElement);
|
|
24722
25317
|
const nodeCutter = new NodeCutter();
|
|
24723
25318
|
const range = domSelection.getRange(this.parent.currentDocument);
|
|
24724
25319
|
const nodes = this.getSelectionNodes(domSelection.getNodeCollection(range));
|
|
@@ -25003,7 +25598,7 @@ class Alignments {
|
|
|
25003
25598
|
selector: e.selector
|
|
25004
25599
|
});
|
|
25005
25600
|
}
|
|
25006
|
-
this.parent.editableElement.focus();
|
|
25601
|
+
this.parent.editableElement.focus({ preventScroll: true });
|
|
25007
25602
|
save = this.parent.domNode.saveMarker(save);
|
|
25008
25603
|
if (isIDevice$1()) {
|
|
25009
25604
|
setEditFrameFocus(this.parent.editableElement, e.selector);
|
|
@@ -25121,7 +25716,7 @@ class Indents {
|
|
|
25121
25716
|
/* eslint-enable */
|
|
25122
25717
|
}
|
|
25123
25718
|
}
|
|
25124
|
-
editEle.focus();
|
|
25719
|
+
editEle.focus({ preventScroll: true });
|
|
25125
25720
|
if (isIDevice$1()) {
|
|
25126
25721
|
setEditFrameFocus(editEle, e.selector);
|
|
25127
25722
|
}
|
|
@@ -25289,6 +25884,8 @@ class ImageCommand {
|
|
|
25289
25884
|
(Browser.isIE ? selectedNode.previousSibling : selectedNode.previousElementSibling);
|
|
25290
25885
|
const onImageLoadEvent = () => {
|
|
25291
25886
|
if (!isNullOrUndefined(this.parent.currentDocument)) {
|
|
25887
|
+
imgElm.setAttribute('width', this.calculateStyleValue(imgElm.offsetWidth));
|
|
25888
|
+
imgElm.setAttribute('height', this.calculateStyleValue(imgElm.offsetHeight));
|
|
25292
25889
|
e.callBack({
|
|
25293
25890
|
requestType: (e.value === 'Replace') ? (e.item.subCommand = 'Replace', 'Replace') : 'Images',
|
|
25294
25891
|
editorMode: 'HTML',
|
|
@@ -27112,7 +27709,7 @@ class SelectionCommands {
|
|
|
27112
27709
|
if (format === 'backgroundcolor' && value === '') {
|
|
27113
27710
|
value = 'transparent';
|
|
27114
27711
|
}
|
|
27115
|
-
let domSelection = new NodeSelection();
|
|
27712
|
+
let domSelection = new NodeSelection(endNode);
|
|
27116
27713
|
const domNode = new DOMNode(endNode, docElement);
|
|
27117
27714
|
const nodeCutter = new NodeCutter();
|
|
27118
27715
|
const isFormatted = new IsFormatted();
|
|
@@ -27321,7 +27918,7 @@ class SelectionCommands {
|
|
|
27321
27918
|
if (cursorNodes.length === 1 && range.startOffset === 0 && (cursorNodes[0].nodeName === 'BR' || (isNullOrUndefined(cursorNodes[0].nextSibling) ? false : cursorNodes[0].nextSibling.nodeName === 'BR'))) {
|
|
27322
27919
|
detach(cursorNodes[0].nodeName === '#text' ? cursorNodes[0].nextSibling : cursorNodes[0]);
|
|
27323
27920
|
}
|
|
27324
|
-
if (!isNullOrUndefined(cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
27921
|
+
if (!isNullOrUndefined(cursorNodes[0] && cursorNodes[0].parentElement) && IsFormatted.inlineTags.
|
|
27325
27922
|
indexOf((cursorNodes[0].parentElement).tagName.toLowerCase()) !== -1 && cursorNodes[0].textContent.includes('\u200B')) {
|
|
27326
27923
|
const element = this.GetFormatNode(format, value);
|
|
27327
27924
|
const tempNode = cursorNodes[0];
|
|
@@ -28229,7 +28826,7 @@ class ClearFormat$1 {
|
|
|
28229
28826
|
static clear(docElement, endNode, enterAction, selector, command) {
|
|
28230
28827
|
this.domNode = new DOMNode(endNode, docElement);
|
|
28231
28828
|
this.defaultTag = enterAction === 'P' ? this.defaultTag : 'div';
|
|
28232
|
-
const nodeSelection = new NodeSelection();
|
|
28829
|
+
const nodeSelection = new NodeSelection(endNode);
|
|
28233
28830
|
const nodeCutter = new NodeCutter();
|
|
28234
28831
|
let range = nodeSelection.getRange(docElement);
|
|
28235
28832
|
const nodes = range.collapsed ? nodeSelection.getSelectionNodeCollection(range) :
|
|
@@ -28658,7 +29255,7 @@ class UndoRedoManager {
|
|
|
28658
29255
|
if (!this.parent.currentDocument) {
|
|
28659
29256
|
return;
|
|
28660
29257
|
}
|
|
28661
|
-
let range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
29258
|
+
let range = new NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
28662
29259
|
const currentContainer = this.parent.editableElement === range.startContainer.parentElement ?
|
|
28663
29260
|
range.startContainer.parentElement : range.startContainer;
|
|
28664
29261
|
for (let i = currentContainer.childNodes.length - 1; i >= 0; i--) {
|
|
@@ -28668,8 +29265,8 @@ class UndoRedoManager {
|
|
|
28668
29265
|
detach(currentContainer.childNodes[i]);
|
|
28669
29266
|
}
|
|
28670
29267
|
}
|
|
28671
|
-
range = new NodeSelection().getRange(this.parent.currentDocument);
|
|
28672
|
-
const save = new NodeSelection().save(range, this.parent.currentDocument);
|
|
29268
|
+
range = new NodeSelection(this.parent.editableElement).getRange(this.parent.currentDocument);
|
|
29269
|
+
const save = new NodeSelection(this.parent.editableElement).save(range, this.parent.currentDocument);
|
|
28673
29270
|
const clonedElement = this.parent.editableElement.cloneNode(true);
|
|
28674
29271
|
const fragment = document.createDocumentFragment();
|
|
28675
29272
|
while (clonedElement.firstChild) {
|
|
@@ -29492,6 +30089,11 @@ class MsWordPaste {
|
|
|
29492
30089
|
startAttr = parseInt(startString, 10);
|
|
29493
30090
|
}
|
|
29494
30091
|
}
|
|
30092
|
+
else if (listStyleType === 'decimal-leading-zero') {
|
|
30093
|
+
if (!isNaN(parseInt(startString, 10))) {
|
|
30094
|
+
startAttr = parseInt(startString, 10);
|
|
30095
|
+
}
|
|
30096
|
+
}
|
|
29495
30097
|
else if (listStyleType === 'upper-alpha') {
|
|
29496
30098
|
startAttr = (startString.split('.')[0].charCodeAt(0) - 64);
|
|
29497
30099
|
}
|
|
@@ -30641,7 +31243,7 @@ class EditorManager {
|
|
|
30641
31243
|
constructor(options) {
|
|
30642
31244
|
this.currentDocument = options.document;
|
|
30643
31245
|
this.editableElement = options.editableElement;
|
|
30644
|
-
this.nodeSelection = new NodeSelection();
|
|
31246
|
+
this.nodeSelection = new NodeSelection(this.editableElement);
|
|
30645
31247
|
this.nodeCutter = new NodeCutter();
|
|
30646
31248
|
this.domNode = new DOMNode(this.editableElement, this.currentDocument);
|
|
30647
31249
|
this.observer = new Observer(this);
|
|
@@ -31309,7 +31911,7 @@ class HtmlEditor {
|
|
|
31309
31911
|
if (this.parent.isDestroyed) {
|
|
31310
31912
|
return;
|
|
31311
31913
|
}
|
|
31312
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
31914
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
31313
31915
|
this.parent.on(initialLoad, this.instantiateRenderer, this);
|
|
31314
31916
|
this.parent.on(htmlToolbarClick, this.onToolbarClick, this);
|
|
31315
31917
|
this.parent.on(keyDown, this.onKeyDown, this);
|
|
@@ -32016,7 +32618,7 @@ class HtmlEditor {
|
|
|
32016
32618
|
urlText = urlText.slice(0, urlTextRange);
|
|
32017
32619
|
// eslint-disable-next-line
|
|
32018
32620
|
const regex = new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);
|
|
32019
|
-
if (selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
32621
|
+
if (selectNodeEle[0] && selectNodeEle[0].nodeName !== 'A' && urlText.match(regex)) {
|
|
32020
32622
|
const selection = this.nodeSelectionObj.save(range, this.parent.contentModule.getDocument());
|
|
32021
32623
|
const url = urlText.indexOf('http') > -1 ? urlText : 'http://' + urlText;
|
|
32022
32624
|
const selectParent = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range);
|
|
@@ -32375,7 +32977,7 @@ class PasteCleanup {
|
|
|
32375
32977
|
this.isDestroyed = false;
|
|
32376
32978
|
}
|
|
32377
32979
|
addEventListener() {
|
|
32378
|
-
this.nodeSelectionObj = new NodeSelection();
|
|
32980
|
+
this.nodeSelectionObj = new NodeSelection(this.parent.inputElement);
|
|
32379
32981
|
if (this.parent.isDestroyed) {
|
|
32380
32982
|
return;
|
|
32381
32983
|
}
|
|
@@ -33529,6 +34131,8 @@ class Resize {
|
|
|
33529
34131
|
this.parent = parent;
|
|
33530
34132
|
this.addEventListener();
|
|
33531
34133
|
this.isDestroyed = false;
|
|
34134
|
+
this.isResizing = false;
|
|
34135
|
+
this.iframeMouseUpBoundFn = this.iframeMouseUp.bind(this);
|
|
33532
34136
|
}
|
|
33533
34137
|
addEventListener() {
|
|
33534
34138
|
if (this.parent.isDestroyed) {
|
|
@@ -33548,12 +34152,14 @@ class Resize {
|
|
|
33548
34152
|
this.parent.rootContainer.classList.add('e-resize-enabled');
|
|
33549
34153
|
if (this.parent.iframeSettings.enable) {
|
|
33550
34154
|
this.parent.inputElement.classList.add('e-resize-enabled');
|
|
34155
|
+
this.parent.contentModule.getDocument().addEventListener('mouseup', this.iframeMouseUpBoundFn);
|
|
33551
34156
|
}
|
|
33552
34157
|
this.touchStartEvent = (Browser.info.name === 'msie') ? 'pointerdown' : 'touchstart';
|
|
33553
34158
|
EventHandler.add(this.resizer, 'mousedown', this.resizeStart, this);
|
|
33554
34159
|
EventHandler.add(this.resizer, this.touchStartEvent, this.resizeStart, this);
|
|
33555
34160
|
}
|
|
33556
34161
|
resizeStart(e) {
|
|
34162
|
+
this.isResizing = false;
|
|
33557
34163
|
if (e.cancelable) {
|
|
33558
34164
|
e.preventDefault();
|
|
33559
34165
|
}
|
|
@@ -33567,6 +34173,7 @@ class Resize {
|
|
|
33567
34173
|
});
|
|
33568
34174
|
}
|
|
33569
34175
|
performResize(e) {
|
|
34176
|
+
this.isResizing = true;
|
|
33570
34177
|
const args = { event: e, requestType: 'editor' };
|
|
33571
34178
|
this.parent.trigger(onResize, args, (resizingArgs) => {
|
|
33572
34179
|
if (resizingArgs.cancel) {
|
|
@@ -33596,6 +34203,7 @@ class Resize {
|
|
|
33596
34203
|
this.parent.refreshUI();
|
|
33597
34204
|
}
|
|
33598
34205
|
stopResize(e) {
|
|
34206
|
+
this.isResizing = false;
|
|
33599
34207
|
this.parent.refreshUI();
|
|
33600
34208
|
this.unwireResizeEvents();
|
|
33601
34209
|
const args = { event: e, requestType: 'editor' };
|
|
@@ -33645,6 +34253,7 @@ class Resize {
|
|
|
33645
34253
|
}
|
|
33646
34254
|
if (this.parent.iframeSettings.enable && !isNullOrUndefined(this.parent.inputElement)) {
|
|
33647
34255
|
this.parent.inputElement.classList.remove('e-resize-enabled');
|
|
34256
|
+
this.parent.contentModule.getDocument().removeEventListener('mouseup', this.iframeMouseUpBoundFn);
|
|
33648
34257
|
}
|
|
33649
34258
|
if (this.resizer) {
|
|
33650
34259
|
EventHandler.remove(this.resizer, 'mousedown', this.resizeStart);
|
|
@@ -33652,6 +34261,12 @@ class Resize {
|
|
|
33652
34261
|
detach(this.resizer);
|
|
33653
34262
|
}
|
|
33654
34263
|
this.parent.off(destroy, this.destroy);
|
|
34264
|
+
this.iframeMouseUpBoundFn = null;
|
|
34265
|
+
}
|
|
34266
|
+
iframeMouseUp(e) {
|
|
34267
|
+
if (this.isResizing) {
|
|
34268
|
+
this.stopResize(e);
|
|
34269
|
+
}
|
|
33655
34270
|
}
|
|
33656
34271
|
/**
|
|
33657
34272
|
* For internal use only - Get the module name.
|
|
@@ -35155,7 +35770,7 @@ class ImportExport {
|
|
|
35155
35770
|
saveUrl: this.parent.importWord.serviceUrl
|
|
35156
35771
|
},
|
|
35157
35772
|
success: (args) => {
|
|
35158
|
-
this.parent.executeCommand('
|
|
35773
|
+
this.parent.executeCommand('importWord', args.e.currentTarget.response, { undo: true });
|
|
35159
35774
|
}
|
|
35160
35775
|
});
|
|
35161
35776
|
this.parent.setProperties({ enableXhtml: true }, true);
|
|
@@ -35718,7 +36333,7 @@ __decorate$2([
|
|
|
35718
36333
|
class FileManagerSettings extends ChildProperty {
|
|
35719
36334
|
}
|
|
35720
36335
|
__decorate$2([
|
|
35721
|
-
Event()
|
|
36336
|
+
Event$1()
|
|
35722
36337
|
], FileManagerSettings.prototype, "beforeSend", void 0);
|
|
35723
36338
|
__decorate$2([
|
|
35724
36339
|
Complex({ getImageUrl: null, url: null, uploadUrl: null }, AjaxSettings)
|
|
@@ -36445,11 +37060,16 @@ class EnterKeyAction {
|
|
|
36445
37060
|
else if (!isNullOrUndefined(currentParent) && currentParent !== this.parent.inputElement && currentParent.nodeName !== 'BR') {
|
|
36446
37061
|
if (currentParent.textContent.trim().length === 0 || (currentParent.textContent.trim().length === 1 &&
|
|
36447
37062
|
currentParent.textContent.charCodeAt(0) === 8203)) {
|
|
36448
|
-
|
|
36449
|
-
|
|
36450
|
-
|
|
36451
|
-
|
|
36452
|
-
|
|
37063
|
+
if (currentParent.childElementCount > 1 && currentParent.lastElementChild.nodeName === 'IMG') {
|
|
37064
|
+
this.insertBRElement();
|
|
37065
|
+
}
|
|
37066
|
+
else {
|
|
37067
|
+
const newElem = this.parent.formatter.editorManager.nodeCutter.SplitNode(this.range, currentParent, true).cloneNode(true);
|
|
37068
|
+
this.parent.formatter.editorManager.domNode.insertAfter(newElem, currentParent);
|
|
37069
|
+
const outerBRElem = this.parent.createElement('br');
|
|
37070
|
+
newElem.parentElement.insertBefore(outerBRElem, newElem);
|
|
37071
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), newElem, 0);
|
|
37072
|
+
}
|
|
36453
37073
|
}
|
|
36454
37074
|
else {
|
|
36455
37075
|
let newElem;
|
|
@@ -36484,6 +37104,7 @@ class EnterKeyAction {
|
|
|
36484
37104
|
e.args.preventDefault();
|
|
36485
37105
|
}
|
|
36486
37106
|
this.triggerActionComplete(e, shiftKey);
|
|
37107
|
+
this.parent.inputElement.dispatchEvent(new Event('input'));
|
|
36487
37108
|
}
|
|
36488
37109
|
});
|
|
36489
37110
|
}
|
|
@@ -36991,6 +37612,17 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
36991
37612
|
* @public
|
|
36992
37613
|
*/
|
|
36993
37614
|
executeCommand(commandName, value, option) {
|
|
37615
|
+
if (commandName === 'importWord') {
|
|
37616
|
+
const importContainer = this.createElement('div');
|
|
37617
|
+
importContainer.innerHTML = value;
|
|
37618
|
+
const tableElement = importContainer.querySelectorAll('table:not(.e-rte-table):not(.e-rte-paste-table)');
|
|
37619
|
+
for (let i = 0; i < tableElement.length; i++) {
|
|
37620
|
+
tableElement[i].classList.add('e-rte-paste-table');
|
|
37621
|
+
}
|
|
37622
|
+
value = importContainer.innerHTML;
|
|
37623
|
+
importContainer.remove();
|
|
37624
|
+
commandName = 'insertHTML';
|
|
37625
|
+
}
|
|
36994
37626
|
value = this.htmlPurifier(commandName, value);
|
|
36995
37627
|
let internalValue;
|
|
36996
37628
|
if (this.editorMode === 'HTML') {
|
|
@@ -39055,7 +39687,6 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
39055
39687
|
const iframeElement = this.element.querySelector('#' + this.getID() + '_rte-view');
|
|
39056
39688
|
if (iframeElement) {
|
|
39057
39689
|
this.setAutoHeight(iframeElement);
|
|
39058
|
-
this.inputElement.style.overflow = 'hidden';
|
|
39059
39690
|
}
|
|
39060
39691
|
}
|
|
39061
39692
|
}
|
|
@@ -39080,9 +39711,14 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
39080
39711
|
}
|
|
39081
39712
|
setAutoHeight(element) {
|
|
39082
39713
|
if (!isNullOrUndefined(element)) {
|
|
39083
|
-
element.
|
|
39084
|
-
|
|
39085
|
-
|
|
39714
|
+
if (element.nodeName === 'TEXTAREA') {
|
|
39715
|
+
element.style.height = 'auto';
|
|
39716
|
+
element.style.height = (this.inputElement.scrollHeight + 16) + 'px';
|
|
39717
|
+
element.style.overflow = 'hidden';
|
|
39718
|
+
}
|
|
39719
|
+
else if (element.nodeName === 'IFRAME') {
|
|
39720
|
+
element.style.height = this.inputElement.parentElement.offsetHeight + 'px';
|
|
39721
|
+
}
|
|
39086
39722
|
}
|
|
39087
39723
|
}
|
|
39088
39724
|
wireEvents() {
|
|
@@ -39468,124 +40104,124 @@ __decorate$5([
|
|
|
39468
40104
|
Property(10000)
|
|
39469
40105
|
], RichTextEditor.prototype, "saveInterval", void 0);
|
|
39470
40106
|
__decorate$5([
|
|
39471
|
-
Event()
|
|
40107
|
+
Event$1()
|
|
39472
40108
|
], RichTextEditor.prototype, "actionBegin", void 0);
|
|
39473
40109
|
__decorate$5([
|
|
39474
|
-
Event()
|
|
40110
|
+
Event$1()
|
|
39475
40111
|
], RichTextEditor.prototype, "actionComplete", void 0);
|
|
39476
40112
|
__decorate$5([
|
|
39477
|
-
Event()
|
|
40113
|
+
Event$1()
|
|
39478
40114
|
], RichTextEditor.prototype, "beforeDialogOpen", void 0);
|
|
39479
40115
|
__decorate$5([
|
|
39480
|
-
Event()
|
|
40116
|
+
Event$1()
|
|
39481
40117
|
], RichTextEditor.prototype, "dialogOpen", void 0);
|
|
39482
40118
|
__decorate$5([
|
|
39483
|
-
Event()
|
|
40119
|
+
Event$1()
|
|
39484
40120
|
], RichTextEditor.prototype, "beforeDialogClose", void 0);
|
|
39485
40121
|
__decorate$5([
|
|
39486
|
-
Event()
|
|
40122
|
+
Event$1()
|
|
39487
40123
|
], RichTextEditor.prototype, "dialogClose", void 0);
|
|
39488
40124
|
__decorate$5([
|
|
39489
|
-
Event()
|
|
40125
|
+
Event$1()
|
|
39490
40126
|
], RichTextEditor.prototype, "beforeQuickToolbarOpen", void 0);
|
|
39491
40127
|
__decorate$5([
|
|
39492
|
-
Event()
|
|
40128
|
+
Event$1()
|
|
39493
40129
|
], RichTextEditor.prototype, "quickToolbarOpen", void 0);
|
|
39494
40130
|
__decorate$5([
|
|
39495
|
-
Event()
|
|
40131
|
+
Event$1()
|
|
39496
40132
|
], RichTextEditor.prototype, "quickToolbarClose", void 0);
|
|
39497
40133
|
__decorate$5([
|
|
39498
|
-
Event()
|
|
40134
|
+
Event$1()
|
|
39499
40135
|
], RichTextEditor.prototype, "toolbarStatusUpdate", void 0);
|
|
39500
40136
|
__decorate$5([
|
|
39501
|
-
Event()
|
|
40137
|
+
Event$1()
|
|
39502
40138
|
], RichTextEditor.prototype, "updatedToolbarStatus", void 0);
|
|
39503
40139
|
__decorate$5([
|
|
39504
|
-
Event()
|
|
40140
|
+
Event$1()
|
|
39505
40141
|
], RichTextEditor.prototype, "imageSelected", void 0);
|
|
39506
40142
|
__decorate$5([
|
|
39507
|
-
Event()
|
|
40143
|
+
Event$1()
|
|
39508
40144
|
], RichTextEditor.prototype, "beforeImageUpload", void 0);
|
|
39509
40145
|
__decorate$5([
|
|
39510
|
-
Event()
|
|
40146
|
+
Event$1()
|
|
39511
40147
|
], RichTextEditor.prototype, "imageUploading", void 0);
|
|
39512
40148
|
__decorate$5([
|
|
39513
|
-
Event()
|
|
40149
|
+
Event$1()
|
|
39514
40150
|
], RichTextEditor.prototype, "imageUploadSuccess", void 0);
|
|
39515
40151
|
__decorate$5([
|
|
39516
|
-
Event()
|
|
40152
|
+
Event$1()
|
|
39517
40153
|
], RichTextEditor.prototype, "imageUploadFailed", void 0);
|
|
39518
40154
|
__decorate$5([
|
|
39519
|
-
Event()
|
|
40155
|
+
Event$1()
|
|
39520
40156
|
], RichTextEditor.prototype, "imageRemoving", void 0);
|
|
39521
40157
|
__decorate$5([
|
|
39522
|
-
Event()
|
|
40158
|
+
Event$1()
|
|
39523
40159
|
], RichTextEditor.prototype, "afterImageDelete", void 0);
|
|
39524
40160
|
__decorate$5([
|
|
39525
|
-
Event()
|
|
40161
|
+
Event$1()
|
|
39526
40162
|
], RichTextEditor.prototype, "fileSelected", void 0);
|
|
39527
40163
|
__decorate$5([
|
|
39528
|
-
Event()
|
|
40164
|
+
Event$1()
|
|
39529
40165
|
], RichTextEditor.prototype, "beforeFileUpload", void 0);
|
|
39530
40166
|
__decorate$5([
|
|
39531
|
-
Event()
|
|
40167
|
+
Event$1()
|
|
39532
40168
|
], RichTextEditor.prototype, "fileUploading", void 0);
|
|
39533
40169
|
__decorate$5([
|
|
39534
|
-
Event()
|
|
40170
|
+
Event$1()
|
|
39535
40171
|
], RichTextEditor.prototype, "fileUploadSuccess", void 0);
|
|
39536
40172
|
__decorate$5([
|
|
39537
|
-
Event()
|
|
40173
|
+
Event$1()
|
|
39538
40174
|
], RichTextEditor.prototype, "fileUploadFailed", void 0);
|
|
39539
40175
|
__decorate$5([
|
|
39540
|
-
Event()
|
|
40176
|
+
Event$1()
|
|
39541
40177
|
], RichTextEditor.prototype, "fileRemoving", void 0);
|
|
39542
40178
|
__decorate$5([
|
|
39543
|
-
Event()
|
|
40179
|
+
Event$1()
|
|
39544
40180
|
], RichTextEditor.prototype, "afterMediaDelete", void 0);
|
|
39545
40181
|
__decorate$5([
|
|
39546
|
-
Event()
|
|
40182
|
+
Event$1()
|
|
39547
40183
|
], RichTextEditor.prototype, "created", void 0);
|
|
39548
40184
|
__decorate$5([
|
|
39549
|
-
Event()
|
|
40185
|
+
Event$1()
|
|
39550
40186
|
], RichTextEditor.prototype, "destroyed", void 0);
|
|
39551
40187
|
__decorate$5([
|
|
39552
|
-
Event()
|
|
40188
|
+
Event$1()
|
|
39553
40189
|
], RichTextEditor.prototype, "beforeSanitizeHtml", void 0);
|
|
39554
40190
|
__decorate$5([
|
|
39555
|
-
Event()
|
|
40191
|
+
Event$1()
|
|
39556
40192
|
], RichTextEditor.prototype, "blur", void 0);
|
|
39557
40193
|
__decorate$5([
|
|
39558
|
-
Event()
|
|
40194
|
+
Event$1()
|
|
39559
40195
|
], RichTextEditor.prototype, "toolbarClick", void 0);
|
|
39560
40196
|
__decorate$5([
|
|
39561
|
-
Event()
|
|
40197
|
+
Event$1()
|
|
39562
40198
|
], RichTextEditor.prototype, "focus", void 0);
|
|
39563
40199
|
__decorate$5([
|
|
39564
|
-
Event()
|
|
40200
|
+
Event$1()
|
|
39565
40201
|
], RichTextEditor.prototype, "change", void 0);
|
|
39566
40202
|
__decorate$5([
|
|
39567
|
-
Event()
|
|
40203
|
+
Event$1()
|
|
39568
40204
|
], RichTextEditor.prototype, "resizing", void 0);
|
|
39569
40205
|
__decorate$5([
|
|
39570
|
-
Event()
|
|
40206
|
+
Event$1()
|
|
39571
40207
|
], RichTextEditor.prototype, "resizeStart", void 0);
|
|
39572
40208
|
__decorate$5([
|
|
39573
|
-
Event()
|
|
40209
|
+
Event$1()
|
|
39574
40210
|
], RichTextEditor.prototype, "resizeStop", void 0);
|
|
39575
40211
|
__decorate$5([
|
|
39576
|
-
Event()
|
|
40212
|
+
Event$1()
|
|
39577
40213
|
], RichTextEditor.prototype, "beforePasteCleanup", void 0);
|
|
39578
40214
|
__decorate$5([
|
|
39579
|
-
Event()
|
|
40215
|
+
Event$1()
|
|
39580
40216
|
], RichTextEditor.prototype, "afterPasteCleanup", void 0);
|
|
39581
40217
|
__decorate$5([
|
|
39582
|
-
Event()
|
|
40218
|
+
Event$1()
|
|
39583
40219
|
], RichTextEditor.prototype, "beforeImageDrop", void 0);
|
|
39584
40220
|
__decorate$5([
|
|
39585
40221
|
Property(null)
|
|
39586
40222
|
], RichTextEditor.prototype, "formatter", void 0);
|
|
39587
40223
|
__decorate$5([
|
|
39588
|
-
Event()
|
|
40224
|
+
Event$1()
|
|
39589
40225
|
], RichTextEditor.prototype, "slashMenuItemSelect", void 0);
|
|
39590
40226
|
RichTextEditor = __decorate$5([
|
|
39591
40227
|
NotifyPropertyChanges
|