@sapui5/sap.ui.richtexteditor 1.108.2 → 1.108.3
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 +4 -2
- 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.3</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
|
},
|
|
@@ -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 {
|