@sapui5/sap.ui.richtexteditor 1.109.0 → 1.111.0
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 +2 -2
- package/src/sap/ui/richtexteditor/RTESplitButton.js +2 -2
- package/src/sap/ui/richtexteditor/RTESplitButtonRenderer.js +1 -1
- package/src/sap/ui/richtexteditor/RichTextEditor.js +16 -14
- package/src/sap/ui/richtexteditor/RichTextEditorRenderer.js +12 -2
- package/src/sap/ui/richtexteditor/ToolbarWrapper.js +1 -1
- package/src/sap/ui/richtexteditor/ToolbarWrapperRenderer.js +1 -1
- package/src/sap/ui/richtexteditor/library.js +2 -2
- package/src/sap/ui/richtexteditor/themes/base/RichTextEditor.less +15 -0
- package/src/sap/ui/richtexteditor/themes/base/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_belize/RichTextEditor.less +4 -0
- package/src/sap/ui/richtexteditor/themes/sap_belize/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_belize_plus/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_bluecrystal/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_fiori_3/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_fiori_3_dark/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcb/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcw/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_horizon/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_horizon_dark/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_horizon_hcb/library.source.less +1 -1
- package/src/sap/ui/richtexteditor/themes/sap_horizon_hcw/library.source.less +1 -1
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<name>sap.ui.richtexteditor</name>
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>SAPUI5
|
|
7
|
-
* (c) Copyright 2009-
|
|
8
|
-
<version>1.
|
|
7
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.</copyright>
|
|
8
|
+
<version>1.111.0</version>
|
|
9
9
|
|
|
10
10
|
<documentation>A rich text editor (RTE) control. Requires installation of an additional rich text editor library.</documentation>
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
// Provides control sap.ui.richtexteditor.RTESplitButton.
|
|
6
6
|
sap.ui.define([
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @alias sap.ui.richtexteditor.RTESplitButton
|
|
25
25
|
*
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.111.0
|
|
28
28
|
*/
|
|
29
29
|
var RTESplitButton = SplitButton.extend("sap.ui.richtexteditor.RTESplitButton", {
|
|
30
30
|
metadata: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
// Provides default renderer for control sap.ui.richtexteditor.RTESplitButton
|
|
6
6
|
sap.ui.define(['sap/m/SplitButtonRenderer', 'sap/ui/core/Renderer'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Provides control sap.ui.richtexteditor.RichTextEditor.
|
|
@@ -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
|
|
|
@@ -293,7 +294,7 @@ sap.ui.define([
|
|
|
293
294
|
* @deprecated Since version 1.97.0
|
|
294
295
|
* This property became obsolete after the deprecation of TinyMCE v3.
|
|
295
296
|
*/
|
|
296
|
-
useLegacyTheme: { type: "boolean", group: "Appearance", defaultValue: true },
|
|
297
|
+
useLegacyTheme: { type: "boolean", group: "Appearance", defaultValue: true, deprecated: true },
|
|
297
298
|
|
|
298
299
|
/**
|
|
299
300
|
* An array of button configurations. These configurations contain the names of buttons as array in the property "buttons" and the name of the group in "name", they can also contain the "row" where the buttons should be placed, a "priority" and whether the buttons are "visible". See method addButtonGroup() for more details on the structure of the objects in this array.
|
|
@@ -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
|
},
|
|
@@ -860,7 +862,7 @@ sap.ui.define([
|
|
|
860
862
|
* RichTextEditor.
|
|
861
863
|
*
|
|
862
864
|
* @param {object|string} [mPlugin] The plugin ID/name or an object with property "name", containing the ID/name of the plugin
|
|
863
|
-
* @returns {
|
|
865
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
864
866
|
* @public
|
|
865
867
|
*/
|
|
866
868
|
RichTextEditor.prototype.addPlugin = function (mPlugin) {
|
|
@@ -885,7 +887,7 @@ sap.ui.define([
|
|
|
885
887
|
* Removes the plugin with the given name/ID from the list of plugins to load
|
|
886
888
|
*
|
|
887
889
|
* @param {string} [sPluginName] The name/ID of the plugin to remove
|
|
888
|
-
* @returns {
|
|
890
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
889
891
|
* @public
|
|
890
892
|
*/
|
|
891
893
|
RichTextEditor.prototype.removePlugin = function(sPluginName) {
|
|
@@ -913,7 +915,7 @@ sap.ui.define([
|
|
|
913
915
|
* @param {int} [vGroup.row=0] (optional) Row number in which the button should be
|
|
914
916
|
* @param {int} [vGroup.priority=10] (optional) The priority of the button group. Lower priorities are added first.
|
|
915
917
|
* @param {int} [vGroup.customToolbarPriority] (optional) The priority of the button group in the custom toolbar. Each default group in the custom toolbar has a predefined <code>customToolbarPriority</code>. Lower priorities are added in first.
|
|
916
|
-
* @returns {
|
|
918
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
917
919
|
* @public
|
|
918
920
|
*/
|
|
919
921
|
RichTextEditor.prototype.addButtonGroup = function (vGroup) {
|
|
@@ -1009,7 +1011,7 @@ sap.ui.define([
|
|
|
1009
1011
|
* Removes a button group from the editor.
|
|
1010
1012
|
*
|
|
1011
1013
|
* @param {string} [sGroupName] The name of the group to be removed.
|
|
1012
|
-
* @returns {
|
|
1014
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
1013
1015
|
* @public
|
|
1014
1016
|
*/
|
|
1015
1017
|
RichTextEditor.prototype.removeButtonGroup = function(sGroupName) {
|
|
@@ -1033,7 +1035,7 @@ sap.ui.define([
|
|
|
1033
1035
|
* Sets the button groups to the editor.
|
|
1034
1036
|
*
|
|
1035
1037
|
* @param {array} [aGroups] Array of names or objects containing the group information
|
|
1036
|
-
* @returns {
|
|
1038
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
1037
1039
|
* @public
|
|
1038
1040
|
*/
|
|
1039
1041
|
RichTextEditor.prototype.setButtonGroups = function (aGroups) {
|
|
@@ -1086,7 +1088,7 @@ sap.ui.define([
|
|
|
1086
1088
|
* Sets the plugins to the editor.
|
|
1087
1089
|
*
|
|
1088
1090
|
* @param {array} [aPlugins] Array of names or objects containing the plugin information
|
|
1089
|
-
* @returns {
|
|
1091
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
1090
1092
|
* @public
|
|
1091
1093
|
*/
|
|
1092
1094
|
RichTextEditor.prototype.setPlugins = function (aPlugins) {
|
|
@@ -1246,7 +1248,7 @@ sap.ui.define([
|
|
|
1246
1248
|
* All plugins and button groups should be set after this has been invoked
|
|
1247
1249
|
*
|
|
1248
1250
|
* @param {string} [sEditorType] Which editor type to be used (currently only TinyMCE 4, 5 and 6)
|
|
1249
|
-
* @returns {
|
|
1251
|
+
* @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
|
|
1250
1252
|
* @public
|
|
1251
1253
|
*/
|
|
1252
1254
|
RichTextEditor.prototype.setEditorType = function(sEditorType) {
|
|
@@ -1257,8 +1259,6 @@ sap.ui.define([
|
|
|
1257
1259
|
|
|
1258
1260
|
this._setupToolbar();
|
|
1259
1261
|
|
|
1260
|
-
this.setEditorLocation(EDITOR_LOCATION_MAPPING[this.getEditorType()]);
|
|
1261
|
-
|
|
1262
1262
|
if (!oEditorMapping[sEditorType]) {
|
|
1263
1263
|
Log.error('TinyMCE3 is removed now due to security concerns, please do NOT use it anymore. The framework automatically will load TinyMCE4 since v1.60');
|
|
1264
1264
|
}
|
|
@@ -1522,9 +1522,11 @@ sap.ui.define([
|
|
|
1522
1522
|
*/
|
|
1523
1523
|
RichTextEditor.prototype.onBeforeRenderingTinyMCE = function() {
|
|
1524
1524
|
if (this._shouldLoadTinyMCE()) {
|
|
1525
|
+
// fallback to tinymce 4 for now since the editorLocation property used to do so
|
|
1526
|
+
var sEditorLocation = EDITOR_LOCATION_MAPPING[this.getEditorType()] || EDITOR_LOCATION_MAPPING[RichTextEditor.EDITORTYPE_TINYMCE4];
|
|
1525
1527
|
// Load TinyMCE component
|
|
1526
1528
|
this._tinyMCEStatus = EditorStatus.Loading;
|
|
1527
|
-
this._pTinyMCELoaded = RichTextEditor.loadTinyMCE(
|
|
1529
|
+
this._pTinyMCELoaded = RichTextEditor.loadTinyMCE(sEditorLocation).then(function() {
|
|
1528
1530
|
this._tinyMCEStatus = EditorStatus.Loaded;
|
|
1529
1531
|
}.bind(this));
|
|
1530
1532
|
} else {
|
|
@@ -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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
// Provides default renderer for control sap.ui.richtexteditor.RichTextEditor
|
|
6
6
|
sap.ui.define(['sap/ui/core/Core'],
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
"sap.ui.richtexteditor.RTESplitButton"
|
|
35
35
|
],
|
|
36
36
|
elements: [],
|
|
37
|
-
version: "1.
|
|
37
|
+
version: "1.111.0"
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -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 {
|