@sapui5/sap.ui.richtexteditor 1.84.40 → 1.84.42

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 (430) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +27 -4
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +3 -3
  4. package/src/sap/ui/richtexteditor/RTESplitButtonRenderer.js +8 -4
  5. package/src/sap/ui/richtexteditor/RichTextEditor.js +551 -401
  6. package/src/sap/ui/richtexteditor/RichTextEditorRenderer.js +15 -7
  7. package/src/sap/ui/richtexteditor/ToolbarWrapper.js +570 -307
  8. package/src/sap/ui/richtexteditor/ToolbarWrapperRenderer.js +4 -5
  9. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/a11ychecker/plugin.js +1 -1
  10. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/a11ychecker/plugin.min.js +1 -1
  11. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/help/plugin.min.js +1 -1
  12. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.js +197 -0
  13. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.min.js +7 -0
  14. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/index.js +13 -0
  15. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ar.js +7 -0
  16. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/bg_BG.js +7 -0
  17. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ca.js +7 -0
  18. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cs.js +7 -0
  19. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cy.js +1 -0
  20. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/da.js +7 -0
  21. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/de.js +7 -0
  22. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/dv.js +1 -0
  23. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/el.js +7 -0
  24. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/en_GB.js +261 -0
  25. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es.js +7 -0
  26. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es_MX.js +1 -0
  27. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/et.js +1 -0
  28. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/eu.js +7 -0
  29. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fa.js +7 -0
  30. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fi.js +7 -0
  31. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fr_FR.js +7 -0
  32. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/he_IL.js +7 -0
  33. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hi.js +7 -0
  34. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hr.js +7 -0
  35. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hu_HU.js +7 -0
  36. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/id.js +7 -0
  37. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/it.js +7 -0
  38. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ja.js +7 -0
  39. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/kk.js +7 -0
  40. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ko_KR.js +7 -0
  41. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lt.js +1 -0
  42. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lv.js +1 -0
  43. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ms.js +7 -0
  44. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nb_NO.js +7 -0
  45. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nl.js +7 -0
  46. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pl.js +7 -0
  47. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_BR.js +7 -0
  48. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_PT.js +7 -0
  49. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ro.js +7 -0
  50. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ru.js +7 -0
  51. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sk.js +7 -0
  52. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sl_SI.js +7 -0
  53. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sr.js +1 -0
  54. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sv_SE.js +7 -0
  55. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/th_TH.js +7 -0
  56. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/tr.js +7 -0
  57. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/uk.js +7 -0
  58. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/vi.js +7 -0
  59. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_CN.js +7 -0
  60. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_TW.js +7 -0
  61. package/src/sap/ui/richtexteditor/js/tiny_mce6/license.txt +5 -0
  62. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/index.js +13 -0
  63. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.js +8045 -0
  64. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.min.js +9 -0
  65. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/index.js +13 -0
  66. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.js +1038 -0
  67. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.min.js +9 -0
  68. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/CHANGELOG.md +110 -0
  69. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.css +13 -0
  70. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.js +13 -0
  71. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.js +10 -0
  72. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.min.js +10 -0
  73. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ar.js +15 -0
  74. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/bg_BG.js +15 -0
  75. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ca.js +15 -0
  76. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/cs.js +15 -0
  77. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/da.js +15 -0
  78. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/de.js +15 -0
  79. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/el.js +15 -0
  80. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/es.js +15 -0
  81. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/eu.js +15 -0
  82. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fa.js +15 -0
  83. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fi.js +15 -0
  84. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fr_FR.js +15 -0
  85. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/he_IL.js +15 -0
  86. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hi.js +15 -0
  87. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hr.js +15 -0
  88. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hu_HU.js +15 -0
  89. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/id.js +15 -0
  90. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/it.js +15 -0
  91. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ja.js +15 -0
  92. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/kk.js +15 -0
  93. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ko_KR.js +15 -0
  94. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ms.js +15 -0
  95. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nb_NO.js +15 -0
  96. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nl.js +15 -0
  97. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pl.js +15 -0
  98. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_BR.js +15 -0
  99. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_PT.js +15 -0
  100. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ro.js +15 -0
  101. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ru.js +15 -0
  102. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sk.js +15 -0
  103. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sl_SI.js +15 -0
  104. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sv_SE.js +15 -0
  105. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/th_TH.js +15 -0
  106. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/tr.js +15 -0
  107. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/uk.js +15 -0
  108. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/vi.js +15 -0
  109. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_CN.js +15 -0
  110. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_TW.js +15 -0
  111. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/license.txt +5 -0
  112. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.js +10 -0
  113. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.min.js +10 -0
  114. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/readme.txt +10 -0
  115. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/version.txt +1 -0
  116. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/index.js +13 -0
  117. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.js +264 -0
  118. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.min.js +9 -0
  119. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/index.js +13 -0
  120. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.js +219 -0
  121. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.min.js +9 -0
  122. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/index.js +13 -0
  123. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.js +233 -0
  124. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.min.js +9 -0
  125. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/index.js +13 -0
  126. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.js +197 -0
  127. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.min.js +9 -0
  128. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/index.js +13 -0
  129. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.js +238 -0
  130. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.min.js +9 -0
  131. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/index.js +13 -0
  132. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.js +1663 -0
  133. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.min.js +9 -0
  134. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/index.js +13 -0
  135. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.js +90 -0
  136. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.min.js +9 -0
  137. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/index.js +13 -0
  138. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.js +2468 -0
  139. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.min.js +9 -0
  140. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/index.js +13 -0
  141. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.js +400 -0
  142. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.min.js +9 -0
  143. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/index.js +13 -0
  144. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojiimages.js +7 -0
  145. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojiimages.min.js +9 -0
  146. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojis.js +7 -0
  147. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojis.min.js +8 -0
  148. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.js +600 -0
  149. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.min.js +9 -0
  150. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/index.js +13 -0
  151. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.js +1201 -0
  152. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.min.js +9 -0
  153. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/index.js +13 -0
  154. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ar.js +96 -0
  155. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/bg_BG.js +96 -0
  156. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ca.js +96 -0
  157. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/cs.js +96 -0
  158. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/da.js +96 -0
  159. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/de.js +96 -0
  160. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/el.js +96 -0
  161. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/en.js +96 -0
  162. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/es.js +96 -0
  163. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/eu.js +96 -0
  164. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fa.js +96 -0
  165. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fi.js +96 -0
  166. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fr_FR.js +96 -0
  167. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/he_IL.js +96 -0
  168. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hi.js +96 -0
  169. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hr.js +96 -0
  170. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hu_HU.js +96 -0
  171. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/id.js +96 -0
  172. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/it.js +96 -0
  173. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ja.js +96 -0
  174. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/kk.js +96 -0
  175. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ko_KR.js +96 -0
  176. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ms.js +96 -0
  177. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nb_NO.js +96 -0
  178. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nl.js +96 -0
  179. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pl.js +96 -0
  180. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_BR.js +96 -0
  181. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_PT.js +96 -0
  182. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ro.js +96 -0
  183. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ru.js +96 -0
  184. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sk.js +96 -0
  185. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sl_SI.js +96 -0
  186. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sv_SE.js +96 -0
  187. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/th_TH.js +96 -0
  188. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/tr.js +96 -0
  189. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/uk.js +96 -0
  190. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/vi.js +96 -0
  191. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_CN.js +90 -0
  192. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_TW.js +96 -0
  193. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.js +898 -0
  194. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.min.js +9 -0
  195. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/index.js +13 -0
  196. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.js +1509 -0
  197. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.min.js +9 -0
  198. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/index.js +13 -0
  199. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.js +349 -0
  200. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.min.js +9 -0
  201. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/index.js +13 -0
  202. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.js +192 -0
  203. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.min.js +9 -0
  204. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/index.js +13 -0
  205. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.js +1246 -0
  206. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.min.js +9 -0
  207. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/index.js +13 -0
  208. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.js +1953 -0
  209. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.min.js +9 -0
  210. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/index.js +13 -0
  211. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.js +1240 -0
  212. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.min.js +9 -0
  213. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/index.js +13 -0
  214. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.js +128 -0
  215. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.min.js +9 -0
  216. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/index.js +13 -0
  217. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.js +122 -0
  218. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.min.js +9 -0
  219. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/CHANGELOG.md +402 -0
  220. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/js/wordimport.js +3498 -0
  221. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ar.js +20 -0
  222. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/bg_BG.js +20 -0
  223. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ca.js +20 -0
  224. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/cs.js +20 -0
  225. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/da.js +20 -0
  226. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/de.js +20 -0
  227. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/el.js +20 -0
  228. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/es.js +20 -0
  229. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/eu.js +20 -0
  230. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fa.js +20 -0
  231. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fi.js +20 -0
  232. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fr_FR.js +20 -0
  233. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/he_IL.js +20 -0
  234. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hi.js +20 -0
  235. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hr.js +20 -0
  236. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hu_HU.js +20 -0
  237. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/id.js +20 -0
  238. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/it.js +20 -0
  239. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ja.js +20 -0
  240. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/kk.js +20 -0
  241. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ko_KR.js +20 -0
  242. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ms.js +20 -0
  243. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nb_NO.js +20 -0
  244. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nl.js +20 -0
  245. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pl.js +20 -0
  246. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_BR.js +20 -0
  247. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_PT.js +20 -0
  248. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ro.js +20 -0
  249. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ru.js +20 -0
  250. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sk.js +20 -0
  251. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sl_SI.js +20 -0
  252. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sv_SE.js +20 -0
  253. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/th_TH.js +20 -0
  254. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/tr.js +20 -0
  255. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/uk.js +20 -0
  256. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/vi.js +20 -0
  257. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_CN.js +20 -0
  258. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_TW.js +20 -0
  259. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/license.txt +5 -0
  260. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.js +10 -0
  261. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.min.js +10 -0
  262. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/readme.txt +10 -0
  263. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/version.txt +1 -0
  264. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/index.js +13 -0
  265. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.js +102 -0
  266. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.min.js +9 -0
  267. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/index.js +13 -0
  268. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.js +443 -0
  269. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.min.js +9 -0
  270. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/index.js +13 -0
  271. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.js +123 -0
  272. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.min.js +9 -0
  273. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/index.js +13 -0
  274. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.js +1098 -0
  275. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.min.js +9 -0
  276. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/index.js +13 -0
  277. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.js +3467 -0
  278. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.min.js +9 -0
  279. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/index.js +13 -0
  280. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.js +572 -0
  281. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.min.js +9 -0
  282. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/index.js +13 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.js +103 -0
  284. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.min.js +9 -0
  285. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/index.js +13 -0
  286. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.js +565 -0
  287. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.min.js +9 -0
  288. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/index.js +13 -0
  289. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.js +410 -0
  290. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.min.js +9 -0
  291. package/src/sap/ui/richtexteditor/js/tiny_mce6/readme.txt +12 -0
  292. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.css +72 -0
  293. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.min.css +7 -0
  294. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.css +67 -0
  295. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.min.css +7 -0
  296. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.css +72 -0
  297. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.min.css +7 -0
  298. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.css +67 -0
  299. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.min.css +7 -0
  300. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.css +72 -0
  301. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.min.css +7 -0
  302. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.css +68 -0
  303. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.min.css +7 -0
  304. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.css +791 -0
  305. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.css +785 -0
  306. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.min.css +7 -0
  307. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.min.css +7 -0
  308. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.css +3694 -0
  309. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.min.css +7 -0
  310. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.css +36 -0
  311. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  312. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.css +772 -0
  313. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.css +785 -0
  314. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.min.css +7 -0
  315. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.min.css +7 -0
  316. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.css +3697 -0
  317. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.min.css +7 -0
  318. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.css +36 -0
  319. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  320. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.css +791 -0
  321. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.css +785 -0
  322. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.min.css +7 -0
  323. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.min.css +7 -0
  324. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.css +3788 -0
  325. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.min.css +7 -0
  326. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.css +36 -0
  327. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.min.css +7 -0
  328. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.css +772 -0
  329. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.css +785 -0
  330. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.min.css +7 -0
  331. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.min.css +7 -0
  332. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.css +3788 -0
  333. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.min.css +7 -0
  334. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.css +36 -0
  335. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +7 -0
  336. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/index.js +13 -0
  337. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.js +30172 -0
  338. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.min.js +9 -0
  339. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.d.ts +3206 -0
  340. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.js +31303 -0
  341. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.min.js +9 -0
  342. package/src/sap/ui/richtexteditor/js/tiny_mce6/version.txt +1 -0
  343. package/src/sap/ui/richtexteditor/library.js +72 -33
  344. package/src/sap/ui/richtexteditor/messagebundle.properties +8 -2
  345. package/src/sap/ui/richtexteditor/messagebundle_ar.properties +60 -2
  346. package/src/sap/ui/richtexteditor/messagebundle_bg.properties +60 -2
  347. package/src/sap/ui/richtexteditor/messagebundle_ca.properties +60 -2
  348. package/src/sap/ui/richtexteditor/messagebundle_cs.properties +60 -2
  349. package/src/sap/ui/richtexteditor/messagebundle_cy.properties +60 -2
  350. package/src/sap/ui/richtexteditor/messagebundle_da.properties +60 -2
  351. package/src/sap/ui/richtexteditor/messagebundle_de.properties +60 -2
  352. package/src/sap/ui/richtexteditor/messagebundle_el.properties +60 -2
  353. package/src/sap/ui/richtexteditor/messagebundle_en.properties +60 -2
  354. package/src/sap/ui/richtexteditor/messagebundle_en_GB.properties +60 -2
  355. package/src/sap/ui/richtexteditor/messagebundle_en_US_sappsd.properties +6 -2
  356. package/src/sap/ui/richtexteditor/messagebundle_en_US_saprigi.properties +105 -0
  357. package/src/sap/ui/richtexteditor/messagebundle_en_US_saptrc.properties +6 -2
  358. package/src/sap/ui/richtexteditor/messagebundle_es.properties +60 -2
  359. package/src/sap/ui/richtexteditor/messagebundle_es_MX.properties +60 -2
  360. package/src/sap/ui/richtexteditor/messagebundle_et.properties +60 -2
  361. package/src/sap/ui/richtexteditor/messagebundle_fi.properties +60 -2
  362. package/src/sap/ui/richtexteditor/messagebundle_fr.properties +60 -2
  363. package/src/sap/ui/richtexteditor/messagebundle_fr_CA.properties +60 -2
  364. package/src/sap/ui/richtexteditor/messagebundle_hi.properties +60 -2
  365. package/src/sap/ui/richtexteditor/messagebundle_hr.properties +60 -2
  366. package/src/sap/ui/richtexteditor/messagebundle_hu.properties +60 -2
  367. package/src/sap/ui/richtexteditor/messagebundle_id.properties +60 -2
  368. package/src/sap/ui/richtexteditor/messagebundle_it.properties +60 -2
  369. package/src/sap/ui/richtexteditor/messagebundle_iw.properties +60 -2
  370. package/src/sap/ui/richtexteditor/messagebundle_ja.properties +60 -2
  371. package/src/sap/ui/richtexteditor/messagebundle_kk.properties +60 -2
  372. package/src/sap/ui/richtexteditor/messagebundle_ko.properties +60 -2
  373. package/src/sap/ui/richtexteditor/messagebundle_lt.properties +60 -2
  374. package/src/sap/ui/richtexteditor/messagebundle_lv.properties +60 -2
  375. package/src/sap/ui/richtexteditor/messagebundle_ms.properties +60 -2
  376. package/src/sap/ui/richtexteditor/messagebundle_nl.properties +60 -2
  377. package/src/sap/ui/richtexteditor/messagebundle_no.properties +60 -2
  378. package/src/sap/ui/richtexteditor/messagebundle_pl.properties +60 -2
  379. package/src/sap/ui/richtexteditor/messagebundle_pt.properties +60 -2
  380. package/src/sap/ui/richtexteditor/messagebundle_pt_PT.properties +60 -2
  381. package/src/sap/ui/richtexteditor/messagebundle_ro.properties +60 -2
  382. package/src/sap/ui/richtexteditor/messagebundle_ru.properties +60 -2
  383. package/src/sap/ui/richtexteditor/messagebundle_sh.properties +60 -2
  384. package/src/sap/ui/richtexteditor/messagebundle_sk.properties +60 -2
  385. package/src/sap/ui/richtexteditor/messagebundle_sl.properties +60 -2
  386. package/src/sap/ui/richtexteditor/messagebundle_sr.properties +60 -2
  387. package/src/sap/ui/richtexteditor/messagebundle_sv.properties +60 -2
  388. package/src/sap/ui/richtexteditor/messagebundle_th.properties +60 -2
  389. package/src/sap/ui/richtexteditor/messagebundle_tr.properties +60 -2
  390. package/src/sap/ui/richtexteditor/messagebundle_uk.properties +60 -2
  391. package/src/sap/ui/richtexteditor/messagebundle_vi.properties +60 -2
  392. package/src/sap/ui/richtexteditor/messagebundle_zh_CN.properties +60 -2
  393. package/src/sap/ui/richtexteditor/messagebundle_zh_TW.properties +60 -2
  394. package/src/sap/ui/richtexteditor/themes/base/RichTextEditor.less +25 -84
  395. package/src/sap/ui/richtexteditor/themes/base/library.source.less +1 -1
  396. package/src/sap/ui/richtexteditor/themes/sap_belize/RichTextEditor.less +33 -0
  397. package/src/sap/ui/richtexteditor/themes/sap_belize/library.source.less +4 -2
  398. package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/RichTextEditor.less +29 -0
  399. package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/library.source.less +3 -1
  400. package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/RichTextEditor.less +30 -0
  401. package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/library.source.less +3 -1
  402. package/src/sap/ui/richtexteditor/themes/sap_belize_plus/library.source.less +1 -1
  403. package/src/sap/ui/richtexteditor/themes/sap_bluecrystal/library.source.less +1 -1
  404. package/src/sap/ui/richtexteditor/themes/sap_fiori_3/RichTextEditor.less +4 -5
  405. package/src/sap/ui/richtexteditor/themes/sap_fiori_3/library.source.less +1 -1
  406. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_dark/RichTextEditor.less +4 -5
  407. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_dark/library.source.less +1 -1
  408. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcb/RichTextEditor.less +4 -5
  409. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcb/library.source.less +1 -1
  410. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcw/RichTextEditor.less +4 -5
  411. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcw/library.source.less +1 -1
  412. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/css/dialog.css +0 -118
  413. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/buttons.png +0 -0
  414. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/icons.gif +0 -0
  415. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/items.gif +0 -0
  416. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/menu_arrow.gif +0 -0
  417. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/menu_check.gif +0 -0
  418. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/progress.gif +0 -0
  419. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/img/tabs.gif +0 -0
  420. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/plugin.js +0 -314
  421. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/plugin.min.js +0 -1
  422. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/tiny_mce_popup.js +0 -534
  423. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/utils/editable_selects.js +0 -64
  424. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/utils/form_utils.js +0 -214
  425. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/utils/mctabs.js +0 -160
  426. package/src/sap/ui/richtexteditor/js/tiny_mce4/plugins/compat3x/utils/validate.js +0 -259
  427. package/src/sap/ui/richtexteditor/themes/base/icons.gif +0 -0
  428. package/src/sap/ui/richtexteditor/themes/base/icons.png +0 -0
  429. package/src/sap/ui/richtexteditor/themes/sap_hcb/RichTextEditor.less +0 -108
  430. package/src/sap/ui/richtexteditor/themes/sap_hcb/library.source.less +0 -9
@@ -1,58 +1,54 @@
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
- /*global Promise */
7
-
8
6
  // Provides control sap.ui.richtexteditor.RichTextEditor.
9
7
  sap.ui.define([
10
8
  "sap/ui/thirdparty/jquery",
11
9
  'sap/ui/core/Control',
10
+ 'sap/ui/core/library',
11
+ 'sap/ui/core/Locale',
12
+ 'sap/ui/core/Popup',
12
13
  'sap/ui/core/ResizeHandler',
13
14
  './library',
14
15
  './ToolbarWrapper',
15
- "sap/ui/core/RenderManager",
16
16
  "sap/ui/dom/includeScript",
17
17
  "sap/base/Log",
18
18
  "sap/base/security/sanitizeHTML",
19
19
  "sap/ui/events/KeyCodes",
20
- "sap/base/security/encodeXML",
21
- "sap/ui/Device",
22
20
  "sap/ui/core/Core",
23
21
  // Control renderer
24
- "./RichTextEditorRenderer",
25
- // jQuery custom selectors ":sapFocusable"
26
- "sap/ui/dom/jquery/Selectors",
27
- // jQuery Plugin "control"
28
- "sap/ui/dom/jquery/control"
22
+ "./RichTextEditorRenderer"
29
23
  ],
30
24
  function(
31
25
  jQuery,
32
26
  Control,
27
+ coreLibrary,
28
+ Locale,
29
+ Popup,
33
30
  ResizeHandler,
34
31
  library,
35
32
  ToolbarWrapper,
36
- RenderManager,
37
33
  includeScript,
38
34
  Log,
39
35
  sanitizeHTML,
40
36
  KeyCodes,
41
- encodeXML,
42
- Device,
43
37
  Core
44
38
  ) {
45
39
  "use strict";
40
+
41
+ var TextDirection = coreLibrary.TextDirection;
42
+
46
43
  /**
47
- * Describes the internal status of the editor component used inside the RichTextEditor control. Currently only
48
- * relevant for TinyMCE4
44
+ * Describes the internal status of the editor component used inside the RichTextEditor control.
49
45
  *
50
46
  * @enum {string}
51
47
  * @private
52
48
  */
53
49
  var EditorStatus = {
54
50
  /**
55
- * Uses TinyMCE version 4 as editor
51
+ * Uses TinyMCE as editor
56
52
  * @private
57
53
  */
58
54
  Initial: "Initial",
@@ -84,16 +80,16 @@ sap.ui.define([
84
80
  * synchronizing the state of its internal controls with the current state of the selection in the editor
85
81
  * (bold, italics, font styles etc.).
86
82
  *
87
- * <h4>Limitations</h4>
83
+ * <h4>Restrictions</h4>
88
84
  *
89
85
  * <b>Note: The <code>RichTextEditor</code> uses a third-party component and therefore
90
- * some additional limitations apply for its proper usage and support.
86
+ * some additional restrictions apply for its proper usage and support.
91
87
  * For more information see the Preamble section in {@link topic:d4f3f1598373452bb73f2120930c133c sap.ui.richtexteditor}.
92
88
  * </b>
93
89
  *
94
90
  * <h3>Guidelines</h3>
95
91
  * <ul>
96
- * <li> The <code>RichTextEditor</code> should be used for desktop apps only. However, if it is essential for your use case, you can enable the mobile version of TinyMCE, whilst having in mind the limitations. For more information see the {@link topic:d4f3f1598373452bb73f2120930c133c sap.ui.richtexteditor documentation}.</li>
92
+ * <li> The <code>RichTextEditor</code> should be used for desktop apps only. However, if it is essential for your use case, you can enable the mobile version of TinyMCE, whilst having in mind the restrictions. For more information see the {@link topic:d4f3f1598373452bb73f2120930c133c sap.ui.richtexteditor documentation}.</li>
97
93
  * <li> In order to be usable, the control needs a minimum width 17.5 rem and height of 12.5 rem.</li>
98
94
  * <li> Do not instantiate the <code>RichTextEditor</code> from a hidden container.</li>
99
95
  * <li> Make sure you destroy the <code>RichTextEditor</code> instance instead of hiding it and create a new one when you show it again.</li>
@@ -113,6 +109,47 @@ sap.ui.define([
113
109
  * <li>Use callbacks to the native third-party API with care, as there may be compatibility issues with later versions.</li>
114
110
  * </ul>
115
111
  *
112
+ * <h3>Custom toolbar - adding and removing buttons</h3>
113
+ * With version 1.84.40 it is possible to redefine the button groups configuration in order to show only particular set of buttons in the custom toolbar of the <code>RichTextEditor</code>.
114
+ * This is possible in few ways:
115
+ * <ul>
116
+ * <li>By providing the buttons group configurations as a whole by setting the <code>buttonGroups</code> property of the control.</li>
117
+ * <li>By providing individual button group configuration via <code>addButtonGroup</code> method.</li>
118
+ * </ul>
119
+ *
120
+ * Consider the following when choosing your approach:
121
+ * <ul>
122
+ * <li>Setting <code>buttonGroups</code> will override all current custom toolbar button group configurations. This method allows for total redefining of the custom toolbar groups.</li>
123
+ * <li>Using <code>addButtonGroups</code> will try to add non-existing group into the configuration array, however, if such group configuration exists already, a warning will be logged and the new configuration will not be added. In order to replace the existing configuration you will need to remove it first via <code>removeButtonGroup</code>.</li>
124
+ * </ul>
125
+ *
126
+ * Below is a list of supported groups and buttons, which can be specified in the configuration objects (format is <<group name>>: <<supported buttons>>):
127
+ * <ul>
128
+ * <li>font-style: bold, italic, underline, strikethrough</li>
129
+ * <li>font: fontfamily, fontsize, forecolor, backcolor</li>
130
+ * <li>clipboard: cut, copy, paste</li>
131
+ * <li>structure: bullist, numlist, outdent, indent</li>
132
+ * <li>undo: undo, redo</li>
133
+ * <li>insert: image, emoticons</li>
134
+ * <li>link: link, unlink</li>
135
+ * <li>text-align: alignleft, aligncenter, alignright, alignjustify</li>
136
+ * </ul>
137
+ * Additional supported groups, which can be added only after the editor is loaded (they can not be specified in the above mentioned configuration):
138
+ * <ul>
139
+ * <li>table: table</li>
140
+ * <li>styleselect: styleselect</li>
141
+ * <ul>
142
+ * <b>Note!</b> Adding configuration for "text-align" group with any buttons will still render a menu button with all available options inside. Removing/hiding the group can be achieved by invoking <code>removeButtonGroup</code> or <code>setShowGroupTextAlign(false)</code> depending on the desired result.
143
+ *
144
+ * <b>Note!</b> There is no synchronization between the <code>setShowGroup*</code> properties and the configuration object that the application can specifying via <code>buttonGroups</code> in the constructor or on a later stage. This means that in case new configuration is provided and for particular group the passed object contains property <code>visible: true</code>, this group property will be respected no matter if the <code>RichTextEditor</code>'s property for this particular group is set to <code>false</code>.
145
+ * Example:
146
+ * Providing the following object as group configuration:
147
+ * {
148
+ * name: "font"
149
+ * visible: true
150
+ * }
151
+ * Will make the "font" group visible, no matter that calling <code>RichTextEditor.getShowGroupFont()</code> returns <code>false</code>.
152
+ *
116
153
  * @extends sap.ui.core.Control
117
154
  *
118
155
  * @author SAP SE
@@ -124,7 +161,6 @@ sap.ui.define([
124
161
  * @alias sap.ui.richtexteditor.RichTextEditor
125
162
  * @see {@link fiori:https://experience.sap.com/fiori-design-web/rich-text-editor/ Rich Text Editor}
126
163
  * @see {@link topic:d4f3f1598373452bb73f2120930c133c}
127
- * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
128
164
  */
129
165
  var RichTextEditor = Control.extend("sap.ui.richtexteditor.RichTextEditor", /** @lends sap.ui.richtexteditor.RichTextEditor.prototype */ {
130
166
  metadata: {
@@ -141,7 +177,7 @@ sap.ui.define([
141
177
  /**
142
178
  * The text direction
143
179
  */
144
- textDirection: { type: "sap.ui.core.TextDirection", group: "Appearance", defaultValue: sap.ui.core.TextDirection.Inherit },
180
+ textDirection: { type: "sap.ui.core.TextDirection", group: "Appearance", defaultValue: TextDirection.Inherit },
145
181
 
146
182
  /**
147
183
  * Width of RichTextEditor control in CSS units.
@@ -151,6 +187,7 @@ sap.ui.define([
151
187
  /**
152
188
  * Height of RichTextEditor control in CSS units.
153
189
  * <b>Note:</b> If the height property results in a value smaller than 200px, the minimum height of 200px will be applied.
190
+ * <b>Note:</b> If the "autoresize" TinyMCE plugin is used, the height property is not taken into account.
154
191
  */
155
192
  height: { type: "sap.ui.core.CSSSize", group: "Dimension", defaultValue: null },
156
193
 
@@ -162,9 +199,14 @@ sap.ui.define([
162
199
  * not an enumeration).
163
200
  *
164
201
  * <b>Notes:</b>
165
- * <ul><li>TinyMCE version 3 is no longer supported and cannot be used. If you set the property to TinyMCE, it will load TinyMCE version 4.</li>
166
- * <li>Any attempts to set this property after the first rendering will not
167
- * have any effect.</li></ul>
202
+ * <ul><li>Any attempts to set this property after the first rendering will not
203
+ * have any effect.</li>
204
+ * <li>Usage of internal TinyMCE APIs is not recommended, since it might lead to issues upon TinyMCE version update.</li>
205
+ * <li>TinyMCE version 3 and 4 are no longer supported and cannot be used.</li>
206
+ * <li>TinyMCE 4 is out of support and by using it, application developers are accepting all the risks comming from that fact. In addition TinyMCE 4 will be removed in future releases.</li>
207
+ * <li>TinyMCE 5 will be removed in future releases.</li>
208
+ * <li>Have in mind when choosing a specific TinyMCE version that there might be differences in the support rules compared to UI5, therefore we might be forced to remove any TinyMCE version.</li>
209
+ * </ul>
168
210
  */
169
211
  editorType: { type: "string", group: "Misc", defaultValue: 'TinyMCE4' },
170
212
 
@@ -183,41 +225,49 @@ sap.ui.define([
183
225
 
184
226
  /**
185
227
  * Determines whether the toolbar button group containing commands like Bold, Italic, Underline and Strikethrough is available. Changing this after the initial rendering will result in some visible redrawing.
228
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
186
229
  */
187
230
  showGroupFontStyle: { type: "boolean", group: "Misc", defaultValue: true },
188
231
 
189
232
  /**
190
233
  * Determines whether the toolbar button group containing text alignment commands is available. Changing this after the initial rendering will result in some visible redrawing.
234
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
191
235
  */
192
236
  showGroupTextAlign: { type: "boolean", group: "Misc", defaultValue: true },
193
237
 
194
238
  /**
195
239
  * Determines whether the toolbar button group containing commands like Bullets and Indentation is available. Changing this after the initial rendering will result in some visible redrawing.
240
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
196
241
  */
197
242
  showGroupStructure: { type: "boolean", group: "Misc", defaultValue: true },
198
243
 
199
244
  /**
200
245
  * Determines whether the toolbar button group containing commands like Font, Font Size and Colors is available. Changing this after the initial rendering will result in some visible redrawing.
246
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
201
247
  */
202
248
  showGroupFont: { type: "boolean", group: "Misc", defaultValue: false },
203
249
 
204
250
  /**
205
251
  * Determines whether the toolbar button group containing commands like Cut, Copy and Paste is available. Changing this after the initial rendering will result in some visible redrawing.
252
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
206
253
  */
207
254
  showGroupClipboard: { type: "boolean", group: "Misc", defaultValue: true },
208
255
 
209
256
  /**
210
257
  * Determines whether the toolbar button group containing commands like Insert Image and Insert Smiley is available. Changing this after the initial rendering will result in some visible redrawing.
258
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
211
259
  */
212
260
  showGroupInsert: { type: "boolean", group: "Misc", defaultValue: false },
213
261
 
214
262
  /**
215
263
  * Determines whether the toolbar button group containing commands like Create Link and Remove Link is available. Changing this after the initial rendering will result in some visible redrawing.
264
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
216
265
  */
217
266
  showGroupLink: { type: "boolean", group: "Misc", defaultValue: false },
218
267
 
219
268
  /**
220
269
  * Determines whether the toolbar button group containing commands like Undo and Redo is available. Changing this after the initial rendering will result in some visible redrawing.
270
+ * Note: This property will not be synchronized with group configuration provided via the buttonGroups property or when groups are added on a later stage.
221
271
  */
222
272
  showGroupUndo: { type: "boolean", group: "Misc", defaultValue: false },
223
273
 
@@ -232,7 +282,7 @@ sap.ui.define([
232
282
  required: { type: "boolean", group: "Misc", defaultValue: false },
233
283
 
234
284
  /**
235
- * Determines whether to run the HTML sanitizer once the value (HTML markup) is applied or not. To configure allowed URLs please use the whitelist API via <code>jQuery.sap.addUrlWhitelist</code>
285
+ * Determines whether to run the HTML sanitizer once the value (HTML markup) is applied or not. To configure allowed URLs please use the validator API via {@link module:sap/base/security/URLListValidator#add URLListValidator API}.
236
286
  */
237
287
  sanitizeValue: { type: "boolean", group: "Misc", defaultValue: true },
238
288
 
@@ -244,16 +294,19 @@ sap.ui.define([
244
294
 
245
295
  /**
246
296
  * Determines whether or not to use the legacy theme for the toolbar buttons. If this is set to false, the default theme for the editor will be used (which might change slightly with every update). The legacy theme has the disadvantage that not all functionality has its own icon, so using non default buttons might lead to invisible buttons with the legacy theme - use the default editor theme in this case.
297
+ * @deprecated Since version 1.84.40
298
+ * This property became obsolete after the deprecation of TinyMCE v3.
247
299
  */
248
- useLegacyTheme: { type: "boolean", group: "Appearance", defaultValue: true },
300
+ useLegacyTheme: { type: "boolean", group: "Appearance", defaultValue: true, deprecated: true },
249
301
 
250
302
  /**
251
303
  * 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.
304
+ * <b>Note:</b> <code>buttonGroups</code> is a feature from the native editor. Its supported scope with <code>customToolbar</code> is limited up to the grouping- the user could turn on/off a whole group, but modifying buttons within a group is not possible. In order to achieve that functionality with <code>customToolbar</code>, the developer needs to turn the group off and instantiate their own <code>sap.m.Button</code>(s) with the desired functionality.
252
305
  */
253
- buttonGroups: { type: "object[]", group: "Behavior", defaultValue: [] },
306
+ buttonGroups: {type: "object[]", group: "Behavior", defaultValue: [] },
254
307
 
255
308
  /**
256
- * Determines whether a Fiori Toolbar is used instead of the TinyMCE default toolbar one. It is applied only when the EditorType is TinyMCE4 and sap.m library is loaded.
309
+ * Determines whether a Fiori Toolbar is used instead of the TinyMCE default toolbar one. It is applied only when the EditorType is TinyMCE6 and sap.m library is loaded.
257
310
  * <b>Note:</b> The <code>customToolbar</code> property will have effect only on initial loading. Changing it during runtime will not affect the initially loaded toolbar.
258
311
  *
259
312
  * @since 1.48
@@ -287,7 +340,8 @@ sap.ui.define([
287
340
  readyRecurring: {},
288
341
 
289
342
  /**
290
- * 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 oject that will be given to TinyMCE upon first instantiation. The configuration parameter contains a map that can be changed in the case of TinyMCE.
343
+ * 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.
344
+ * <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.
291
345
  */
292
346
  beforeEditorInit: {}
293
347
  },
@@ -311,7 +365,7 @@ sap.ui.define([
311
365
  associations: {
312
366
  /**
313
367
  * Association to controls / IDs which label this control (see WAI-ARIA attribute <code>aria-labelledby</code>).
314
- * @since 1.76.0
368
+ * @since 1.84.40
315
369
  */
316
370
  ariaLabelledBy: {
317
371
  type: "sap.ui.core.Control",
@@ -326,11 +380,10 @@ sap.ui.define([
326
380
 
327
381
  // global tinymce
328
382
  // Tells JSLint/SAPUI5 validation we need access to this global variable
329
- /* eslint-disable strict (Will be adressed when moving to AMD syntax) */
330
383
 
331
384
  /*
332
- * The following code is editor-independent
333
- */
385
+ * The following code is editor-independent
386
+ */
334
387
  // Counter for creating internal ids
335
388
  RichTextEditor._lastId = 0;
336
389
 
@@ -340,98 +393,151 @@ sap.ui.define([
340
393
 
341
394
  // Editor type entries for backwards compatibility
342
395
  RichTextEditor.EDITORTYPE_TINYMCE4 = library.EditorType.TinyMCE4;
343
-
344
- RichTextEditor.EDITORLOCATION_TINYMCE4 = "js/tiny_mce4/tinymce.min.js";
345
-
346
- if (Core.getConfiguration().getDebug()) {
347
- RichTextEditor.EDITORLOCATION_TINYMCE4 = "js/tiny_mce4/tinymce.js";
348
- }
349
-
350
- RichTextEditor.MAPPED_LANGUAGES_TINYMCE4 = {
351
- "sh": "sr",
352
- "ji": "yi",
396
+ RichTextEditor.EDITORTYPE_TINYMCE6 = library.EditorType.TinyMCE6;
397
+
398
+ // default
399
+ RichTextEditor.EDITORTYPE_TINYMCE = library.EditorType.TinyMCE4;
400
+
401
+ var EDITOR_LOCATION_MAPPING = {};
402
+
403
+ // default
404
+ EDITOR_LOCATION_MAPPING[RichTextEditor.EDITORTYPE_TINYMCE] = "js/tiny_mce4/tinymce.min.js";
405
+
406
+ EDITOR_LOCATION_MAPPING[RichTextEditor.EDITORTYPE_TINYMCE4] = "js/tiny_mce4/tinymce.min.js";
407
+ EDITOR_LOCATION_MAPPING[RichTextEditor.EDITORTYPE_TINYMCE6] = "js/tiny_mce6/tinymce.min.js";
408
+
409
+ RichTextEditor.DEFAULT_PLUGINS_TINYMCE4 = [
410
+ "emoticons",
411
+ "directionality",
412
+ "tabfocus",
413
+ "table",
414
+ "image",
415
+ "link",
416
+ "textcolor",
417
+ "colorpicker",
418
+ "textpattern",
419
+ "powerpaste"
420
+ ];
421
+ RichTextEditor.DEFAULT_PLUGINS_TINYMCE6 = [
422
+ "emoticons",
423
+ "directionality",
424
+ "image",
425
+ "table",
426
+ "link",
427
+ "powerpaste"
428
+ ];
429
+
430
+ // TinyMCE does not provide some of the regions/languages that our messagebundle has, therefore with this mapping, we are falling back to the ones provided
431
+ RichTextEditor.MAPPED_LANGUAGES_TINYMCE = {
432
+ "bg": "bg_BG",
433
+ "en_US": "en_GB",
434
+ "fr": "fr_FR",
435
+ "fr_CA": "fr_FR",
436
+ "hu": "hu_HU",
353
437
  "in": "id",
354
438
  "iw": "he",
355
- "no": "nb"
439
+ "ji": "yi",
440
+ "ko": "ko_KR",
441
+ "no": "nb",
442
+ "pt": "pt_PT",
443
+ "sh": "sr",
444
+ "sl": "sl_SI",
445
+ "sv": "sv_SE",
446
+ "th": "th_TH"
447
+
356
448
  };
357
449
 
358
- RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE4 = {
450
+ RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE = {
359
451
  "en": true, // Default
360
- "ar": true,
452
+ "af_ZA": true,
361
453
  "ar_SA": true,
362
- "hy": true,
454
+ "ar": true,
363
455
  "az": true,
364
- "eu": true,
365
456
  "be": true,
457
+ "bg_BG": true,
366
458
  "bn_BD": true,
367
459
  "bs": true,
368
- "bg_BG": true,
369
460
  "ca": true,
370
- "zh_CN": true,
371
- "zh_TW": true,
372
- "hr": true,
461
+ "cs_CZ": true,
373
462
  "cs": true,
463
+ "cy": true,
374
464
  "da": true,
465
+ "de_AT": true,
466
+ "de": true,
375
467
  "dv": true,
376
- "nl": true,
468
+ "el": true,
377
469
  "en_CA": true,
378
470
  "en_GB": true,
471
+ "es_MX": true,
472
+ "es": true,
379
473
  "et": true,
380
- "fo": true,
474
+ "eu": true,
475
+ "fa_IR": true,
476
+ "fa": true,
381
477
  "fi": true,
478
+ "fo": true,
382
479
  "fr_FR": true,
480
+ "ga": true,
383
481
  "gd": true,
384
482
  "gl": true,
385
- "ka_GE": true,
386
- "de": true,
387
- "de_AT": true,
388
- "el": true,
389
483
  "he_IL": true,
484
+ "hi": true,
390
485
  "hi_IN": true,
486
+ "hr": true,
391
487
  "hu_HU": true,
392
- "is_IS": true,
488
+ "hy": true,
393
489
  "id": true,
490
+ "is_IS": true,
394
491
  "it": true,
395
492
  "ja": true,
493
+ "ka_GE": true,
494
+ "kab": true,
396
495
  "kk": true,
397
496
  "km_KH": true,
398
497
  "ko_KR": true,
399
- "ku": true,
400
498
  "ku_IQ": true,
401
- "lv": true,
402
- "lt": true,
499
+ "ku": true,
403
500
  "lb": true,
404
- "ml": true,
501
+ "lt": true,
502
+ "lv": true,
405
503
  "ml_IN": true,
504
+ "ml": true,
406
505
  "mn_MN": true,
407
506
  "nb_NO": true,
408
- "fa": true,
409
- "fa_IR": true,
507
+ "nl": true,
410
508
  "pl": true,
411
509
  "pt_BR": true,
412
510
  "pt_PT": true,
413
511
  "ro": true,
414
512
  "ru": true,
415
- "ru@petr1708": true,
416
- "sr": true,
417
513
  "si_LK": true,
418
514
  "sk": true,
419
515
  "sl_SI": true,
420
- "es": true,
421
- "es_MX": true,
516
+ "sl": true,
517
+ "sr": true,
422
518
  "sv_SE": true,
423
- "tg": true,
424
- "ta": true,
425
519
  "ta_IN": true,
426
- "tt": true,
520
+ "ta": true,
521
+ "tg": true,
427
522
  "th_TH": true,
428
523
  "tr_TR": true,
524
+ "tr": true,
525
+ "tt": true,
429
526
  "ug": true,
430
- "uk": true,
431
527
  "uk_UA": true,
432
- "vi": true,
528
+ "uk": true,
529
+ "uz": true,
433
530
  "vi_VN": true,
434
- "cy": true
531
+ "vi": true,
532
+ "zh_CN": true,
533
+ "zh_TW": true
534
+ };
535
+
536
+ RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE6 = {
537
+ "eo": true,
538
+ "es_ES": true,
539
+ "it_IT": true,
540
+ "ro_RO": true
435
541
  };
436
542
 
437
543
  RichTextEditor.SUPPORTED_LANGUAGES_DEFAULT_REGIONS = {
@@ -459,7 +565,37 @@ sap.ui.define([
459
565
  "vi": "VN"
460
566
  };
461
567
 
568
+ RichTextEditor.SUPPORTED_LANGUAGES_DEFAULT_REGIONS_TINYMCE6 = {
569
+ "zh": "CN",
570
+ "fr": "FR",
571
+ "bn": "BD",
572
+ "bg": "BG",
573
+ "ka": "GE",
574
+ "he": "IL",
575
+ "hu": "HU",
576
+ "is": "IS",
577
+ "km": "KH",
578
+ "ko": "KR",
579
+ "ku": "IQ",
580
+ "ml": "IN",
581
+ "mn": "MN",
582
+ "nb": "NO",
583
+ "pt": "PT",
584
+ "si": "SI",
585
+ "sl": "SI",
586
+ "sv": "SE",
587
+ "th": "TH"
588
+ };
589
+
462
590
  RichTextEditor.pLoadTinyMCE = null;
591
+ var oEditorMapping = {};
592
+
593
+ // default
594
+ oEditorMapping[RichTextEditor.EDITORTYPE_TINYMCE] = RichTextEditor.EDITORTYPE_TINYMCE4;
595
+
596
+ // other versions
597
+ oEditorMapping[RichTextEditor.EDITORTYPE_TINYMCE4] = RichTextEditor.EDITORTYPE_TINYMCE4;
598
+ oEditorMapping[RichTextEditor.EDITORTYPE_TINYMCE6] = RichTextEditor.EDITORTYPE_TINYMCE6;
463
599
 
464
600
  /**
465
601
  * Creates and returns a promise to load the given location as script url. Only the first invocation needs the
@@ -473,7 +609,7 @@ sap.ui.define([
473
609
  */
474
610
  RichTextEditor.loadTinyMCE = function(sLocation) {
475
611
  if (sLocation) {
476
- var sRealLocation = sap.ui.resource('sap.ui.richtexteditor', sLocation),
612
+ var sRealLocation = sap.ui.require.toUrl('sap/ui/richtexteditor/' + sLocation),
477
613
  oScriptElement = document.querySelector("#sapui5-tinyMCE"),
478
614
  sLoadedLocation = oScriptElement ? oScriptElement.getAttribute("src") : "";
479
615
 
@@ -485,8 +621,9 @@ sap.ui.define([
485
621
  }
486
622
 
487
623
  if (!RichTextEditor.pLoadTinyMCE) {
488
- RichTextEditor.pLoadTinyMCE = new Promise(function(fnResolve, fnReject) {
489
- includeScript(sRealLocation, "sapui5-tinyMCE", fnResolve, fnReject);
624
+ RichTextEditor.pLoadTinyMCE = includeScript({
625
+ id: "sapui5-tinyMCE",
626
+ url: sRealLocation
490
627
  });
491
628
  }
492
629
  }
@@ -498,6 +635,8 @@ sap.ui.define([
498
635
  * @private
499
636
  */
500
637
  RichTextEditor.prototype.init = function() {
638
+ var sEditorType = oEditorMapping[this.getEditorType()] || RichTextEditor.EDITORTYPE_TINYMCE;
639
+
501
640
  this._bEditorCreated = false;
502
641
  this._sTimerId = null;
503
642
  RichTextEditor._iCountInstances++;
@@ -510,7 +649,8 @@ sap.ui.define([
510
649
  this._textAreaDom.style.height = "100%";
511
650
  this._textAreaDom.style.width = "100%";
512
651
 
513
- this.setEditorType(library.EditorType.TinyMCE4);
652
+ this.setEditorType(sEditorType);
653
+
514
654
  this._setupToolbar();
515
655
  };
516
656
 
@@ -529,16 +669,15 @@ sap.ui.define([
529
669
  }
530
670
 
531
671
  if (this.isPropertyInitial("editorType")) {
532
- Log.warning("editorType property is automatically set to TinyMCE 4, because of the removal of TinyMCE 3");
672
+ Log.info("You are using the default value of the editorType which is subject to changes and might affect your application.");
533
673
  }
534
674
 
535
- this.onBeforeRenderingTinyMCE4();
675
+ this.onBeforeRenderingTinyMCE();
536
676
  };
537
677
 
538
678
  RichTextEditor.prototype.onAfterRendering = function() {
539
- this.onAfterRenderingTinyMCE4();
679
+ this.onAfterRenderingTinyMCE();
540
680
 
541
- this.getDomRef() && jQuery(this).toggleClass("sapUiRTELegacyTheme", this.getUseLegacyTheme());
542
681
  };
543
682
 
544
683
  /**
@@ -550,7 +689,7 @@ sap.ui.define([
550
689
  RichTextEditor.prototype.reinitialize = function() {
551
690
  // Make sure reinitialization does not happen because several settings are done
552
691
  clearTimeout(this._iReinitTimeout);
553
- this._iReinitTimeout = window.setTimeout(this.reinitializeTinyMCE4.bind(this), 0);
692
+ this._iReinitTimeout = window.setTimeout(this.reinitializeTinyMCE.bind(this), 0);
554
693
  };
555
694
 
556
695
 
@@ -560,15 +699,14 @@ sap.ui.define([
560
699
  *
561
700
  * @returns {object} The native editor object (here: The TinyMCE editor instance)
562
701
  * @public
563
- * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
564
702
  */
565
703
  RichTextEditor.prototype.getNativeApi = function() {
566
- return this.getNativeApiTinyMCE4();
704
+ return this.getNativeApiTinyMCE();
567
705
  };
568
706
 
569
707
  RichTextEditor.prototype.exit = function() {
570
708
  clearTimeout(this._reinitDelay);
571
- this.exitTinyMCE4();
709
+ this.exitTinyMCE();
572
710
  RichTextEditor._iCountInstances--;
573
711
  };
574
712
 
@@ -579,7 +717,7 @@ sap.ui.define([
579
717
 
580
718
  if (this.getSanitizeValue()) {
581
719
  Log.trace("sanitizing HTML content for " + this);
582
- // images are using the URL whitelist support
720
+ // images are using the URL validator support
583
721
  sValue = sanitizeHTML(sValue);
584
722
  }
585
723
 
@@ -589,9 +727,8 @@ sap.ui.define([
589
727
 
590
728
  this.setProperty("value", sValue, true);
591
729
  sValue = this.getProperty("value");
592
- var methodName = "setValue" + this.getEditorType();
593
- if (this[methodName] && typeof this[methodName] === "function") {
594
- this[methodName].call(this, sValue);
730
+ if (oEditorMapping[this.getEditorType()]) {
731
+ this.setValueTinyMCE(sValue);
595
732
  } else {
596
733
  this.reinitialize();
597
734
  }
@@ -630,7 +767,7 @@ sap.ui.define([
630
767
  * Helper function for show/hide of each button group
631
768
  *
632
769
  * @param {boolean} [bShow] Boolean value, indicating if the group should be shown or hidden
633
- * @param {object} [mSettings] Settings object
770
+ * @param {object} [mSettings] Settings object
634
771
  * @returns {object} Control instance (for method chaining)
635
772
  * @private
636
773
  */
@@ -710,7 +847,7 @@ sap.ui.define([
710
847
  RichTextEditor.prototype.setCustomToolbar = function (bEnabled) {
711
848
  // switching the custom toolbar on/off after init may cause performance issues, backward incompatibility
712
849
  // and TinyMCE life-cycle management
713
- if (!this._tinyMCE4Status || this._tinyMCE4Status === EditorStatus.Initial) { // only supported before first rendering!
850
+ if (!this._tinyMCEStatus || this._tinyMCEStatus === EditorStatus.Initial) { // only supported before first rendering!
714
851
  this.setProperty("customToolbar", bEnabled);
715
852
  } else {
716
853
  Log.error("Cannot set customToolbar property to " + bEnabled + " after initialization.", this);
@@ -724,7 +861,7 @@ sap.ui.define([
724
861
  * RichTextEditor.
725
862
  *
726
863
  * @param {object|string} [mPlugin] The plugin ID/name or an object with property "name", containing the ID/name of the plugin
727
- * @returns {object} Control instance (for method chaining)
864
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
728
865
  * @public
729
866
  */
730
867
  RichTextEditor.prototype.addPlugin = function (mPlugin) {
@@ -749,7 +886,7 @@ sap.ui.define([
749
886
  * Removes the plugin with the given name/ID from the list of plugins to load
750
887
  *
751
888
  * @param {string} [sPluginName] The name/ID of the plugin to remove
752
- * @returns {object} Control instance (for method chaining)
889
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
753
890
  * @public
754
891
  */
755
892
  RichTextEditor.prototype.removePlugin = function(sPluginName) {
@@ -768,85 +905,114 @@ sap.ui.define([
768
905
 
769
906
  /**
770
907
  * Adds a button group to the editor.
908
+ * <b>Note</b>: Adding already existing group will not do anything. If a button group needs to be changed, it first needs to be removed and then added by providing its name or map object, containing its desired configuration.
771
909
  *
772
- * @param {object|string} [mGroup] Name/ID of a single button or object containing the group information
773
- * @param {string[]} [mGroup.buttons] Array of name/IDs of the buttons in the group
774
- * @param {string} [mGroup.name] Name/ID of the group.
775
- * @param {boolean} [mGroup.visible=true] (optional) The priority of the button group. Lower priorities are added first.
776
- * @param {int} [mGroup.row=0] (optional) Row number in which the button should be
777
- * @param {int} [mGroup.priority=10] (optional) The priority of the button group. Lower priorities are added first.
778
- * @param {int} [mGroup.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.
779
- * @returns {object} Control instance (for method chaining)
910
+ * @param {object|string} [vGroup] Name/ID of a single button or object containing the group information
911
+ * @param {string[]} [vGroup.buttons] Array of name/IDs of the buttons in the group
912
+ * @param {string} [vGroup.name] Name/ID of the group.
913
+ * @param {boolean} [vGroup.visible=true] (optional) The priority of the button group. Lower priorities are added first.
914
+ * @param {int} [vGroup.row=0] (optional) Row number in which the button should be
915
+ * @param {int} [vGroup.priority=10] (optional) The priority of the button group. Lower priorities are added first.
916
+ * @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.
917
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
780
918
  * @public
781
919
  */
782
- RichTextEditor.prototype.addButtonGroup = function (mGroup) {
920
+ RichTextEditor.prototype.addButtonGroup = function (vGroup) {
783
921
  var aGroups = this.getProperty("buttonGroups").slice(),
784
- oCustomToolbar = this.getAggregation("_toolbarWrapper"),
785
- bFullGroup = true;
922
+ oCustomToolbar = this.getAggregation("_toolbarWrapper");
923
+
924
+ if (!vGroup) {
925
+ return this;
926
+ }
786
927
 
787
928
  // check if the group is already added
788
929
  for (var i = 0; i < aGroups.length; ++i) {
789
- if (mGroup === "string" && aGroups[i].name === mGroup || aGroups[i].name === mGroup.name) {
930
+ if (typeof vGroup === "string" && aGroups[i].name === vGroup || aGroups[i].name === vGroup.name) {
931
+ Log.warning("Trying to add already existing group: " + (typeof vGroup === "string" ? vGroup : vGroup.name) + ". Please remove the group first and then add it.", this);
790
932
  return this;
791
933
  }
792
934
  }
793
935
 
794
- //if mGroup is string internally we are creating a group object.
795
- if (typeof mGroup === "string") {
796
- bFullGroup = false;
797
- switch (mGroup) {
936
+ // check for the mandatory parameters "vGroup.buttons" and "vGroup.name"
937
+ if (typeof vGroup === "object" && !(vGroup.name && Array.isArray(vGroup.buttons))) {
938
+ Log.error("The properties 'name' and 'buttons' are mandatory for the group configuration object. Please make sure they exist within the provided configuration.", this);
939
+ return this;
940
+ }
941
+
942
+ // check buttons in the vGroup.buttons property
943
+ if (typeof vGroup === "object" && !(Array.isArray(vGroup.buttons) && vGroup.buttons.length)) {
944
+ Log.error("The 'buttons' array of the provided group configuration object cannot be empty.", this);
945
+ return this;
946
+ }
947
+
948
+ //if vGroup is string and the group name is known to the RTE control, internally we are creating a group object.
949
+ if (typeof vGroup === "string") {
950
+ switch (vGroup) {
798
951
  case "formatselect":
799
- bFullGroup = true;
800
- mGroup = {
952
+ vGroup = {
801
953
  name: "formatselect",
802
954
  buttons: ["formatselect"]
803
955
  };
804
956
  break;
805
957
  case "styleselect":
806
- bFullGroup = true;
807
- mGroup = {
958
+ vGroup = {
808
959
  name: "styleselect",
809
960
  buttons: ["styleselect"],
810
961
  customToolbarPriority: 40
811
962
  };
812
963
  break;
813
964
  case "table":
814
- bFullGroup = true;
815
- mGroup = {
965
+ vGroup = {
816
966
  name: "table",
817
967
  buttons: ["table"],
818
968
  customToolbarPriority: 90
819
969
  };
820
970
  break;
971
+ // TinyMCE 6
972
+ case "blocks":
973
+ vGroup = {
974
+ name: "blocks",
975
+ buttons: ["blocks"]
976
+ };
977
+ break;
978
+ case "styles":
979
+ vGroup = {
980
+ name: "styles",
981
+ buttons: ["styles"],
982
+ customToolbarPriority: 40
983
+ };
984
+ break;
821
985
  default:
822
- mGroup = {
986
+ vGroup = {
823
987
  name: this._createId("buttonGroup"),
824
- buttons: [mGroup]
988
+ buttons: [vGroup]
825
989
  };
826
990
  }
827
991
  }
828
992
 
829
- if (mGroup.visible === undefined) {
830
- mGroup.visible = true;
831
- }
832
- if (mGroup.priority === undefined) {
833
- mGroup.priority = 10;
834
- }
835
- if (mGroup.row === undefined) {
836
- mGroup.row = 0;
837
- }
993
+ // Check if any optional configuration parameters are missing
994
+ // and if so - update the group object with their default values.
995
+ this._checkAndUpdateGroupInfo(vGroup);
838
996
 
839
997
  var aButtonGroups = this.getButtonGroups();
840
- aButtonGroups.push(mGroup);
998
+ aButtonGroups.push(vGroup);
841
999
  this.setProperty("buttonGroups", aButtonGroups);
842
1000
 
843
1001
  if (oCustomToolbar) {
844
- oCustomToolbar.addButtonGroupToContent(mGroup, bFullGroup);
1002
+ // Provide the new configuration of the group to the custom toolbar
1003
+ oCustomToolbar.addButtonGroupToContent(vGroup);
845
1004
  }
846
1005
 
847
1006
  return this;
848
1007
  };
849
1008
 
1009
+ /**
1010
+ * Removes a button group from the editor.
1011
+ *
1012
+ * @param {string} [sGroupName] The name of the group to be removed.
1013
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
1014
+ * @public
1015
+ */
850
1016
  RichTextEditor.prototype.removeButtonGroup = function(sGroupName) {
851
1017
  var aGroups = this.getProperty("buttonGroups").slice(0),
852
1018
  oCustomToolbar = this.getAggregation("_toolbarWrapper");
@@ -855,7 +1021,6 @@ sap.ui.define([
855
1021
  if (aGroups[i].name === sGroupName) {
856
1022
  aGroups.splice(i, 1);
857
1023
  --i;
858
-
859
1024
  oCustomToolbar && oCustomToolbar.removeButtonGroup(sGroupName);
860
1025
  }
861
1026
  }
@@ -869,7 +1034,7 @@ sap.ui.define([
869
1034
  * Sets the button groups to the editor.
870
1035
  *
871
1036
  * @param {array} [aGroups] Array of names or objects containing the group information
872
- * @returns {object} Control instance (for method chaining)
1037
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
873
1038
  * @public
874
1039
  */
875
1040
  RichTextEditor.prototype.setButtonGroups = function (aGroups) {
@@ -879,6 +1044,10 @@ sap.ui.define([
879
1044
  return this;
880
1045
  }
881
1046
 
1047
+ // There are some optional parameters in the groups config, which need to be checked and if not provided
1048
+ // set a default values
1049
+ aGroups.forEach(this._checkAndUpdateGroupInfo);
1050
+
882
1051
  this.setProperty("buttonGroups", aGroups);
883
1052
 
884
1053
  oCustomToolbar = this.getAggregation("_toolbarWrapper");
@@ -891,11 +1060,34 @@ sap.ui.define([
891
1060
 
892
1061
  };
893
1062
 
1063
+ /**
1064
+ * Checks the group object for optional parameters and adds them with their default values in case they are missing
1065
+ * The properties that this method checks for are (default values are in brackets):
1066
+ * - visible (true)
1067
+ * - priority (10)
1068
+ * - row (0)
1069
+ *
1070
+ * @param {object} oGroup The group object that needs to be checked and modified if needed.
1071
+ */
1072
+ RichTextEditor.prototype._checkAndUpdateGroupInfo = function (oGroup) {
1073
+ // As those are optional parameters we are adding default values
1074
+ // in case the application developers have not done so.
1075
+ if (oGroup.visible === undefined) {
1076
+ oGroup.visible = true;
1077
+ }
1078
+ if (oGroup.priority === undefined) {
1079
+ oGroup.priority = 10;
1080
+ }
1081
+ if (oGroup.row === undefined) {
1082
+ oGroup.row = 0;
1083
+ }
1084
+ };
1085
+
894
1086
  /**
895
1087
  * Sets the plugins to the editor.
896
1088
  *
897
1089
  * @param {array} [aPlugins] Array of names or objects containing the plugin information
898
- * @returns {object} Control instance (for method chaining)
1090
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
899
1091
  * @public
900
1092
  */
901
1093
  RichTextEditor.prototype.setPlugins = function (aPlugins) {
@@ -915,15 +1107,13 @@ sap.ui.define([
915
1107
  aPlugins.push({name: "lists"});
916
1108
  }
917
1109
 
918
- this.setProperty("plugins", aPlugins);
919
-
920
- return this;
1110
+ return this.setProperty("plugins", aPlugins);
921
1111
  };
922
1112
 
923
1113
  /**
924
1114
  * Make the button group with the given name (in)visible (if used before initialization of the editor)
925
1115
  *
926
- * @param {string} [sGroupName] Name of the group of buttons to be chenged
1116
+ * @param {string} [sGroupName] Name of the group of buttons to be changed
927
1117
  * @param {boolean} [bVisible=false] Whether or not this group should be visible
928
1118
  * @returns {object} Control instance (for method chaining)
929
1119
  * @private
@@ -955,31 +1145,29 @@ sap.ui.define([
955
1145
  };
956
1146
 
957
1147
  RichTextEditor.prototype._setupToolbar = function () {
958
- this.setPlugins([{
959
- name: "emoticons"
960
- }, {
961
- name: "directionality"
962
- }, {
963
- name: "tabfocus"
964
- }, {
965
- name: "table"
966
- }, {
967
- name: "image"
968
- }, {
969
- name: "link"
970
- }, {
971
- name: "textcolor"
972
- }, {
973
- name: "colorpicker"
974
- }, {
975
- name: "textpattern"
976
- }, {
977
- name: "powerpaste"
978
- }]);
1148
+ var fnMapPluginList = function (aList) {
1149
+ return aList.map(function(item) {
1150
+ return { "name": item };
1151
+ });
1152
+ };
1153
+
1154
+ var mapping = {
1155
+ "TinyMCE": fnMapPluginList(RichTextEditor.DEFAULT_PLUGINS_TINYMCE6), // to
1156
+ "TinyMCE4": fnMapPluginList(RichTextEditor.DEFAULT_PLUGINS_TINYMCE4),
1157
+ "TinyMCE6": fnMapPluginList(RichTextEditor.DEFAULT_PLUGINS_TINYMCE6)
1158
+ };
1159
+
1160
+ this.setPlugins(mapping[this.getEditorType()]);
1161
+
1162
+ var fontButtonGroupButtoNamesMapping = {
1163
+ "TinyMCE": ["fontfamily", "fontsize", "forecolor", "backcolor"],
1164
+ "TinyMCE4": ["fontselect", "fontsizeselect", "forecolor", "backcolor"],
1165
+ "TinyMCE6": ["fontfamily", "fontsize", "forecolor", "backcolor"]
1166
+ };
979
1167
 
980
1168
  this.setButtonGroups([{
981
1169
  name: "font-style",
982
- visible: true,
1170
+ visible: this.getShowGroupFontStyle(),
983
1171
  row: 0,
984
1172
  priority: 10,
985
1173
  customToolbarPriority: 20,
@@ -988,16 +1176,14 @@ sap.ui.define([
988
1176
  ]
989
1177
  }, {
990
1178
  name: "font",
991
- visible: false,
1179
+ visible: this.getShowGroupFont(),
992
1180
  row: 0,
993
1181
  priority: 30,
994
1182
  customToolbarPriority: 50,
995
- buttons: [
996
- "fontselect", "fontsizeselect", "forecolor", "backcolor"
997
- ]
1183
+ buttons: fontButtonGroupButtoNamesMapping[this.getEditorType()]
998
1184
  }, {
999
1185
  name: "clipboard",
1000
- visible: true,
1186
+ visible: this.getShowGroupClipboard(),
1001
1187
  row: 1,
1002
1188
  priority: 10,
1003
1189
  customToolbarPriority: 110,
@@ -1006,23 +1192,16 @@ sap.ui.define([
1006
1192
  ]
1007
1193
  }, {
1008
1194
  name: "structure",
1009
- visible: true,
1195
+ visible: this.getShowGroupStructure(),
1010
1196
  row: 1,
1011
1197
  priority: 20,
1012
1198
  customToolbarPriority: 60,
1013
1199
  buttons: [
1014
1200
  "bullist", "numlist", "outdent", "indent"
1015
1201
  ]
1016
- }, {
1017
- name: "e-mail",
1018
- visible: false,
1019
- row: 1,
1020
- priority: 30,
1021
- customToolbarPriority: 10,
1022
- buttons: []
1023
1202
  }, {
1024
1203
  name: "undo",
1025
- visible: false,
1204
+ visible: this.getShowGroupUndo(),
1026
1205
  row: 1,
1027
1206
  priority: 40,
1028
1207
  customToolbarPriority: 100,
@@ -1031,7 +1210,7 @@ sap.ui.define([
1031
1210
  ]
1032
1211
  }, {
1033
1212
  name: "insert",
1034
- visible: false,
1213
+ visible: this.getShowGroupInsert(),
1035
1214
  row: 1,
1036
1215
  priority: 50,
1037
1216
  customToolbarPriority: 80,
@@ -1040,26 +1219,24 @@ sap.ui.define([
1040
1219
  ]
1041
1220
  }, {
1042
1221
  name: "link",
1043
- visible: false,
1222
+ visible: this.getShowGroupLink(),
1044
1223
  row: 1,
1045
1224
  priority: 60,
1046
1225
  customToolbarPriority: 70,
1047
1226
  buttons: [
1048
1227
  "link", "unlink"
1049
1228
  ]
1050
- }]);
1051
-
1052
- this.addButtonGroup({
1229
+ }, {
1053
1230
  // Text Align group
1054
1231
  name: "text-align",
1055
- visible: true,
1232
+ visible: this.getShowGroupTextAlign(),
1056
1233
  row: 0,
1057
1234
  priority: 20,
1058
1235
  customToolbarPriority: 30,
1059
1236
  buttons: [
1060
1237
  "alignleft", "aligncenter", "alignright", "alignjustify"
1061
1238
  ]
1062
- });
1239
+ }]);
1063
1240
  };
1064
1241
 
1065
1242
  // the following functions shall not work after the first rendering
@@ -1067,22 +1244,27 @@ sap.ui.define([
1067
1244
  * Switches the editor type and sets the default settings for the editor.
1068
1245
  * All plugins and button groups should be set after this has been invoked
1069
1246
  *
1070
- * @param {string} [sEditorType] Which editor type to be used (currently only TinyMCE 3 and 4)
1071
- * @returns {object} Control instance (for method chaining)
1247
+ * @param {string} [sEditorType] Which editor type to be used (currently only TinyMCE 4, 5 and 6)
1248
+ * @returns {sap.ui.richtexteditor.RichTextEditor} Control instance (for method chaining)
1072
1249
  * @public
1073
1250
  */
1074
1251
  RichTextEditor.prototype.setEditorType = function(sEditorType) {
1075
- if (!this._bEditorCreated) { // only supported before first rendering!
1076
1252
 
1253
+ if (!this._bEditorCreated) { // only supported before first rendering!
1077
1254
  this.setProperty("editorType", sEditorType);
1255
+ sEditorType = this.getEditorType();
1078
1256
 
1079
- this.setEditorLocation(RichTextEditor.EDITORLOCATION_TINYMCE4);
1257
+ this._setupToolbar();
1080
1258
 
1081
- if (sEditorType !== library.EditorType.TinyMCE4 ) {
1259
+ if (!oEditorMapping[sEditorType]) {
1082
1260
  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');
1083
1261
  }
1084
1262
 
1085
- this.initTinyMCE4();
1263
+ if (oEditorMapping[sEditorType] === "TinyMCE4") {
1264
+ Log.error("TinyMCE version 4 is used as editor. This version is no longer supported by TinyMCE and will be removed in future releases, therefore using it is at your own risk. Please consider upgrading to TinyMCE version 6.");
1265
+ }
1266
+
1267
+ this.initTinyMCE();
1086
1268
  } else {
1087
1269
  Log.error(
1088
1270
  "editorType property cannot be set after the RichtextEditor has been rendered"
@@ -1114,11 +1296,11 @@ sap.ui.define([
1114
1296
  /////////////////////////// Begin editor section "TinyMCE" (All versions) //////////////////////////
1115
1297
 
1116
1298
  /**
1117
- * Creates the ButtonRow strings for TinyMCE
1299
+ * Creates the ButtonRow for TinyMCE
1118
1300
  *
1119
1301
  * @param {string} [sButtonSeparator] Separator that is used to separate button entries
1120
1302
  * @param {string} [sGroupSeparator] Separator that is used to separate groups of button entries
1121
- * @returns {string[]} An array of strings with TinyMCE specific button format
1303
+ * @returns {string[]|string} Specific button format. Return an array of strings for TinyMCE 4 and single string for TinyMCE 5
1122
1304
  * @private
1123
1305
  */
1124
1306
  RichTextEditor.prototype._createButtonRowsTinyMCE = function(sButtonSeparator, sGroupSeparator) {
@@ -1129,6 +1311,8 @@ sap.ui.define([
1129
1311
  sGroupSep = sButtonSeparator + sGroupSeparator + sButtonSeparator,
1130
1312
  i, iLen, mGroup,
1131
1313
  aOrderedGroups = {},
1314
+ bIsTinyMCE6 = this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE6,
1315
+ sButtonRows = "",
1132
1316
  aButtonRows = [];
1133
1317
 
1134
1318
  // Order Groups by priority
@@ -1155,13 +1339,24 @@ sap.ui.define([
1155
1339
  continue;
1156
1340
  }
1157
1341
 
1158
- if (!aButtonRows[iRow]) {
1159
- aButtonRows[iRow] = "";
1342
+ if (bIsTinyMCE6) {
1343
+ if (!sButtonRows) {
1344
+ sButtonRows = "";
1345
+ }
1346
+ sButtonRows += mGroup.buttons.join(sButtonSeparator) + sGroupSep;
1347
+ } else {
1348
+ if (!aButtonRows[iRow]) {
1349
+ aButtonRows[iRow] = "";
1350
+ }
1351
+ aButtonRows[iRow] += mGroup.buttons.join(sButtonSeparator) + sGroupSep;
1160
1352
  }
1161
- aButtonRows[iRow] += mGroup.buttons.join(sButtonSeparator) + sGroupSep;
1162
1353
  }
1163
1354
  }
1164
1355
 
1356
+ if (bIsTinyMCE6) {
1357
+ return sButtonRows;
1358
+ }
1359
+
1165
1360
  for (i = 0; i < aButtonRows.length; ++i) {
1166
1361
  if (aButtonRows[i] === null) {
1167
1362
  continue;
@@ -1204,38 +1399,6 @@ sap.ui.define([
1204
1399
  return aPluginNames.join(",");
1205
1400
  };
1206
1401
 
1207
-
1208
-
1209
- /**
1210
- * Checks whether TinyMCE has rendered its HTML
1211
- *
1212
- * @returns {boolean} Whether TinyMCE is rendered inside the page
1213
- * @private
1214
- */
1215
- RichTextEditor.prototype.tinyMCEReady = function() {
1216
- var iframe = (this._iframeId ? window.document.getElementById(this._iframeId) : null);
1217
- return !!iframe;
1218
- };
1219
-
1220
-
1221
- /**
1222
- * TinyMCE-specific value setter that avoids re-rendering
1223
- *
1224
- * @param {string} [sValue] The content for the editor
1225
- * @returns {void}
1226
- */
1227
- RichTextEditor.prototype.setValueTinyMCE = function(sValue) {
1228
- if (this._bEditorCreated) {
1229
- jQuery(document.getElementById(this._textAreaId)).text(sValue);
1230
- this.setContentTinyMCE();
1231
- } else {
1232
- this.setProperty("value", sValue, true);
1233
- if (this.getDomRef()) {
1234
- jQuery(document.getElementById(this._textAreaId)).val(sValue);
1235
- }
1236
- }
1237
- };
1238
-
1239
1402
  /**
1240
1403
  * Event handler being called when the text in the editor has changed
1241
1404
  *
@@ -1244,98 +1407,35 @@ sap.ui.define([
1244
1407
  * @private
1245
1408
  */
1246
1409
  RichTextEditor.prototype.onTinyMCEChange = function(oCurrentInst) {
1247
- var oldVal = this.getValue(),
1248
- newVal = oCurrentInst.getContent();
1410
+ var sPrevValue = this.getValue(),
1411
+ sContent = oCurrentInst.getContent(),
1412
+ sNewValue = this.getSanitizeValue() ? sanitizeHTML(sContent) : sContent;
1249
1413
 
1250
- if ((oldVal !== newVal) && !this.bExiting) {
1251
- this.setProperty("value", newVal, true); // suppress rerendering
1252
- this.fireChange({ oldValue: oldVal, newValue: newVal });
1414
+ if ((sPrevValue !== sNewValue) && !this.bExiting) {
1415
+ this.setProperty("value", sNewValue, true); // suppress rerendering
1416
+ this.fireChange({ oldValue: sPrevValue, newValue: sNewValue });
1253
1417
  }
1254
1418
  };
1255
1419
 
1256
- /**
1257
- * Called on every keydown
1258
- *
1259
- * @param {jQuery.Event} [oEvent] The keyboard event
1260
- * @returns {void}
1261
- * @private
1262
- */
1263
- RichTextEditor.prototype._tinyMCEKeyboardHandler = function(oEvent) {
1264
- var newIndex,
1265
- key = oEvent['keyCode'];
1266
-
1267
- switch (key) {
1268
- case KeyCodes.TAB: /* 9 */
1269
- if (!this.$focusables.index(jQuery(oEvent.target)) === 0) { // if not on very first element
1270
- var index = this.$focusables.length - 1; // this element moves the focus into the iframe
1271
- this.$focusables.get(index).focus();
1272
- }
1273
- break;
1274
-
1275
- case KeyCodes.ARROW_LEFT:
1276
- case KeyCodes.ARROW_UP:
1277
- newIndex = this.$focusables.index(jQuery(oEvent.target)) - 1;
1278
- if (newIndex === 0) {
1279
- newIndex = this.$focusables.length - 2;
1280
- }
1281
- this.$focusables.get(newIndex).focus();
1282
- break;
1283
-
1284
- case KeyCodes.ARROW_RIGHT:
1285
- case KeyCodes.ARROW_DOWN:
1286
- newIndex = this.$focusables.index(jQuery(oEvent.target)) + 1;
1287
- if (newIndex === this.$focusables.length - 1) {
1288
- newIndex = 1;
1289
- }
1290
- this.$focusables.get(newIndex).focus();
1291
- break;
1292
-
1293
- default:
1294
- // Do not react to other keys
1295
- break;
1296
- }
1297
- };
1298
-
1299
-
1300
- /**
1301
- * Map languages that are incorrectly assigned or fallback if languages do not work
1302
- * TODO: Change this when more languages are supported by TinyMCE
1303
- *
1304
- * @returns {string} The language to be used for TinyMCE
1305
- */
1306
- RichTextEditor.prototype._getLanguageTinyMCE = function() {
1307
- var oLocale = new sap.ui.core.Locale(Core.getConfiguration().getLanguage()),
1308
- sLanguage = oLocale.getLanguage(),
1309
- sRegion = oLocale.getRegion(),
1310
- mLangFallback = {
1311
- "zh": "zh-" + (sRegion ? sRegion.toLowerCase() : "cn"),
1312
- "sh": "sr",
1313
- "hi": "en" // Hindi is not supported by tinyMCE - fallback to en to show something at least
1314
- };
1315
-
1316
- sLanguage = mLangFallback[sLanguage] ? mLangFallback[sLanguage] : sLanguage;
1317
-
1318
- return sLanguage;
1319
- };
1320
1420
  //////////////////////////// End editor section "TinyMCE" (All versions) ///////////////////////////
1321
1421
 
1322
- ////////////////////////////////// Begin editor section "TinyMCE4" /////////////////////////////////
1422
+ ////////////////////////////////// Begin editor section "TinyMCE" /////////////////////////////////
1323
1423
 
1324
1424
 
1325
1425
  /**
1326
- * Called when the editor type is set to TinyMCE4
1426
+ * Called when the editor type is set to TinyMCE
1327
1427
  *
1328
1428
  * @private
1329
1429
  */
1330
- RichTextEditor.prototype.initTinyMCE4 = function() {
1331
- // TinyMCE 4 instance
1430
+ RichTextEditor.prototype.initTinyMCE = function() {
1431
+ // TinyMCE instance
1332
1432
  this._oEditor = null;
1333
1433
 
1334
- // Status of the TinyMCE4 component
1335
- this._tinyMCE4Status = EditorStatus.Initial;
1434
+ // Status of the TinyMCE component
1435
+ this._tinyMCEStatus = EditorStatus.Initial;
1336
1436
 
1337
1437
  // Bound resize method, so it can be given to the Resizehandler with correct this-reference
1338
- this._boundResizeEditorTinyMCE4 = this._resizeEditorTinyMCE4.bind(this);
1438
+ this._boundResizeEditorTinyMCE = this._resizeEditorTinyMCE.bind(this);
1339
1439
 
1340
1440
  // If initialization is currently pending, but has not yet been requested from TinyMCE, we ca avoid calling
1341
1441
  // it again without any changes
@@ -1346,25 +1446,24 @@ sap.ui.define([
1346
1446
  };
1347
1447
 
1348
1448
  /**
1349
- * Called when the editor type is set from TinyMCE4 to something else or the control is destroyed
1449
+ * Called when the editor type is set from TinyMCE to something else or the control is destroyed
1350
1450
  *
1351
1451
  * @private
1352
1452
  */
1353
- RichTextEditor.prototype.exitTinyMCE4 = function() {
1453
+ RichTextEditor.prototype.exitTinyMCE = function() {
1354
1454
  this._bUnloading = true;
1355
1455
 
1356
1456
  ResizeHandler.deregister(this._resizeHandlerId);
1357
1457
  this._resizeHandlerId = null;
1358
1458
 
1359
- this._removeEditorTinyMCE4();
1360
-
1459
+ this._removeEditorTinyMCE();
1361
1460
  };
1362
1461
 
1363
1462
  /**
1364
1463
  * @private
1365
1464
  */
1366
- RichTextEditor.prototype._removeEditorTinyMCE4 = function() {
1367
- switch (this._tinyMCE4Status) {
1465
+ RichTextEditor.prototype._removeEditorTinyMCE = function() {
1466
+ switch (this._tinyMCEStatus) {
1368
1467
  case EditorStatus.Initial:
1369
1468
  case EditorStatus.Loading:
1370
1469
  case EditorStatus.Loaded:
@@ -1372,13 +1471,13 @@ sap.ui.define([
1372
1471
  break;
1373
1472
 
1374
1473
  case EditorStatus.Initializing:
1375
- this._pTinyMCE4Initialized.then(this._removeEditorTinyMCE4.bind(this, this._oEditor));
1474
+ this._pTinyMCEInitialized.then(this._removeEditorTinyMCE.bind(this, this._oEditor));
1376
1475
  break;
1377
1476
 
1378
1477
  case EditorStatus.Ready:
1379
1478
  this._oEditor.remove();
1380
- this._tinyMCE4Status = EditorStatus.Destroyed;
1381
- this._boundResizeEditorTinyMCE4 = null;
1479
+ this._tinyMCEStatus = EditorStatus.Destroyed;
1480
+ this._boundResizeEditorTinyMCE = null;
1382
1481
  this._oEditor = null;
1383
1482
  break;
1384
1483
 
@@ -1386,58 +1485,79 @@ sap.ui.define([
1386
1485
  // Ignored as the editor is already destroyed.
1387
1486
  break;
1388
1487
  default:
1389
- Log.error("Unknown TinyMCE4 status: " + this._tinyMCE4Status);
1488
+ Log.error("Unknown TinyMCE status: " + this._tinyMCEStatus);
1390
1489
  break;
1391
1490
  }
1392
1491
  };
1393
1492
 
1493
+ /**
1494
+ * Determines if a new TinyMCE instance should be loaded.
1495
+ * @private
1496
+ * @returns {boolean} Whether tinyMCE should be loaded.
1497
+ */
1498
+ RichTextEditor.prototype._shouldLoadTinyMCE = function () {
1499
+ var sEditorType = this.getEditorType();
1500
+
1501
+ if (!window.tinymce) {
1502
+ return true;
1503
+ }
1504
+
1505
+ switch (sEditorType) {
1506
+ case RichTextEditor.EDITORTYPE_TINYMCE4:
1507
+ return window.tinymce.majorVersion != "4";
1508
+ case RichTextEditor.EDITORTYPE_TINYMCE6:
1509
+ return window.tinymce.majorVersion != "6";
1510
+ default:
1511
+ return false;
1512
+ }
1513
+ };
1394
1514
 
1395
1515
  /**
1396
1516
  * @private
1397
1517
  */
1398
- RichTextEditor.prototype.onBeforeRenderingTinyMCE4 = function() {
1399
- if (!window.tinymce || window.tinymce.majorVersion != "4") {
1518
+ RichTextEditor.prototype.onBeforeRenderingTinyMCE = function() {
1519
+ if (this._shouldLoadTinyMCE()) {
1520
+ // fallback to tinymce 4 for now since the editorLocation property used to do so
1521
+ var sEditorLocation = EDITOR_LOCATION_MAPPING[this.getEditorType()] || EDITOR_LOCATION_MAPPING[RichTextEditor.EDITORTYPE_TINYMCE4];
1400
1522
  // Load TinyMCE component
1401
- this._tinyMCE4Status = EditorStatus.Loading;
1402
- this._pTinyMCE4Loaded = RichTextEditor.loadTinyMCE(this.getEditorLocation()).then(function() {
1403
- this._tinyMCE4Status = EditorStatus.Loaded;
1523
+ this._tinyMCEStatus = EditorStatus.Loading;
1524
+ this._pTinyMCELoaded = RichTextEditor.loadTinyMCE(sEditorLocation).then(function() {
1525
+ this._tinyMCEStatus = EditorStatus.Loaded;
1404
1526
  }.bind(this));
1405
1527
  } else {
1406
- this._pTinyMCE4Loaded = Promise.resolve();
1407
- this._tinyMCE4Status = EditorStatus.Loaded;
1528
+ this._pTinyMCELoaded = Promise.resolve();
1529
+ this._tinyMCEStatus = EditorStatus.Loaded;
1408
1530
  }
1409
1531
  };
1410
1532
 
1411
-
1412
-
1413
1533
  /**
1414
1534
  * @private
1415
1535
  */
1416
- RichTextEditor.prototype.onAfterRenderingTinyMCE4 = function() {
1536
+ RichTextEditor.prototype.onAfterRenderingTinyMCE = function() {
1417
1537
  var oDomRef = this.getDomRef();
1418
1538
 
1419
- if (!window.tinymce || window.tinymce.majorVersion != "4") {
1539
+ if (this._shouldLoadTinyMCE()) {
1420
1540
  // TinyMCE not loaded yet. try again later...
1421
- this._pTinyMCE4Loaded.then(this.onAfterRenderingTinyMCE4.bind(this));
1541
+ this._pTinyMCELoaded.then(this.onAfterRenderingTinyMCE.bind(this));
1422
1542
  } else if (oDomRef) {
1423
1543
 
1424
- switch (this._tinyMCE4Status) {
1544
+ switch (this._tinyMCEStatus) {
1425
1545
  case EditorStatus.Initializing:
1426
1546
  oDomRef.appendChild(this._textAreaDom);
1427
1547
  break;
1428
1548
  case EditorStatus.Loaded:
1429
1549
  case EditorStatus.Loading:
1430
1550
  this.getDomRef().appendChild(this._textAreaDom);
1431
- this.reinitializeTinyMCE4();
1551
+ this.reinitializeTinyMCE();
1432
1552
  break;
1433
1553
  case EditorStatus.Ready:
1434
1554
  // We need to reinitialize TinyMCE so changes will be shown.
1435
1555
  oDomRef.appendChild(this._textAreaDom);
1436
- this.reinitializeTinyMCE4();
1556
+ this.reinitializeTinyMCE();
1437
1557
  break;
1438
1558
 
1439
1559
  default:
1440
- Log.error("Unknown TinyMCE4 status: " + this._tinyMCE4Status);
1560
+ Log.error("Unknown TinyMCE status: " + this._tinyMCEStatus);
1441
1561
  break;
1442
1562
  }
1443
1563
  }
@@ -1445,12 +1565,12 @@ sap.ui.define([
1445
1565
 
1446
1566
 
1447
1567
  /**
1448
- * TinyMCE4 specific reinitialize method
1568
+ * TinyMCE specific reinitialize method
1449
1569
  * The TinyMCE instance is destroyed and recreated with new configuration values.
1450
1570
  *
1451
1571
  * @private
1452
1572
  */
1453
- RichTextEditor.prototype.reinitializeTinyMCE4 = function() {
1573
+ RichTextEditor.prototype.reinitializeTinyMCE = function() {
1454
1574
  if (this._bInitializationPending || this._bUnloading) {
1455
1575
  // Do nothing if an initialization is currently waiting to happen or if the control has already been destroyed...
1456
1576
  return;
@@ -1462,24 +1582,24 @@ sap.ui.define([
1462
1582
  this._oEditor.remove();
1463
1583
  }
1464
1584
 
1465
- this._initializeTinyMCE4();
1585
+ this._initializeTinyMCE();
1466
1586
  }.bind(this);
1467
1587
 
1468
- switch (this._tinyMCE4Status) {
1588
+ switch (this._tinyMCEStatus) {
1469
1589
  case EditorStatus.Initial:
1470
1590
  // Ignored as the control is not rendered yet.
1471
1591
  break;
1472
1592
 
1473
1593
  case EditorStatus.Loading:
1474
1594
  this._bInitializationPending = true;
1475
- this._pTinyMCE4Loaded.then(fnReinitialize);
1595
+ this._pTinyMCELoaded.then(fnReinitialize);
1476
1596
  break;
1477
1597
 
1478
1598
  case EditorStatus.Initializing:
1479
- // We are currently waiting for the initialization of TinyMCE4 to complete, we have to do it again to
1599
+ // We are currently waiting for the initialization of TinyMCE to complete, we have to do it again to
1480
1600
  // make sure the latest changes will be reflected
1481
1601
  this._bInitializationPending = true;
1482
- this._pTinyMCE4Initialized.then(fnReinitialize);
1602
+ this._pTinyMCEInitialized.then(fnReinitialize);
1483
1603
  break;
1484
1604
 
1485
1605
  case EditorStatus.Loaded:
@@ -1492,35 +1612,36 @@ sap.ui.define([
1492
1612
  break;
1493
1613
 
1494
1614
  default:
1495
- Log.error("Unknown TinyMCE4 status: " + this._tinyMCE4Status);
1615
+ Log.error("Unknown TinyMCE status: " + this._tinyMCEStatus);
1496
1616
  break;
1497
1617
  }
1498
1618
  };
1499
1619
 
1500
1620
  /**
1501
- * TinyMCE4 specific getNativeApi method
1621
+ * TinyMCE specific getNativeApi method
1502
1622
  * Returns the editor instance for this control instance if available
1503
1623
  *
1504
1624
  * <b>Note:</b> This is the only official way of accessing TinyMCE. Accessing the third-party API through
1505
1625
  * the window object may lead to backward incompatibility with later updates. Such cases will not be supported.
1506
1626
  *
1507
- * @returns {object} The TinyMCE4 editor instance
1627
+ * @returns {object} The TinyMCE editor instance
1508
1628
  * @private
1509
1629
  */
1510
- RichTextEditor.prototype.getNativeApiTinyMCE4 = function() {
1630
+ RichTextEditor.prototype.getNativeApiTinyMCE = function() {
1511
1631
  return this._oEditor;
1512
1632
  };
1513
1633
 
1514
1634
  /**
1515
- * TinyMCE4 specific setValue method
1635
+ * TinyMCE specific setValue method
1516
1636
  * Loads the content set in the controls property into the TinyMCE editor instance and does
1517
1637
  * the necessary post processing
1518
1638
  *
1519
1639
  * @param {string} [sValue] Content, already sanitized if sanitizer is activated
1520
1640
  * @private
1521
1641
  */
1522
- RichTextEditor.prototype.setValueTinyMCE4 = function(sValue) {
1523
- switch (this._tinyMCE4Status) {
1642
+ RichTextEditor.prototype.setValueTinyMCE = function(sValue) {
1643
+
1644
+ switch (this._tinyMCEStatus) {
1524
1645
  case EditorStatus.Initial:
1525
1646
  case EditorStatus.Initializing:
1526
1647
  case EditorStatus.Loading:
@@ -1542,24 +1663,24 @@ sap.ui.define([
1542
1663
  break;
1543
1664
 
1544
1665
  default:
1545
- Log.error("Unknown TinyMCE4 status: " + this._tinyMCE4Status);
1666
+ Log.error("Unknown TinyMCE status: " + this._tinyMCEStatus);
1546
1667
  break;
1547
1668
  }
1548
1669
  };
1549
1670
 
1550
1671
 
1551
- RichTextEditor.prototype._initializeTinyMCE4 = function() {
1552
- this._pTinyMCE4Initialized = new Promise(function(fnResolve, fnReject) {
1672
+ RichTextEditor.prototype._initializeTinyMCE = function() {
1673
+ this._pTinyMCEInitialized = new Promise(function(fnResolve, fnReject) {
1553
1674
  this._bInitializationPending = false;
1554
- this._tinyMCE4Status = EditorStatus.Initializing;
1555
- this._textAreaDom.value = this._patchTinyMCE4Value(this.getValue());
1556
- window.tinymce.init(this._createConfigTinyMCE4(function() {
1557
- this._tinyMCE4Status = EditorStatus.Ready;
1675
+ this._tinyMCEStatus = EditorStatus.Initializing;
1676
+ this._textAreaDom.value = this._patchTinyMCEValue(this.getValue());
1677
+ window.tinymce.init(this._createConfigTinyMCE(function() {
1678
+ this._tinyMCEStatus = EditorStatus.Ready;
1558
1679
  // Wee need to add a timeout here, as the promise resolves before other asynchronous tasks like the
1559
- // load-events, which leads to TinyMCE4 still trying to operate on its DOM after the promise is resolved.
1680
+ // load-events, which leads to TinyMCE still trying to operate on its DOM after the promise is resolved.
1560
1681
  setTimeout(function() {
1561
1682
  if (!this._bInitializationPending) {
1562
- this._onAfterReadyTinyMCE4();
1683
+ this._onAfterReadyTinyMCE();
1563
1684
  }
1564
1685
  fnResolve();
1565
1686
  }.bind(this), 0);
@@ -1568,18 +1689,18 @@ sap.ui.define([
1568
1689
  };
1569
1690
 
1570
1691
  /**
1571
- * Patches the value which would be inserted in TinyMCE4.
1692
+ * Patches the value which would be inserted in TinyMCE.
1572
1693
  *
1573
1694
  * If the value starts with an HTML comment, then tinyMCE
1574
1695
  * throws an exception and its init hook is not executed.
1575
1696
  *
1576
1697
  * TODO: Check if this is fixed with higher version of TinyMCE and remove the patch
1577
1698
  *
1578
- * @param {string} value The value which will be inserted in the TinyMCE4
1699
+ * @param {string} value The value which will be inserted in the TinyMCE
1579
1700
  * @returns {string} The patched value
1580
1701
  * @private
1581
1702
  */
1582
- RichTextEditor.prototype._patchTinyMCE4Value = function (value) {
1703
+ RichTextEditor.prototype._patchTinyMCEValue = function (value) {
1583
1704
  if (value.indexOf("<!--") === 0) {
1584
1705
  value = "&#8203;" + value; // Prepend the value with "ZERO WIDTH NO-BREAK SPACE" character
1585
1706
  }
@@ -1594,7 +1715,7 @@ sap.ui.define([
1594
1715
  *
1595
1716
  * @private
1596
1717
  */
1597
- RichTextEditor.prototype._onAfterReadyTinyMCE4 = function() {
1718
+ RichTextEditor.prototype._onAfterReadyTinyMCE = function() {
1598
1719
  var oEditorIFrame = document.getElementById(this._iframeId),
1599
1720
  oCustomToolbar = this.getAggregation("_toolbarWrapper"),
1600
1721
  oToolbarDOM = oCustomToolbar && oCustomToolbar.getAggregation("_toolbar").getDomRef(),
@@ -1619,13 +1740,22 @@ sap.ui.define([
1619
1740
  }
1620
1741
 
1621
1742
  this._oEditor.on("change", function(oEvent) {
1622
- this.onTinyMCEChange(this._oEditor); // Works for TinyMCE 3 and 4
1743
+ this.onTinyMCEChange(this._oEditor); // Works for TinyMCE 4 and 5
1623
1744
  }.bind(this));
1624
1745
 
1746
+ /* Save the editor's state after the custom toolbar is initialized in order to enable proper firing of a 'dirty'
1747
+ event - a native TinyMCE event that is fired on every single change done in the editor.
1748
+
1749
+ When we initialize the customToolbar, setDirty method of TinyMCE is called many times, as a result of
1750
+ executing the default font styles to ensure right synchronizing of the custom toolbar in ToolbarWrapper.prototype.modifyRTEToolbarConfig.
1751
+
1752
+ As a result when we have custom toolbar used, initally it is always "dirty" and the event is not fired on content change.
1753
+ Saving the content initially will "clean" the state, allowing the app to use the native TinyMCE dirty event.
1625
1754
 
1626
- // Focus handling
1627
- var $Editor = jQuery(this._oEditor.getContainer());
1628
- $Editor.on('keydown', jQuery.proxy(this, this._tinyMCEKeyboardHandler));
1755
+ Event is not fired when the whole content is selected via CTRL + A and deleted. That is a TinyMCE issue.*/
1756
+ if (this.getCustomToolbar()) {
1757
+ this._oEditor.save();
1758
+ }
1629
1759
 
1630
1760
  // Make sure focus event is triggered, when body inside the iframe is focused
1631
1761
  var $EditorIFrame = jQuery(oEditorIFrame),
@@ -1636,11 +1766,7 @@ sap.ui.define([
1636
1766
  if (!bTriggered) {
1637
1767
  bTriggered = true;
1638
1768
  /* TODO remove after 1.62 version */
1639
- if (Device.browser.msie || Device.browser.edge) {
1640
- $EditorIFrame.trigger('activate');
1641
- } else {
1642
- $EditorIFrame.trigger('focus');
1643
- }
1769
+ $EditorIFrame.trigger('focus');
1644
1770
  $Body.trigger('focus');
1645
1771
  bTriggered = false;
1646
1772
  }
@@ -1651,11 +1777,11 @@ sap.ui.define([
1651
1777
  this._oEditor.getBody().setAttribute("title", sTooltip);
1652
1778
  $EditorIFrame.attr("title", sTooltip);
1653
1779
  }
1654
- this._registerWithPopupTinyMCE4();
1780
+ this._registerWithPopupTinyMCE();
1655
1781
 
1656
1782
  // Handle resized correctly.
1657
1783
  if (!this._resizeHandlerId) {
1658
- this._resizeHandlerId = ResizeHandler.register(this, this._boundResizeEditorTinyMCE4);
1784
+ this._resizeHandlerId = ResizeHandler.register(this, this._boundResizeEditorTinyMCE);
1659
1785
  }
1660
1786
 
1661
1787
  this._resizeEditorOnDocumentReady();
@@ -1664,12 +1790,14 @@ sap.ui.define([
1664
1790
  oToolbarDOM.setAttribute("aria-roledescription", oResourceBundle.getText("CUSTOM_TOOLBAR_ARIA_ROLEDESCRIPTION"));
1665
1791
  }
1666
1792
 
1793
+ this._oEditor.getContainer().classList.add("sapUiRteEditorContainer");
1794
+
1667
1795
  // TODO: make sure ready is fired if no reinitializations are pending
1668
- this.fireReadyTinyMCE4();
1796
+ this.fireReadyTinyMCE();
1669
1797
  };
1670
1798
 
1671
1799
  RichTextEditor.prototype._resizeEditorOnDocumentReady = function() {
1672
- var fnResizeEditor = this._resizeEditorTinyMCE4.bind(this);
1800
+ var fnResizeEditor = this._resizeEditorTinyMCE.bind(this);
1673
1801
  // Resize when editor is loaded completely
1674
1802
  var oEditorDocument = this._oEditor.getDoc();
1675
1803
 
@@ -1703,8 +1831,8 @@ sap.ui.define([
1703
1831
  *
1704
1832
  * @private
1705
1833
  */
1706
- RichTextEditor.prototype.fireReadyTinyMCE4 = function() {
1707
- switch (this._tinyMCE4Status) {
1834
+ RichTextEditor.prototype.fireReadyTinyMCE = function() {
1835
+ switch (this._tinyMCEStatus) {
1708
1836
  case EditorStatus.Initial:
1709
1837
  case EditorStatus.Loading:
1710
1838
  case EditorStatus.Loaded:
@@ -1723,7 +1851,7 @@ sap.ui.define([
1723
1851
  break;
1724
1852
 
1725
1853
  default:
1726
- Log.error("Unknown TinyMCE4 status: " + this._tinyMCE4Status);
1854
+ Log.error("Unknown TinyMCE status: " + this._tinyMCEStatus);
1727
1855
  break;
1728
1856
  }
1729
1857
  };
@@ -1731,7 +1859,7 @@ sap.ui.define([
1731
1859
  /**
1732
1860
  * Helper function for evaluating the textDirection of the tinyMCE's content config
1733
1861
  *
1734
- * @returns {sString} Text direction
1862
+ * @returns {string} Text direction
1735
1863
  * @private
1736
1864
  */
1737
1865
  RichTextEditor.prototype._getTextDirection = function() {
@@ -1750,10 +1878,10 @@ sap.ui.define([
1750
1878
  * @returns {boolean} Whether the configuration changed since last time
1751
1879
  * @private
1752
1880
  */
1753
- RichTextEditor.prototype._createConfigTinyMCE4 = function(fnOnInit) {
1881
+ RichTextEditor.prototype._createConfigTinyMCE = function(fnOnInit) {
1754
1882
  var oCustomToolbar = this.getAggregation("_toolbarWrapper");
1755
1883
 
1756
- // Create new instance of TinyMCE4
1884
+ // Create new instance of TinyMCE
1757
1885
  var aButtonRows = this._createButtonRowsTinyMCE(" ", "|");
1758
1886
  if (aButtonRows.length === 0) {
1759
1887
  aButtonRows = false;
@@ -1767,19 +1895,37 @@ sap.ui.define([
1767
1895
  sPluginsList = sPluginsList.replace(/(,powerpaste|powerpaste,)/gi, "");
1768
1896
  }
1769
1897
 
1898
+ var bIsTinyMCE6 = this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE6;
1899
+
1900
+ // since TinyMCE 6 plugins property format has changed
1901
+ if (bIsTinyMCE6) {
1902
+ sPluginsList = this.getPlugins().map(function(oPlugin) {
1903
+ return oPlugin.name;
1904
+ });
1905
+ }
1906
+
1907
+ if (bIsTinyMCE6 && !this.getEditable()) {
1908
+ sPluginsList = sPluginsList.filter(function(oPlugin) {
1909
+ return oPlugin !== "powerpaste";
1910
+ });
1911
+ }
1912
+
1770
1913
  /*eslint-disable camelcase */
1771
1914
  var oConfig = {
1772
1915
  // The following line only covers the editor content, not the UI in general
1916
+ height: "calc(100% - var(--_sap_ui_richtexteditor__toolbar_height))",
1773
1917
  directionality: this._getTextDirection(),
1774
1918
  selector: "[id='" + this._textAreaId + "']",
1775
- theme: "modern",
1919
+ theme: bIsTinyMCE6 ? "silver" : "modern",
1776
1920
  menubar: false,
1777
- language: this._getLanguageTinyMCE4(),
1921
+ language: this._getLanguageTinyMCE(),
1778
1922
  browser_spellcheck: true,
1779
1923
  convert_urls: false,
1780
1924
  plugins: sPluginsList,
1925
+ contextmenu: false,
1781
1926
  toolbar_items_size: 'small',
1782
1927
  toolbar: aButtonRows,
1928
+ toolbar_mode: "sliding",
1783
1929
  statusbar: false, // disables display of the status bar at the bottom of the editor
1784
1930
  image_advtab: true, // Adds an "Advanced" tab to the image dialog allowing you to add custom styles, spacing and borders to images
1785
1931
  readonly: !this.getEditable(),
@@ -1818,32 +1964,35 @@ sap.ui.define([
1818
1964
  *
1819
1965
  * @returns {string} The language to be used for TinyMCE
1820
1966
  */
1821
- RichTextEditor.prototype._getLanguageTinyMCE4 = function() {
1822
- var oLocale = new sap.ui.core.Locale(Core.getConfiguration().getLanguage()),
1967
+ RichTextEditor.prototype._getLanguageTinyMCE = function() {
1968
+ var oLocale = new Locale(Core.getConfiguration().getLanguage()),
1823
1969
  sLanguage = oLocale.getLanguage(),
1824
1970
  sRegion = oLocale.getRegion(),
1971
+ bIsTinyMCE6 = this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE6,
1825
1972
  sLangStr;
1826
1973
 
1827
1974
  // Language mapping for old/fallback languages
1828
- sLanguage = RichTextEditor.MAPPED_LANGUAGES_TINYMCE4[sLanguage] || sLanguage;
1975
+ sLanguage = RichTextEditor.MAPPED_LANGUAGES_TINYMCE[sLanguage] || sLanguage;
1829
1976
 
1830
1977
  // Find default region, if region is not given
1831
1978
  if (!sRegion) {
1832
- sRegion = RichTextEditor.SUPPORTED_LANGUAGES_DEFAULT_REGIONS[sLanguage];
1979
+ sRegion = bIsTinyMCE6 ? RichTextEditor.SUPPORTED_LANGUAGES_DEFAULT_REGIONS_TINYMCE6[sLanguage] : RichTextEditor.SUPPORTED_LANGUAGES_DEFAULT_REGIONS[sLanguage];
1833
1980
  }
1834
1981
 
1835
1982
  sLangStr = sRegion ? sLanguage + "_" + sRegion.toUpperCase() : sLanguage;
1836
1983
 
1837
- // If there is no language for that region defined, try without region
1838
- if (!RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE4[sLangStr]) {
1839
- sLangStr = sLanguage;
1984
+ // If there is region language, return it
1985
+ if (RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE[sLangStr]) {
1986
+ return sLangStr;
1840
1987
  }
1841
- // If there is still no language defined, fallback to english
1842
- if (!RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE4[sLangStr]) {
1843
- sLangStr = "en";
1988
+
1989
+ // If there is a some language, return it
1990
+ if (RichTextEditor.SUPPORTED_LANGUAGES_TINYMCE[sLanguage]) {
1991
+ return sLanguage;
1844
1992
  }
1845
1993
 
1846
- return sLangStr;
1994
+ // If there is still no language defined, fallback to english
1995
+ return "en";
1847
1996
  };
1848
1997
 
1849
1998
  /**
@@ -1852,10 +2001,10 @@ sap.ui.define([
1852
2001
  * @returns {void}
1853
2002
  * @private
1854
2003
  */
1855
- RichTextEditor.prototype._resizeEditorTinyMCE4 = function() {
2004
+ RichTextEditor.prototype._resizeEditorTinyMCE = function() {
1856
2005
  // Resize so the full editor takes the correct height
1857
2006
 
1858
- if (this._tinyMCE4Status !== EditorStatus.Ready) {
2007
+ if (this._tinyMCEStatus !== EditorStatus.Ready) {
1859
2008
  // This only happens when the control instance is destroyed in the meantime...
1860
2009
  return;
1861
2010
  }
@@ -1904,31 +2053,34 @@ sap.ui.define([
1904
2053
  *
1905
2054
  * @private
1906
2055
  */
1907
- RichTextEditor.prototype._registerWithPopupTinyMCE4 = function() {
1908
- var oBus = Core.getEventBus(),
2056
+ RichTextEditor.prototype._registerWithPopupTinyMCE = function() {
2057
+ var bIsTinyMCE6 = this.getEditorType() === RichTextEditor.EDITORTYPE_TINYMCE6,
1909
2058
  $Pop = this.$().closest("[data-sap-ui-popup]");
1910
2059
 
1911
2060
  setTimeout(function() {
1912
2061
  if ($Pop.length === 1) {
1913
- var sPopupId = $Pop.attr("data-sap-ui-popup"),
1914
- oObject = { id: this._iframeId };
1915
-
1916
- oBus.publish("sap.ui", "sap.ui.core.Popup.addFocusableContent-" + sPopupId, oObject);
2062
+ var sDialogId = "tox-dialog-" + this.getId();
1917
2063
 
1918
2064
  if (this._oEditor) {
1919
2065
  this._oEditor.on('OpenWindow', function(oEvent) {
1920
- var oObject = { id: oEvent.win._id };
1921
- oBus.publish("sap.ui", "sap.ui.core.Popup.addFocusableContent-" + sPopupId, oObject);
2066
+ if (bIsTinyMCE6) {
2067
+ jQuery(".tox-dialog[role='dialog']").attr("id", sDialogId);
2068
+ }
2069
+ var sSelector = "#" + (bIsTinyMCE6 ? sDialogId : oEvent.win._id);
2070
+ Popup.addExternalContent(sSelector, /* marked as selectable */ true);
1922
2071
  });
1923
2072
  this._oEditor.on('CloseWindow', function(oEvent) {
1924
- var oObject = { id: oEvent.win._id };
1925
- oBus.publish("sap.ui", "sap.ui.core.Popup.removeFocusableContent-" + sPopupId, oObject);
2073
+ var sSelector = "#" + (bIsTinyMCE6 ? sDialogId : oEvent.win._id);
2074
+ Popup.removeExternalContent(sSelector, /* remove selectable */ true);
2075
+ if (bIsTinyMCE6) {
2076
+ jQuery(".tox-dialog[role='dialog']").attr("id"); // remove our id
2077
+ }
1926
2078
  });
1927
2079
  }
1928
2080
  }
1929
2081
  }.bind(this), 0);
1930
2082
  };
1931
- ////////////////////////////////// End editor section "TinyMCE4" /////////////////////////////////
2083
+ ////////////////////////////////// End editor section "TinyMCE" /////////////////////////////////
1932
2084
 
1933
2085
 
1934
2086
  ////////////////////////////////// Custom Toolbar Section /////////////////////////////////
@@ -1940,9 +2092,7 @@ sap.ui.define([
1940
2092
  * @private
1941
2093
  */
1942
2094
  RichTextEditor.prototype._checkCustomToolbarRequirements = function() {
1943
- var bRequirementsFullfiled = this.getCustomToolbar() &&
1944
- this.getEditorType() === library.EditorType.TinyMCE4 &&
1945
- library.RichTextEditorHelper.bSapMLoaded;
2095
+ var bRequirementsFullfiled = this.getCustomToolbar() && oEditorMapping[this.getEditorType()] && library.RichTextEditorHelper.bSapMLoaded;
1946
2096
 
1947
2097
  this.$().toggleClass("sapUiRTEWithCustomToolbar", bRequirementsFullfiled);
1948
2098