@sapui5/sap.ui.richtexteditor 1.136.4 → 1.136.6

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 (448) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +1 -1
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
  4. package/src/sap/ui/richtexteditor/RichTextEditor.js +43 -43
  5. package/src/sap/ui/richtexteditor/ToolbarWrapper.js +1 -1
  6. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.js +234 -0
  7. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.min.js +7 -0
  8. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/index.js +13 -0
  9. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ar.js +7 -0
  10. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/bg_BG.js +7 -0
  11. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ca.js +7 -0
  12. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cs.js +7 -0
  13. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cy.js +1 -0
  14. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/da.js +7 -0
  15. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/de.js +7 -0
  16. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/el.js +7 -0
  17. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/en_GB.js +261 -0
  18. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es.js +7 -0
  19. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es_MX.js +1 -0
  20. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/eu.js +7 -0
  21. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fa.js +7 -0
  22. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fi.js +7 -0
  23. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fr_FR.js +7 -0
  24. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/he_IL.js +7 -0
  25. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hi.js +7 -0
  26. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hr.js +7 -0
  27. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hu_HU.js +7 -0
  28. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/id.js +7 -0
  29. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/it.js +7 -0
  30. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ja.js +7 -0
  31. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/kk.js +7 -0
  32. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ko_KR.js +7 -0
  33. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lt.js +1 -0
  34. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lv.js +1 -0
  35. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ms.js +7 -0
  36. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nb_NO.js +7 -0
  37. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nl.js +7 -0
  38. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pl.js +7 -0
  39. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_BR.js +7 -0
  40. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_PT.js +7 -0
  41. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ro.js +7 -0
  42. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ru.js +7 -0
  43. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sk.js +7 -0
  44. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sl_SI.js +7 -0
  45. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sr.js +1 -0
  46. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sv_SE.js +7 -0
  47. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/th_TH.js +7 -0
  48. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/tr.js +7 -0
  49. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/uk.js +7 -0
  50. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/vi.js +7 -0
  51. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_CN.js +7 -0
  52. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_TW.js +7 -0
  53. package/src/sap/ui/richtexteditor/js/tiny_mce7/license.txt +5 -0
  54. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/index.js +13 -0
  55. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.js +8147 -0
  56. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.min.js +9 -0
  57. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/index.js +13 -0
  58. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.js +1062 -0
  59. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.min.js +9 -0
  60. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/CHANGELOG.md +45 -0
  61. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/codemirror.min.js +13 -0
  62. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.js +10 -0
  63. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.min.js +10 -0
  64. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/index.js +3 -0
  65. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ar.js +35 -0
  66. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/bg_BG.js +35 -0
  67. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ca.js +35 -0
  68. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/cs.js +35 -0
  69. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/da.js +35 -0
  70. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/de.js +35 -0
  71. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/el.js +35 -0
  72. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/es.js +35 -0
  73. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/eu.js +35 -0
  74. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fa.js +35 -0
  75. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fi.js +35 -0
  76. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fr_FR.js +35 -0
  77. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/he_IL.js +35 -0
  78. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hi.js +35 -0
  79. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hr.js +35 -0
  80. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hu_HU.js +35 -0
  81. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/id.js +35 -0
  82. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/it.js +35 -0
  83. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ja.js +35 -0
  84. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/kk.js +35 -0
  85. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ko_KR.js +35 -0
  86. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ms.js +35 -0
  87. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nb_NO.js +35 -0
  88. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nl.js +35 -0
  89. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pl.js +35 -0
  90. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_BR.js +35 -0
  91. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_PT.js +35 -0
  92. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ro.js +35 -0
  93. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ru.js +35 -0
  94. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sk.js +35 -0
  95. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sl_SI.js +35 -0
  96. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sv_SE.js +35 -0
  97. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/th_TH.js +35 -0
  98. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/tr.js +35 -0
  99. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/uk.js +35 -0
  100. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/vi.js +35 -0
  101. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_CN.js +35 -0
  102. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_TW.js +35 -0
  103. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/license.txt +5 -0
  104. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.js +10 -0
  105. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.min.js +10 -0
  106. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/readme.txt +10 -0
  107. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/version.txt +1 -0
  108. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/index.js +13 -0
  109. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.js +298 -0
  110. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.min.js +9 -0
  111. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/index.js +13 -0
  112. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.js +219 -0
  113. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.min.js +9 -0
  114. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/index.js +13 -0
  115. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.js +233 -0
  116. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.min.js +9 -0
  117. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/index.js +13 -0
  118. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.js +184 -0
  119. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.min.js +9 -0
  120. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/index.js +13 -0
  121. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.js +239 -0
  122. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.min.js +9 -0
  123. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/index.js +13 -0
  124. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.js +1663 -0
  125. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.min.js +9 -0
  126. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/index.js +13 -0
  127. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.js +90 -0
  128. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.min.js +9 -0
  129. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/index.js +13 -0
  130. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.js +2468 -0
  131. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.min.js +9 -0
  132. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/index.js +13 -0
  133. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.js +395 -0
  134. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.min.js +9 -0
  135. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/index.js +13 -0
  136. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.js +7 -0
  137. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.min.js +9 -0
  138. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.js +7 -0
  139. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.min.js +8 -0
  140. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.js +601 -0
  141. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.min.js +9 -0
  142. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/index.js +13 -0
  143. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.js +1266 -0
  144. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.min.js +9 -0
  145. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/index.js +13 -0
  146. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ar.js +99 -0
  147. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/bg_BG.js +99 -0
  148. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ca.js +99 -0
  149. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/cs.js +99 -0
  150. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/da.js +99 -0
  151. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/de.js +99 -0
  152. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/el.js +99 -0
  153. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/en.js +99 -0
  154. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/es.js +99 -0
  155. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/eu.js +99 -0
  156. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fa.js +99 -0
  157. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fi.js +99 -0
  158. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fr_FR.js +99 -0
  159. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/he_IL.js +99 -0
  160. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hi.js +99 -0
  161. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hr.js +99 -0
  162. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hu_HU.js +99 -0
  163. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/id.js +99 -0
  164. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/it.js +99 -0
  165. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ja.js +99 -0
  166. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/kk.js +99 -0
  167. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ko_KR.js +99 -0
  168. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ms.js +99 -0
  169. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nb_NO.js +99 -0
  170. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nl.js +99 -0
  171. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pl.js +99 -0
  172. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_BR.js +99 -0
  173. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_PT.js +99 -0
  174. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ro.js +99 -0
  175. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ru.js +99 -0
  176. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sk.js +99 -0
  177. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sl_SI.js +99 -0
  178. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sv_SE.js +99 -0
  179. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/th_TH.js +99 -0
  180. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/tr.js +99 -0
  181. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/uk.js +99 -0
  182. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/vi.js +99 -0
  183. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_CN.js +93 -0
  184. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_TW.js +99 -0
  185. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.js +931 -0
  186. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.min.js +9 -0
  187. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/index.js +13 -0
  188. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.js +1513 -0
  189. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.min.js +9 -0
  190. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/index.js +13 -0
  191. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.js +350 -0
  192. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.min.js +9 -0
  193. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/index.js +13 -0
  194. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.js +192 -0
  195. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.min.js +9 -0
  196. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/index.js +13 -0
  197. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.js +1337 -0
  198. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.min.js +9 -0
  199. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/index.js +13 -0
  200. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.js +2186 -0
  201. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.min.js +9 -0
  202. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/index.js +13 -0
  203. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.js +1229 -0
  204. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.min.js +9 -0
  205. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/index.js +1 -0
  206. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ar.js +12 -0
  207. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/bg_BG.js +12 -0
  208. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ca.js +12 -0
  209. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/cs.js +12 -0
  210. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/da.js +12 -0
  211. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/de.js +12 -0
  212. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/el.js +12 -0
  213. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/es.js +12 -0
  214. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/eu.js +12 -0
  215. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fa.js +12 -0
  216. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fi.js +12 -0
  217. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fr_FR.js +12 -0
  218. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/he_IL.js +12 -0
  219. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hi.js +12 -0
  220. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hr.js +12 -0
  221. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hu_HU.js +12 -0
  222. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/id.js +12 -0
  223. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/it.js +12 -0
  224. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ja.js +12 -0
  225. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/kk.js +12 -0
  226. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ko_KR.js +12 -0
  227. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ms.js +12 -0
  228. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/nb_NO.js +12 -0
  229. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/nl.js +12 -0
  230. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pl.js +12 -0
  231. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pt_BR.js +12 -0
  232. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pt_PT.js +12 -0
  233. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ro.js +12 -0
  234. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ru.js +12 -0
  235. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sk.js +12 -0
  236. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sl_SI.js +12 -0
  237. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sv_SE.js +12 -0
  238. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/th_TH.js +12 -0
  239. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/tr.js +12 -0
  240. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/uk.js +12 -0
  241. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/vi.js +12 -0
  242. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/zh_CN.js +12 -0
  243. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/zh_TW.js +12 -0
  244. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/license.txt +5 -0
  245. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/plugin.js +10 -0
  246. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/plugin.min.js +10 -0
  247. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/readme.txt +10 -0
  248. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/version.txt +1 -0
  249. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/index.js +13 -0
  250. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.js +128 -0
  251. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.min.js +9 -0
  252. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/index.js +13 -0
  253. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.js +122 -0
  254. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.min.js +9 -0
  255. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/CHANGELOG.md +20 -0
  256. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/index.js +2 -0
  257. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/js/wordimport.js +23102 -0
  258. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ar.js +19 -0
  259. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/bg_BG.js +19 -0
  260. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ca.js +19 -0
  261. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/cs.js +19 -0
  262. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/da.js +19 -0
  263. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/de.js +19 -0
  264. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/el.js +19 -0
  265. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/es.js +19 -0
  266. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/eu.js +19 -0
  267. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fa.js +19 -0
  268. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fi.js +19 -0
  269. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fr_FR.js +19 -0
  270. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/he_IL.js +19 -0
  271. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hi.js +19 -0
  272. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hr.js +19 -0
  273. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hu_HU.js +19 -0
  274. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/id.js +19 -0
  275. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/it.js +19 -0
  276. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ja.js +19 -0
  277. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/kk.js +19 -0
  278. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ko_KR.js +19 -0
  279. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ms.js +19 -0
  280. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nb_NO.js +19 -0
  281. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nl.js +19 -0
  282. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pl.js +19 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_BR.js +19 -0
  284. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_PT.js +19 -0
  285. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ro.js +19 -0
  286. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ru.js +19 -0
  287. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sk.js +19 -0
  288. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sl_SI.js +19 -0
  289. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sv_SE.js +19 -0
  290. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/th_TH.js +19 -0
  291. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/tr.js +19 -0
  292. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/uk.js +19 -0
  293. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/vi.js +19 -0
  294. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_CN.js +19 -0
  295. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_TW.js +19 -0
  296. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/license.txt +5 -0
  297. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.js +10 -0
  298. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.min.js +10 -0
  299. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/readme.txt +17 -0
  300. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/version.txt +1 -0
  301. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/index.js +13 -0
  302. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.js +598 -0
  303. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.min.js +9 -0
  304. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/index.js +13 -0
  305. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.js +463 -0
  306. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.min.js +9 -0
  307. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/index.js +13 -0
  308. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.js +124 -0
  309. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.min.js +9 -0
  310. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/index.js +13 -0
  311. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.js +1103 -0
  312. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.min.js +9 -0
  313. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/index.js +13 -0
  314. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.js +3466 -0
  315. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.min.js +9 -0
  316. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/CHANGELOG.md +56 -0
  317. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/css/tinycomments.css +9 -0
  318. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/css/tinycomments.js +10 -0
  319. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/index.js +3 -0
  320. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/js/tinycomments-sidebar.js +10 -0
  321. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/js/tinycomments-sidebar.min.js +10 -0
  322. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ar.js +58 -0
  323. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/bg_BG.js +58 -0
  324. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ca.js +58 -0
  325. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/cs.js +58 -0
  326. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/da.js +58 -0
  327. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/de.js +58 -0
  328. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/el.js +58 -0
  329. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/es.js +58 -0
  330. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/eu.js +58 -0
  331. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fa.js +58 -0
  332. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fi.js +58 -0
  333. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fr_FR.js +58 -0
  334. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/he_IL.js +58 -0
  335. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hi.js +58 -0
  336. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hr.js +58 -0
  337. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hu_HU.js +58 -0
  338. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/id.js +58 -0
  339. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/it.js +58 -0
  340. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ja.js +58 -0
  341. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/kk.js +58 -0
  342. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ko_KR.js +58 -0
  343. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ms.js +58 -0
  344. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/nb_NO.js +58 -0
  345. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/nl.js +58 -0
  346. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pl.js +58 -0
  347. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pt_BR.js +58 -0
  348. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pt_PT.js +58 -0
  349. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ro.js +58 -0
  350. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ru.js +58 -0
  351. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sk.js +58 -0
  352. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sl_SI.js +58 -0
  353. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sv_SE.js +58 -0
  354. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/th_TH.js +58 -0
  355. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/tr.js +58 -0
  356. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/uk.js +58 -0
  357. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/vi.js +58 -0
  358. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/zh_CN.js +58 -0
  359. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/zh_TW.js +58 -0
  360. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/license.txt +5 -0
  361. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/plugin.js +10 -0
  362. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/plugin.min.js +10 -0
  363. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/readme.txt +10 -0
  364. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/version.txt +1 -0
  365. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/index.js +13 -0
  366. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.js +105 -0
  367. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.min.js +9 -0
  368. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/index.js +13 -0
  369. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.js +567 -0
  370. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.min.js +9 -0
  371. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/index.js +13 -0
  372. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.js +420 -0
  373. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.min.js +9 -0
  374. package/src/sap/ui/richtexteditor/js/tiny_mce7/readme.txt +12 -0
  375. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.css +72 -0
  376. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.js +7 -0
  377. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.min.css +7 -0
  378. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.css +67 -0
  379. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.js +7 -0
  380. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.min.css +7 -0
  381. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.css +72 -0
  382. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.js +7 -0
  383. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.min.css +7 -0
  384. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.css +67 -0
  385. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.js +7 -0
  386. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.min.css +7 -0
  387. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.css +72 -0
  388. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.js +7 -0
  389. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.min.css +7 -0
  390. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.css +68 -0
  391. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.js +7 -0
  392. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.min.css +7 -0
  393. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.css +890 -0
  394. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.css +884 -0
  395. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.js +7 -0
  396. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.min.css +7 -0
  397. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.js +7 -0
  398. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.min.css +7 -0
  399. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.css +4766 -0
  400. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.js +7 -0
  401. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.min.css +7 -0
  402. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.css +36 -0
  403. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.js +7 -0
  404. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  405. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.css +878 -0
  406. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.css +884 -0
  407. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.js +7 -0
  408. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.min.css +7 -0
  409. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.js +7 -0
  410. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.min.css +7 -0
  411. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.css +4769 -0
  412. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.js +7 -0
  413. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.min.css +7 -0
  414. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.css +36 -0
  415. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.js +7 -0
  416. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  417. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.css +890 -0
  418. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.css +884 -0
  419. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.js +7 -0
  420. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.min.css +7 -0
  421. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.js +7 -0
  422. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.min.css +7 -0
  423. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.css +4880 -0
  424. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.js +7 -0
  425. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.min.css +7 -0
  426. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.css +36 -0
  427. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.js +7 -0
  428. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.min.css +7 -0
  429. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.css +878 -0
  430. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.css +884 -0
  431. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.js +7 -0
  432. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.min.css +7 -0
  433. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.js +7 -0
  434. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.min.css +7 -0
  435. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.css +4880 -0
  436. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.js +7 -0
  437. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.min.css +7 -0
  438. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.css +36 -0
  439. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.js +7 -0
  440. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +7 -0
  441. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/index.js +13 -0
  442. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.js +31928 -0
  443. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.min.js +337 -0
  444. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.d.ts +3313 -0
  445. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.js +32267 -0
  446. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.min.js +336 -0
  447. package/src/sap/ui/richtexteditor/js/tiny_mce7/version.txt +1 -0
  448. package/src/sap/ui/richtexteditor/library.js +9 -3
