@syncfusion/ej2-richtexteditor 20.2.36 → 20.2.40
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 +34 -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 +101 -29
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +99 -26
- 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/editor-manager/plugin/lists.js +2 -0
- package/src/editor-manager/plugin/toolbar-status.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +4 -2
- package/src/rich-text-editor/base/constant.d.ts +6 -1
- package/src/rich-text-editor/base/constant.js +6 -1
- package/src/rich-text-editor/base/rich-text-editor.js +21 -6
- package/src/rich-text-editor/base/util.js +7 -3
- package/src/rich-text-editor/renderer/image-module.d.ts +9 -0
- package/src/rich-text-editor/renderer/image-module.js +32 -7
- package/src/rich-text-editor/renderer/link-module.d.ts +8 -0
- package/src/rich-text-editor/renderer/link-module.js +10 -0
- package/src/rich-text-editor/renderer/render.d.ts +6 -0
- package/src/rich-text-editor/renderer/render.js +8 -0
- package/src/rich-text-editor/renderer/table-module.js +5 -3
- package/src/rich-text-editor/renderer/toolbar-renderer.js +2 -1
- package/styles/bootstrap-dark.css +49 -0
- package/styles/bootstrap.css +49 -0
- package/styles/bootstrap4.css +49 -0
- package/styles/bootstrap5-dark.css +49 -0
- package/styles/bootstrap5.css +49 -0
- package/styles/fabric-dark.css +49 -0
- package/styles/fabric.css +49 -0
- package/styles/fluent-dark.css +52 -3
- package/styles/fluent.css +49 -0
- package/styles/highcontrast-light.css +49 -0
- package/styles/highcontrast.css +49 -0
- package/styles/material-dark.css +49 -0
- package/styles/material.css +49 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap4-definition.scss +17 -16
- package/styles/rich-text-editor/_bootstrap5-definition.scss +17 -16
- package/styles/rich-text-editor/_fabric-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_fabric-definition.scss +17 -16
- package/styles/rich-text-editor/_fluent-definition.scss +17 -16
- package/styles/rich-text-editor/_fusionnew-definition.scss +17 -16
- package/styles/rich-text-editor/_highcontrast-definition.scss +17 -16
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +17 -16
- package/styles/rich-text-editor/_layout.scss +56 -0
- package/styles/rich-text-editor/_material-dark-definition.scss +17 -16
- package/styles/rich-text-editor/_material-definition.scss +17 -16
- package/styles/rich-text-editor/_material3-definition.scss +17 -16
- package/styles/rich-text-editor/_tailwind-definition.scss +17 -16
- package/styles/rich-text-editor/bootstrap-dark.css +49 -0
- package/styles/rich-text-editor/bootstrap.css +49 -0
- package/styles/rich-text-editor/bootstrap4.css +49 -0
- package/styles/rich-text-editor/bootstrap5-dark.css +49 -0
- package/styles/rich-text-editor/bootstrap5.css +49 -0
- package/styles/rich-text-editor/fabric-dark.css +49 -0
- package/styles/rich-text-editor/fabric.css +49 -0
- package/styles/rich-text-editor/fluent-dark.css +52 -3
- package/styles/rich-text-editor/fluent.css +49 -0
- package/styles/rich-text-editor/highcontrast-light.css +49 -0
- package/styles/rich-text-editor/highcontrast.css +49 -0
- package/styles/rich-text-editor/material-dark.css +49 -0
- package/styles/rich-text-editor/material.css +49 -0
- package/styles/rich-text-editor/tailwind-dark.css +49 -0
- package/styles/rich-text-editor/tailwind.css +49 -0
- package/styles/tailwind-dark.css +49 -0
- package/styles/tailwind.css +49 -0
|
@@ -658,11 +658,15 @@ const bindCssClass = 'closeTableDialog';
|
|
|
658
658
|
* @hidden
|
|
659
659
|
* @deprecated
|
|
660
660
|
*/
|
|
661
|
-
const
|
|
661
|
+
const blockEmptyNodes = `address:empty, article:empty, aside:empty, blockquote:empty,
|
|
662
662
|
details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,
|
|
663
|
-
h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty,
|
|
664
|
-
noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty
|
|
665
|
-
|
|
663
|
+
h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,
|
|
664
|
+
noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty`;
|
|
665
|
+
/**
|
|
666
|
+
* @hidden
|
|
667
|
+
* @deprecated
|
|
668
|
+
*/
|
|
669
|
+
const inlineEmptyNodes = `a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,
|
|
666
670
|
canvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,
|
|
667
671
|
ins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,
|
|
668
672
|
q:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,
|
|
@@ -2596,9 +2600,13 @@ function updateTextNode(value, rteObj) {
|
|
|
2596
2600
|
let previousParent;
|
|
2597
2601
|
let insertElem;
|
|
2598
2602
|
while (tempNode.firstChild) {
|
|
2599
|
-
const
|
|
2600
|
-
for (let i = 0; i <
|
|
2601
|
-
|
|
2603
|
+
const emptyBlockElem = tempNode.querySelectorAll(blockEmptyNodes);
|
|
2604
|
+
for (let i = 0; i < emptyBlockElem.length; i++) {
|
|
2605
|
+
emptyBlockElem[i].innerHTML = '<br>';
|
|
2606
|
+
}
|
|
2607
|
+
const emptyInlineElem = tempNode.querySelectorAll(inlineEmptyNodes);
|
|
2608
|
+
for (let i = 0; i < emptyInlineElem.length; i++) {
|
|
2609
|
+
emptyInlineElem[i].innerHTML = '​';
|
|
2602
2610
|
}
|
|
2603
2611
|
if (rteObj.enterKey !== 'BR' && ((tempNode.firstChild.nodeName === '#text' &&
|
|
2604
2612
|
(tempNode.firstChild.textContent.indexOf('\n') < 0 || tempNode.firstChild.textContent.trim() !== '')) ||
|
|
@@ -3253,8 +3261,9 @@ class ToolbarRenderer {
|
|
|
3253
3261
|
proxy.parent.notify(selectionRestore, {});
|
|
3254
3262
|
proxy.currentElement.querySelector('.' + CLS_RTE_ELEMENTS).style.borderBottomColor = colorpickerValue;
|
|
3255
3263
|
const range = proxy.parent.formatter.editorManager.nodeSelection.getRange(proxy.parent.contentModule.getDocument());
|
|
3264
|
+
const closestElement = closest(range.startContainer.parentNode, 'table');
|
|
3256
3265
|
if ((range.startContainer.nodeName === 'TD' || range.startContainer.nodeName === 'TH' || range.startContainer.nodeName === 'BODY' ||
|
|
3257
|
-
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed && args.subCommand === 'BackgroundColor') {
|
|
3266
|
+
closest(range.startContainer.parentNode, 'td,th')) && range.collapsed && args.subCommand === 'BackgroundColor' && closest(closestElement, '.' + CLS_RTE)) {
|
|
3258
3267
|
proxy.parent.notify(tableColorPickerChanged, colorPickerArgs);
|
|
3259
3268
|
}
|
|
3260
3269
|
else {
|
|
@@ -10897,6 +10906,8 @@ class Lists {
|
|
|
10897
10906
|
let endNode = this.parent.domNode.getSelectedNode(range.endContainer, range.endOffset);
|
|
10898
10907
|
startNode = startNode.nodeName === 'BR' ? startNode.parentElement : startNode;
|
|
10899
10908
|
endNode = endNode.nodeName === 'BR' ? endNode.parentElement : endNode;
|
|
10909
|
+
startNode = startNode.nodeName !== 'LI' && !isNullOrUndefined(startNode.closest('LI')) ? startNode.closest('LI') : startNode;
|
|
10910
|
+
endNode = endNode.nodeName !== 'LI' && !isNullOrUndefined(endNode.closest('LI')) ? endNode.closest('LI') : endNode;
|
|
10900
10911
|
if (((range.commonAncestorContainer.nodeName === 'OL' || range.commonAncestorContainer.nodeName === 'UL' || range.commonAncestorContainer.nodeName === 'LI') &&
|
|
10901
10912
|
isNullOrUndefined(endNode.nextElementSibling) && endNode.textContent.length === range.endOffset &&
|
|
10902
10913
|
isNullOrUndefined(startNode.previousElementSibling) && range.startOffset === 0) ||
|
|
@@ -16969,7 +16980,7 @@ class ToolbarStatus {
|
|
|
16969
16980
|
if ((name !== null && name !== '' && name !== undefined)
|
|
16970
16981
|
&& (fontName === null || fontName === undefined || (fontName.filter((value, pos) => {
|
|
16971
16982
|
const pattern = new RegExp(name, 'i');
|
|
16972
|
-
if ((value.replace(/"/g, '').replace(/ /g, '') === name.replace(/"/g, '').replace(/ /g, '')) ||
|
|
16983
|
+
if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
|
|
16973
16984
|
(value.search(pattern) > -1)) {
|
|
16974
16985
|
index = pos;
|
|
16975
16986
|
}
|
|
@@ -19584,7 +19595,8 @@ class FullScreen {
|
|
|
19584
19595
|
}
|
|
19585
19596
|
this.parent.element.classList.add(CLS_FULL_SCREEN);
|
|
19586
19597
|
this.toggleParentOverflow(true);
|
|
19587
|
-
this.parent.
|
|
19598
|
+
let isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
19599
|
+
this.parent.setContentHeight(null, isExpand);
|
|
19588
19600
|
if (this.parent.toolbarModule) {
|
|
19589
19601
|
if (!this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
19590
19602
|
this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -19630,7 +19642,8 @@ class FullScreen {
|
|
|
19630
19642
|
for (let i = 0; i < elem.length; i++) {
|
|
19631
19643
|
removeClass([elem[i]], ['e-rte-overflow']);
|
|
19632
19644
|
}
|
|
19633
|
-
this.parent.
|
|
19645
|
+
let isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
19646
|
+
this.parent.setContentHeight(null, isExpand);
|
|
19634
19647
|
if (this.parent.toolbarModule) {
|
|
19635
19648
|
if (!this.parent.getBaseToolbarObject().toolbarObj.items[0].properties) {
|
|
19636
19649
|
this.parent.getBaseToolbarObject().toolbarObj.removeItems(0);
|
|
@@ -19816,6 +19829,14 @@ class Render {
|
|
|
19816
19829
|
destroy() {
|
|
19817
19830
|
this.removeEventListener();
|
|
19818
19831
|
}
|
|
19832
|
+
/**
|
|
19833
|
+
* Clears the Render Module.
|
|
19834
|
+
*
|
|
19835
|
+
* @returns {void}
|
|
19836
|
+
*/
|
|
19837
|
+
moduleDestroy() {
|
|
19838
|
+
this.parent = null;
|
|
19839
|
+
}
|
|
19819
19840
|
addEventListener() {
|
|
19820
19841
|
if (this.parent.isDestroyed) {
|
|
19821
19842
|
return;
|
|
@@ -20371,6 +20392,16 @@ class Link {
|
|
|
20371
20392
|
destroy() {
|
|
20372
20393
|
this.removeEventListener();
|
|
20373
20394
|
}
|
|
20395
|
+
/**
|
|
20396
|
+
* Clears the Link Module.
|
|
20397
|
+
*
|
|
20398
|
+
* @returns {void}
|
|
20399
|
+
* @hidden
|
|
20400
|
+
* @deprecated
|
|
20401
|
+
*/
|
|
20402
|
+
moduleDestroy() {
|
|
20403
|
+
this.parent = null;
|
|
20404
|
+
}
|
|
20374
20405
|
/**
|
|
20375
20406
|
* For internal use only - Get the module name.
|
|
20376
20407
|
*
|
|
@@ -20390,6 +20421,7 @@ class Image {
|
|
|
20390
20421
|
this.isAllowedTypes = true;
|
|
20391
20422
|
this.pageX = null;
|
|
20392
20423
|
this.pageY = null;
|
|
20424
|
+
this.mouseX = null;
|
|
20393
20425
|
this.deletedImg = [];
|
|
20394
20426
|
this.parent = parent;
|
|
20395
20427
|
this.rteID = parent.element.id;
|
|
@@ -20725,8 +20757,9 @@ class Image {
|
|
|
20725
20757
|
img.style.minWidth = this.parent.insertImageSettings.minWidth === 0 ? '20px' : formatUnit(this.parent.insertImageSettings.minWidth);
|
|
20726
20758
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20727
20759
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20728
|
-
|
|
20729
|
-
img.style.width
|
|
20760
|
+
var original = img.offsetWidth + this.mouseX;
|
|
20761
|
+
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
20762
|
+
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
20730
20763
|
}
|
|
20731
20764
|
else {
|
|
20732
20765
|
img.style.width = this.pixToPerc((width / height * expectedY), (img.previousElementSibling || img.parentElement)) + '%';
|
|
@@ -20749,13 +20782,20 @@ class Image {
|
|
|
20749
20782
|
img.style.height = expectedY + 'px';
|
|
20750
20783
|
}
|
|
20751
20784
|
else {
|
|
20752
|
-
|
|
20785
|
+
if (this.parent.iframeSettings.enable) {
|
|
20786
|
+
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
20787
|
+
}
|
|
20788
|
+
else {
|
|
20789
|
+
img.setAttribute('width', (img.offsetWidth + this.mouseX).toString());
|
|
20790
|
+
}
|
|
20753
20791
|
}
|
|
20754
20792
|
}
|
|
20755
20793
|
else if (height > width) {
|
|
20756
20794
|
if (this.parent.insertImageSettings.resizeByPercent) {
|
|
20757
20795
|
if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
|
|
20758
|
-
|
|
20796
|
+
var original = img.offsetWidth + this.mouseX;
|
|
20797
|
+
var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
|
|
20798
|
+
img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
|
|
20759
20799
|
}
|
|
20760
20800
|
else {
|
|
20761
20801
|
img.style.width = this.pixToPerc((expectedX / height * expectedY), (img.previousElementSibling || img.parentElement)) + '%';
|
|
@@ -20821,6 +20861,7 @@ class Image {
|
|
|
20821
20861
|
const mouseY = (this.resizeBtnStat.topLeft || this.resizeBtnStat.topRight) ? -(pageY - this.pageY) : (pageY - this.pageY);
|
|
20822
20862
|
const width = parseInt(this.imgDupPos.width, 10) + mouseX;
|
|
20823
20863
|
const height = parseInt(this.imgDupPos.height, 10) + mouseY;
|
|
20864
|
+
this.mouseX = mouseX;
|
|
20824
20865
|
this.pageX = pageX;
|
|
20825
20866
|
this.pageY = pageY;
|
|
20826
20867
|
if (this.resizeBtnStat.botRight) {
|
|
@@ -21346,7 +21387,8 @@ class Image {
|
|
|
21346
21387
|
buttonModel: {
|
|
21347
21388
|
content: linkUpdate, cssClass: 'e-flat e-update-link' + ' ' + this.parent.cssClass, isPrimary: true
|
|
21348
21389
|
}
|
|
21349
|
-
}]
|
|
21390
|
+
}],
|
|
21391
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
21350
21392
|
});
|
|
21351
21393
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
21352
21394
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -21393,7 +21435,8 @@ class Image {
|
|
|
21393
21435
|
buttonModel: {
|
|
21394
21436
|
content: linkUpdate, cssClass: 'e-flat e-update-alt' + ' ' + this.parent.cssClass, isPrimary: true
|
|
21395
21437
|
}
|
|
21396
|
-
}]
|
|
21438
|
+
}],
|
|
21439
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
21397
21440
|
});
|
|
21398
21441
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
21399
21442
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -21615,7 +21658,8 @@ class Image {
|
|
|
21615
21658
|
buttonModel: {
|
|
21616
21659
|
content: linkUpdate, cssClass: 'e-flat e-update-size' + ' ' + this.parent.cssClass, isPrimary: true
|
|
21617
21660
|
}
|
|
21618
|
-
}]
|
|
21661
|
+
}],
|
|
21662
|
+
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
21619
21663
|
});
|
|
21620
21664
|
if (!isNullOrUndefined(this.parent.cssClass)) {
|
|
21621
21665
|
this.dialogObj.setProperties({ cssClass: this.parent.cssClass });
|
|
@@ -22637,6 +22681,18 @@ class Image {
|
|
|
22637
22681
|
this.prevSelectedImgEle = undefined;
|
|
22638
22682
|
this.removeEventListener();
|
|
22639
22683
|
}
|
|
22684
|
+
/* eslint-disable */
|
|
22685
|
+
/**
|
|
22686
|
+
* Clears the ImageModule.
|
|
22687
|
+
*
|
|
22688
|
+
* @returns {void}
|
|
22689
|
+
* @hidden
|
|
22690
|
+
* @deprecated
|
|
22691
|
+
*/
|
|
22692
|
+
/* eslint-enable */
|
|
22693
|
+
moduleDestroy() {
|
|
22694
|
+
this.parent = null;
|
|
22695
|
+
}
|
|
22640
22696
|
/**
|
|
22641
22697
|
* For internal use only - Get the module name.
|
|
22642
22698
|
*
|
|
@@ -23447,7 +23503,8 @@ class Table {
|
|
|
23447
23503
|
}
|
|
23448
23504
|
const target = e.target || e.targetTouches[0].target;
|
|
23449
23505
|
const closestTable = closest(target, 'table.e-rte-table');
|
|
23450
|
-
if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable
|
|
23506
|
+
if (!isNullOrUndefined(this.curTable) && !isNullOrUndefined(closestTable) && closestTable !== this.curTable &&
|
|
23507
|
+
this.parent.contentModule.getEditPanel().contains(closestTable)) {
|
|
23451
23508
|
this.removeResizeElement();
|
|
23452
23509
|
this.removeHelper(e);
|
|
23453
23510
|
this.cancelResizeAction();
|
|
@@ -23722,7 +23779,8 @@ class Table {
|
|
|
23722
23779
|
const rteWidth = this.contentModule.getEditPanel().offsetWidth - (this.contentModule.getEditPanel().offsetWidth -
|
|
23723
23780
|
this.contentModule.getEditPanel().clientWidth) - paddingSize * 2;
|
|
23724
23781
|
let widthCompare;
|
|
23725
|
-
if (!isNullOrUndefined(this.curTable.parentElement.closest('table')))
|
|
23782
|
+
if (!isNullOrUndefined(this.curTable.parentElement.closest('table')) && !isNullOrUndefined(this.curTable.closest('td')) &&
|
|
23783
|
+
this.contentModule.getEditPanel().contains(this.curTable.closest('td'))) {
|
|
23726
23784
|
const currentTd = this.curTable.closest('td');
|
|
23727
23785
|
const currentTDPad = +getComputedStyle(currentTd).paddingRight.match(/\d/g).join('');
|
|
23728
23786
|
// Padding of the current table with the parent element multiply with 2.
|
|
@@ -24023,7 +24081,7 @@ class Table {
|
|
|
24023
24081
|
},
|
|
24024
24082
|
buttonModel: { cssClass: 'e-flat e-cancel' + ' ' + this.parent.cssClass, content: cancel }
|
|
24025
24083
|
}],
|
|
24026
|
-
cssClass: this.
|
|
24084
|
+
cssClass: this.editdlgObj.cssClass + ' e-rte-edit-table-prop-dialog'
|
|
24027
24085
|
});
|
|
24028
24086
|
this.editdlgObj.element.style.maxHeight = 'none';
|
|
24029
24087
|
this.editdlgObj.content.querySelector('input').focus();
|
|
@@ -25627,19 +25685,22 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
25627
25685
|
const currentEndContainer = range.endContainer;
|
|
25628
25686
|
const currentStartOffset = range.startOffset;
|
|
25629
25687
|
const isSameContainer = currentStartContainer === currentEndContainer ? true : false;
|
|
25630
|
-
let currentEndOffset;
|
|
25631
25688
|
const endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
|
|
25632
25689
|
range.endContainer;
|
|
25633
25690
|
const closestLI = closest(endNode, 'LI');
|
|
25634
25691
|
if (!isNullOrUndefined(closestLI) && endNode.textContent.length === range.endOffset &&
|
|
25635
25692
|
!range.collapsed && isNullOrUndefined(endNode.nextElementSibling)) {
|
|
25636
|
-
|
|
25637
|
-
|
|
25693
|
+
for (let i = 0; i < closestLI.childNodes.length; i++) {
|
|
25694
|
+
if (closestLI.childNodes[i].nodeName === "#text" && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
25695
|
+
detach(closestLI.childNodes[i]);
|
|
25696
|
+
i--;
|
|
25697
|
+
}
|
|
25698
|
+
}
|
|
25638
25699
|
let currentLastElem = closestLI;
|
|
25639
|
-
while (currentLastElem.nodeName !== '#text') {
|
|
25700
|
+
while (currentLastElem.lastChild !== null && currentLastElem.nodeName !== '#text') {
|
|
25640
25701
|
currentLastElem = currentLastElem.lastChild;
|
|
25641
25702
|
}
|
|
25642
|
-
this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? currentLastElem : currentStartContainer, currentLastElem, currentStartOffset, currentLastElem.textContent.length);
|
|
25703
|
+
this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? (currentLastElem.nodeName === 'BR' && !isNullOrUndefined(currentLastElem.previousSibling) ? currentLastElem.previousSibling : currentLastElem) : currentStartContainer, currentLastElem, currentStartOffset, (currentLastElem.nodeName === 'BR' ? 0 : currentLastElem.textContent.length));
|
|
25643
25704
|
}
|
|
25644
25705
|
}
|
|
25645
25706
|
/**
|
|
@@ -25977,8 +26038,19 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
25977
26038
|
if (this.isDestroyed || !this.isRendered) {
|
|
25978
26039
|
return;
|
|
25979
26040
|
}
|
|
25980
|
-
if (this.element.offsetParent === null
|
|
25981
|
-
this.toolbarModule
|
|
26041
|
+
if (this.element.offsetParent === null) {
|
|
26042
|
+
if (!isNullOrUndefined(this.toolbarModule)) {
|
|
26043
|
+
this.toolbarModule.destroy();
|
|
26044
|
+
}
|
|
26045
|
+
if (!isNullOrUndefined(this.imageModule)) {
|
|
26046
|
+
this.imageModule.moduleDestroy();
|
|
26047
|
+
}
|
|
26048
|
+
if (!isNullOrUndefined(this.linkModule)) {
|
|
26049
|
+
this.linkModule.moduleDestroy();
|
|
26050
|
+
}
|
|
26051
|
+
if (!isNullOrUndefined(this.renderModule)) {
|
|
26052
|
+
this.renderModule.moduleDestroy();
|
|
26053
|
+
}
|
|
25982
26054
|
return;
|
|
25983
26055
|
}
|
|
25984
26056
|
this.notify(destroy, {});
|
|
@@ -27583,5 +27655,5 @@ RichTextEditor = __decorate$1([
|
|
|
27583
27655
|
* Rich Text Editor component exported items
|
|
27584
27656
|
*/
|
|
27585
27657
|
|
|
27586
|
-
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, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, imageCaption, imageSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, mediaSelected, mediaUploading, mediaUploadSuccess, mediaUploadFailed, mediaRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeMediaUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, closeImageDialog, closeAudioDialog, showTableDialog, closeTableDialog, bindCssClass,
|
|
27658
|
+
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, HTMLFormatter, Formatter, MarkdownFormatter, ContentRender, Render, ToolbarRenderer, Link, Image, ViewSource, Table, DialogRenderer, IframeContentRender, MarkdownRender, PopupRenderer, RichTextEditor, RenderType, ToolbarType, DialogType, executeGroup, created, destroyed, load, initialLoad, contentChanged, initialEnd, iframeMouseDown, destroy, toolbarClick, toolbarRefresh, refreshBegin, toolbarUpdated, bindOnEnd, renderColorPicker, htmlToolbarClick, markdownToolbarClick, destroyColorPicker, modelChanged, keyUp, keyDown, mouseUp, toolbarCreated, toolbarRenderComplete, enableFullScreen, disableFullScreen, dropDownSelect, beforeDropDownItemRender, execCommandCallBack, imageToolbarAction, linkToolbarAction, windowResize, resizeStart, onResize, resizeStop, undo, redo, insertLink, unLink, editLink, openLink, actionBegin, actionComplete, updatedToolbarStatus, actionSuccess, updateToolbarItem, insertImage, insertCompleted, imageLeft, imageRight, imageCenter, imageBreak, imageInline, imageLink, imageAlt, imageDelete, imageCaption, imageSize, sourceCode, updateSource, toolbarOpen, beforeDropDownOpen, selectionSave, selectionRestore, expandPopupClick, count, contentFocus, contentBlur, mouseDown, sourceCodeMouseDown, editAreaClick, scroll, contentscroll, colorPickerChanged, tableColorPickerChanged, focusChange, selectAll$1 as selectAll, selectRange, getSelectedHtml, renderInlineToolbar, paste, imgModule, rtlMode, createTable, docClick, tableToolbarAction, checkUndo, readOnlyMode, pasteClean, enterHandler, beforeDialogOpen, clearDialogObj, dialogOpen, beforeDialogClose, dialogClose, beforeQuickToolbarOpen, quickToolbarOpen, quickToolbarClose, popupHide, imageSelected, imageUploading, imageUploadSuccess, imageUploadFailed, imageRemoving, mediaSelected, mediaUploading, mediaUploadSuccess, mediaUploadFailed, mediaRemoving, afterImageDelete, afterMediaDelete, drop, xhtmlValidation, beforeImageUpload, beforeMediaUpload, resizeInitialized, renderFileManager, beforeImageDrop, dynamicModule, beforePasteCleanup, afterPasteCleanup, updateTbItemsStatus, showLinkDialog, closeLinkDialog, showImageDialog, closeImageDialog, closeAudioDialog, showTableDialog, closeTableDialog, bindCssClass, blockEmptyNodes, inlineEmptyNodes, CLS_RTE, CLS_RTL, CLS_CONTENT, CLS_DISABLED, CLS_SCRIPT_SHEET, CLS_STYLE_SHEET, CLS_TOOLBAR, CLS_TB_FIXED, CLS_TB_FLOAT, CLS_TB_ABS_FLOAT, CLS_INLINE, CLS_TB_INLINE, CLS_RTE_EXPAND_TB, CLS_FULL_SCREEN, CLS_QUICK_TB, CLS_POP, CLS_TB_STATIC, CLS_QUICK_POP, CLS_QUICK_DROPDOWN, CLS_IMAGE_POP, CLS_INLINE_POP, CLS_INLINE_DROPDOWN, CLS_DROPDOWN_POPUP, CLS_DROPDOWN_ICONS, CLS_DROPDOWN_ITEMS, CLS_DROPDOWN_BTN, CLS_RTE_CONTENT, CLS_TB_ITEM, CLS_TB_EXTENDED, CLS_TB_WRAP, CLS_POPUP, CLS_SEPARATOR, CLS_MINIMIZE, CLS_MAXIMIZE, CLS_BACK, CLS_SHOW, CLS_HIDE, CLS_VISIBLE, CLS_FOCUS, CLS_RM_WHITE_SPACE, CLS_IMGRIGHT, CLS_IMGLEFT, CLS_IMGCENTER, CLS_IMGBREAK, CLS_CAPTION, CLS_RTE_CAPTION, CLS_CAPINLINE, CLS_IMGINLINE, CLS_COUNT, CLS_WARNING, CLS_ERROR, CLS_ICONS, CLS_ACTIVE, CLS_EXPAND_OPEN, CLS_RTE_ELEMENTS, CLS_TB_BTN, CLS_HR_SEPARATOR, CLS_TB_IOS_FIX, CLS_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_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, 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, 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, CLASS_IMAGE_RIGHT, CLASS_IMAGE_LEFT, CLASS_IMAGE_CENTER, CLASS_IMAGE_BREAK, CLASS_CAPTION, CLASS_RTE_CAPTION, CLASS_CAPTION_INLINE, CLASS_IMAGE_INLINE, Lists, markerClassName, DOMNode, Alignments, Indents, Formats, LinkCommand, InsertMethods, InsertTextExec, InsertHtmlExec, InsertHtml, IsFormatted, MsWordPaste, NodeCutter, ImageCommand, SelectionCommands, SelectionBasedExec, ClearFormatExec, UndoRedoManager, TableCommand, statusCollection, ToolbarStatus, NodeSelection, MarkdownParser, LISTS_COMMAND, selectionCommand, LINK_COMMAND, CLEAR_COMMAND, MD_TABLE, INSERT_TEXT_COMMAND, ClearFormat, MDLists, MDFormats, MarkdownSelection, UndoRedoCommands, MDSelectionFormats, MDLink, MDTable, markdownFormatTags, markdownSelectionTags, markdownListsTags, htmlKeyConfig, markdownKeyConfig, pasteCleanupGroupingTags, listConversionFilters, selfClosingTags, KEY_DOWN, ACTION, FORMAT_TYPE, KEY_DOWN_HANDLER, LIST_TYPE, KEY_UP_HANDLER, KEY_UP, MODEL_CHANGED_PLUGIN, MODEL_CHANGED, MS_WORD_CLEANUP_PLUGIN, MS_WORD_CLEANUP, ON_BEGIN, SPACE_ACTION };
|
|
27587
27659
|
//# sourceMappingURL=ej2-richtexteditor.es2015.js.map
|