@syncfusion/ej2-richtexteditor 25.1.40 → 25.1.42
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 +28 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- 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 +159 -72
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +159 -73
- 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 +19 -9
- package/src/editor-manager/plugin/inserthtml.js +8 -2
- package/src/editor-manager/plugin/lists.d.ts +1 -0
- package/src/editor-manager/plugin/lists.js +97 -51
- package/src/editor-manager/plugin/nodecutter.js +2 -2
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/enter-key.js +9 -0
- package/src/rich-text-editor/actions/html-editor.js +8 -2
- package/src/rich-text-editor/actions/paste-clean-up.js +2 -2
- package/src/rich-text-editor/base/enum.d.ts +4 -4
- package/src/rich-text-editor/base/enum.js +9 -9
- package/src/rich-text-editor/base/interface.d.ts +3 -3
- package/src/rich-text-editor/base/rich-text-editor.js +7 -0
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +3 -3
- package/src/rich-text-editor/renderer/link-module.js +3 -0
- package/src/rich-text-editor/renderer/table-module.js +3 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +7 -1
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/fluent-dark.css +4 -0
- package/styles/fluent.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material.css +4 -0
- package/styles/material3-dark.css +4 -0
- package/styles/material3.css +4 -0
- package/styles/rich-text-editor/_layout.scss +4 -0
- package/styles/rich-text-editor/bootstrap-dark.css +4 -0
- package/styles/rich-text-editor/bootstrap.css +4 -0
- package/styles/rich-text-editor/bootstrap4.css +4 -0
- package/styles/rich-text-editor/bootstrap5-dark.css +4 -0
- package/styles/rich-text-editor/bootstrap5.css +4 -0
- package/styles/rich-text-editor/fabric-dark.css +4 -0
- package/styles/rich-text-editor/fabric.css +4 -0
- package/styles/rich-text-editor/fluent-dark.css +4 -0
- package/styles/rich-text-editor/fluent.css +4 -0
- package/styles/rich-text-editor/highcontrast-light.css +4 -0
- package/styles/rich-text-editor/highcontrast.css +4 -0
- package/styles/rich-text-editor/material-dark.css +4 -0
- package/styles/rich-text-editor/material.css +4 -0
- package/styles/rich-text-editor/material3-dark.css +4 -0
- package/styles/rich-text-editor/material3.css +4 -0
- package/styles/rich-text-editor/tailwind-dark.css +4 -0
- package/styles/rich-text-editor/tailwind.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind.css +4 -0
|
@@ -1644,15 +1644,15 @@ var DialogType;
|
|
|
1644
1644
|
/**
|
|
1645
1645
|
* Defines types to be used as inserted image.
|
|
1646
1646
|
*/
|
|
1647
|
-
var
|
|
1648
|
-
(function (
|
|
1649
|
-
/** Defines
|
|
1650
|
-
|
|
1651
|
-
/** Defines
|
|
1652
|
-
|
|
1653
|
-
/** Defines
|
|
1654
|
-
|
|
1655
|
-
})(
|
|
1647
|
+
var ImageInputSource;
|
|
1648
|
+
(function (ImageInputSource) {
|
|
1649
|
+
/** Defines ImageInputSource as Uploaded */
|
|
1650
|
+
ImageInputSource["Uploaded"] = "Uploaded";
|
|
1651
|
+
/** Defines ImageInputSource as Dropped */
|
|
1652
|
+
ImageInputSource["Dropped"] = "Dropped";
|
|
1653
|
+
/** Defines ImageInputSource as Pasted */
|
|
1654
|
+
ImageInputSource["Pasted"] = "Pasted";
|
|
1655
|
+
})(ImageInputSource || (ImageInputSource = {}));
|
|
1656
1656
|
|
|
1657
1657
|
/* eslint-disable */
|
|
1658
1658
|
/**
|
|
@@ -5095,6 +5095,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
5095
5095
|
openDelay: 400,
|
|
5096
5096
|
opensOn: 'Hover',
|
|
5097
5097
|
beforeRender: this.tooltipBeforeRender.bind(this),
|
|
5098
|
+
beforeOpen: this.tooltipBeforeOpen.bind(this),
|
|
5098
5099
|
cssClass: this.parent.getCssClass(),
|
|
5099
5100
|
windowCollision: true,
|
|
5100
5101
|
position: 'BottomCenter'
|
|
@@ -5217,7 +5218,7 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
5217
5218
|
if ((divNode.textContent.trim() !== ''
|
|
5218
5219
|
&& args.element.childNodes[index].textContent.trim() === divNode.textContent.trim()) ||
|
|
5219
5220
|
((args.items[0].command === 'Formats' && !isNullOrUndefined(toolbarStatus.formats) && _this.parent.format.types[index].value.toLowerCase() === toolbarStatus.formats.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.format.types[index].cssClass))
|
|
5220
|
-
|| (args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && _this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.fontFamily.items[index].cssClass)))) {
|
|
5221
|
+
|| (args.items[0].subCommand === 'FontName' && args.items[0].command === 'Font' && !isNullOrUndefined(toolbarStatus.fontname) && !isNullOrUndefined(_this.parent.fontFamily.items[index]) && _this.parent.fontFamily.items[index].value.toLowerCase() === toolbarStatus.fontname.toLowerCase() && args.element.childNodes[index].classList.contains(_this.parent.fontFamily.items[index].cssClass)))) {
|
|
5221
5222
|
if (!args.element.childNodes[index].classList.contains('e-active')) {
|
|
5222
5223
|
addClass([args.element.childNodes[index]], 'e-active');
|
|
5223
5224
|
}
|
|
@@ -5603,6 +5604,11 @@ var ToolbarRenderer = /** @__PURE__ @class */ (function () {
|
|
|
5603
5604
|
colorPicker.appendTo(document.getElementById(args.target));
|
|
5604
5605
|
return colorPicker;
|
|
5605
5606
|
};
|
|
5607
|
+
ToolbarRenderer.prototype.tooltipBeforeOpen = function (args) {
|
|
5608
|
+
if (args.element) {
|
|
5609
|
+
args.element.setAttribute('data-rte-id', this.parent.getID());
|
|
5610
|
+
}
|
|
5611
|
+
};
|
|
5606
5612
|
/**
|
|
5607
5613
|
* The function is used to render Rich Text Editor toolbar
|
|
5608
5614
|
*
|
|
@@ -13446,58 +13452,36 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
13446
13452
|
var listsNodes = this.domNode.blockNodes(true);
|
|
13447
13453
|
if (e.enterAction === 'BR') {
|
|
13448
13454
|
this.setSelectionBRConfig();
|
|
13449
|
-
var
|
|
13450
|
-
|
|
13451
|
-
|
|
13452
|
-
|
|
13453
|
-
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13455
|
+
var selectedNodes = this.parent.domNode.blockNodes();
|
|
13456
|
+
if (selectedNodes.length > 1) {
|
|
13457
|
+
var i = 0;
|
|
13458
|
+
var currentAlignmentNode = selectedNodes[0];
|
|
13459
|
+
while (!isNullOrUndefined(currentAlignmentNode)) {
|
|
13460
|
+
if (currentAlignmentNode.nodeName === 'BR') {
|
|
13461
|
+
var nextNode = currentAlignmentNode.nextSibling;
|
|
13462
|
+
detach(currentAlignmentNode);
|
|
13463
|
+
currentAlignmentNode = nextNode;
|
|
13464
|
+
}
|
|
13465
|
+
if (!isNullOrUndefined(currentAlignmentNode)) {
|
|
13466
|
+
selectedNodes[i] = currentAlignmentNode.nodeName === 'LI' || this.parent.domNode.isBlockNode(currentAlignmentNode) ?
|
|
13467
|
+
currentAlignmentNode : this.gatherElementsAround(currentAlignmentNode);
|
|
13468
|
+
var currentSelectNode = selectedNodes[i].nodeName === 'LI' ? selectedNodes[i].parentElement : selectedNodes[i];
|
|
13469
|
+
var currentElementCheckNode = currentAlignmentNode.nodeName === '#text' ? currentAlignmentNode.parentElement : currentAlignmentNode;
|
|
13470
|
+
currentAlignmentNode = !isNullOrUndefined(currentElementCheckNode.querySelector('.e-editor-select-end')) ||
|
|
13471
|
+
!isNullOrUndefined(closest(currentAlignmentNode, '.e-editor-select-end')) ?
|
|
13472
|
+
null : currentSelectNode.nextSibling;
|
|
13473
|
+
if (currentAlignmentNode === null && !isNullOrUndefined(currentSelectNode.nextSibling) && currentSelectNode.nextSibling.nodeName === 'BR') {
|
|
13474
|
+
detach(currentSelectNode.nextSibling);
|
|
13475
|
+
}
|
|
13476
|
+
}
|
|
13477
|
+
i++;
|
|
13464
13478
|
}
|
|
13465
13479
|
}
|
|
13466
|
-
|
|
13467
|
-
if (!this.parent.domNode.isBlockNode(
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
previousNode = currentNode;
|
|
13472
|
-
currentNode = currentNode.parentElement;
|
|
13473
|
-
}
|
|
13474
|
-
var tempElem = void 0;
|
|
13475
|
-
if (this.parent.domNode.isBlockNode(previousNode.parentElement) &&
|
|
13476
|
-
previousNode.parentElement === this.parent.editableElement) {
|
|
13477
|
-
tempElem = createElement('p');
|
|
13478
|
-
previousNode.parentElement.insertBefore(tempElem, previousNode);
|
|
13479
|
-
tempElem.appendChild(previousNode);
|
|
13480
|
-
}
|
|
13481
|
-
else {
|
|
13482
|
-
tempElem = previousNode;
|
|
13483
|
-
}
|
|
13484
|
-
var preNode = tempElem.previousSibling;
|
|
13485
|
-
while (!isNullOrUndefined(preNode) && preNode.nodeName !== 'BR' &&
|
|
13486
|
-
!this.parent.domNode.isBlockNode(preNode)) {
|
|
13487
|
-
tempElem.firstChild.parentElement.insertBefore(preNode, tempElem.firstChild);
|
|
13488
|
-
preNode = tempElem.previousSibling;
|
|
13489
|
-
}
|
|
13490
|
-
if (!isNullOrUndefined(preNode) && preNode.nodeName === 'BR') {
|
|
13491
|
-
detach(preNode);
|
|
13492
|
-
}
|
|
13493
|
-
var postNode = tempElem.nextSibling;
|
|
13494
|
-
while (!isNullOrUndefined(postNode) && postNode.nodeName !== 'BR' &&
|
|
13495
|
-
!this.parent.domNode.isBlockNode(postNode)) {
|
|
13496
|
-
tempElem.appendChild(postNode);
|
|
13497
|
-
postNode = tempElem.nextSibling;
|
|
13498
|
-
}
|
|
13499
|
-
if (!isNullOrUndefined(postNode) && postNode.nodeName === 'BR') {
|
|
13500
|
-
detach(postNode);
|
|
13480
|
+
else {
|
|
13481
|
+
if (!this.parent.domNode.isBlockNode(selectedNodes[0])) {
|
|
13482
|
+
selectedNodes[0] = this.gatherElementsAround(selectedNodes[0]);
|
|
13483
|
+
if (!isNullOrUndefined(selectedNodes[0].nextSibling) && (selectedNodes[0].nextSibling.nodeName === 'BR')) {
|
|
13484
|
+
detach(selectedNodes[0].nextSibling);
|
|
13501
13485
|
}
|
|
13502
13486
|
}
|
|
13503
13487
|
}
|
|
@@ -13599,6 +13583,16 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
13599
13583
|
}
|
|
13600
13584
|
}
|
|
13601
13585
|
this.cleanNode();
|
|
13586
|
+
if (e.enterAction === 'BR') {
|
|
13587
|
+
var spansToRemove = document.querySelectorAll('span#removeSpan');
|
|
13588
|
+
spansToRemove.forEach(function (span) {
|
|
13589
|
+
var fragment = document.createDocumentFragment();
|
|
13590
|
+
while (span.firstChild) {
|
|
13591
|
+
fragment.appendChild(span.firstChild);
|
|
13592
|
+
}
|
|
13593
|
+
span.parentNode.replaceChild(fragment, span);
|
|
13594
|
+
});
|
|
13595
|
+
}
|
|
13602
13596
|
this.parent.editableElement.focus();
|
|
13603
13597
|
if (isIDevice$1()) {
|
|
13604
13598
|
setEditFrameFocus(this.parent.editableElement, selector);
|
|
@@ -13796,6 +13790,12 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
13796
13790
|
if (e.enterAction !== 'BR') {
|
|
13797
13791
|
this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapper));
|
|
13798
13792
|
}
|
|
13793
|
+
else {
|
|
13794
|
+
var wrapperSpan = '<span class=e-rte-wrap-inner id=removeSpan></span>';
|
|
13795
|
+
var br = document.createElement('br');
|
|
13796
|
+
this.domNode.wrapInner(element, this.domNode.parseHTMLFragment(wrapperSpan));
|
|
13797
|
+
element.appendChild(br);
|
|
13798
|
+
}
|
|
13799
13799
|
}
|
|
13800
13800
|
else if (this.domNode.contents(element)[0].nodeType === 3) {
|
|
13801
13801
|
var replace = this.domNode.createTagString(DEFAULT_TAG, parentNode, this.parent.domNode.encode(this.domNode.contents(element)[0].textContent));
|
|
@@ -13808,8 +13808,18 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
13808
13808
|
}
|
|
13809
13809
|
else {
|
|
13810
13810
|
var childNode = element.firstChild;
|
|
13811
|
+
if (childNode) {
|
|
13812
|
+
var attributes_1 = element.parentElement.attributes;
|
|
13813
|
+
if (attributes_1.length > 0) {
|
|
13814
|
+
for (var d = 0; d < attributes_1.length; d++) {
|
|
13815
|
+
var e_1 = attributes_1[d];
|
|
13816
|
+
var existingValue = childNode.getAttribute(e_1.nodeName);
|
|
13817
|
+
var parentValue = (element.parentElement).getAttribute(e_1.nodeName);
|
|
13818
|
+
childNode.setAttribute(e_1.nodeName, existingValue ? parentValue + ' ' + existingValue : parentValue);
|
|
13819
|
+
}
|
|
13820
|
+
}
|
|
13821
|
+
}
|
|
13811
13822
|
className = childNode.getAttribute('class');
|
|
13812
|
-
attributes(childNode, this.domNode.rawAttributes(parentNode));
|
|
13813
13823
|
if (className && childNode.getAttribute('class')) {
|
|
13814
13824
|
attributes(childNode, { 'class': className + ' ' + childNode.getAttribute('class') });
|
|
13815
13825
|
}
|
|
@@ -13850,6 +13860,48 @@ var Lists = /** @__PURE__ @class */ (function () {
|
|
|
13850
13860
|
Lists.prototype.closeTag = function (type) {
|
|
13851
13861
|
return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-' + type.toLowerCase() + '"></span>');
|
|
13852
13862
|
};
|
|
13863
|
+
Lists.prototype.gatherElementsAround = function (node) {
|
|
13864
|
+
var pWrap = document.createElement('p');
|
|
13865
|
+
// Insert the new div before the current node
|
|
13866
|
+
var currentNode = node.previousSibling;
|
|
13867
|
+
var classNode = node.parentNode;
|
|
13868
|
+
if (classNode.className === 'e-editor-select-start') {
|
|
13869
|
+
node.parentNode.parentNode.insertBefore(pWrap, node.parentNode);
|
|
13870
|
+
}
|
|
13871
|
+
else if (node.parentNode) {
|
|
13872
|
+
node.parentNode.insertBefore(pWrap, node);
|
|
13873
|
+
}
|
|
13874
|
+
// Gather text and inline elements before the currentNode
|
|
13875
|
+
var i = 0;
|
|
13876
|
+
while (currentNode !== null && currentNode.nodeName !== 'BR' &&
|
|
13877
|
+
!this.parent.domNode.isBlockNode(currentNode)) {
|
|
13878
|
+
var prevSibling = currentNode.previousSibling;
|
|
13879
|
+
if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
|
|
13880
|
+
if (i === 0) {
|
|
13881
|
+
pWrap.appendChild(currentNode);
|
|
13882
|
+
}
|
|
13883
|
+
else {
|
|
13884
|
+
pWrap.insertBefore(currentNode, pWrap.firstChild);
|
|
13885
|
+
}
|
|
13886
|
+
}
|
|
13887
|
+
currentNode = prevSibling;
|
|
13888
|
+
i++;
|
|
13889
|
+
}
|
|
13890
|
+
// Add the current node to the new p
|
|
13891
|
+
pWrap.appendChild(node);
|
|
13892
|
+
// Gather text and inline elements after the currentNode
|
|
13893
|
+
currentNode = pWrap.nextSibling ? pWrap.nextSibling : pWrap.parentElement.nextSibling;
|
|
13894
|
+
while (currentNode !== null && currentNode.nodeName !== 'BR' &&
|
|
13895
|
+
!this.parent.domNode.isBlockNode(currentNode)) {
|
|
13896
|
+
var nextSibling = currentNode.nextSibling ?
|
|
13897
|
+
currentNode.nextSibling : currentNode.parentElement.nextSibling;
|
|
13898
|
+
if (currentNode.nodeType === 3 || currentNode.nodeType === 1) {
|
|
13899
|
+
pWrap.appendChild(currentNode);
|
|
13900
|
+
}
|
|
13901
|
+
currentNode = nextSibling;
|
|
13902
|
+
}
|
|
13903
|
+
return pWrap;
|
|
13904
|
+
};
|
|
13853
13905
|
return Lists;
|
|
13854
13906
|
}());
|
|
13855
13907
|
|
|
@@ -13978,7 +14030,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
13978
14030
|
fragment = this.spliceEmptyNode(fragment, false);
|
|
13979
14031
|
if (fragment && fragment.childNodes.length > 0) {
|
|
13980
14032
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG' && !(fragment.querySelectorAll('img').length > 0)
|
|
13981
|
-
&& this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
|
|
14033
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
|
|
13982
14034
|
if (!isEmpty) {
|
|
13983
14035
|
if (node) {
|
|
13984
14036
|
InsertMethods.AppendBefore(fragment, node);
|
|
@@ -13999,7 +14051,7 @@ var NodeCutter = /** @__PURE__ @class */ (function () {
|
|
|
13999
14051
|
fragment = this.spliceEmptyNode(fragment, true);
|
|
14000
14052
|
if (fragment && fragment.childNodes.length > 0) {
|
|
14001
14053
|
var isEmpty = (fragment.childNodes.length === 1 && fragment.childNodes[0].nodeName !== 'IMG'
|
|
14002
|
-
&& this.isRteElm(fragment) && fragment.textContent === '') ? true : false;
|
|
14054
|
+
&& this.isRteElm(fragment) && fragment.textContent.trim() === '') ? true : false;
|
|
14003
14055
|
if (!isEmpty) {
|
|
14004
14056
|
if (node) {
|
|
14005
14057
|
InsertMethods.AppendBefore(fragment, node, true);
|
|
@@ -14605,7 +14657,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
14605
14657
|
range.startContainer === range.endContainer;
|
|
14606
14658
|
var isCollapsed = range.collapsed;
|
|
14607
14659
|
var nodes = this.getNodeCollection(range, nodeSelection, node);
|
|
14608
|
-
var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? this.closestEle(nodes[0].parentNode, editNode) : nodes[0];
|
|
14660
|
+
var closestParentNode = (node.nodeName.toLowerCase() === 'table') ? (!isNullOrUndefined(nodes[0]) ? this.closestEle(nodes[0].parentNode, editNode) : range.startContainer) : nodes[0];
|
|
14609
14661
|
if (closestParentNode && closestParentNode.nodeName === 'LI' && node.nodeName.toLowerCase() === 'table') {
|
|
14610
14662
|
this.insertTableInList(range, node, closestParentNode, nodes[0], nodeCutter);
|
|
14611
14663
|
return;
|
|
@@ -14650,7 +14702,7 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
14650
14702
|
nodes[index].parentNode.removeChild(nodes[index]);
|
|
14651
14703
|
}
|
|
14652
14704
|
}
|
|
14653
|
-
if (sibNode) {
|
|
14705
|
+
if (!isNullOrUndefined(sibNode) && !isNullOrUndefined(sibNode.parentNode)) {
|
|
14654
14706
|
InsertMethods.AppendBefore(node, sibNode, true);
|
|
14655
14707
|
}
|
|
14656
14708
|
else {
|
|
@@ -14901,6 +14953,12 @@ var InsertHtml = /** @__PURE__ @class */ (function () {
|
|
|
14901
14953
|
node.parentNode.replaceChild(fragment, node);
|
|
14902
14954
|
}
|
|
14903
14955
|
}
|
|
14956
|
+
if (lastSelectionNode.nodeName === 'TABLE') {
|
|
14957
|
+
var pTag = createElement('p');
|
|
14958
|
+
pTag.appendChild(createElement('br'));
|
|
14959
|
+
lastSelectionNode.parentElement.insertBefore(pTag, lastSelectionNode.nextSibling);
|
|
14960
|
+
lastSelectionNode = pTag;
|
|
14961
|
+
}
|
|
14904
14962
|
if (lastSelectionNode.nodeName === '#text') {
|
|
14905
14963
|
this.placeCursorEnd(lastSelectionNode, node, nodeSelection, docElement, editNode);
|
|
14906
14964
|
}
|
|
@@ -21359,7 +21417,7 @@ var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
|
21359
21417
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21360
21418
|
};
|
|
21361
21419
|
})();
|
|
21362
|
-
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .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;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .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;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .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; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .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; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }\n .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }\n .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }\n .e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .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; }\n li ol, li ul { margin-block-start: 10px;}\n </style>\n </head>";
|
|
21420
|
+
var IFRAMEHEADER = "\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-audio {border: 0;cursor: pointer;display:\n block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;\n margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .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;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-rte-img-caption.e-imgcenter {display: contents; margin-left: auto; margin-right: auto;}\n .e-rte-img-caption.e-imgright {display: contents; margin-left: auto; margin-right: 0;}\n .e-rte-img-caption.e-imgleft {display: contents;margin-left: 0;margin-right: auto;}\n .e-img-caption.e-rte-img-caption.e-imgbreak {display: contents;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .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;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark, span.e-rte-videoboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .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; }\n .e-mob-rte span.e-rte-imageboxmark, .e-mob-rte span.e-rte-videoboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .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; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-rte-img-caption.e-imgleft .e-img-inner { float: left; text-align: left; }\n .e-rte-img-caption.e-imgright .e-img-inner { float: right; text-align: right; }\n .e-rte-img-caption.e-imgleft .e-img-wrap, .e-rte-img-caption.e-imgright .e-img-wrap { display: contents; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-rte-img-caption .e-rte-image.e-imgright { margin-left: auto; margin-right: 0; }\n .e-rte-img-caption .e-rte-image.e-imgleft { margin: 0; }\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n table{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .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; }\n li ol, li ul { margin-block-start: 10px;}\n </style>\n </head>";
|
|
21363
21421
|
/**
|
|
21364
21422
|
* Content module is used to render Rich Text Editor content
|
|
21365
21423
|
*
|
|
@@ -21808,8 +21866,14 @@ var HtmlEditor = /** @__PURE__ @class */ (function () {
|
|
|
21808
21866
|
range.insertNode(tempSpan);
|
|
21809
21867
|
}
|
|
21810
21868
|
var currentChild = this.parent.inputElement.firstChild;
|
|
21811
|
-
while (!isNullOrUndefined(currentChild)
|
|
21812
|
-
currentChild.
|
|
21869
|
+
while (!isNullOrUndefined(currentChild)) {
|
|
21870
|
+
if (currentChild.nodeName === '#text') {
|
|
21871
|
+
currentChild = currentChild.nextElementSibling;
|
|
21872
|
+
continue;
|
|
21873
|
+
}
|
|
21874
|
+
if (currentChild.textContent.replace(regEx, '').trim().length > 0) {
|
|
21875
|
+
currentChild.innerHTML = currentChild.innerHTML.replace(regEx, '');
|
|
21876
|
+
}
|
|
21813
21877
|
currentChild = currentChild.nextElementSibling;
|
|
21814
21878
|
}
|
|
21815
21879
|
var tempSpanToRemove = this.parent.inputElement.querySelector('.tempSpan');
|
|
@@ -22959,7 +23023,7 @@ var PasteCleanup = /** @__PURE__ @class */ (function () {
|
|
|
22959
23023
|
var _this = this;
|
|
22960
23024
|
this.parent.inputElement.contentEditable = 'true';
|
|
22961
23025
|
e.element = imgElem;
|
|
22962
|
-
e.
|
|
23026
|
+
e.detectImageSource = ImageInputSource.Pasted;
|
|
22963
23027
|
this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
22964
23028
|
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
22965
23029
|
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
@@ -25237,7 +25301,7 @@ var EmojiPicker = /** @__PURE__ @class */ (function () {
|
|
|
25237
25301
|
var popupHeight = 330;
|
|
25238
25302
|
var popupTop = cursorTop;
|
|
25239
25303
|
var popupLeft = cursorLeft + rect.width;
|
|
25240
|
-
if (rteEle.getBoundingClientRect().top < 0) {
|
|
25304
|
+
if (rteEle.getBoundingClientRect().top < 0 && !this.parent.inlineMode.enable) {
|
|
25241
25305
|
popupTop = popupTop + rteContent.getBoundingClientRect().top - toolbarHeight;
|
|
25242
25306
|
}
|
|
25243
25307
|
if (rect.top < popupHeight) {
|
|
@@ -25908,7 +25972,10 @@ var Link = /** @__PURE__ @class */ (function () {
|
|
|
25908
25972
|
this.selection.restore();
|
|
25909
25973
|
}
|
|
25910
25974
|
else {
|
|
25975
|
+
var x = window.scrollX;
|
|
25976
|
+
var y = window.scrollY;
|
|
25911
25977
|
this.selfLink.parent.contentModule.getEditPanel().focus();
|
|
25978
|
+
window.scrollTo(x, y);
|
|
25912
25979
|
}
|
|
25913
25980
|
};
|
|
25914
25981
|
Link.prototype.onDocumentClick = function (e) {
|
|
@@ -27744,7 +27811,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
27744
27811
|
}
|
|
27745
27812
|
},
|
|
27746
27813
|
success: function (e) {
|
|
27747
|
-
e.
|
|
27814
|
+
e.detectImageSource = ImageInputSource.Uploaded;
|
|
27748
27815
|
_this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
27749
27816
|
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
27750
27817
|
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
@@ -28189,7 +28256,7 @@ var Image$1 = /** @__PURE__ @class */ (function () {
|
|
|
28189
28256
|
imageElement.style.opacity = '1';
|
|
28190
28257
|
imageElement.classList.add(CLS_IMG_FOCUS);
|
|
28191
28258
|
e.element = imageElement;
|
|
28192
|
-
e.
|
|
28259
|
+
e.detectImageSource = ImageInputSource.Dropped;
|
|
28193
28260
|
this.parent.trigger(imageUploadSuccess, e, function (e) {
|
|
28194
28261
|
if (!isNullOrUndefined(_this.parent.insertImageSettings.path)) {
|
|
28195
28262
|
var url = _this.parent.insertImageSettings.path + e.file.name;
|
|
@@ -31475,8 +31542,11 @@ var Table = /** @__PURE__ @class */ (function () {
|
|
|
31475
31542
|
if (proxy.editdlgObj) {
|
|
31476
31543
|
proxy.editdlgObj.hide();
|
|
31477
31544
|
}
|
|
31545
|
+
var x = window.scrollX;
|
|
31546
|
+
var y = window.scrollY;
|
|
31478
31547
|
proxy.parent.formatter.process(proxy.parent, selectionObj.args, selectionObj.args.originalEvent, value);
|
|
31479
31548
|
proxy.contentModule.getEditPanel().focus();
|
|
31549
|
+
window.scrollTo(x, y);
|
|
31480
31550
|
proxy.parent.on(mouseDown, proxy.cellSelect, proxy);
|
|
31481
31551
|
};
|
|
31482
31552
|
Table.prototype.cellSelect = function (e) {
|
|
@@ -33860,6 +33930,7 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
33860
33930
|
else {
|
|
33861
33931
|
currentParent = _this.startNode;
|
|
33862
33932
|
}
|
|
33933
|
+
var currentParentStyle = window.getComputedStyle(currentParent);
|
|
33863
33934
|
_this.removeBRElement(currentParent);
|
|
33864
33935
|
var currentParentLastChild = currentParent.lastChild;
|
|
33865
33936
|
while (!isNullOrUndefined(currentParentLastChild) && !(currentParentLastChild.nodeName === '#text' || currentParentLastChild.nodeName === 'BR'
|
|
@@ -33923,6 +33994,14 @@ var EnterKeyAction = /** @__PURE__ @class */ (function () {
|
|
|
33923
33994
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33924
33995
|
|
|
33925
33996
|
}
|
|
33997
|
+
else if (currentParent !== _this.parent.inputElement &&
|
|
33998
|
+
(currentParentStyle.display === 'inline' || currentParentStyle.display === 'inline-block')) {
|
|
33999
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
34000
|
+
newElem = _this.parent.formatter.editorManager.nodeCutter.SplitNode(_this.range, currentParent, true).cloneNode(true);
|
|
34001
|
+
currentParent.parentElement.insertBefore(outerBRElem, currentParent);
|
|
34002
|
+
_this.parent.formatter.editorManager.nodeSelection.setCursorPoint(_this.parent.contentModule.getDocument(), currentParent, 0);
|
|
34003
|
+
_this.insertFocusContent();
|
|
34004
|
+
}
|
|
33926
34005
|
else {
|
|
33927
34006
|
_this.insertBRElement();
|
|
33928
34007
|
}
|
|
@@ -35086,6 +35165,13 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
35086
35165
|
clearInterval(this.timeInterval);
|
|
35087
35166
|
this.timeInterval = null;
|
|
35088
35167
|
}
|
|
35168
|
+
var tooltipElements = document.querySelectorAll('[data-rte-id="' + this.getID() + '"]');
|
|
35169
|
+
for (var i = 0; i < tooltipElements.length; i++) {
|
|
35170
|
+
var tooltipEle = tooltipElements[i];
|
|
35171
|
+
if (this.getID() === tooltipEle.getAttribute('data-rte-id')) {
|
|
35172
|
+
detach(tooltipEle);
|
|
35173
|
+
}
|
|
35174
|
+
}
|
|
35089
35175
|
if (this.element.offsetParent === null) {
|
|
35090
35176
|
if (!isNullOrUndefined(this.toolbarModule)) {
|
|
35091
35177
|
this.toolbarModule.destroy();
|
|
@@ -36943,5 +37029,5 @@ var RichTextEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
36943
37029
|
* Rich Text Editor component exported items
|
|
36944
37030
|
*/
|
|
36945
37031
|
|
|
36946
|
-
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType,
|
|
37032
|
+
export { Toolbar$2 as Toolbar, KeyboardEvents$1 as KeyboardEvents, BaseToolbar, BaseQuickToolbar, QuickToolbar, Count, ColorPickerInput, MarkdownToolbarStatus, ExecCommandCallBack, ToolbarAction, MarkdownEditor, HtmlEditor, PasteCleanup, Resize, DropDownButtons, FileManager$1 as FileManager, FullScreen, setAttributes, HtmlToolbarStatus, XhtmlValidation, FormatPainter, EmojiPicker, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image$1 as Image, Audio, Video, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, ImageInputSource, executeGroup, created, destroyed, tableclass, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, tableModulekeyUp, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, audioToolbarAction, videoToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertAudio, insertVideo, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, audioDelete, videoDelete, imageCaption, imageSize, videoSize, 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, moduleDestroy, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, fileSelected, fileUploading, fileUploadSuccess, fileUploadFailed, fileRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeFileUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, showAudioDialog, showVideoDialog, closeImageDialog, closeAudioDialog, closeVideoDialog, showTableDialog, closeTableDialog, bindCssClass, formatPainterClick, formatPainterDoubleClick, emojiPicker, destroyTooltip, hidePopup, cleanupResizeElements, afterKeyDown, updateValueOnIdle, documentClickClosedBy, showColorPicker, closeTooltip, blockEmptyNodes, inlineEmptyNodes, supportedUnits, conversionFactors, onHandleFontsizeChange, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_TEXT_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_TEXT_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_AUDIOBREAK, CLS_CLICKELEM, CLS_VID_CLICK_ELEM, CLS_AUDIOWRAP, CLS_VIDEOWRAP, CLS_VIDEOBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_AUDIOINLINE, CLS_VIDEOINLINE, 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_LIST_PRIMARY_CONTENT, CLS_NUMBERFORMATLIST_TB_BTN, CLS_BULLETFORMATLIST_TB_BTN, CLS_FORMATS_TB_BTN, CLS_FONT_NAME_TB_BTN, CLS_FONT_SIZE_TB_BTN, CLS_ALIGN_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_AUD_FOCUS, CLS_VID_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, CLS_RTE_FIXED_TB_EXPAND, CLS_RTE_TB_ENABLED, CLS_RTE_RES_WEST, CLS_RTE_SOURCE_CODE_TXTAREA, getIndex, hasClass, getDropDownValue, isIDevice, getFormattedFontSize, pageYOffset, getTooltipText, setToolbarStatus, getCollection, getTBarItemsIndex, updateUndoRedoStatus, dispatchEvent, parseHtml, getTextNodesUnder, toObjectLowerCase, getEditValue, updateTextNode, getDefaultValue, isEditableValueEmpty, decode, sanitizeHelper, convertToBlob, getLocaleFontFormat, updateDropDownFontFormatLocale, ServiceLocator, RendererFactory, EditorManager, IMAGE, AUDIO, VIDEO, TABLE, LINK, INSERT_ROW, INSERT_COLUMN, DELETEROW, DELETECOLUMN, REMOVETABLE, TABLEHEADER, TABLE_VERTICAL_ALIGN, TABLE_MERGE, TABLE_VERTICAL_SPLIT, TABLE_HORIZONTAL_SPLIT, TABLE_MOVE, ALIGNMENT_TYPE, INDENT_TYPE, DEFAULT_TAG, BLOCK_TAGS, IGNORE_BLOCK_TAGS, TABLE_BLOCK_TAGS, SELECTION_TYPE, INSERTHTML_TYPE, INSERT_TEXT_TYPE, CLEAR_TYPE, SELF_CLOSING_TAGS, PASTE_SOURCE, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_VIDEO_RIGHT, CLASS_VIDEO_LEFT, CLASS_VIDEO_CENTER, CLASS_IMAGE_BREAK, CLASS_AUDIO_BREAK, CLASS_VIDEO_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, CLASS_AUDIO_INLINE, CLASS_CLICK_ELEM, CLASS_VIDEO_CLICK_ELEM, CLASS_AUDIO, CLASS_VIDEO, CLASS_AUDIO_WRAP, CLASS_VIDEO_WRAP, CLASS_EMBED_VIDEO_WRAP, CLASS_AUDIO_FOCUS, CLASS_VIDEO_FOCUS, CLASS_VIDEO_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, AudioCommand, VideoCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, FormatPainterActions, EmojiPickerAction, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, imageResizeFactor, 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, ON_BEGIN, SPACE_ACTION, FORMAT_PAINTER_ACTIONS, EMOJI_PICKER_ACTIONS, MOUSE_DOWN };
|
|
36947
37033
|
//# sourceMappingURL=ej2-richtexteditor.es5.js.map
|