@syncfusion/ej2-richtexteditor 23.1.44 → 23.2.4
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 +10 -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 +23 -7
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +23 -7
- 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 -13
- package/src/editor-manager/plugin/selection-commands.js +8 -1
- package/src/editor-manager/plugin/toolbar-status.js +12 -3
- package/src/rich-text-editor/base/util.js +3 -3
|
@@ -2903,7 +2903,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2903
2903
|
const formatItems$$1 = e.parent.format.types;
|
|
2904
2904
|
const formatContent = isNullOrUndefined(e.parent.format.default) ? formatItems$$1[0].text :
|
|
2905
2905
|
e.parent.format.default;
|
|
2906
|
-
result = getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
|
|
2906
|
+
result = value === 'empty' ? '' : getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
|
|
2907
2907
|
dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
|
|
2908
2908
|
'width:' + e.parent.format.width + '" >' +
|
|
2909
2909
|
'<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
@@ -2929,7 +2929,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2929
2929
|
break;
|
|
2930
2930
|
}
|
|
2931
2931
|
const fontNameItems = e.parent.fontFamily.items;
|
|
2932
|
-
result = getDropDownValue(fontNameItems, value, 'value', 'text');
|
|
2932
|
+
result = value === 'empty' ? '' : getDropDownValue(fontNameItems, value, 'value', 'text');
|
|
2933
2933
|
const fontNameContent = isNullOrUndefined(e.parent.fontFamily.default) ? fontNameItems[0].text :
|
|
2934
2934
|
e.parent.fontFamily.default;
|
|
2935
2935
|
const name = (isNullOrUndefined(result) ? fontNameContent : result);
|
|
@@ -2948,7 +2948,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2948
2948
|
const fontSizeItems = e.parent.fontSize.items;
|
|
2949
2949
|
const fontSizeContent = isNullOrUndefined(e.parent.fontSize.default) ? fontSizeItems[1].text :
|
|
2950
2950
|
e.parent.fontSize.default;
|
|
2951
|
-
result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
2951
|
+
result = value === 'empty' ? '' : getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
2952
2952
|
dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
|
|
2953
2953
|
'width:' + e.parent.fontSize.width + '" >' +
|
|
2954
2954
|
'<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
@@ -16391,7 +16391,14 @@ class SelectionCommands {
|
|
|
16391
16391
|
}
|
|
16392
16392
|
const formatNodeStyles = formatNode.getAttribute('style');
|
|
16393
16393
|
const formatNodeTagName = formatNode.tagName;
|
|
16394
|
-
|
|
16394
|
+
let child;
|
|
16395
|
+
if (formatNodeTagName === 'A' && format === 'underline') {
|
|
16396
|
+
formatNode.style.textDecoration = 'none';
|
|
16397
|
+
child = [formatNode];
|
|
16398
|
+
}
|
|
16399
|
+
else {
|
|
16400
|
+
child = InsertMethods.unwrap(formatNode);
|
|
16401
|
+
}
|
|
16395
16402
|
if (child[0] && !isFontStyle) {
|
|
16396
16403
|
let nodeTraverse = child[index] ? child[index] : child[0];
|
|
16397
16404
|
const textNode = nodeTraverse;
|
|
@@ -18493,12 +18500,18 @@ class ToolbarStatus {
|
|
|
18493
18500
|
if ((index === 0 && formatCollection.fontcolor) || !formatCollection.fontcolor) {
|
|
18494
18501
|
nodeCollection.fontcolor = formatCollection.fontcolor;
|
|
18495
18502
|
}
|
|
18496
|
-
if (
|
|
18503
|
+
if (index === 0 && formatCollection.fontname) {
|
|
18497
18504
|
nodeCollection.fontname = formatCollection.fontname;
|
|
18498
18505
|
}
|
|
18499
|
-
|
|
18506
|
+
else {
|
|
18507
|
+
nodeCollection.fontname = formatCollection.fontname === nodeCollection.fontname ? formatCollection.fontname : 'empty';
|
|
18508
|
+
}
|
|
18509
|
+
if (index === 0 && formatCollection.fontsize) {
|
|
18500
18510
|
nodeCollection.fontsize = formatCollection.fontsize;
|
|
18501
18511
|
}
|
|
18512
|
+
else {
|
|
18513
|
+
nodeCollection.fontsize = formatCollection.fontsize === nodeCollection.fontsize ? formatCollection.fontsize : 'empty';
|
|
18514
|
+
}
|
|
18502
18515
|
if ((index === 0 && formatCollection.backgroundcolor) || !formatCollection.backgroundcolor) {
|
|
18503
18516
|
nodeCollection.backgroundcolor = formatCollection.backgroundcolor;
|
|
18504
18517
|
}
|
|
@@ -18511,9 +18524,12 @@ class ToolbarStatus {
|
|
|
18511
18524
|
if ((index === 0 && formatCollection.alignments) || !formatCollection.alignments) {
|
|
18512
18525
|
nodeCollection.alignments = formatCollection.alignments;
|
|
18513
18526
|
}
|
|
18514
|
-
if (
|
|
18527
|
+
if (index === 0 && formatCollection.formats) {
|
|
18515
18528
|
nodeCollection.formats = formatCollection.formats;
|
|
18516
18529
|
}
|
|
18530
|
+
else {
|
|
18531
|
+
nodeCollection.formats = formatCollection.formats === nodeCollection.formats ? formatCollection.formats : 'empty';
|
|
18532
|
+
}
|
|
18517
18533
|
if ((index === 0 && formatCollection.createlink) || !formatCollection.createlink) {
|
|
18518
18534
|
nodeCollection.createlink = formatCollection.createlink;
|
|
18519
18535
|
}
|