@sapui5/sap.ui.richtexteditor 1.108.2 → 1.108.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/package.json +1 -1
- package/src/sap/ui/richtexteditor/.library +1 -1
- package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
- package/src/sap/ui/richtexteditor/RichTextEditor.js +12 -10
- package/src/sap/ui/richtexteditor/RichTextEditorRenderer.js +11 -1
- package/src/sap/ui/richtexteditor/library.js +1 -1
- package/src/sap/ui/richtexteditor/themes/base/RichTextEditor.less +15 -0
- package/src/sap/ui/richtexteditor/themes/sap_belize/RichTextEditor.less +4 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>SAPUI5
|
|
7
7
|
* (c) Copyright 2009-2022 SAP SE. All rights reserved.</copyright>
|
|
8
|
-
<version>1.108.
|
|
8
|
+
<version>1.108.4</version>
|
|
9
9
|
|
|
10
10
|
<documentation>A rich text editor (RTE) control. Requires installation of an additional rich text editor library.</documentation>
|
|
11
11
|
|
|
@@ -185,6 +185,7 @@ sap.ui.define([
|
|
|
185
185
|
/**
|
|
186
186
|
* Height of RichTextEditor control in CSS units.
|
|
187
187
|
* <b>Note:</b> If the height property results in a value smaller than 200px, the minimum height of 200px will be applied.
|
|
188
|
+
* <b>Note:</b> If the "autoresize" TinyMCE plugin is used, the height property is not taken into account.
|
|
188
189
|
*/
|
|
189
190
|
height: { type: "sap.ui.core.CSSSize", group: "Dimension", defaultValue: null },
|
|
190
191
|
|
|
@@ -336,7 +337,8 @@ sap.ui.define([
|
|
|
336
337
|
readyRecurring: {},
|
|
337
338
|
|
|
338
339
|
/**
|
|
339
|
-
* This event is fired right before the TinyMCE instance is created and can be used to change the settings object that will be given to TinyMCE. The parameter "configuration" is the javascript
|
|
340
|
+
* This event is fired right before the TinyMCE instance is created and can be used to change the settings object that will be given to TinyMCE. The parameter "configuration" is the javascript object that will be given to TinyMCE upon first instantiation. The configuration parameter contains a map that can be changed in the case of TinyMCE.
|
|
341
|
+
* <b>Note:</b> In order to add plugins to the <code>RichTextEditor</code> control, you have to use the <code>addPlugin</code> method. Adding plugins through the settings object may lead to synchronizing issues between TinyMCE and <code>RichTextEditor</code> control.
|
|
340
342
|
*/
|
|
341
343
|
beforeEditorInit: {}
|
|
342
344
|
},
|
|
@@ -1168,7 +1170,7 @@ sap.ui.define([
|
|
|
1168
1170
|
|
|
1169
1171
|
this.setButtonGroups([{
|
|
1170
1172
|
name: "font-style",
|
|
1171
|
-
visible:
|
|
1173
|
+
visible: this.getShowGroupFontStyle(),
|
|
1172
1174
|
row: 0,
|
|
1173
1175
|
priority: 10,
|
|
1174
1176
|
customToolbarPriority: 20,
|
|
@@ -1177,14 +1179,14 @@ sap.ui.define([
|
|
|
1177
1179
|
]
|
|
1178
1180
|
}, {
|
|
1179
1181
|
name: "font",
|
|
1180
|
-
visible:
|
|
1182
|
+
visible: this.getShowGroupFont(),
|
|
1181
1183
|
row: 0,
|
|
1182
1184
|
priority: 30,
|
|
1183
1185
|
customToolbarPriority: 50,
|
|
1184
1186
|
buttons: fontButtonGroupButtoNamesMapping[this.getEditorType()]
|
|
1185
1187
|
}, {
|
|
1186
1188
|
name: "clipboard",
|
|
1187
|
-
visible:
|
|
1189
|
+
visible: this.getShowGroupClipboard(),
|
|
1188
1190
|
row: 1,
|
|
1189
1191
|
priority: 10,
|
|
1190
1192
|
customToolbarPriority: 110,
|
|
@@ -1193,7 +1195,7 @@ sap.ui.define([
|
|
|
1193
1195
|
]
|
|
1194
1196
|
}, {
|
|
1195
1197
|
name: "structure",
|
|
1196
|
-
visible:
|
|
1198
|
+
visible: this.getShowGroupStructure(),
|
|
1197
1199
|
row: 1,
|
|
1198
1200
|
priority: 20,
|
|
1199
1201
|
customToolbarPriority: 60,
|
|
@@ -1202,7 +1204,7 @@ sap.ui.define([
|
|
|
1202
1204
|
]
|
|
1203
1205
|
}, {
|
|
1204
1206
|
name: "undo",
|
|
1205
|
-
visible:
|
|
1207
|
+
visible: this.getShowGroupUndo(),
|
|
1206
1208
|
row: 1,
|
|
1207
1209
|
priority: 40,
|
|
1208
1210
|
customToolbarPriority: 100,
|
|
@@ -1211,7 +1213,7 @@ sap.ui.define([
|
|
|
1211
1213
|
]
|
|
1212
1214
|
}, {
|
|
1213
1215
|
name: "insert",
|
|
1214
|
-
visible:
|
|
1216
|
+
visible: this.getShowGroupInsert(),
|
|
1215
1217
|
row: 1,
|
|
1216
1218
|
priority: 50,
|
|
1217
1219
|
customToolbarPriority: 80,
|
|
@@ -1220,7 +1222,7 @@ sap.ui.define([
|
|
|
1220
1222
|
]
|
|
1221
1223
|
}, {
|
|
1222
1224
|
name: "link",
|
|
1223
|
-
visible:
|
|
1225
|
+
visible: this.getShowGroupLink(),
|
|
1224
1226
|
row: 1,
|
|
1225
1227
|
priority: 60,
|
|
1226
1228
|
customToolbarPriority: 70,
|
|
@@ -1230,7 +1232,7 @@ sap.ui.define([
|
|
|
1230
1232
|
}, {
|
|
1231
1233
|
// Text Align group
|
|
1232
1234
|
name: "text-align",
|
|
1233
|
-
visible:
|
|
1235
|
+
visible: this.getShowGroupTextAlign(),
|
|
1234
1236
|
row: 0,
|
|
1235
1237
|
priority: 20,
|
|
1236
1238
|
customToolbarPriority: 30,
|
|
@@ -1917,7 +1919,7 @@ sap.ui.define([
|
|
|
1917
1919
|
/*eslint-disable camelcase */
|
|
1918
1920
|
var oConfig = {
|
|
1919
1921
|
// The following line only covers the editor content, not the UI in general
|
|
1920
|
-
height: "100%",
|
|
1922
|
+
height: "calc(100% - var(--_sap_ui_richtexteditor__toolbar_height))",
|
|
1921
1923
|
directionality: this._getTextDirection(),
|
|
1922
1924
|
selector: "[id='" + this._textAreaId + "']",
|
|
1923
1925
|
theme: bIsTinyMCE5Or6 ? "silver" : "modern",
|
|
@@ -28,6 +28,8 @@ sap.ui.define(['sap/ui/core/Core'],
|
|
|
28
28
|
var oToolbarWrapper = oRichTextEditor.getAggregation("_toolbarWrapper");
|
|
29
29
|
var bCustomToolbar = oToolbarWrapper && oRichTextEditor._bCustomToolbarRequirementsFullfiled;
|
|
30
30
|
var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.richtexteditor");
|
|
31
|
+
var aPlugins = oRichTextEditor.getPlugins();
|
|
32
|
+
var bAutoresize = false;
|
|
31
33
|
|
|
32
34
|
rm.openStart("div", oRichTextEditor);
|
|
33
35
|
rm.class("sapUiRTE");
|
|
@@ -42,7 +44,15 @@ sap.ui.define(['sap/ui/core/Core'],
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
rm.style("width", oRichTextEditor.getWidth());
|
|
45
|
-
|
|
47
|
+
|
|
48
|
+
bAutoresize = aPlugins.some(function(oPlugin) {
|
|
49
|
+
return oPlugin.name === "autoresize";
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (oRichTextEditor.getHeight() && !bAutoresize) {
|
|
53
|
+
rm.style("height", oRichTextEditor.getHeight());
|
|
54
|
+
}
|
|
55
|
+
|
|
46
56
|
if (oRichTextEditor.getTooltip_AsString()) { // ensure not to render null
|
|
47
57
|
rm.attr("title", oRichTextEditor.getTooltip_AsString());
|
|
48
58
|
}
|
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
min-height: 200px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.sapUiRTE.sapUiRTEWithCustomToolbar {
|
|
7
|
+
--_sap_ui_richtexteditor__toolbar_height: 2.75rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.sapUiRTE:not(.sapUiRTEWithCustomToolbar) {
|
|
11
|
+
--_sap_ui_richtexteditor__toolbar_height: 0rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.sapUiSizeCompact.sapUiRTE.sapUiRTEWithCustomToolbar,
|
|
15
|
+
.sapUiSizeCompact .sapUiRTE.sapUiRTEWithCustomToolbar {
|
|
16
|
+
--_sap_ui_richtexteditor__toolbar_height: 2rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
/* This fixes the focus of the split buttons in Edge */
|
|
7
20
|
html[data-sap-ui-browser^="ed"] {
|
|
8
21
|
.sapUiRTE.sapUiRTEWithCustomToolbar .sapUiRTECustomToolbar .sapMBtnBase.sapMSBText .sapMBtnFocusDiv {
|
|
@@ -17,6 +30,8 @@ html[data-sap-ui-browser^="ed"] {
|
|
|
17
30
|
.tox-editor-header {
|
|
18
31
|
padding: 0;
|
|
19
32
|
}
|
|
33
|
+
|
|
34
|
+
min-height: ~"calc(200px - var(--_sap_ui_richtexteditor__toolbar_height))";
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
.sapUiRTEWithCustomToolbar .sapUiRteEditorContainer {
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
/* ==================================================== */
|
|
5
5
|
|
|
6
6
|
/*RichTextEditor with Custom toolbar*/
|
|
7
|
+
.sapUiRTE.sapUiRTEWithCustomToolbar {
|
|
8
|
+
--_sap_ui_richtexteditor__toolbar_height: 3rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.sapUiRTE.sapUiRTEWithCustomToolbar .sapUiRTECustomToolbar {
|
|
8
12
|
|
|
9
13
|
.sapMBarChild ~ .sapMBarChild {
|