@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
|
@@ -2897,7 +2897,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2897
2897
|
var formatItems$$1 = e.parent.format.types;
|
|
2898
2898
|
var formatContent = isNullOrUndefined(e.parent.format.default) ? formatItems$$1[0].text :
|
|
2899
2899
|
e.parent.format.default;
|
|
2900
|
-
result = getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
|
|
2900
|
+
result = value === 'empty' ? '' : getDropDownValue(formatItems$$1, value, 'subCommand', 'text');
|
|
2901
2901
|
dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
|
|
2902
2902
|
'width:' + e.parent.format.width + '" >' +
|
|
2903
2903
|
'<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
@@ -2923,7 +2923,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2923
2923
|
break;
|
|
2924
2924
|
}
|
|
2925
2925
|
var fontNameItems = e.parent.fontFamily.items;
|
|
2926
|
-
result = getDropDownValue(fontNameItems, value, 'value', 'text');
|
|
2926
|
+
result = value === 'empty' ? '' : getDropDownValue(fontNameItems, value, 'value', 'text');
|
|
2927
2927
|
var fontNameContent = isNullOrUndefined(e.parent.fontFamily.default) ? fontNameItems[0].text :
|
|
2928
2928
|
e.parent.fontFamily.default;
|
|
2929
2929
|
var name_1 = (isNullOrUndefined(result) ? fontNameContent : result);
|
|
@@ -2942,7 +2942,7 @@ function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
2942
2942
|
var fontSizeItems = e.parent.fontSize.items;
|
|
2943
2943
|
var fontSizeContent = isNullOrUndefined(e.parent.fontSize.default) ? fontSizeItems[1].text :
|
|
2944
2944
|
e.parent.fontSize.default;
|
|
2945
|
-
result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
2945
|
+
result = value === 'empty' ? '' : getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
2946
2946
|
dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
|
|
2947
2947
|
'width:' + e.parent.fontSize.width + '" >' +
|
|
2948
2948
|
'<span class="e-rte-dropdown-btn-text' + (isNullOrUndefined(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
@@ -16508,7 +16508,14 @@ var SelectionCommands = /** @__PURE__ @class */ (function () {
|
|
|
16508
16508
|
}
|
|
16509
16509
|
var formatNodeStyles = formatNode.getAttribute('style');
|
|
16510
16510
|
var formatNodeTagName = formatNode.tagName;
|
|
16511
|
-
var child
|
|
16511
|
+
var child;
|
|
16512
|
+
if (formatNodeTagName === 'A' && format === 'underline') {
|
|
16513
|
+
formatNode.style.textDecoration = 'none';
|
|
16514
|
+
child = [formatNode];
|
|
16515
|
+
}
|
|
16516
|
+
else {
|
|
16517
|
+
child = InsertMethods.unwrap(formatNode);
|
|
16518
|
+
}
|
|
16512
16519
|
if (child[0] && !isFontStyle) {
|
|
16513
16520
|
var nodeTraverse = child[index] ? child[index] : child[0];
|
|
16514
16521
|
var textNode = nodeTraverse;
|
|
@@ -18623,12 +18630,18 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18623
18630
|
if ((index === 0 && formatCollection.fontcolor) || !formatCollection.fontcolor) {
|
|
18624
18631
|
nodeCollection.fontcolor = formatCollection.fontcolor;
|
|
18625
18632
|
}
|
|
18626
|
-
if (
|
|
18633
|
+
if (index === 0 && formatCollection.fontname) {
|
|
18627
18634
|
nodeCollection.fontname = formatCollection.fontname;
|
|
18628
18635
|
}
|
|
18629
|
-
|
|
18636
|
+
else {
|
|
18637
|
+
nodeCollection.fontname = formatCollection.fontname === nodeCollection.fontname ? formatCollection.fontname : 'empty';
|
|
18638
|
+
}
|
|
18639
|
+
if (index === 0 && formatCollection.fontsize) {
|
|
18630
18640
|
nodeCollection.fontsize = formatCollection.fontsize;
|
|
18631
18641
|
}
|
|
18642
|
+
else {
|
|
18643
|
+
nodeCollection.fontsize = formatCollection.fontsize === nodeCollection.fontsize ? formatCollection.fontsize : 'empty';
|
|
18644
|
+
}
|
|
18632
18645
|
if ((index === 0 && formatCollection.backgroundcolor) || !formatCollection.backgroundcolor) {
|
|
18633
18646
|
nodeCollection.backgroundcolor = formatCollection.backgroundcolor;
|
|
18634
18647
|
}
|
|
@@ -18641,9 +18654,12 @@ var ToolbarStatus = /** @__PURE__ @class */ (function () {
|
|
|
18641
18654
|
if ((index === 0 && formatCollection.alignments) || !formatCollection.alignments) {
|
|
18642
18655
|
nodeCollection.alignments = formatCollection.alignments;
|
|
18643
18656
|
}
|
|
18644
|
-
if (
|
|
18657
|
+
if (index === 0 && formatCollection.formats) {
|
|
18645
18658
|
nodeCollection.formats = formatCollection.formats;
|
|
18646
18659
|
}
|
|
18660
|
+
else {
|
|
18661
|
+
nodeCollection.formats = formatCollection.formats === nodeCollection.formats ? formatCollection.formats : 'empty';
|
|
18662
|
+
}
|
|
18647
18663
|
if ((index === 0 && formatCollection.createlink) || !formatCollection.createlink) {
|
|
18648
18664
|
nodeCollection.createlink = formatCollection.createlink;
|
|
18649
18665
|
}
|