@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.richtexteditor",
3
- "version": "1.126.0",
3
+ "version": "1.127.0",
4
4
  "description": "SAPUI5 Library sap.ui.richtexteditor",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -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.126.0</version>
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
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @alias sap.ui.richtexteditor.RTESplitButton
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.126.0
27
+ * @version 1.127.0
28
28
  */
29
29
  var RTESplitButton = SplitButton.extend("sap.ui.richtexteditor.RTESplitButton", {
30
30
  metadata: {
@@ -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: 0,
1302
- width: "50%"
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: 0,
1311
- width: "50%"
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: oRowsInput.getValue(), columns: oColsInput.getValue() });
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(oColsInput.getValue(), oRowsInput.getValue());
1375
+ oTableElm = oNativeAPI.plugins.table.insertTable(iCols, iRows);
1366
1376
  }
1367
1377
 
1368
1378
  oDomRef.setStyle(oTableElm, 'width', oDimensionWidthInput.getValue() + "px");
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  "sap.ui.richtexteditor.RTESplitButton"
36
36
  ],
37
37
  elements: [],
38
- version: "1.126.0"
38
+ version: "1.127.0"
39
39
  });
40
40
 
41
41
  /**
@@ -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