@syncfusion/ej2-richtexteditor 23.1.43 → 23.1.44
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 +14 -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 +30 -13
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +30 -13
- 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 +7 -7
- package/src/editor-manager/plugin/inserthtml.js +10 -6
- package/src/editor-manager/plugin/link.js +6 -0
- package/src/rich-text-editor/actions/enter-key.js +8 -0
- package/src/rich-text-editor/renderer/image-module.js +6 -7
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.1.
|
|
3
|
+
* version : 23.1.44
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@23.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@23.1.43",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-jgzplcFRi5rmn0kbDEri7p8DT1c7WyfUq6Gc4tDWhQX0voLlzxQaCv0VOf/zK/PB4PSbu4eaTIsuvOQlY7bmzA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-23.1.
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-23.1.43.tgz",
|
|
30
|
+
"_shasum": "c003b36ae31089222d8492e3cdb00d29a82d6703",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@syncfusion/ej2-buttons": "~23.1.43",
|
|
43
43
|
"@syncfusion/ej2-filemanager": "~23.1.43",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~23.1.43",
|
|
45
|
-
"@syncfusion/ej2-navigations": "~23.1.
|
|
46
|
-
"@syncfusion/ej2-popups": "~23.1.
|
|
45
|
+
"@syncfusion/ej2-navigations": "~23.1.44",
|
|
46
|
+
"@syncfusion/ej2-popups": "~23.1.44",
|
|
47
47
|
"@syncfusion/ej2-splitbuttons": "~23.1.43"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "23.1.
|
|
73
|
+
"version": "23.1.44",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -503,14 +503,18 @@ var InsertHtml = /** @class */ (function () {
|
|
|
503
503
|
};
|
|
504
504
|
InsertHtml.removeEmptyElements = function (element) {
|
|
505
505
|
var emptyElements = element.querySelectorAll(':empty');
|
|
506
|
-
|
|
506
|
+
var nonSvgEmptyElements = Array.from(emptyElements).filter(function (element) {
|
|
507
|
+
// Check if the element is an SVG element or an ancestor of an SVG element
|
|
508
|
+
return !element.closest('svg') && !element.closest('canvas');
|
|
509
|
+
});
|
|
510
|
+
for (var i = 0; i < nonSvgEmptyElements.length; i++) {
|
|
507
511
|
var lineWithDiv = true;
|
|
508
|
-
if (
|
|
509
|
-
lineWithDiv =
|
|
510
|
-
|
|
512
|
+
if (nonSvgEmptyElements[i].tagName === 'DIV') {
|
|
513
|
+
lineWithDiv = nonSvgEmptyElements[i].style.borderBottom === 'none' ||
|
|
514
|
+
nonSvgEmptyElements[i].style.borderBottom === '' ? true : false;
|
|
511
515
|
}
|
|
512
|
-
if (CONSTANT.SELF_CLOSING_TAGS.indexOf(
|
|
513
|
-
var detachableElement = this.findDetachEmptyElem(
|
|
516
|
+
if (CONSTANT.SELF_CLOSING_TAGS.indexOf(nonSvgEmptyElements[i].tagName.toLowerCase()) < 0 && lineWithDiv) {
|
|
517
|
+
var detachableElement = this.findDetachEmptyElem(nonSvgEmptyElements[i]);
|
|
514
518
|
if (!isNOU(detachableElement)) {
|
|
515
519
|
detach(detachableElement);
|
|
516
520
|
}
|
|
@@ -85,6 +85,12 @@ var LinkCommand = /** @class */ (function () {
|
|
|
85
85
|
|| e.event.keyCode === 13) || e.item.action === 'Paste' || range.collapsed || text) {
|
|
86
86
|
var anchor = this.createAchorNode(e);
|
|
87
87
|
anchor.innerText = e.item.text === '' ? e.item.url : e.item.text;
|
|
88
|
+
var text_1 = anchor.innerText;
|
|
89
|
+
// Replace spaces with non-breaking spaces
|
|
90
|
+
var modifiedText = text_1.replace(/ +/g, function (match) {
|
|
91
|
+
return '\u00A0'.repeat(match.length);
|
|
92
|
+
});
|
|
93
|
+
anchor.innerText = modifiedText;
|
|
88
94
|
e.item.selection.restore();
|
|
89
95
|
InsertHtml.Insert(this.parent.currentDocument, anchor, this.parent.editableElement);
|
|
90
96
|
if (e.event && e.event.type === 'keydown' && (e.event.keyCode === 32
|
|
@@ -482,6 +482,14 @@ var EnterKeyAction = /** @class */ (function () {
|
|
|
482
482
|
else if ((this.parent.enterKey === 'P' && !shiftKey) || (this.parent.shiftEnterKey === 'P' && shiftKey)) {
|
|
483
483
|
insertElem = this.parent.createElement('p');
|
|
484
484
|
}
|
|
485
|
+
var previousBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling;
|
|
486
|
+
var nextBlockNode = this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;
|
|
487
|
+
if (!isNOU(previousBlockNode) && previousBlockNode.hasAttribute('style')) {
|
|
488
|
+
insertElem.setAttribute('style', previousBlockNode.getAttribute('style'));
|
|
489
|
+
}
|
|
490
|
+
if (isNOU(previousBlockNode) && !isNOU(nextBlockNode) && nextBlockNode.hasAttribute('style')) {
|
|
491
|
+
insertElem.setAttribute('style', nextBlockNode.getAttribute('style'));
|
|
492
|
+
}
|
|
485
493
|
return insertElem;
|
|
486
494
|
};
|
|
487
495
|
return EnterKeyAction;
|
|
@@ -1046,9 +1046,10 @@ var Image = /** @class */ (function () {
|
|
|
1046
1046
|
var getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
1047
1047
|
e.selectNode[0].getAttribute('alt');
|
|
1048
1048
|
var content = '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
1049
|
-
'<input type="text" spellcheck="false"
|
|
1049
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + ' ' + this.parent.cssClass + '" placeholder="' + altText + '"/>' +
|
|
1050
1050
|
'</div>';
|
|
1051
1051
|
var contentElem = parseHtml(content);
|
|
1052
|
+
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
1052
1053
|
altWrap.appendChild(contentElem);
|
|
1053
1054
|
var inputAlt = altWrap.querySelector('.e-img-alt');
|
|
1054
1055
|
var altArgs_1 = {
|
|
@@ -1584,14 +1585,12 @@ var Image = /** @class */ (function () {
|
|
|
1584
1585
|
this.changedWidthValue = null;
|
|
1585
1586
|
this.changedHeightValue = null;
|
|
1586
1587
|
var content = '<div class="e-rte-label' + ' ' + this.parent.cssClass + '"><label>' + imgWidth +
|
|
1587
|
-
'</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"><input type="text" id="imgwidth" class="e-img-width' + ' ' + this.parent.cssClass + '
|
|
1588
|
-
widthVal
|
|
1589
|
-
+ ' /></div>' +
|
|
1588
|
+
'</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"><input type="text" id="imgwidth" class="e-img-width' + ' ' + this.parent.cssClass + '/></div>' +
|
|
1590
1589
|
'<div class="e-rte-label' + ' ' + this.parent.cssClass + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"> ' +
|
|
1591
|
-
'<input type="text" id="imgheight" class="e-img-height' + ' ' + this.parent.cssClass + '"
|
|
1592
|
-
heightVal
|
|
1593
|
-
+ ' /></div>';
|
|
1590
|
+
'<input type="text" id="imgheight" class="e-img-height' + ' ' + this.parent.cssClass + '"/></div>';
|
|
1594
1591
|
var contentElem = parseHtml(content);
|
|
1592
|
+
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
1593
|
+
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
1595
1594
|
imgSizeWrap.appendChild(contentElem);
|
|
1596
1595
|
this.widthNum = new TextBox({
|
|
1597
1596
|
value: formatUnit(widthVal),
|