@sapui5/sap.ui.richtexteditor 1.120.7 → 1.121.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.
Files changed (69) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +2 -2
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +2 -2
  4. package/src/sap/ui/richtexteditor/RTESplitButtonRenderer.js +1 -1
  5. package/src/sap/ui/richtexteditor/RichTextEditor.js +9 -7
  6. package/src/sap/ui/richtexteditor/RichTextEditorRenderer.js +4 -4
  7. package/src/sap/ui/richtexteditor/ToolbarWrapper.js +65 -55
  8. package/src/sap/ui/richtexteditor/ToolbarWrapperRenderer.js +1 -1
  9. package/src/sap/ui/richtexteditor/library.js +10 -9
  10. package/src/sap/ui/richtexteditor/messagebundle_ar.properties +54 -0
  11. package/src/sap/ui/richtexteditor/messagebundle_bg.properties +54 -0
  12. package/src/sap/ui/richtexteditor/messagebundle_cs.properties +54 -0
  13. package/src/sap/ui/richtexteditor/messagebundle_cy.properties +54 -0
  14. package/src/sap/ui/richtexteditor/messagebundle_da.properties +54 -0
  15. package/src/sap/ui/richtexteditor/messagebundle_de.properties +54 -0
  16. package/src/sap/ui/richtexteditor/messagebundle_el.properties +54 -0
  17. package/src/sap/ui/richtexteditor/messagebundle_en_GB.properties +54 -0
  18. package/src/sap/ui/richtexteditor/messagebundle_en_US_saprigi.properties +52 -52
  19. package/src/sap/ui/richtexteditor/messagebundle_es.properties +54 -0
  20. package/src/sap/ui/richtexteditor/messagebundle_es_MX.properties +54 -0
  21. package/src/sap/ui/richtexteditor/messagebundle_et.properties +54 -0
  22. package/src/sap/ui/richtexteditor/messagebundle_fi.properties +54 -0
  23. package/src/sap/ui/richtexteditor/messagebundle_fr.properties +54 -0
  24. package/src/sap/ui/richtexteditor/messagebundle_fr_CA.properties +54 -0
  25. package/src/sap/ui/richtexteditor/messagebundle_hi.properties +54 -0
  26. package/src/sap/ui/richtexteditor/messagebundle_hr.properties +54 -0
  27. package/src/sap/ui/richtexteditor/messagebundle_hu.properties +54 -0
  28. package/src/sap/ui/richtexteditor/messagebundle_id.properties +54 -0
  29. package/src/sap/ui/richtexteditor/messagebundle_it.properties +54 -0
  30. package/src/sap/ui/richtexteditor/messagebundle_iw.properties +54 -0
  31. package/src/sap/ui/richtexteditor/messagebundle_ja.properties +54 -0
  32. package/src/sap/ui/richtexteditor/messagebundle_kk.properties +54 -0
  33. package/src/sap/ui/richtexteditor/messagebundle_ko.properties +54 -0
  34. package/src/sap/ui/richtexteditor/messagebundle_lt.properties +54 -0
  35. package/src/sap/ui/richtexteditor/messagebundle_lv.properties +54 -0
  36. package/src/sap/ui/richtexteditor/messagebundle_mk.properties +54 -0
  37. package/src/sap/ui/richtexteditor/messagebundle_ms.properties +54 -0
  38. package/src/sap/ui/richtexteditor/messagebundle_nl.properties +54 -0
  39. package/src/sap/ui/richtexteditor/messagebundle_no.properties +54 -0
  40. package/src/sap/ui/richtexteditor/messagebundle_pl.properties +54 -0
  41. package/src/sap/ui/richtexteditor/messagebundle_pt.properties +54 -0
  42. package/src/sap/ui/richtexteditor/messagebundle_pt_PT.properties +54 -0
  43. package/src/sap/ui/richtexteditor/messagebundle_ro.properties +54 -0
  44. package/src/sap/ui/richtexteditor/messagebundle_ru.properties +54 -0
  45. package/src/sap/ui/richtexteditor/messagebundle_sh.properties +57 -3
  46. package/src/sap/ui/richtexteditor/messagebundle_sk.properties +54 -0
  47. package/src/sap/ui/richtexteditor/messagebundle_sl.properties +54 -0
  48. package/src/sap/ui/richtexteditor/messagebundle_sr.properties +159 -0
  49. package/src/sap/ui/richtexteditor/messagebundle_sv.properties +54 -0
  50. package/src/sap/ui/richtexteditor/messagebundle_th.properties +54 -0
  51. package/src/sap/ui/richtexteditor/messagebundle_tr.properties +54 -0
  52. package/src/sap/ui/richtexteditor/messagebundle_uk.properties +54 -0
  53. package/src/sap/ui/richtexteditor/messagebundle_vi.properties +54 -0
  54. package/src/sap/ui/richtexteditor/messagebundle_zh_CN.properties +54 -0
  55. package/src/sap/ui/richtexteditor/messagebundle_zh_TW.properties +54 -0
  56. package/src/sap/ui/richtexteditor/themes/base/library.source.less +1 -1
  57. package/src/sap/ui/richtexteditor/themes/sap_belize/library.source.less +1 -1
  58. package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/library.source.less +1 -1
  59. package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/library.source.less +1 -1
  60. package/src/sap/ui/richtexteditor/themes/sap_belize_plus/library.source.less +1 -1
  61. package/src/sap/ui/richtexteditor/themes/sap_bluecrystal/library.source.less +1 -1
  62. package/src/sap/ui/richtexteditor/themes/sap_fiori_3/library.source.less +1 -1
  63. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_dark/library.source.less +1 -1
  64. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcb/library.source.less +1 -1
  65. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcw/library.source.less +1 -1
  66. package/src/sap/ui/richtexteditor/themes/sap_horizon/library.source.less +1 -1
  67. package/src/sap/ui/richtexteditor/themes/sap_horizon_dark/library.source.less +1 -1
  68. package/src/sap/ui/richtexteditor/themes/sap_horizon_hcb/library.source.less +1 -1
  69. package/src/sap/ui/richtexteditor/themes/sap_horizon_hcw/library.source.less +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.richtexteditor",
