@sapui5/sap.ui.richtexteditor 1.126.0 → 1.127.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 +1 -1
- package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
- package/src/sap/ui/richtexteditor/ToolbarWrapper.js +16 -6
- package/src/sap/ui/richtexteditor/library.js +1 -1
- package/src/sap/ui/richtexteditor/messagebundle.properties +7 -1
- package/src/sap/ui/richtexteditor/messagebundle_en.properties +6 -0
- package/src/sap/ui/richtexteditor/messagebundle_en_US_saprigi.properties +6 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>SAPUI5
|
|
7
7
|
* (c) Copyright 2009-2024 SAP SE. All rights reserved.</copyright>
|
|
8
|
-
<version>1.
|
|
8
|
+
<version>1.127.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
|
|
|
@@ -1295,11 +1295,16 @@ sap.ui.define([
|
|
|
1295
1295
|
* @private
|
|
1296
1296
|
*/
|
|
1297
1297
|
ToolbarWrapper.prototype._createInsertTableConfig = function() {
|
|
1298
|
+
const iMaxTableCells = 25;
|
|
1299
|
+
const iMinTableCells = 0;
|
|
1300
|
+
|
|
1298
1301
|
var oTitleBundleText = this._oResourceBundle.getText(EditorCommands["InsertTable"].bundleKey),
|
|
1299
1302
|
oRowsInput = this._helper.createStepInput({
|
|
1300
1303
|
value: 2,
|
|
1301
|
-
min:
|
|
1302
|
-
|
|
1304
|
+
min: iMinTableCells,
|
|
1305
|
+
max: iMaxTableCells,
|
|
1306
|
+
width: "50%",
|
|
1307
|
+
valueStateText: this._oResourceBundle.getText("INSERT_TABLE_ROWS_ERROR")
|
|
1303
1308
|
}),
|
|
1304
1309
|
oRowsLabel = this._helper.createLabel({
|
|
1305
1310
|
text: this._oResourceBundle.getText("INSERT_TABLE_ROWS"),
|
|
@@ -1307,8 +1312,10 @@ sap.ui.define([
|
|
|
1307
1312
|
}),
|
|
1308
1313
|
oColsInput = this._helper.createStepInput({
|
|
1309
1314
|
value: 2,
|
|
1310
|
-
min:
|
|
1311
|
-
|
|
1315
|
+
min: iMinTableCells,
|
|
1316
|
+
max: iMaxTableCells,
|
|
1317
|
+
width: "50%",
|
|
1318
|
+
valueStateText: this._oResourceBundle.getText("INSERT_TABLE_COLS_ERROR")
|
|
1312
1319
|
}),
|
|
1313
1320
|
oColsLabel = this._helper.createLabel({
|
|
1314
1321
|
text: this._oResourceBundle.getText("INSERT_TABLE_COLS"),
|
|
@@ -1355,14 +1362,17 @@ sap.ui.define([
|
|
|
1355
1362
|
var oNativeAPI = oRTE.getNativeApi();
|
|
1356
1363
|
var oTableElm;
|
|
1357
1364
|
|
|
1365
|
+
const iRows = Math.min(Math.max(oRowsInput.getValue(), iMinTableCells), iMaxTableCells);
|
|
1366
|
+
const iCols = Math.min(Math.max(oColsInput.getValue(), iMinTableCells), iMaxTableCells);
|
|
1367
|
+
|
|
1358
1368
|
if (oRTE.getEditorType() === library.EditorType.TinyMCE6) {
|
|
1359
|
-
oNativeAPI.execCommand('mceInsertTable', false, { rows:
|
|
1369
|
+
oNativeAPI.execCommand('mceInsertTable', false, { rows: iRows, columns: iCols });
|
|
1360
1370
|
|
|
1361
1371
|
oTableElm = oDomRef.getParents(oNativeAPI.selection.getNode()).find(function (element) {
|
|
1362
1372
|
return element.tagName.toLowerCase() === "table";
|
|
1363
1373
|
});
|
|
1364
1374
|
} else {
|
|
1365
|
-
oTableElm = oNativeAPI.plugins.table.insertTable(
|
|
1375
|
+
oTableElm = oNativeAPI.plugins.table.insertTable(iCols, iRows);
|
|
1366
1376
|
}
|
|
1367
1377
|
|
|
1368
1378
|
oDomRef.setStyle(oTableElm, 'width', oDimensionWidthInput.getValue() + "px");
|
|
@@ -156,4 +156,10 @@ INSERT_LINK_TARGET=Target
|
|
|
156
156
|
INSERT_TABLE_ROWS=Number of Rows:
|
|
157
157
|
|
|
158
158
|
#XFLD: Label for number of cols input for inserting table
|
|
159
|
-
INSERT_TABLE_COLS=Number of Cols:
|
|
159
|
+
INSERT_TABLE_COLS=Number of Cols:
|
|
160
|
+
|
|
161
|
+
#XMSG: Error message for rows max limit
|
|
162
|
+
INSERT_TABLE_ROWS_ERROR=The number of rows is limited to 25
|
|
163
|
+
|
|
164
|
+
#XMSG: Error message for cols max limit
|
|
165
|
+
INSERT_TABLE_COLS_ERROR=The number of cols is limited to 25
|
|
@@ -157,3 +157,9 @@ INSERT_TABLE_ROWS=Number of Rows\:
|
|
|
157
157
|
|
|
158
158
|
#XFLD: Label for number of cols input for inserting table
|
|
159
159
|
INSERT_TABLE_COLS=Number of Columns\:
|
|
160
|
+
|
|
161
|
+
#XMSG: Error message for rows max limit
|
|
162
|
+
INSERT_TABLE_ROWS_ERROR=The number of rows is limited to 25
|
|
163
|
+
|
|
164
|
+
#XMSG: Error message for cols max limit
|
|
165
|
+
INSERT_TABLE_COLS_ERROR=The number of columns is limited to 25
|
|
@@ -157,3 +157,9 @@ INSERT_TABLE_ROWS=\u206A\u206A\u206A\u200D\u200B\u200D\u200C\u200C\u200B\u200B\u
|
|
|
157
157
|
|
|
158
158
|
#XFLD: Label for number of cols input for inserting table
|
|
159
159
|
INSERT_TABLE_COLS=\u206A\u206A\u206A\u200C\u200B\u200B\u200D\u200C\u200C\u200D\u200B\u200C\u200B\u200C\u200C\u200B\u200B\u200C\u200D\u200C\u200D\u200B\u200B\u200B\u200D\u200C\u200D\u200B\u200C\u200D\u200B\u200B\u200C\u200D\u200C\u200C\u200C\u200C\u200B\u200B\u200B\u200C\u200D\u200B\u206ANumber of Columns\:\u206A\u206A
|
|
160
|
+
|
|
161
|
+
#XMSG: Error message for rows max limit
|
|
162
|
+
INSERT_TABLE_ROWS_ERROR=\u206A\u206A\u206A\u200C\u200D\u200D\u200B\u200B\u200C\u200D\u200C\u200B\u200D\u200B\u200C\u200B\u200B\u200C\u200B\u200D\u200D\u200B\u200D\u200D\u200B\u200D\u200B\u200D\u200D\u200B\u200B\u200D\u200D\u200B\u200B\u200D\u200C\u200C\u200C\u200D\u200D\u200B\u200B\u206AThe number of rows is limited to 25\u206A\u206A
|
|
163
|
+
|
|
164
|
+
#XMSG: Error message for cols max limit
|
|
165
|
+
INSERT_TABLE_COLS_ERROR=\u206A\u206A\u206A\u200C\u200B\u200D\u200D\u200B\u200D\u200B\u200D\u200B\u200B\u200C\u200B\u200B\u200B\u200C\u200B\u200C\u200D\u200C\u200C\u200B\u200D\u200C\u200B\u200B\u200D\u200B\u200B\u200C\u200D\u200B\u200B\u200B\u200D\u200C\u200C\u200C\u200B\u200C\u200B\u200D\u206AThe number of columns is limited to 25\u206A\u206A
|