@@ -0,0 +1,1513 @@
1
+ /*!
2
+ * TinyMCE
3
+ *
4
+ * Copyright (c) 2025 Ephox Corporation DBA Tiny Technologies, Inc.
5
+ * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
+ *
7
+ * Version: 7.7.2
8
+ */
9
+
10
+ (function () {
11
+ 'use strict';
12
+
13
+ var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
14
+
15
+ const getPrototypeOf = Object.getPrototypeOf;
16
+ const hasProto = (v, constructor, predicate) => {
17
+ var _a;
18
+ if (predicate(v, constructor.prototype)) {
19
+ return true;
20
+ } else {
21
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
22
+ }
23
+ };
24
+ const typeOf = x => {
25
+ const t = typeof x;
26
+ if (x === null) {
27
+ return 'null';
28
+ } else if (t === 'object' && Array.isArray(x)) {
29
+ return 'array';
30
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
31
+ return 'string';
32
+ } else {
33
+ return t;
34
+ }
35
+ };
36
+ const isType = type => value => typeOf(value) === type;
37
+ const isSimpleType = type => value => typeof value === type;
38
+ const eq = t => a => t === a;
39
+ const is = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf(o) === proto);
40
+ const isString = isType('string');
41
+ const isObject = isType('object');
42
+ const isPlainObject = value => is(value, Object);
43
+ const isArray = isType('array');
44
+ const isNull = eq(null);
45
+ const isBoolean = isSimpleType('boolean');
46
+ const isNullable = a => a === null || a === undefined;
47
+ const isNonNullable = a => !isNullable(a);
48
+ const isFunction = isSimpleType('function');
49
+ const isNumber = isSimpleType('number');
50
+ const isArrayOf = (value, pred) => {
51
+ if (isArray(value)) {
52
+ for (let i = 0, len = value.length; i < len; ++i) {
53
+ if (!pred(value[i])) {
54
+ return false;
55
+ }
56
+ }
57
+ return true;
58
+ }
59
+ return false;
60
+ };
61
+
62
+ const noop = () => {
63
+ };
64
+
65
+ class Optional {
66
+ constructor(tag, value) {
67
+ this.tag = tag;
68
+ this.value = value;
69
+ }
70
+ static some(value) {
71
+ return new Optional(true, value);
72
+ }
73
+ static none() {
74
+ return Optional.singletonNone;
75
+ }
76
+ fold(onNone, onSome) {
77
+ if (this.tag) {
78
+ return onSome(this.value);
79
+ } else {
80
+ return onNone();
81
+ }
82
+ }
83
+ isSome() {
84
+ return this.tag;
85
+ }
86
+ isNone() {
87
+ return !this.tag;
88
+ }
89
+ map(mapper) {
90
+ if (this.tag) {
91
+ return Optional.some(mapper(this.value));
92
+ } else {
93
+ return Optional.none();
94
+ }
95
+ }
96
+ bind(binder) {
97
+ if (this.tag) {
98
+ return binder(this.value);
99
+ } else {
100
+ return Optional.none();
101
+ }
102
+ }
103
+ exists(predicate) {
104
+ return this.tag && predicate(this.value);
105
+ }
106
+ forall(predicate) {
107
+ return !this.tag || predicate(this.value);
108
+ }
109
+ filter(predicate) {
110
+ if (!this.tag || predicate(this.value)) {
111
+ return this;
112
+ } else {
113
+ return Optional.none();
114
+ }
115
+ }
116
+ getOr(replacement) {
117
+ return this.tag ? this.value : replacement;
118
+ }
119
+ or(replacement) {
120
+ return this.tag ? this : replacement;
121
+ }
122
+ getOrThunk(thunk) {
123
+ return this.tag ? this.value : thunk();
124
+ }
125
+ orThunk(thunk) {
126
+ return this.tag ? this : thunk();
127
+ }
128
+ getOrDie(message) {
129
+ if (!this.tag) {
130
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
131
+ } else {
132
+ return this.value;
133
+ }
134
+ }
135
+ static from(value) {
136
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
137
+ }
138
+ getOrNull() {
139
+ return this.tag ? this.value : null;
140
+ }
141
+ getOrUndefined() {
142
+ return this.value;
143
+ }
144
+ each(worker) {
145
+ if (this.tag) {
146
+ worker(this.value);
147
+ }
148
+ }
149
+ toArray() {
150
+ return this.tag ? [this.value] : [];
151
+ }
152
+ toString() {
153
+ return this.tag ? `some(${ this.value })` : 'none()';
154
+ }
155
+ }
156
+ Optional.singletonNone = new Optional(false);
157
+
158
+ const keys = Object.keys;
159
+ const hasOwnProperty = Object.hasOwnProperty;
160
+ const each = (obj, f) => {
161
+ const props = keys(obj);
162
+ for (let k = 0, len = props.length; k < len; k++) {
163
+ const i = props[k];
164
+ const x = obj[i];
165
+ f(x, i);
166
+ }
167
+ };
168
+ const objAcc = r => (x, i) => {
169
+ r[i] = x;
170
+ };
171
+ const internalFilter = (obj, pred, onTrue, onFalse) => {
172
+ each(obj, (x, i) => {
173
+ (pred(x, i) ? onTrue : onFalse)(x, i);
174
+ });
175
+ };
176
+ const filter = (obj, pred) => {
177
+ const t = {};
178
+ internalFilter(obj, pred, objAcc(t), noop);
179
+ return t;
180
+ };
181
+ const has = (obj, key) => hasOwnProperty.call(obj, key);
182
+ const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;
183
+
184
+ const nativePush = Array.prototype.push;
185
+ const flatten = xs => {
186
+ const r = [];
187
+ for (let i = 0, len = xs.length; i < len; ++i) {
188
+ if (!isArray(xs[i])) {
189
+ throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
190
+ }
191
+ nativePush.apply(r, xs[i]);
192
+ }
193
+ return r;
194
+ };
195
+ const get = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
196
+ const head = xs => get(xs, 0);
197
+ const findMap = (arr, f) => {
198
+ for (let i = 0; i < arr.length; i++) {
199
+ const r = f(arr[i], i);
200
+ if (r.isSome()) {
201
+ return r;
202
+ }
203
+ }
204
+ return Optional.none();
205
+ };
206
+
207
+ typeof window !== 'undefined' ? window : Function('return this;')();
208
+
209
+ const rawSet = (dom, key, value) => {
210
+ if (isString(value) || isBoolean(value) || isNumber(value)) {
211
+ dom.setAttribute(key, value + '');
212
+ } else {
213
+ console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
214
+ throw new Error('Attribute value was not simple');
215
+ }
216
+ };
217
+ const set = (element, key, value) => {
218
+ rawSet(element.dom, key, value);
219
+ };
220
+ const remove = (element, key) => {
221
+ element.dom.removeAttribute(key);
222
+ };
223
+
224
+ const fromHtml = (html, scope) => {
225
+ const doc = scope || document;
226
+ const div = doc.createElement('div');
227
+ div.innerHTML = html;
228
+ if (!div.hasChildNodes() || div.childNodes.length > 1) {
229
+ const message = 'HTML does not have a single root node';
230
+ console.error(message, html);
231
+ throw new Error(message);
232
+ }
233
+ return fromDom(div.childNodes[0]);
234
+ };
235
+ const fromTag = (tag, scope) => {
236
+ const doc = scope || document;
237
+ const node = doc.createElement(tag);
238
+ return fromDom(node);
239
+ };
240
+ const fromText = (text, scope) => {
241
+ const doc = scope || document;
242
+ const node = doc.createTextNode(text);
243
+ return fromDom(node);
244
+ };
245
+ const fromDom = node => {
246
+ if (node === null || node === undefined) {
247
+ throw new Error('Node cannot be null or undefined');
248
+ }
249
+ return { dom: node };
250
+ };
251
+ const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
252
+ const SugarElement = {
253
+ fromHtml,
254
+ fromTag,
255
+ fromText,
256
+ fromDom,
257
+ fromPoint
258
+ };
259
+
260
+ var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
261
+
262
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
263
+
264
+ const isNotEmpty = s => s.length > 0;
265
+
266
+ const option = name => editor => editor.options.get(name);
267
+ const register$2 = editor => {
268
+ const registerOption = editor.options.register;
269
+ registerOption('image_dimensions', {
270
+ processor: 'boolean',
271
+ default: true
272
+ });
273
+ registerOption('image_advtab', {
274
+ processor: 'boolean',
275
+ default: false
276
+ });
277
+ registerOption('image_uploadtab', {
278
+ processor: 'boolean',
279
+ default: true
280
+ });
281
+ registerOption('image_prepend_url', {
282
+ processor: 'string',
283
+ default: ''
284
+ });
285
+ registerOption('image_class_list', { processor: 'object[]' });
286
+ registerOption('image_description', {
287
+ processor: 'boolean',
288
+ default: true
289
+ });
290
+ registerOption('image_title', {
291
+ processor: 'boolean',
292
+ default: false
293
+ });
294
+ registerOption('image_caption', {
295
+ processor: 'boolean',
296
+ default: false
297
+ });
298
+ registerOption('image_list', {
299
+ processor: value => {
300
+ const valid = value === false || isString(value) || isArrayOf(value, isObject) || isFunction(value);
301
+ return valid ? {
302
+ value,
303
+ valid
304
+ } : {
305
+ valid: false,
306
+ message: 'Must be false, a string, an array or a function.'
307
+ };
308
+ },
309
+ default: false
310
+ });
311
+ };
312
+ const hasDimensions = option('image_dimensions');
313
+ const hasAdvTab = option('image_advtab');
314
+ const hasUploadTab = option('image_uploadtab');
315
+ const getPrependUrl = option('image_prepend_url');
316
+ const getClassList = option('image_class_list');
317
+ const hasDescription = option('image_description');
318
+ const hasImageTitle = option('image_title');
319
+ const hasImageCaption = option('image_caption');
320
+ const getImageList = option('image_list');
321
+ const showAccessibilityOptions = option('a11y_advanced_options');
322
+ const isAutomaticUploadsEnabled = option('automatic_uploads');
323
+ const hasUploadUrl = editor => isNotEmpty(editor.options.get('images_upload_url'));
324
+ const hasUploadHandler = editor => isNonNullable(editor.options.get('images_upload_handler'));
325
+
326
+ const parseIntAndGetMax = (val1, val2) => Math.max(parseInt(val1, 10), parseInt(val2, 10));
327
+ const getImageSize = url => new Promise(callback => {
328
+ const img = document.createElement('img');
329
+ const done = dimensions => {
330
+ if (img.parentNode) {
331
+ img.parentNode.removeChild(img);
332
+ }
333
+ callback(dimensions);
334
+ };
335
+ img.addEventListener('load', () => {
336
+ const width = parseIntAndGetMax(img.width, img.clientWidth);
337
+ const height = parseIntAndGetMax(img.height, img.clientHeight);
338
+ const dimensions = {
339
+ width,
340
+ height
341
+ };
342
+ done(Promise.resolve(dimensions));
343
+ });
344
+ img.addEventListener('error', () => {
345
+ done(Promise.reject(`Failed to get image dimensions for: ${ url }`));
346
+ });
347
+ const style = img.style;
348
+ style.visibility = 'hidden';
349
+ style.position = 'fixed';
350
+ style.bottom = style.left = '0px';
351
+ style.width = style.height = 'auto';
352
+ document.body.appendChild(img);
353
+ img.src = url;
354
+ });
355
+ const removePixelSuffix = value => {
356
+ if (value) {
357
+ value = value.replace(/px$/, '');
358
+ }
359
+ return value;
360
+ };
361
+ const addPixelSuffix = value => {
362
+ if (value.length > 0 && /^[0-9]+$/.test(value)) {
363
+ value += 'px';
364
+ }
365
+ return value;
366
+ };
367
+ const mergeMargins = css => {
368
+ if (css.margin) {
369
+ const splitMargin = String(css.margin).split(' ');
370
+ switch (splitMargin.length) {
371
+ case 1:
372
+ css['margin-top'] = css['margin-top'] || splitMargin[0];
373
+ css['margin-right'] = css['margin-right'] || splitMargin[0];
374
+ css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
375
+ css['margin-left'] = css['margin-left'] || splitMargin[0];
376
+ break;
377
+ case 2:
378
+ css['margin-top'] = css['margin-top'] || splitMargin[0];
379
+ css['margin-right'] = css['margin-right'] || splitMargin[1];
380
+ css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
381
+ css['margin-left'] = css['margin-left'] || splitMargin[1];
382
+ break;
383
+ case 3:
384
+ css['margin-top'] = css['margin-top'] || splitMargin[0];
385
+ css['margin-right'] = css['margin-right'] || splitMargin[1];
386
+ css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
387
+ css['margin-left'] = css['margin-left'] || splitMargin[1];
388
+ break;
389
+ case 4:
390
+ css['margin-top'] = css['margin-top'] || splitMargin[0];
391
+ css['margin-right'] = css['margin-right'] || splitMargin[1];
392
+ css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
393
+ css['margin-left'] = css['margin-left'] || splitMargin[3];
394
+ }
395
+ delete css.margin;
396
+ }
397
+ return css;
398
+ };
399
+ const createImageList = (editor, callback) => {
400
+ const imageList = getImageList(editor);
401
+ if (isString(imageList)) {
402
+ fetch(imageList).then(res => {
403
+ if (res.ok) {
404
+ res.json().then(callback);
405
+ }
406
+ });
407
+ } else if (isFunction(imageList)) {
408
+ imageList(callback);
409
+ } else {
410
+ callback(imageList);
411
+ }
412
+ };
413
+ const waitLoadImage = (editor, data, imgElm) => {
414
+ const selectImage = () => {
415
+ imgElm.onload = imgElm.onerror = null;
416
+ if (editor.selection) {
417
+ editor.selection.select(imgElm);
418
+ editor.nodeChanged();
419
+ }
420
+ };
421
+ imgElm.onload = () => {
422
+ if (!data.width && !data.height && hasDimensions(editor)) {
423
+ editor.dom.setAttribs(imgElm, {
424
+ width: String(imgElm.clientWidth),
425
+ height: String(imgElm.clientHeight)
426
+ });
427
+ }
428
+ selectImage();
429
+ };
430
+ imgElm.onerror = selectImage;
431
+ };
432
+ const blobToDataUri = blob => new Promise((resolve, reject) => {
433
+ const reader = new FileReader();
434
+ reader.onload = () => {
435
+ resolve(reader.result);
436
+ };
437
+ reader.onerror = () => {
438
+ var _a;
439
+ reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);
440
+ };
441
+ reader.readAsDataURL(blob);
442
+ });
443
+ const isPlaceholderImage = imgElm => imgElm.nodeName === 'IMG' && (imgElm.hasAttribute('data-mce-object') || imgElm.hasAttribute('data-mce-placeholder'));
444
+ const isSafeImageUrl = (editor, src) => {
445
+ const getOption = editor.options.get;
446
+ return global$2.isDomSafe(src, 'img', {
447
+ allow_html_data_urls: getOption('allow_html_data_urls'),
448
+ allow_script_urls: getOption('allow_script_urls'),
449
+ allow_svg_data_urls: getOption('allow_svg_data_urls')
450
+ });
451
+ };
452
+
453
+ const DOM = global$3.DOM;
454
+ const getHspace = image => {
455
+ if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {
456
+ return removePixelSuffix(image.style.marginLeft);
457
+ } else {
458
+ return '';
459
+ }
460
+ };
461
+ const getVspace = image => {
462
+ if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) {
463
+ return removePixelSuffix(image.style.marginTop);
464
+ } else {
465
+ return '';
466
+ }
467
+ };
468
+ const getBorder = image => {
469
+ if (image.style.borderWidth) {
470
+ return removePixelSuffix(image.style.borderWidth);
471
+ } else {
472
+ return '';
473
+ }
474
+ };
475
+ const getAttrib = (image, name) => {
476
+ var _a;
477
+ if (image.hasAttribute(name)) {
478
+ return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';
479
+ } else {
480
+ return '';
481
+ }
482
+ };
483
+ const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
484
+ const updateAttrib = (image, name, value) => {
485
+ if (value === '' || value === null) {
486
+ image.removeAttribute(name);
487
+ } else {
488
+ image.setAttribute(name, value);
489
+ }
490
+ };
491
+ const wrapInFigure = image => {
492
+ const figureElm = DOM.create('figure', { class: 'image' });
493
+ DOM.insertAfter(figureElm, image);
494
+ figureElm.appendChild(image);
495
+ figureElm.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));
496
+ figureElm.contentEditable = 'false';
497
+ };
498
+ const removeFigure = image => {
499
+ const figureElm = image.parentNode;
500
+ if (isNonNullable(figureElm)) {
501
+ DOM.insertAfter(image, figureElm);
502
+ DOM.remove(figureElm);
503
+ }
504
+ };
505
+ const toggleCaption = image => {
506
+ if (hasCaption(image)) {
507
+ removeFigure(image);
508
+ } else {
509
+ wrapInFigure(image);
510
+ }
511
+ };
512
+ const normalizeStyle = (image, normalizeCss) => {
513
+ const attrValue = image.getAttribute('style');
514
+ const value = normalizeCss(attrValue !== null ? attrValue : '');
515
+ if (value.length > 0) {
516
+ image.setAttribute('style', value);
517
+ image.setAttribute('data-mce-style', value);
518
+ } else {
519
+ image.removeAttribute('style');
520
+ }
521
+ };
522
+ const setSize = (name, normalizeCss) => (image, name, value) => {
523
+ const styles = image.style;
524
+ if (styles[name]) {
525
+ styles[name] = addPixelSuffix(value);
526
+ normalizeStyle(image, normalizeCss);
527
+ } else {
528
+ updateAttrib(image, name, value);
529
+ }
530
+ };
531
+ const getSize = (image, name) => {
532
+ if (image.style[name]) {
533
+ return removePixelSuffix(image.style[name]);
534
+ } else {
535
+ return getAttrib(image, name);
536
+ }
537
+ };
538
+ const setHspace = (image, value) => {
539
+ const pxValue = addPixelSuffix(value);
540
+ image.style.marginLeft = pxValue;
541
+ image.style.marginRight = pxValue;
542
+ };
543
+ const setVspace = (image, value) => {
544
+ const pxValue = addPixelSuffix(value);
545
+ image.style.marginTop = pxValue;
546
+ image.style.marginBottom = pxValue;
547
+ };
548
+ const setBorder = (image, value) => {
549
+ const pxValue = addPixelSuffix(value);
550
+ image.style.borderWidth = pxValue;
551
+ };
552
+ const setBorderStyle = (image, value) => {
553
+ image.style.borderStyle = value;
554
+ };
555
+ const getBorderStyle = image => {
556
+ var _a;
557
+ return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : '';
558
+ };
559
+ const isFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE';
560
+ const isImage = elm => elm.nodeName === 'IMG';
561
+ const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';
562
+ const getAlt = image => {
563
+ if (getIsDecorative(image)) {
564
+ return '';
565
+ } else {
566
+ return getAttrib(image, 'alt');
567
+ }
568
+ };
569
+ const defaultData = () => ({
570
+ src: '',
571
+ alt: '',
572
+ title: '',
573
+ width: '',
574
+ height: '',
575
+ class: '',
576
+ style: '',
577
+ caption: false,
578
+ hspace: '',
579
+ vspace: '',
580
+ border: '',
581
+ borderStyle: '',
582
+ isDecorative: false
583
+ });
584
+ const getStyleValue = (normalizeCss, data) => {
585
+ var _a;
586
+ const image = document.createElement('img');
587
+ updateAttrib(image, 'style', data.style);
588
+ if (getHspace(image) || data.hspace !== '') {
589
+ setHspace(image, data.hspace);
590
+ }
591
+ if (getVspace(image) || data.vspace !== '') {
592
+ setVspace(image, data.vspace);
593
+ }
594
+ if (getBorder(image) || data.border !== '') {
595
+ setBorder(image, data.border);
596
+ }
597
+ if (getBorderStyle(image) || data.borderStyle !== '') {
598
+ setBorderStyle(image, data.borderStyle);
599
+ }
600
+ return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');
601
+ };
602
+ const create = (normalizeCss, data) => {
603
+ const image = document.createElement('img');
604
+ write(normalizeCss, {
605
+ ...data,
606
+ caption: false
607
+ }, image);
608
+ setAlt(image, data.alt, data.isDecorative);
609
+ if (data.caption) {
610
+ const figure = DOM.create('figure', { class: 'image' });
611
+ figure.appendChild(image);
612
+ figure.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));
613
+ figure.contentEditable = 'false';
614
+ return figure;
615
+ } else {
616
+ return image;
617
+ }
618
+ };
619
+ const read = (normalizeCss, image) => ({
620
+ src: getAttrib(image, 'src'),
621
+ alt: getAlt(image),
622
+ title: getAttrib(image, 'title'),
623
+ width: getSize(image, 'width'),
624
+ height: getSize(image, 'height'),
625
+ class: getAttrib(image, 'class'),
626
+ style: normalizeCss(getAttrib(image, 'style')),
627
+ caption: hasCaption(image),
628
+ hspace: getHspace(image),
629
+ vspace: getVspace(image),
630
+ border: getBorder(image),
631
+ borderStyle: getBorderStyle(image),
632
+ isDecorative: getIsDecorative(image)
633
+ });
634
+ const updateProp = (image, oldData, newData, name, set) => {
635
+ if (newData[name] !== oldData[name]) {
636
+ set(image, name, String(newData[name]));
637
+ }
638
+ };
639
+ const setAlt = (image, alt, isDecorative) => {
640
+ if (isDecorative) {
641
+ DOM.setAttrib(image, 'role', 'presentation');
642
+ const sugarImage = SugarElement.fromDom(image);
643
+ set(sugarImage, 'alt', '');
644
+ } else {
645
+ if (isNull(alt)) {
646
+ const sugarImage = SugarElement.fromDom(image);
647
+ remove(sugarImage, 'alt');
648
+ } else {
649
+ const sugarImage = SugarElement.fromDom(image);
650
+ set(sugarImage, 'alt', alt);
651
+ }
652
+ if (DOM.getAttrib(image, 'role') === 'presentation') {
653
+ DOM.setAttrib(image, 'role', '');
654
+ }
655
+ }
656
+ };
657
+ const updateAlt = (image, oldData, newData) => {
658
+ if (newData.alt !== oldData.alt || newData.isDecorative !== oldData.isDecorative) {
659
+ setAlt(image, newData.alt, newData.isDecorative);
660
+ }
661
+ };
662
+ const normalized = (set, normalizeCss) => (image, name, value) => {
663
+ set(image, value);
664
+ normalizeStyle(image, normalizeCss);
665
+ };
666
+ const write = (normalizeCss, newData, image) => {
667
+ const oldData = read(normalizeCss, image);
668
+ updateProp(image, oldData, newData, 'caption', (image, _name, _value) => toggleCaption(image));
669
+ updateProp(image, oldData, newData, 'src', updateAttrib);
670
+ updateProp(image, oldData, newData, 'title', updateAttrib);
671
+ updateProp(image, oldData, newData, 'width', setSize('width', normalizeCss));
672
+ updateProp(image, oldData, newData, 'height', setSize('height', normalizeCss));
673
+ updateProp(image, oldData, newData, 'class', updateAttrib);
674
+ updateProp(image, oldData, newData, 'style', normalized((image, value) => updateAttrib(image, 'style', value), normalizeCss));
675
+ updateProp(image, oldData, newData, 'hspace', normalized(setHspace, normalizeCss));
676
+ updateProp(image, oldData, newData, 'vspace', normalized(setVspace, normalizeCss));
677
+ updateProp(image, oldData, newData, 'border', normalized(setBorder, normalizeCss));
678
+ updateProp(image, oldData, newData, 'borderStyle', normalized(setBorderStyle, normalizeCss));
679
+ updateAlt(image, oldData, newData);
680
+ };
681
+
682
+ const normalizeCss$1 = (editor, cssText) => {
683
+ const css = editor.dom.styles.parse(cssText);
684
+ const mergedCss = mergeMargins(css);
685
+ const compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));
686
+ return editor.dom.styles.serialize(compressed);
687
+ };
688
+ const getSelectedImage = editor => {
689
+ const imgElm = editor.selection.getNode();
690
+ const figureElm = editor.dom.getParent(imgElm, 'figure.image');
691
+ if (figureElm) {
692
+ return editor.dom.select('img', figureElm)[0];
693
+ }
694
+ if (imgElm && (imgElm.nodeName !== 'IMG' || isPlaceholderImage(imgElm))) {
695
+ return null;
696
+ }
697
+ return imgElm;
698
+ };
699
+ const splitTextBlock = (editor, figure) => {
700
+ var _a;
701
+ const dom = editor.dom;
702
+ const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));
703
+ const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());
704
+ if (textBlock) {
705
+ return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;
706
+ } else {
707
+ return figure;
708
+ }
709
+ };
710
+ const readImageDataFromSelection = editor => {
711
+ const image = getSelectedImage(editor);
712
+ return image ? read(css => normalizeCss$1(editor, css), image) : defaultData();
713
+ };
714
+ const insertImageAtCaret = (editor, data) => {
715
+ const elm = create(css => normalizeCss$1(editor, css), data);
716
+ editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew');
717
+ editor.focus();
718
+ editor.selection.setContent(elm.outerHTML);
719
+ const insertedElm = editor.dom.select('*[data-mce-id="__mcenew"]')[0];
720
+ editor.dom.setAttrib(insertedElm, 'data-mce-id', null);
721
+ if (isFigure(insertedElm)) {
722
+ const figure = splitTextBlock(editor, insertedElm);
723
+ editor.selection.select(figure);
724
+ } else {
725
+ editor.selection.select(insertedElm);
726
+ }
727
+ };
728
+ const syncSrcAttr = (editor, image) => {
729
+ editor.dom.setAttrib(image, 'src', image.getAttribute('src'));
730
+ };
731
+ const deleteImage = (editor, image) => {
732
+ if (image) {
733
+ const elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image;
734
+ editor.dom.remove(elm);
735
+ editor.focus();
736
+ editor.nodeChanged();
737
+ if (editor.dom.isEmpty(editor.getBody())) {
738
+ editor.setContent('');
739
+ editor.selection.setCursorLocation();
740
+ }
741
+ }
742
+ };
743
+ const writeImageDataToSelection = (editor, data) => {
744
+ const image = getSelectedImage(editor);
745
+ if (image) {
746
+ write(css => normalizeCss$1(editor, css), data, image);
747
+ syncSrcAttr(editor, image);
748
+ if (isFigure(image.parentNode)) {
749
+ editor.dom.setStyle(image, 'float', '');
750
+ const figure = image.parentNode;
751
+ splitTextBlock(editor, figure);
752
+ editor.selection.select(image.parentNode);
753
+ } else {
754
+ editor.selection.select(image);
755
+ waitLoadImage(editor, data, image);
756
+ }
757
+ }
758
+ };
759
+ const sanitizeImageData = (editor, data) => {
760
+ const src = data.src;
761
+ return {
762
+ ...data,
763
+ src: isSafeImageUrl(editor, src) ? src : ''
764
+ };
765
+ };
766
+ const insertOrUpdateImage = (editor, partialData) => {
767
+ const image = getSelectedImage(editor);
768
+ if (image) {
769
+ const selectedImageData = read(css => normalizeCss$1(editor, css), image);
770
+ const data = {
771
+ ...selectedImageData,
772
+ ...partialData
773
+ };
774
+ const sanitizedData = sanitizeImageData(editor, data);
775
+ if (data.src) {
776
+ writeImageDataToSelection(editor, sanitizedData);
777
+ } else {
778
+ deleteImage(editor, image);
779
+ }
780
+ } else if (partialData.src) {
781
+ insertImageAtCaret(editor, {
782
+ ...defaultData(),
783
+ ...partialData
784
+ });
785
+ }
786
+ };
787
+
788
+ const deep = (old, nu) => {
789
+ const bothObjects = isPlainObject(old) && isPlainObject(nu);
790
+ return bothObjects ? deepMerge(old, nu) : nu;
791
+ };
792
+ const baseMerge = merger => {
793
+ return (...objects) => {
794
+ if (objects.length === 0) {
795
+ throw new Error(`Can't merge zero objects`);
796
+ }
797
+ const ret = {};
798
+ for (let j = 0; j < objects.length; j++) {
799
+ const curObject = objects[j];
800
+ for (const key in curObject) {
801
+ if (has(curObject, key)) {
802
+ ret[key] = merger(ret[key], curObject[key]);
803
+ }
804
+ }
805
+ }
806
+ return ret;
807
+ };
808
+ };
809
+ const deepMerge = baseMerge(deep);
810
+
811
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.ImageUploader');
812
+
813
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
814
+
815
+ const getValue = item => isString(item.value) ? item.value : '';
816
+ const getText = item => {
817
+ if (isString(item.text)) {
818
+ return item.text;
819
+ } else if (isString(item.title)) {
820
+ return item.title;
821
+ } else {
822
+ return '';
823
+ }
824
+ };
825
+ const sanitizeList = (list, extractValue) => {
826
+ const out = [];
827
+ global.each(list, item => {
828
+ const text = getText(item);
829
+ if (item.menu !== undefined) {
830
+ const items = sanitizeList(item.menu, extractValue);
831
+ out.push({
832
+ text,
833
+ items
834
+ });
835
+ } else {
836
+ const value = extractValue(item);
837
+ out.push({
838
+ text,
839
+ value
840
+ });
841
+ }
842
+ });
843
+ return out;
844
+ };
845
+ const sanitizer = (extractor = getValue) => list => {
846
+ if (list) {
847
+ return Optional.from(list).map(list => sanitizeList(list, extractor));
848
+ } else {
849
+ return Optional.none();
850
+ }
851
+ };
852
+ const sanitize = list => sanitizer(getValue)(list);
853
+ const isGroup = item => has(item, 'items');
854
+ const findEntryDelegate = (list, value) => findMap(list, item => {
855
+ if (isGroup(item)) {
856
+ return findEntryDelegate(item.items, value);
857
+ } else if (item.value === value) {
858
+ return Optional.some(item);
859
+ } else {
860
+ return Optional.none();
861
+ }
862
+ });
863
+ const findEntry = (optList, value) => optList.bind(list => findEntryDelegate(list, value));
864
+ const ListUtils = {
865
+ sanitizer,
866
+ sanitize,
867
+ findEntry
868
+ };
869
+
870
+ const makeTab$2 = _info => ({
871
+ title: 'Advanced',
872
+ name: 'advanced',
873
+ items: [{
874
+ type: 'grid',
875
+ columns: 2,
876
+ items: [
877
+ {
878
+ type: 'input',
879
+ label: 'Vertical space',
880
+ name: 'vspace',
881
+ inputMode: 'numeric'
882
+ },
883
+ {
884
+ type: 'input',
885
+ label: 'Horizontal space',
886
+ name: 'hspace',
887
+ inputMode: 'numeric'
888
+ },
889
+ {
890
+ type: 'input',
891
+ label: 'Border width',
892
+ name: 'border',
893
+ inputMode: 'numeric'
894
+ },
895
+ {
896
+ type: 'listbox',
897
+ name: 'borderstyle',
898
+ label: 'Border style',
899
+ items: [
900
+ {
901
+ text: 'Select...',
902
+ value: ''
903
+ },
904
+ {
905
+ text: 'Solid',
906
+ value: 'solid'
907
+ },
908
+ {
909
+ text: 'Dotted',
910
+ value: 'dotted'
911
+ },
912
+ {
913
+ text: 'Dashed',
914
+ value: 'dashed'
915
+ },
916
+ {
917
+ text: 'Double',
918
+ value: 'double'
919
+ },
920
+ {
921
+ text: 'Groove',
922
+ value: 'groove'
923
+ },
924
+ {
925
+ text: 'Ridge',
926
+ value: 'ridge'
927
+ },
928
+ {
929
+ text: 'Inset',
930
+ value: 'inset'
931
+ },
932
+ {
933
+ text: 'Outset',
934
+ value: 'outset'
935
+ },
936
+ {
937
+ text: 'None',
938
+ value: 'none'
939
+ },
940
+ {
941
+ text: 'Hidden',
942
+ value: 'hidden'
943
+ }
944
+ ]
945
+ }
946
+ ]
947
+ }]
948
+ });
949
+ const AdvTab = { makeTab: makeTab$2 };
950
+
951
+ const collect = editor => {
952
+ const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url || '', 'src'));
953
+ const futureImageList = new Promise(completer => {
954
+ createImageList(editor, imageList => {
955
+ completer(urlListSanitizer(imageList).map(items => flatten([
956
+ [{
957
+ text: 'None',
958
+ value: ''
959
+ }],
960
+ items
961
+ ])));
962
+ });
963
+ });
964
+ const classList = ListUtils.sanitize(getClassList(editor));
965
+ const hasAdvTab$1 = hasAdvTab(editor);
966
+ const hasUploadTab$1 = hasUploadTab(editor);
967
+ const hasUploadUrl$1 = hasUploadUrl(editor);
968
+ const hasUploadHandler$1 = hasUploadHandler(editor);
969
+ const image = readImageDataFromSelection(editor);
970
+ const hasDescription$1 = hasDescription(editor);
971
+ const hasImageTitle$1 = hasImageTitle(editor);
972
+ const hasDimensions$1 = hasDimensions(editor);
973
+ const hasImageCaption$1 = hasImageCaption(editor);
974
+ const hasAccessibilityOptions = showAccessibilityOptions(editor);
975
+ const automaticUploads = isAutomaticUploadsEnabled(editor);
976
+ const prependURL = Optional.some(getPrependUrl(editor)).filter(preUrl => isString(preUrl) && preUrl.length > 0);
977
+ return futureImageList.then(imageList => ({
978
+ image,
979
+ imageList,
980
+ classList,
981
+ hasAdvTab: hasAdvTab$1,
982
+ hasUploadTab: hasUploadTab$1,
983
+ hasUploadUrl: hasUploadUrl$1,
984
+ hasUploadHandler: hasUploadHandler$1,
985
+ hasDescription: hasDescription$1,
986
+ hasImageTitle: hasImageTitle$1,
987
+ hasDimensions: hasDimensions$1,
988
+ hasImageCaption: hasImageCaption$1,
989
+ prependURL,
990
+ hasAccessibilityOptions,
991
+ automaticUploads
992
+ }));
993
+ };
994
+
995
+ const makeItems = info => {
996
+ const imageUrl = {
997
+ name: 'src',
998
+ type: 'urlinput',
999
+ filetype: 'image',
1000
+ label: 'Source',
1001
+ picker_text: 'Browse files'
1002
+ };
1003
+ const imageList = info.imageList.map(items => ({
1004
+ name: 'images',
1005
+ type: 'listbox',
1006
+ label: 'Image list',
1007
+ items
1008
+ }));
1009
+ const imageDescription = {
1010
+ name: 'alt',
1011
+ type: 'input',
1012
+ label: 'Alternative description',
1013
+ enabled: !(info.hasAccessibilityOptions && info.image.isDecorative)
1014
+ };
1015
+ const imageTitle = {
1016
+ name: 'title',
1017
+ type: 'input',
1018
+ label: 'Image title'
1019
+ };
1020
+ const imageDimensions = {
1021
+ name: 'dimensions',
1022
+ type: 'sizeinput'
1023
+ };
1024
+ const isDecorative = {
1025
+ type: 'label',
1026
+ label: 'Accessibility',
1027
+ items: [{
1028
+ name: 'isDecorative',
1029
+ type: 'checkbox',
1030
+ label: 'Image is decorative'
1031
+ }]
1032
+ };
1033
+ const classList = info.classList.map(items => ({
1034
+ name: 'classes',
1035
+ type: 'listbox',
1036
+ label: 'Class',
1037
+ items
1038
+ }));
1039
+ const caption = {
1040
+ type: 'label',
1041
+ label: 'Caption',
1042
+ items: [{
1043
+ type: 'checkbox',
1044
+ name: 'caption',
1045
+ label: 'Show caption'
1046
+ }]
1047
+ };
1048
+ const getDialogContainerType = useColumns => useColumns ? {
1049
+ type: 'grid',
1050
+ columns: 2
1051
+ } : { type: 'panel' };
1052
+ return flatten([
1053
+ [imageUrl],
1054
+ imageList.toArray(),
1055
+ info.hasAccessibilityOptions && info.hasDescription ? [isDecorative] : [],
1056
+ info.hasDescription ? [imageDescription] : [],
1057
+ info.hasImageTitle ? [imageTitle] : [],
1058
+ info.hasDimensions ? [imageDimensions] : [],
1059
+ [{
1060
+ ...getDialogContainerType(info.classList.isSome() && info.hasImageCaption),
1061
+ items: flatten([
1062
+ classList.toArray(),
1063
+ info.hasImageCaption ? [caption] : []
1064
+ ])
1065
+ }]
1066
+ ]);
1067
+ };
1068
+ const makeTab$1 = info => ({
1069
+ title: 'General',
1070
+ name: 'general',
1071
+ items: makeItems(info)
1072
+ });
1073
+ const MainTab = {
1074
+ makeTab: makeTab$1,
1075
+ makeItems
1076
+ };
1077
+
1078
+ const makeTab = _info => {
1079
+ const items = [{
1080
+ type: 'dropzone',
1081
+ name: 'fileinput'
1082
+ }];
1083
+ return {
1084
+ title: 'Upload',
1085
+ name: 'upload',
1086
+ items
1087
+ };
1088
+ };
1089
+ const UploadTab = { makeTab };
1090
+
1091
+ const createState = info => ({
1092
+ prevImage: ListUtils.findEntry(info.imageList, info.image.src),
1093
+ prevAlt: info.image.alt,
1094
+ open: true
1095
+ });
1096
+ const fromImageData = image => ({
1097
+ src: {
1098
+ value: image.src,
1099
+ meta: {}
1100
+ },
1101
+ images: image.src,
1102
+ alt: image.alt,
1103
+ title: image.title,
1104
+ dimensions: {
1105
+ width: image.width,
1106
+ height: image.height
1107
+ },
1108
+ classes: image.class,
1109
+ caption: image.caption,
1110
+ style: image.style,
1111
+ vspace: image.vspace,
1112
+ border: image.border,
1113
+ hspace: image.hspace,
1114
+ borderstyle: image.borderStyle,
1115
+ fileinput: [],
1116
+ isDecorative: image.isDecorative
1117
+ });
1118
+ const toImageData = (data, removeEmptyAlt) => ({
1119
+ src: data.src.value,
1120
+ alt: (data.alt === null || data.alt.length === 0) && removeEmptyAlt ? null : data.alt,
1121
+ title: data.title,
1122
+ width: data.dimensions.width,
1123
+ height: data.dimensions.height,
1124
+ class: data.classes,
1125
+ style: data.style,
1126
+ caption: data.caption,
1127
+ hspace: data.hspace,
1128
+ vspace: data.vspace,
1129
+ border: data.border,
1130
+ borderStyle: data.borderstyle,
1131
+ isDecorative: data.isDecorative
1132
+ });
1133
+ const addPrependUrl2 = (info, srcURL) => {
1134
+ if (!/^(?:[a-zA-Z]+:)?\/\//.test(srcURL)) {
1135
+ return info.prependURL.bind(prependUrl => {
1136
+ if (srcURL.substring(0, prependUrl.length) !== prependUrl) {
1137
+ return Optional.some(prependUrl + srcURL);
1138
+ }
1139
+ return Optional.none();
1140
+ });
1141
+ }
1142
+ return Optional.none();
1143
+ };
1144
+ const addPrependUrl = (info, api) => {
1145
+ const data = api.getData();
1146
+ addPrependUrl2(info, data.src.value).each(srcURL => {
1147
+ api.setData({
1148
+ src: {
1149
+ value: srcURL,
1150
+ meta: data.src.meta
1151
+ }
1152
+ });
1153
+ });
1154
+ };
1155
+ const formFillFromMeta2 = (info, data, meta) => {
1156
+ if (info.hasDescription && isString(meta.alt)) {
1157
+ data.alt = meta.alt;
1158
+ }
1159
+ if (info.hasAccessibilityOptions) {
1160
+ data.isDecorative = meta.isDecorative || data.isDecorative || false;
1161
+ }
1162
+ if (info.hasImageTitle && isString(meta.title)) {
1163
+ data.title = meta.title;
1164
+ }
1165
+ if (info.hasDimensions) {
1166
+ if (isString(meta.width)) {
1167
+ data.dimensions.width = meta.width;
1168
+ }
1169
+ if (isString(meta.height)) {
1170
+ data.dimensions.height = meta.height;
1171
+ }
1172
+ }
1173
+ if (isString(meta.class)) {
1174
+ ListUtils.findEntry(info.classList, meta.class).each(entry => {
1175
+ data.classes = entry.value;
1176
+ });
1177
+ }
1178
+ if (info.hasImageCaption) {
1179
+ if (isBoolean(meta.caption)) {
1180
+ data.caption = meta.caption;
1181
+ }
1182
+ }
1183
+ if (info.hasAdvTab) {
1184
+ if (isString(meta.style)) {
1185
+ data.style = meta.style;
1186
+ }
1187
+ if (isString(meta.vspace)) {
1188
+ data.vspace = meta.vspace;
1189
+ }
1190
+ if (isString(meta.border)) {
1191
+ data.border = meta.border;
1192
+ }
1193
+ if (isString(meta.hspace)) {
1194
+ data.hspace = meta.hspace;
1195
+ }
1196
+ if (isString(meta.borderstyle)) {
1197
+ data.borderstyle = meta.borderstyle;
1198
+ }
1199
+ }
1200
+ };
1201
+ const formFillFromMeta = (info, api) => {
1202
+ const data = api.getData();
1203
+ const meta = data.src.meta;
1204
+ if (meta !== undefined) {
1205
+ const newData = deepMerge({}, data);
1206
+ formFillFromMeta2(info, newData, meta);
1207
+ api.setData(newData);
1208
+ }
1209
+ };
1210
+ const calculateImageSize = (helpers, info, state, api) => {
1211
+ const data = api.getData();
1212
+ const url = data.src.value;
1213
+ const meta = data.src.meta || {};
1214
+ if (!meta.width && !meta.height && info.hasDimensions) {
1215
+ if (isNotEmpty(url)) {
1216
+ helpers.imageSize(url).then(size => {
1217
+ if (state.open) {
1218
+ api.setData({ dimensions: size });
1219
+ }
1220
+ }).catch(e => console.error(e));
1221
+ } else {
1222
+ api.setData({
1223
+ dimensions: {
1224
+ width: '',
1225
+ height: ''
1226
+ }
1227
+ });
1228
+ }
1229
+ }
1230
+ };
1231
+ const updateImagesDropdown = (info, state, api) => {
1232
+ const data = api.getData();
1233
+ const image = ListUtils.findEntry(info.imageList, data.src.value);
1234
+ state.prevImage = image;
1235
+ api.setData({ images: image.map(entry => entry.value).getOr('') });
1236
+ };
1237
+ const changeSrc = (helpers, info, state, api) => {
1238
+ addPrependUrl(info, api);
1239
+ formFillFromMeta(info, api);
1240
+ calculateImageSize(helpers, info, state, api);
1241
+ updateImagesDropdown(info, state, api);
1242
+ };
1243
+ const changeImages = (helpers, info, state, api) => {
1244
+ const data = api.getData();
1245
+ const image = ListUtils.findEntry(info.imageList, data.images);
1246
+ image.each(img => {
1247
+ const updateAlt = data.alt === '' || state.prevImage.map(image => image.text === data.alt).getOr(false);
1248
+ if (updateAlt) {
1249
+ if (img.value === '') {
1250
+ api.setData({
1251
+ src: img,
1252
+ alt: state.prevAlt
1253
+ });
1254
+ } else {
1255
+ api.setData({
1256
+ src: img,
1257
+ alt: img.text
1258
+ });
1259
+ }
1260
+ } else {
1261
+ api.setData({ src: img });
1262
+ }
1263
+ });
1264
+ state.prevImage = image;
1265
+ changeSrc(helpers, info, state, api);
1266
+ };
1267
+ const changeFileInput = (helpers, info, state, api) => {
1268
+ const data = api.getData();
1269
+ api.block('Uploading image');
1270
+ head(data.fileinput).fold(() => {
1271
+ api.unblock();
1272
+ }, file => {
1273
+ const blobUri = URL.createObjectURL(file);
1274
+ const finalize = () => {
1275
+ api.unblock();
1276
+ URL.revokeObjectURL(blobUri);
1277
+ };
1278
+ const updateSrcAndSwitchTab = url => {
1279
+ api.setData({
1280
+ src: {
1281
+ value: url,
1282
+ meta: {}
1283
+ }
1284
+ });
1285
+ api.showTab('general');
1286
+ changeSrc(helpers, info, state, api);
1287
+ api.focus('src');
1288
+ };
1289
+ blobToDataUri(file).then(dataUrl => {
1290
+ const blobInfo = helpers.createBlobCache(file, blobUri, dataUrl);
1291
+ if (info.automaticUploads) {
1292
+ helpers.uploadImage(blobInfo).then(result => {
1293
+ updateSrcAndSwitchTab(result.url);
1294
+ finalize();
1295
+ }).catch(err => {
1296
+ finalize();
1297
+ helpers.alertErr(err, () => {
1298
+ api.focus('fileinput');
1299
+ });
1300
+ });
1301
+ } else {
1302
+ helpers.addToBlobCache(blobInfo);
1303
+ updateSrcAndSwitchTab(blobInfo.blobUri());
1304
+ api.unblock();
1305
+ }
1306
+ });
1307
+ });
1308
+ };
1309
+ const changeHandler = (helpers, info, state) => (api, evt) => {
1310
+ if (evt.name === 'src') {
1311
+ changeSrc(helpers, info, state, api);
1312
+ } else if (evt.name === 'images') {
1313
+ changeImages(helpers, info, state, api);
1314
+ } else if (evt.name === 'alt') {
1315
+ state.prevAlt = api.getData().alt;
1316
+ } else if (evt.name === 'fileinput') {
1317
+ changeFileInput(helpers, info, state, api);
1318
+ } else if (evt.name === 'isDecorative') {
1319
+ api.setEnabled('alt', !api.getData().isDecorative);
1320
+ }
1321
+ };
1322
+ const closeHandler = state => () => {
1323
+ state.open = false;
1324
+ };
1325
+ const makeDialogBody = info => {
1326
+ if (info.hasAdvTab || info.hasUploadUrl || info.hasUploadHandler) {
1327
+ const tabPanel = {
1328
+ type: 'tabpanel',
1329
+ tabs: flatten([
1330
+ [MainTab.makeTab(info)],
1331
+ info.hasAdvTab ? [AdvTab.makeTab(info)] : [],
1332
+ info.hasUploadTab && (info.hasUploadUrl || info.hasUploadHandler) ? [UploadTab.makeTab(info)] : []
1333
+ ])
1334
+ };
1335
+ return tabPanel;
1336
+ } else {
1337
+ const panel = {
1338
+ type: 'panel',
1339
+ items: MainTab.makeItems(info)
1340
+ };
1341
+ return panel;
1342
+ }
1343
+ };
1344
+ const submitHandler = (editor, info, helpers) => api => {
1345
+ const data = deepMerge(fromImageData(info.image), api.getData());
1346
+ const finalData = {
1347
+ ...data,
1348
+ style: getStyleValue(helpers.normalizeCss, toImageData(data, false))
1349
+ };
1350
+ editor.execCommand('mceUpdateImage', false, toImageData(finalData, info.hasAccessibilityOptions));
1351
+ editor.editorUpload.uploadImagesAuto();
1352
+ api.close();
1353
+ };
1354
+ const imageSize = editor => url => {
1355
+ if (!isSafeImageUrl(editor, url)) {
1356
+ return Promise.resolve({
1357
+ width: '',
1358
+ height: ''
1359
+ });
1360
+ } else {
1361
+ return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(dimensions => ({
1362
+ width: String(dimensions.width),
1363
+ height: String(dimensions.height)
1364
+ }));
1365
+ }
1366
+ };
1367
+ const createBlobCache = editor => (file, blobUri, dataUrl) => {
1368
+ var _a;
1369
+ return editor.editorUpload.blobCache.create({
1370
+ blob: file,
1371
+ blobUri,
1372
+ name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\.[^\.]+$/, ''),
1373
+ filename: file.name,
1374
+ base64: dataUrl.split(',')[1]
1375
+ });
1376
+ };
1377
+ const addToBlobCache = editor => blobInfo => {
1378
+ editor.editorUpload.blobCache.add(blobInfo);
1379
+ };
1380
+ const alertErr = editor => (message, callback) => {
1381
+ editor.windowManager.alert(message, callback);
1382
+ };
1383
+ const normalizeCss = editor => cssText => normalizeCss$1(editor, cssText);
1384
+ const parseStyle = editor => cssText => editor.dom.parseStyle(cssText);
1385
+ const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);
1386
+ const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => {
1387
+ var _a;
1388
+ if (results.length === 0) {
1389
+ return Promise.reject('Failed to upload image');
1390
+ } else if (results[0].status === false) {
1391
+ return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);
1392
+ } else {
1393
+ return results[0];
1394
+ }
1395
+ });
1396
+ const Dialog = editor => {
1397
+ const helpers = {
1398
+ imageSize: imageSize(editor),
1399
+ addToBlobCache: addToBlobCache(editor),
1400
+ createBlobCache: createBlobCache(editor),
1401
+ alertErr: alertErr(editor),
1402
+ normalizeCss: normalizeCss(editor),
1403
+ parseStyle: parseStyle(editor),
1404
+ serializeStyle: serializeStyle(editor),
1405
+ uploadImage: uploadImage(editor)
1406
+ };
1407
+ const open = () => {
1408
+ collect(editor).then(info => {
1409
+ const state = createState(info);
1410
+ return {
1411
+ title: 'Insert/Edit Image',
1412
+ size: 'normal',
1413
+ body: makeDialogBody(info),
1414
+ buttons: [
1415
+ {
1416
+ type: 'cancel',
1417
+ name: 'cancel',
1418
+ text: 'Cancel'
1419
+ },
1420
+ {
1421
+ type: 'submit',
1422
+ name: 'save',
1423
+ text: 'Save',
1424
+ primary: true
1425
+ }
1426
+ ],
1427
+ initialData: fromImageData(info.image),
1428
+ onSubmit: submitHandler(editor, info, helpers),
1429
+ onChange: changeHandler(helpers, info, state),
1430
+ onClose: closeHandler(state)
1431
+ };
1432
+ }).then(editor.windowManager.open);
1433
+ };
1434
+ return { open };
1435
+ };
1436
+
1437
+ const register$1 = editor => {
1438
+ editor.addCommand('mceImage', Dialog(editor).open);
1439
+ editor.addCommand('mceUpdateImage', (_ui, data) => {
1440
+ editor.undoManager.transact(() => insertOrUpdateImage(editor, data));
1441
+ });
1442
+ };
1443
+
1444
+ const hasImageClass = node => {
1445
+ const className = node.attr('class');
1446
+ return isNonNullable(className) && /\bimage\b/.test(className);
1447
+ };
1448
+ const toggleContentEditableState = state => nodes => {
1449
+ let i = nodes.length;
1450
+ const toggleContentEditable = node => {
1451
+ node.attr('contenteditable', state ? 'true' : null);
1452
+ };
1453
+ while (i--) {
1454
+ const node = nodes[i];
1455
+ if (hasImageClass(node)) {
1456
+ node.attr('contenteditable', state ? 'false' : null);
1457
+ global.each(node.getAll('figcaption'), toggleContentEditable);
1458
+ }
1459
+ }
1460
+ };
1461
+ const setup = editor => {
1462
+ editor.on('PreInit', () => {
1463
+ editor.parser.addNodeFilter('figure', toggleContentEditableState(true));
1464
+ editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
1465
+ });
1466
+ };
1467
+
1468
+ const onSetupEditable = editor => api => {
1469
+ const nodeChanged = () => {
1470
+ api.setEnabled(editor.selection.isEditable());
1471
+ };
1472
+ editor.on('NodeChange', nodeChanged);
1473
+ nodeChanged();
1474
+ return () => {
1475
+ editor.off('NodeChange', nodeChanged);
1476
+ };
1477
+ };
1478
+ const register = editor => {
1479
+ editor.ui.registry.addToggleButton('image', {
1480
+ icon: 'image',
1481
+ tooltip: 'Insert/edit image',
1482
+ onAction: Dialog(editor).open,
1483
+ onSetup: buttonApi => {
1484
+ buttonApi.setActive(isNonNullable(getSelectedImage(editor)));
1485
+ const unbindSelectorChanged = editor.selection.selectorChangedWithUnbind('img:not([data-mce-object]):not([data-mce-placeholder]),figure.image', buttonApi.setActive).unbind;
1486
+ const unbindEditable = onSetupEditable(editor)(buttonApi);
1487
+ return () => {
1488
+ unbindSelectorChanged();
1489
+ unbindEditable();
1490
+ };
1491
+ }
1492
+ });
1493
+ editor.ui.registry.addMenuItem('image', {
1494
+ icon: 'image',
1495
+ text: 'Image...',
1496
+ onAction: Dialog(editor).open,
1497
+ onSetup: onSetupEditable(editor)
1498
+ });
1499
+ editor.ui.registry.addContextMenu('image', { update: element => editor.selection.isEditable() && (isFigure(element) || isImage(element) && !isPlaceholderImage(element)) ? ['image'] : [] });
1500
+ };
1501
+
1502
+ var Plugin = () => {
1503
+ global$4.add('image', editor => {
1504
+ register$2(editor);
1505
+ setup(editor);
1506
+ register(editor);
1507
+ register$1(editor);
1508
+ });
1509
+ };
1510
+
1511
+ Plugin();
1512
+
1513
+ })();