3
- "version": "1.120.7",
3
+ "version": "1.121.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)",
@@ -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-2023 SAP SE. All rights reserved.</copyright>
8
- <version>1.120.7</version>
7
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.</copyright>
8
+ <version>1.121.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-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 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.120.7
27
+ * @version 1.121.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-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 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,10 +1,12 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides control sap.ui.richtexteditor.RichTextEditor.
7
7
  sap.ui.define([
8
+ "sap/base/i18n/Localization",
9
+ "sap/ui/core/Lib",
8
10
  "sap/ui/thirdparty/jquery",
9
11
  'sap/ui/core/Control',
10
12
  'sap/ui/core/library',
@@ -17,11 +19,12 @@ sap.ui.define([
17
19
  "sap/base/Log",
18
20
  "sap/base/security/sanitizeHTML",
19
21
  "sap/ui/events/KeyCodes",
20
- "sap/ui/core/Core",
21
22
  // Control renderer
22
23
  "./RichTextEditorRenderer"
23
24
  ],
24
25
  function(
26
+ Localization,
27
+ Library,
25
28
  jQuery,
26
29
  Control,
27
30
  coreLibrary,
@@ -33,8 +36,7 @@ sap.ui.define([
33
36
  includeScript,
34
37
  Log,
35
38
  sanitizeHTML,
36
- KeyCodes,
37
- Core
39
+ KeyCodes
38
40
  ) {
39
41
  "use strict";
40
42
 
@@ -1718,7 +1720,7 @@ sap.ui.define([
1718
1720
  var oEditorIFrame = document.getElementById(this._iframeId),
1719
1721
  oCustomToolbar = this.getAggregation("_toolbarWrapper"),
1720
1722
  oToolbarDOM = oCustomToolbar && oCustomToolbar.getAggregation("_toolbar").getDomRef(),
1721
- oResourceBundle = Core.getLibraryResourceBundle("sap.ui.richtexteditor");
1723
+ oResourceBundle = Library.getResourceBundleFor("sap.ui.richtexteditor");
1722
1724
 
1723
1725
  // ARIA
1724
1726
  if (oEditorIFrame) {
@@ -1863,7 +1865,7 @@ sap.ui.define([
1863
1865
  RichTextEditor.prototype._getTextDirection = function() {
1864
1866
  // use the global config if no textDirection is specified
1865
1867
  if (this.getTextDirection() === this.getMetadata().getProperty("textDirection").getDefaultValue()) {
1866
- return Core.getConfiguration().getRTL() ? "rtl" : "ltr";
1868
+ return Localization.getRTL() ? "rtl" : "ltr";
1867
1869
  } else {
1868
1870
  return this.getTextDirection().toLowerCase();
1869
1871
  }
@@ -1956,7 +1958,7 @@ sap.ui.define([
1956
1958
  * @returns {string} The language to be used for TinyMCE
1957
1959
  */
1958
1960
  RichTextEditor.prototype._getLanguageTinyMCE = function() {
1959
- var oLocale = new Locale(Core.getConfiguration().getLanguage()),
1961
+ var oLocale = new Locale(Localization.getLanguage()),
1960
1962
  sLanguage = oLocale.getLanguage(),
1961
1963
  sRegion = oLocale.getRegion(),
1962
1964
  bIsTinyMCE6 = this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE6 || this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE,
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.
4
4
  */
5
5
  // Provides default renderer for control sap.ui.richtexteditor.RichTextEditor
6
- sap.ui.define(['sap/ui/core/Core'],
7
- function(Core) {
6
+ sap.ui.define(["sap/ui/core/Lib"],
7
+ function(Library) {
8
8
  "use strict";
9
9
 
10
10
 
@@ -27,7 +27,7 @@ sap.ui.define(['sap/ui/core/Core'],
27
27
  RichTextEditorRenderer.render = function(rm, oRichTextEditor) {
28
28
  var oToolbarWrapper = oRichTextEditor.getAggregation("_toolbarWrapper");
29
29
  var bCustomToolbar = oToolbarWrapper && oRichTextEditor._bCustomToolbarRequirementsFullfiled;
30
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.richtexteditor");
30
+ var oResourceBundle = Library.getResourceBundleFor("sap.ui.richtexteditor");
31
31
  var aPlugins = oRichTextEditor.getPlugins();
32
32
  var bAutoresize = false;
33
33
 
@@ -1,30 +1,33 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  // Provides control sap.ui.richtexteditor.ToolbarWrapper.
7
7
  sap.ui.define([
8
+ "sap/ui/core/Element",
9
+ "sap/ui/core/Lib",
8
10
  "sap/ui/thirdparty/jquery",
9
11
  'sap/ui/core/Control',
10
12
  './library',
11
13
  "sap/m/library",
12
14
  'sap/ui/core/IconPool',
13
15
  'sap/ui/core/Item',
14
- 'sap/ui/core/Core',
15
16
  'sap/ui/richtexteditor/RTESplitButton',
16
17
  "sap/base/security/URLListValidator",
17
18
  "sap/base/Log",
18
- "./ToolbarWrapperRenderer" // Control renderer
19
+ // Control renderer
20
+ "./ToolbarWrapperRenderer"
19
21
  ],
20
22
  function(
23
+ Element,
24
+ Library,
21
25
  jQuery,
22
26
  Control,
23
27
  library,
24
28
  mLibrary,
25
29
  IconPool,
26
30
  Item,
27
- Core,
28
31
  RTESplitButton,
29
32
  URLListValidator,
30
33
  Log
@@ -98,7 +101,7 @@ sap.ui.define([
98
101
  // This helper is defined within richtexteditor's library.js to provide loose coupling
99
102
  // with the controls in sap.m library
100
103
  this._helper = library.RichTextEditorHelper;
101
- this._oResourceBundle = Core.getLibraryResourceBundle("sap.ui.richtexteditor");
104
+ this._oResourceBundle = Library.getResourceBundleFor("sap.ui.richtexteditor");
102
105
  this._oAccessibilityTexts = {};
103
106
  this._sTextColor = EditorCommands.TextColor.defaultValue;
104
107
  this._sBackgroundColor = EditorCommands.BackgroundColor.defaultValue;
@@ -252,7 +255,7 @@ sap.ui.define([
252
255
  */
253
256
  ToolbarWrapper.prototype.getEditor = function () {
254
257
  var sId = this.getAssociation("editor"),
255
- oEditor = Core.byId(sId);
258
+ oEditor = Element.getElementById(sId);
256
259
 
257
260
  return oEditor || null;
258
261
  };
@@ -328,7 +331,7 @@ sap.ui.define([
328
331
 
329
332
  if (sCommand === "BackgroundColor") {
330
333
  oColorButtonIcon = oColorButton && oColorButton._getTextButton().getDomRef("img");
331
- oColorButtonIcon && Core.byId(oColorButtonIcon.id).setColor(sColor);
334
+ oColorButtonIcon && Element.getElementById(oColorButtonIcon.id).setColor(sColor);
332
335
  }
333
336
  };
334
337
  /**
@@ -428,7 +431,7 @@ sap.ui.define([
428
431
 
429
432
  oEditorCommand = EditorCommands[sEditorCommand];
430
433
  // TODO: Probably there's a better way to handle this
431
- oControl = Core.byId(this._getId(sEditorCommand));
434
+ oControl = Element.getElementById(this._getId(sEditorCommand));
432
435
 
433
436
  if (!oControl) {
434
437
  continue;
@@ -871,13 +874,18 @@ sap.ui.define([
871
874
  oSelection.getContent({format: 'text'});
872
875
  }
873
876
 
877
+ // save the text content which will later on be modified as a link
878
+ // in order to detect whether we should execute 'mceInsertLink'
879
+ // or modify the html content manually due to user modification of the text content
880
+ this.sSelectionTextValue = sDisplayText && sDisplayText.replace(/\uFEFF/g,"");
881
+
874
882
  sURL = oSelectedNode.getAttribute('href');
875
883
  sTitle = oSelectedNode.getAttribute('title');
876
884
  bTarget = oSelectedNode.getAttribute('target') === "true";
877
885
 
878
886
  aDialogContent[1].setValue(sURL);
879
887
  // sometimes there is an zero non-breaking whitespace added
880
- aDialogContent[3].setValue(sDisplayText && sDisplayText.replace(/\uFEFF/g,""));
888
+ aDialogContent[3].setValue(this.sSelectionTextValue);
881
889
  aDialogContent[5].setValue(sTitle);
882
890
  aDialogContent[6].getAggregation('items')[1].setSelectedIndex(bTarget);
883
891
  };
@@ -1115,7 +1123,7 @@ sap.ui.define([
1115
1123
  };
1116
1124
 
1117
1125
  /**
1118
- * Helper function for generating link HTML content
1126
+ * Helper function for handling link HTML content
1119
1127
  *
1120
1128
  * @param {string} [sURL] The URL of the HTML link tag
1121
1129
  * @param {string} [sTitle] The title of the HTML link tag
@@ -1123,69 +1131,70 @@ sap.ui.define([
1123
1131
  * @param {string} [sText] The text of the HTML link tag
1124
1132
  * @private
1125
1133
  */
1126
- ToolbarWrapper.prototype._generateLinkHTML = function (sURL, sTitle, bTarget, sText) {
1127
- var linkAttrs = {
1134
+ ToolbarWrapper.prototype.handleLinks = function (sURL, sTitle, bTarget, sText) {
1135
+ var oLinkAttrs = {
1128
1136
  href: sURL && URLListValidator.validate(sURL) ? sURL : '',
1129
1137
  target: bTarget ? bTarget : null,
1130
1138
  title: sTitle && URLListValidator.validate(sTitle) ? sTitle : ''
1131
1139
  },
1132
1140
  oNativeEditor = this.getEditor().getNativeApi(),
1133
1141
  oSelection = oNativeEditor.selection,
1134
- bEventFired = false,
1135
- oAnchor, aLinksBefore, aLinksAfter;
1142
+ oAnchor = this._getSelectionAnchor(oSelection);
1143
+
1144
+ oAnchor ? this.updateLink(oAnchor, oLinkAttrs, sText) : this.createLink(oLinkAttrs, sText);
1145
+ };
1136
1146
 
1137
- // find the selected anchor element, if present
1138
- oAnchor = this._getSelectionAnchor(oSelection);
1147
+ /**
1148
+ * Creates an anchor element based on the user input and node selection
1149
+ *
1150
+ * @param {object} [oLinkAttrs] Link attributes to be passed to the anchor tag
1151
+ * @param {string} [sText] Text value of the anchor
1152
+ * @private
1153
+ */
1154
+ ToolbarWrapper.prototype.createLink = function (oLinkAttrs, sText) {
1155
+ var oNativeEditor = this.getEditor().getNativeApi();
1139
1156
 
1140
1157
  // if there is no url provided and no link selected, do not generate an anchor
1141
- if (sURL === "" && !oAnchor) {
1158
+ if (oLinkAttrs.href === "") {
1142
1159
  return;
1143
1160
  }
1144
1161
 
1145
- // if we delete the href of an existing anchor we should unlink it
1146
- if (sURL === "" && oAnchor) {
1147
- oNativeEditor.execCommand("Unlink");
1148
- return;
1162
+ // if the user modifies the predefined text value of the current node via the dialog we should perform insertContent
1163
+ if (sText !== this.sSelectionTextValue || sText === "") {
1164
+ oNativeEditor.insertContent(oNativeEditor.dom.createHTML('a', oLinkAttrs, oNativeEditor.dom.encode(sText)));
1165
+ } else {
1166
+ oNativeEditor.execCommand('mceInsertLink', false, oLinkAttrs);
1149
1167
  }
1168
+ };
1150
1169
 
1151
- if (!oAnchor) {
1152
- // There might be links with the same URL
1153
- aLinksBefore = oNativeEditor.dom.select('a[href="' + linkAttrs.href + '"]');
1154
-
1155
- if (sText !== "") {
1156
- oNativeEditor.insertContent(oNativeEditor.dom.createHTML('a', linkAttrs, oNativeEditor.dom.encode(sText)));
1157
- bEventFired = true;
1158
- } else {
1159
- oNativeEditor.execCommand('mceInsertLink', false, linkAttrs);
1160
- bEventFired = true;
1161
- }
1162
-
1163
- // Select the matching links after insertion. They'd be 1 more
1164
- aLinksAfter = oNativeEditor.dom.select('a[href="' + linkAttrs.href + '"]');
1170
+ /**
1171
+ * Updates an existing anchor element based on the user input and node selection
1172
+ *
1173
+ * @param {object} [oAnchor] Anchor element to be updated
1174
+ * @param {object} [oLinkAttrs] Link attributes to be passed to the anchor tag
1175
+ * @param {string} [sText] Text value of the anchor
1176
+ * @private
1177
+ */
1178
+ ToolbarWrapper.prototype.updateLink = function (oAnchor, oLinkAttrs, sText) {
1179
+ var oNativeEditor = this.getEditor().getNativeApi();
1165
1180
 
1166
- // Intersect and extract just the lastly inserted link
1167
- oAnchor = aLinksAfter.filter(function (oLink) {
1168
- return aLinksBefore.indexOf(oLink) === -1;
1169
- })[0];
1181
+ // if we delete the href of an existing anchor we should unlink it
1182
+ if (oLinkAttrs.href === "") {
1183
+ oNativeEditor.execCommand("Unlink");
1184
+ return;
1170
1185
  }
1171
1186
 
1172
1187
  // ensure that if an anchor has a inner span (due to different styles applied)
1173
1188
  // the span text should be the same as the anchor text value
1174
1189
  // ensure that the text attribute value is the same as the innerText of the anchor
1175
- if ("innerText" in oAnchor) {
1176
- oAnchor.innerText = sText !== "" ? sText : sURL;
1177
- } else {
1178
- oAnchor.textContent = sText !== "" ? sText : sURL;
1179
- }
1190
+ oAnchor[Object.hasOwn(oAnchor, "innerText") ? "innerText" : "textContent"] = sText;
1180
1191
 
1181
- oNativeEditor.dom.setAttribs(oAnchor, linkAttrs);
1192
+ oNativeEditor.dom.setAttribs(oAnchor, oLinkAttrs);
1182
1193
  oNativeEditor.selection.select(oAnchor);
1183
1194
 
1184
1195
  // There should be always a "change" event when executing link edit dialog.
1185
1196
  // TinyMCE's actions like execCommand and insertContent would trigger a change event, but the others won't.
1186
- if (!bEventFired) {
1187
- oNativeEditor.fire("change");
1188
- }
1197
+ oNativeEditor.fire("change");
1189
1198
  };
1190
1199
 
1191
1200
  /**
@@ -1244,10 +1253,11 @@ sap.ui.define([
1244
1253
  text: this._oResourceBundle.getText("DIALOG_OK_BUTTON"),
1245
1254
  press: function () {
1246
1255
  var bTarget = (oTargetSelect.getSelectedItem() === oTargetSelect.getItems()[1]);
1247
- that._generateLinkHTML(oURLInput.getValue(),
1256
+ that.handleLinks(oURLInput.getValue(),
1248
1257
  oTitleInput.getValue(),
1249
1258
  bTarget,
1250
- oTextInput.getValue());
1259
+ // if no text is provided, write the URL value as text of the link
1260
+ oTextInput.getValue() || oURLInput.getValue());
1251
1261
  that.getAggregation("_customInsertLinkDialog").close();
1252
1262
  that._syncToolbarStates(oRTE.getNativeApi());
1253
1263
  }
@@ -1447,7 +1457,7 @@ sap.ui.define([
1447
1457
  oObject.setVisible(bShow);
1448
1458
  });
1449
1459
 
1450
- oToolbar && oToolbar.rerender();
1460
+ oToolbar && oToolbar.invalidate();
1451
1461
  };
1452
1462
 
1453
1463
  /**
@@ -1932,7 +1942,7 @@ sap.ui.define([
1932
1942
  var aIds = this._oAccessibilityTexts[sGroupName] || [];
1933
1943
 
1934
1944
  aIds.forEach(function(sId){
1935
- Core.byId(sId).destroy();
1945
+ Element.getElementById(sId).destroy();
1936
1946
  });
1937
1947
 
1938
1948
  this._oAccessibilityTexts[sGroupName] = [];
@@ -2161,7 +2171,7 @@ sap.ui.define([
2161
2171
  var oToolbar = this.getAggregation("_toolbar"),
2162
2172
  vResult = oToolbar.addContent(oItem);
2163
2173
 
2164
- oToolbar.rerender();
2174
+ oToolbar.invalidate();
2165
2175
 
2166
2176
  if (vResult) {
2167
2177
  this._updateCustomToolbarRefIds(oItem.getId());
@@ -2215,7 +2225,7 @@ sap.ui.define([
2215
2225
  iCalculatedIndex += iIndex;
2216
2226
 
2217
2227
  vResult = oToolbar.insertContent(oItem, iCalculatedIndex);
2218
- oToolbar.rerender();
2228
+ oToolbar.invalidate();
2219
2229
 
2220
2230
  if (vResult) {
2221
2231
  this._updateCustomToolbarRefIds(oItem.getId(), iIndex);
@@ -2270,7 +2280,7 @@ sap.ui.define([
2270
2280
  if (!oRTE) {
2271
2281
  return null;
2272
2282
  }
2273
- return Core.byId(oRTE.getId() + this.getId() + "-" + sButtonName);
2283
+ return Element.getElementById(oRTE.getId() + this.getId() + "-" + sButtonName);
2274
2284
  };
2275
2285
 
2276
2286
  return ToolbarWrapper;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.
4
4
  */
5
5
  // Provides default renderer for control sap.ui.richtexteditor.ToolbarWrapper
6
6
  sap.ui.define([],
@@ -1,15 +1,16 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2023 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2024 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  /**
7
7
  * Initialization Code and shared classes of library sap.ui.richtexteditor.
8
8
  */
9
9
  sap.ui.define([
10
- "sap/ui/core/Core", // provides sap.ui.getCore()
11
- "sap/ui/core/library" // library dependency
12
- ], function (Core) {
10
+ "sap/ui/core/Lib",
11
+ // library dependency
12
+ "sap/ui/core/library"
13
+ ], function(Library) {
13
14
  "use strict";
14
15
 
15
16
  /**
@@ -19,7 +20,7 @@ sap.ui.define([
19
20
  * @alias sap.ui.richtexteditor
20
21
  * @public
21
22
  */
22
- var thisLib = sap.ui.getCore().initLibrary({
23
+ var thisLib = Library.init({
23
24
  name : "sap.ui.richtexteditor",
24
25
  dependencies : ["sap.ui.core"],
25
26
  types: [
@@ -34,7 +35,7 @@ sap.ui.define([
34
35
  "sap.ui.richtexteditor.RTESplitButton"
35
36
  ],
36
37
  elements: [],
37
- version: "1.120.7"
38
+ version: "1.121.0"
38
39
  });
39
40
 
40
41
  /**
@@ -520,7 +521,7 @@ sap.ui.define([
520
521
  };
521
522
 
522
523
  // Check for sap.m library and set the RichTextEditorHelper
523
- if (sap.ui.getCore().getLoadedLibraries()["sap.m"]) {
524
+ if (Library.isLoaded("sap.m")) {
524
525
  setSapMDependencies();
525
526
  } else {
526
527
  var libraryChangedListener = function (oEvent) {
@@ -528,11 +529,11 @@ sap.ui.define([
528
529
 
529
530
  if (oEventParams.stereotype === "library" && oEventParams.name === "sap.m") {
530
531
  setTimeout(setSapMDependencies.bind(null), 0);
531
- setTimeout(sap.ui.getCore()['detachLibraryChanged'].bind(sap.ui.getCore(), libraryChangedListener), 0);
532
+ setTimeout(Library.detachLibraryChanged.bind(Library, libraryChangedListener), 0);
532
533
  }
533
534
  };
534
535
 
535
- sap.ui.getCore().attachLibraryChanged(libraryChangedListener);
536
+ Library.attachLibraryChanged(libraryChangedListener);
536
537
  }
537
538
 
538
539
  return thisLib;
@@ -1,105 +1,159 @@
1
+ #This is the resource bundle for the SAPUI5 sap.ui.richtexteditor library
2
+ #
1
3
 
2
4
 
5
+ #XACT: Text for the aria-roledescription attribute of the custom toolbar wrapper
3
6
  CUSTOM_TOOLBAR_ARIA_ROLEDESCRIPTION=\u062E\u064A\u0627\u0631\u0627\u062A \u062A\u062D\u0631\u064A\u0631 \u0627\u0644\u0646\u0635 \u0627\u0644\u0645\u0646\u0633\u0642
4
7
 
8
+ #XACT: Text for the aria-label attribute of the Rich Text Editor wrapper element
5
9
  RTE_ARIA_LABEL=\u0645\u062D\u0631\u0631 \u0627\u0644\u0646\u0635 \u0627\u0644\u0645\u0646\u0633\u0642
6
10
 
11
+ #XTOL: Tooltip for bold button
7
12
  BOLD_BUTTON_TOOLTIP=\u0639\u0631\u064A\u0636
8
13
 
14
+ #XTOL: Tooltip for italic button
9
15
  ITALIC_BUTTON_TOOLTIP=\u0645\u0627\u0626\u0644
10
16
 
17
+ #XTOL: Tooltip for underline button
11
18
  UNDERLINE_BUTTON_TOOLTIP=\u062A\u0633\u0637\u064A\u0631
12
19
 
20
+ #XTOL: Tooltip for strikethrough button
13
21
  STRIKETHROUGH_BUTTON_TOOLTIP=\u0634\u0637\u0628
14
22
 
23
+ #XTOL: Tooltip for text align menu button
15
24
  TEXTALIGN_BUTTON_TOOLTIP=\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0646\u0635
16
25
 
26
+ #XTOL: Tooltip for text formatBlock menu button
17
27
  FORMAT_BUTTON_TOOLTIP=\u062A\u0646\u0633\u064A\u0642
18
28
 
29
+ #XTOL: Heading 1 from formatting menu
19
30
  HEADING1_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 1
20
31
 
32
+ #XTOL: Heading 2 from formatting menu
21
33
  HEADING2_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 2
22
34
 
35
+ #XTOL: Heading 3 from formatting menu
23
36
  HEADING3_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 3
24
37
 
38
+ #XTOL: Heading 4 from formatting menu
25
39
  HEADING4_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 4
26
40
 
41
+ #XTOL: Heading 5 from formatting menu
27
42
  HEADING5_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 5
28
43
 
44
+ #XTOL: Heading 6 from formatting menu
29
45
  HEADING6_BUTTON_TEXT=\u0639\u0646\u0648\u0627\u0646 6
30
46
 
47
+ #XTOL: Paragraph from formatting menu
31
48
  PARAGRAPH_BUTTON_TEXT=\u0641\u0642\u0631\u0629
32
49
 
50
+ #XTOL: Tooltip for background color button
33
51
  BACKGROUND_COLOR_BUTTON_TOOLTIP=\u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629
34
52
 
53
+ #XTOL: Tooltip for text color button
35
54
  TEXT_COLOR_BUTTON_TOOLTIP=\u0644\u0648\u0646 \u0627\u0644\u0646\u0635
36
55
 
56
+ #XTOL: Tooltip for cut button
37
57
  CUT_BUTTON_TOOLTIP=\u0642\u0635
38
58
 
59
+ #XTOL: Tooltip for copy button
39
60
  COPY_BUTTON_TOOLTIP=\u0646\u0633\u062E
40
61
 
62
+ #XTOL: Tooltip for paste button
41
63
  PASTE_BUTTON_TOOLTIP=\u0644\u0635\u0642
42
64
 
65
+ #XTOL: Tooltip for undo button
43
66
  UNDO_BUTTON_TOOLTIP=\u062A\u0631\u0627\u062C\u0639
44
67
 
68
+ #XTOL: Tooltip for redo button
45
69
  REDO_BUTTON_TOOLTIP=\u0625\u0639\u0627\u062F\u0629
46
70
 
71
+ #XTOL: Tooltip for link button
47
72
  LINK_BUTTON_TOOLTIP=\u0625\u062F\u0631\u0627\u062C/\u062A\u062D\u0631\u064A\u0631 \u0627\u0631\u062A\u0628\u0627\u0637
48
73
 
74
+ #XTOL: Tooltip for unlink button
49
75
  UNLINK_BUTTON_TOOLTIP=\u0625\u0632\u0627\u0644\u0629 \u0627\u0631\u062A\u0628\u0627\u0637
50
76
 
77
+ #XTOL: Tooltip for insert image button
51
78
  IMAGE_BUTTON_TOOLTIP=\u0625\u062F\u0631\u0627\u062C/\u062A\u062D\u0631\u064A\u0631 \u0635\u0648\u0631\u0629
52
79
 
80
+ #XTOL: Tooltip for unordered list button
53
81
  UNORDERED_LIST_BUTTON_TOOLTIP=\u0642\u0627\u0626\u0645\u0629 \u0630\u0627\u062A \u062A\u0639\u062F\u0627\u062F \u0646\u0642\u0637\u064A
54
82
 
83
+ #XTOL: Tooltip for ordered list button
55
84
  ORDERED_LIST_BUTTON_TOOLTIP=\u0642\u0627\u0626\u0645\u0629 \u0630\u0627\u062A \u062A\u0639\u062F\u0627\u062F \u0631\u0642\u0645\u064A
56
85
 
86
+ #XTOL: Tooltip for outdent button
57
87
  OUTDENT_BUTTON_TOOLTIP=\u062A\u0642\u0644\u064A\u0644 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629
58
88
 
89
+ #XTOL: Tooltip for indent button
59
90
  INDENT_BUTTON_TOOLTIP=\u0632\u064A\u0627\u062F\u0629 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629
60
91
 
92
+ #XTOL: Tooltip for insert table button
61
93
  TABLE_BUTTON_TOOLTIP=\u0625\u062F\u0631\u0627\u062C \u062C\u062F\u0648\u0644
62
94
 
95
+ #XTOL: Description for font family select
63
96
  FONT_FAMILY_TEXT=\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u062E\u0637\u0648\u0637
64
97
 
98
+ #XTOL: Description for font size select
65
99
  FONT_SIZE_TEXT=\u062D\u062C\u0645 \u0627\u0644\u062E\u0637
66
100
 
101
+ #XTOL: Description for text color button
67
102
  FONT_COLOR_TEXT=\u0644\u0648\u0646 \u0627\u0644\u0646\u0635
68
103
 
104
+ #XTOL: Description for text color button
69
105
  BACKGROUND_COLOR_TEXT=\u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629
70
106
 
107
+ #XTOL: Heading for left alignment option from alignment menu
71
108
  TEXTALIGH_LEFT=\u064A\u0633\u0627\u0631
72
109
 
110
+ #XTOL: Heading for right alignment option from alignment menu
73
111
  TEXTALIGH_RIGHT=\u064A\u0645\u064A\u0646
74
112
 
113
+ #XTOL: Heading for center alignment option from alignment menu
75
114
  TEXTALIGH_CENTER=\u0648\u0633\u0637
76
115
 
116
+ #XTOL: Heading for full alignment option from alignment menu
77
117
  TEXTALIGH_FULL=\u0636\u0628\u0637
78
118
 
119
+ #XFLD: Label for source url input for inserting image
79
120
  INSERT_IMAGE_URL=\u0631\u0627\u0628\u0637 \u0627\u0644\u0645\u0635\u062F\u0631
80
121
 
122
+ #XFLD: Label for image description input for inserting image
81
123
  INSERT_IMAGE_DESCRIPTION=\u0627\u0644\u0648\u0635\u0641
82
124
 
125
+ #XFLD: Label for dimensions inputs for inserting content
83
126
  INSERT_CONTENT_DIMENSIONS=\u0627\u0644\u0623\u0628\u0639\u0627\u062F
84
127
 
128
+ #XCKL: Label for aspect ratio checkbox for inserting image
85
129
  INSERT_IMAGE_RATIO=\u0635\u064A\u0627\u0646\u0629 \u0646\u0633\u0628\u0629 \u0627\u0644\u0623\u0628\u0639\u0627\u062F
86
130
 
131
+ #XBUT: OK button for inserting content dialog
87
132
  DIALOG_OK_BUTTON=\u0645\u0648\u0627\u0641\u0642
88
133
 
134
+ #XBUT: Cancel button for inserting content dialog
89
135
  DIALOG_CANCEL_BUTTON=\u0625\u0644\u063A\u0627\u0621
90
136
 
137
+ #XFLD: Label for url input for inserting link
91
138
  INSERT_LINK_URL=\u0627\u0644\u0631\u0627\u0628\u0637
92
139
 
140
+ #XFLD: Label for display text input for inserting link
93
141
  INSERT_LINK_DISPLAY_TEXT=\u0639\u0631\u0636 \u0627\u0644\u0646\u0635
94
142
 
143
+ #XFLD: Label for title input for inserting link
95
144
  INSERT_LINK_TITLE=\u0627\u0644\u0639\u0646\u0648\u0627\u0646
96
145
 
146
+ #XLST: Select list item for target none
97
147
  INSERT_LINK_TARGET_NONE=\u0644\u0627 \u0634\u064A\u0621
98
148
 
149
+ #XLST: Select list item for target new window
99
150
  INSERT_LINK_TARGET_NEW_WINDOW=\u0646\u0627\u0641\u0630\u0629 \u062C\u062F\u064A\u062F\u0629
100
151
 
152
+ #XFLD: Label for target select for inserting link
101
153
  INSERT_LINK_TARGET=\u0627\u0644\u0647\u062F\u0641
102
154
 
155
+ #XFLD: Label for number of rows input for inserting table
103
156
  INSERT_TABLE_ROWS=\u0639\u062F\u062F \u0627\u0644\u0635\u0641\u0648\u0641\:
104
157
 
158
+ #XFLD: Label for number of cols input for inserting table
105
159
  INSERT_TABLE_COLS=\u0639\u062F\u062F \u0627\u0644\u0623\u0639\u0645\u062F\u0629\: