jodit-pro 4.15.21 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +10 -9
  3. package/es2015/jodit.js +93 -47
  4. package/es2015/jodit.min.js +9 -8
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/color-picker/color-picker.css +1 -1
  20. package/es2015/plugins/color-picker/color-picker.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  22. package/es2015/plugins/emoji/emoji.css +1 -1
  23. package/es2015/plugins/emoji/emoji.js +1 -1
  24. package/es2015/plugins/emoji/emoji.min.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.js +1 -1
  26. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  27. package/es2015/plugins/finder/finder.css +1 -1
  28. package/es2015/plugins/finder/finder.js +4 -1
  29. package/es2015/plugins/finder/finder.min.js +2 -2
  30. package/es2015/plugins/google-maps/google-maps.css +1 -1
  31. package/es2015/plugins/google-maps/google-maps.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  33. package/es2015/plugins/google-search/google-search.js +1 -1
  34. package/es2015/plugins/google-search/google-search.min.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  36. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  40. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  41. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  43. package/es2015/plugins/keyboard/keyboard.css +1 -1
  44. package/es2015/plugins/keyboard/keyboard.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  47. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  48. package/es2015/plugins/page-break/page-break.js +1 -1
  49. package/es2015/plugins/page-break/page-break.min.js +1 -1
  50. package/es2015/plugins/paste-code/paste-code.css +1 -1
  51. package/es2015/plugins/paste-code/paste-code.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  53. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  54. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  55. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  56. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  57. package/es2015/plugins/style/style.css +1 -1
  58. package/es2015/plugins/style/style.js +1 -1
  59. package/es2015/plugins/style/style.min.js +1 -1
  60. package/es2015/plugins/templates/templates.css +1 -1
  61. package/es2015/plugins/templates/templates.js +1 -1
  62. package/es2015/plugins/templates/templates.min.js +1 -1
  63. package/es2015/plugins/todo-list/todo-list.css +1 -1
  64. package/es2015/plugins/todo-list/todo-list.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  66. package/es2015/plugins/translate/translate.css +1 -1
  67. package/es2015/plugins/translate/translate.js +1 -1
  68. package/es2015/plugins/translate/translate.min.js +1 -1
  69. package/es2015/plugins/tune-block/tune-block.css +1 -1
  70. package/es2015/plugins/tune-block/tune-block.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  72. package/es2018/jodit.fat.min.js +10 -9
  73. package/es2018/jodit.min.js +9 -8
  74. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  75. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  76. package/es2018/plugins/backup/backup.min.js +1 -1
  77. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  78. package/es2018/plugins/change-case/change-case.min.js +1 -1
  79. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  80. package/es2018/plugins/emoji/emoji.min.js +1 -1
  81. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  82. package/es2018/plugins/finder/finder.min.js +13 -13
  83. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  84. package/es2018/plugins/google-search/google-search.min.js +1 -1
  85. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  86. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  87. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  88. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  89. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  90. package/es2018/plugins/page-break/page-break.min.js +1 -1
  91. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  92. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  93. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  94. package/es2018/plugins/style/style.min.js +1 -1
  95. package/es2018/plugins/templates/templates.min.js +1 -1
  96. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  97. package/es2018/plugins/translate/translate.min.js +1 -1
  98. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  99. package/es2021/jodit.css +1 -1
  100. package/es2021/jodit.fat.min.js +11 -10
  101. package/es2021/jodit.js +93 -47
  102. package/es2021/jodit.min.js +10 -9
  103. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  104. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  105. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  106. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  107. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  108. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  109. package/es2021/plugins/backup/backup.css +1 -1
  110. package/es2021/plugins/backup/backup.js +1 -1
  111. package/es2021/plugins/backup/backup.min.js +1 -1
  112. package/es2021/plugins/button-generator/button-generator.css +1 -1
  113. package/es2021/plugins/button-generator/button-generator.js +1 -1
  114. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  115. package/es2021/plugins/change-case/change-case.js +1 -1
  116. package/es2021/plugins/change-case/change-case.min.js +1 -1
  117. package/es2021/plugins/color-picker/color-picker.css +1 -1
  118. package/es2021/plugins/color-picker/color-picker.js +1 -1
  119. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  120. package/es2021/plugins/emoji/emoji.css +1 -1
  121. package/es2021/plugins/emoji/emoji.js +1 -1
  122. package/es2021/plugins/emoji/emoji.min.js +1 -1
  123. package/es2021/plugins/export-docs/export-docs.js +1 -1
  124. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  125. package/es2021/plugins/finder/finder.css +1 -1
  126. package/es2021/plugins/finder/finder.js +4 -1
  127. package/es2021/plugins/finder/finder.min.js +2 -2
  128. package/es2021/plugins/google-maps/google-maps.css +1 -1
  129. package/es2021/plugins/google-maps/google-maps.js +1 -1
  130. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  131. package/es2021/plugins/google-search/google-search.js +1 -1
  132. package/es2021/plugins/google-search/google-search.min.js +1 -1
  133. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  134. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  135. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  136. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  137. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  138. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  139. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  140. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  141. package/es2021/plugins/keyboard/keyboard.css +1 -1
  142. package/es2021/plugins/keyboard/keyboard.js +1 -1
  143. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  144. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  145. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  146. package/es2021/plugins/page-break/page-break.js +1 -1
  147. package/es2021/plugins/page-break/page-break.min.js +1 -1
  148. package/es2021/plugins/paste-code/paste-code.css +1 -1
  149. package/es2021/plugins/paste-code/paste-code.js +1 -1
  150. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  151. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  152. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  153. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  154. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  155. package/es2021/plugins/style/style.css +1 -1
  156. package/es2021/plugins/style/style.js +1 -1
  157. package/es2021/plugins/style/style.min.js +1 -1
  158. package/es2021/plugins/templates/templates.css +1 -1
  159. package/es2021/plugins/templates/templates.js +1 -1
  160. package/es2021/plugins/templates/templates.min.js +1 -1
  161. package/es2021/plugins/todo-list/todo-list.css +1 -1
  162. package/es2021/plugins/todo-list/todo-list.js +1 -1
  163. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  164. package/es2021/plugins/translate/translate.css +1 -1
  165. package/es2021/plugins/translate/translate.js +1 -1
  166. package/es2021/plugins/translate/translate.min.js +1 -1
  167. package/es2021/plugins/tune-block/tune-block.css +1 -1
  168. package/es2021/plugins/tune-block/tune-block.js +1 -1
  169. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  170. package/es2021.en/jodit.css +1 -1
  171. package/es2021.en/jodit.fat.min.js +11 -10
  172. package/es2021.en/jodit.js +93 -47
  173. package/es2021.en/jodit.min.js +10 -9
  174. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  175. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  176. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  177. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  178. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  179. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  180. package/es2021.en/plugins/backup/backup.css +1 -1
  181. package/es2021.en/plugins/backup/backup.js +1 -1
  182. package/es2021.en/plugins/backup/backup.min.js +1 -1
  183. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  184. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  185. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  186. package/es2021.en/plugins/change-case/change-case.js +1 -1
  187. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  188. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  189. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  190. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  191. package/es2021.en/plugins/emoji/emoji.css +1 -1
  192. package/es2021.en/plugins/emoji/emoji.js +1 -1
  193. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  194. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  195. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  196. package/es2021.en/plugins/finder/finder.css +1 -1
  197. package/es2021.en/plugins/finder/finder.js +4 -1
  198. package/es2021.en/plugins/finder/finder.min.js +2 -2
  199. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  200. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  201. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  202. package/es2021.en/plugins/google-search/google-search.js +1 -1
  203. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  204. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  205. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  206. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  207. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  208. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  209. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  210. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  211. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  212. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  213. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  214. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  215. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  216. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  217. package/es2021.en/plugins/page-break/page-break.js +1 -1
  218. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  219. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  220. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  221. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  222. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  223. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  224. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  225. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  226. package/es2021.en/plugins/style/style.css +1 -1
  227. package/es2021.en/plugins/style/style.js +1 -1
  228. package/es2021.en/plugins/style/style.min.js +1 -1
  229. package/es2021.en/plugins/templates/templates.css +1 -1
  230. package/es2021.en/plugins/templates/templates.js +1 -1
  231. package/es2021.en/plugins/templates/templates.min.js +1 -1
  232. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  233. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  234. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  235. package/es2021.en/plugins/translate/translate.css +1 -1
  236. package/es2021.en/plugins/translate/translate.js +1 -1
  237. package/es2021.en/plugins/translate/translate.min.js +1 -1
  238. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  239. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  240. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  241. package/es5/jodit.css +2 -2
  242. package/es5/jodit.fat.min.js +2 -2
  243. package/es5/jodit.js +105 -53
  244. package/es5/jodit.min.css +2 -2
  245. package/es5/jodit.min.js +2 -2
  246. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  247. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  248. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  249. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  250. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  251. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  252. package/es5/plugins/backup/backup.css +1 -1
  253. package/es5/plugins/backup/backup.js +1 -1
  254. package/es5/plugins/backup/backup.min.js +1 -1
  255. package/es5/plugins/button-generator/button-generator.css +1 -1
  256. package/es5/plugins/button-generator/button-generator.js +1 -1
  257. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  258. package/es5/plugins/change-case/change-case.js +1 -1
  259. package/es5/plugins/change-case/change-case.min.js +1 -1
  260. package/es5/plugins/color-picker/color-picker.css +1 -1
  261. package/es5/plugins/color-picker/color-picker.js +1 -1
  262. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  263. package/es5/plugins/emoji/emoji.css +1 -1
  264. package/es5/plugins/emoji/emoji.js +1 -1
  265. package/es5/plugins/emoji/emoji.min.js +1 -1
  266. package/es5/plugins/export-docs/export-docs.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  268. package/es5/plugins/finder/finder.css +1 -1
  269. package/es5/plugins/finder/finder.js +4 -1
  270. package/es5/plugins/finder/finder.min.js +2 -2
  271. package/es5/plugins/google-maps/google-maps.css +1 -1
  272. package/es5/plugins/google-maps/google-maps.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  274. package/es5/plugins/google-search/google-search.js +1 -1
  275. package/es5/plugins/google-search/google-search.min.js +1 -1
  276. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  277. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  278. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  279. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  281. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  282. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  283. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  284. package/es5/plugins/keyboard/keyboard.css +1 -1
  285. package/es5/plugins/keyboard/keyboard.js +1 -1
  286. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  287. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  288. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  289. package/es5/plugins/page-break/page-break.js +1 -1
  290. package/es5/plugins/page-break/page-break.min.js +1 -1
  291. package/es5/plugins/paste-code/paste-code.css +1 -1
  292. package/es5/plugins/paste-code/paste-code.js +1 -1
  293. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  294. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  295. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  296. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  297. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  298. package/es5/plugins/style/style.css +1 -1
  299. package/es5/plugins/style/style.js +1 -1
  300. package/es5/plugins/style/style.min.js +1 -1
  301. package/es5/plugins/templates/templates.css +1 -1
  302. package/es5/plugins/templates/templates.js +1 -1
  303. package/es5/plugins/templates/templates.min.js +1 -1
  304. package/es5/plugins/todo-list/todo-list.css +1 -1
  305. package/es5/plugins/todo-list/todo-list.js +1 -1
  306. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  307. package/es5/plugins/translate/translate.css +1 -1
  308. package/es5/plugins/translate/translate.js +1 -1
  309. package/es5/plugins/translate/translate.min.js +1 -1
  310. package/es5/plugins/tune-block/tune-block.css +1 -1
  311. package/es5/plugins/tune-block/tune-block.js +1 -1
  312. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  313. package/es5/polyfills.fat.min.js +1 -1
  314. package/es5/polyfills.js +1 -1
  315. package/es5/polyfills.min.js +1 -1
  316. package/esm/plugins/finder/browser.js +1 -1
  317. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.15.21
4
+ * Version: v4.16.0
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1743,7 +1743,7 @@ __webpack_require__.r(__webpack_exports__);
1743
1743
  * ```
1744
1744
  * @packageDocumentation
1745
1745
  * @module constants
1746
- */ const APP_VERSION = "4.15.21";
1746
+ */ const APP_VERSION = "4.16.0";
1747
1747
  // prettier-ignore
1748
1748
  const ES = "es2021";
1749
1749
  const IS_ES_MODERN = true;
@@ -14011,6 +14011,7 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
14011
14011
  this.name = this.state.name;
14012
14012
  (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'data-ref', this.state.name);
14013
14013
  (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'ref', this.state.name);
14014
+ this.updateAriaLabel();
14014
14015
  }
14015
14016
  onChangeTooltip() {
14016
14017
  const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
@@ -14022,9 +14023,12 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
14022
14023
  }
14023
14024
  updateAriaLabel() {
14024
14025
  const hasText = this.state.text.trim().length > 0;
14025
- const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
14026
- (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', i8nTooltip);
14027
- (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.button, 'aria-label', !hasText ? i8nTooltip : null);
14026
+ // An icon-only button without a tooltip would have no accessible
14027
+ // name at all — fall back to its raw name (not translated: control
14028
+ // names are identifiers, not i18n keys).
14029
+ const label = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : !hasText && this.state.name ? this.state.name : null;
14030
+ (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', label);
14031
+ (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.button, 'aria-label', !hasText ? label : null);
14028
14032
  }
14029
14033
  onChangeTabIndex() {
14030
14034
  ;(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'tabindex', this.state.tabIndex);
@@ -15052,6 +15056,7 @@ let UIFileInput = class UIFileInput extends _input_input_js__WEBPACK_IMPORTED_MO
15052
15056
  return this.j.create.fromHTML(`<input
15053
15057
  type="file"
15054
15058
  accept="${options.onlyImages ? 'image/*' : '*'}"
15059
+ aria-label="${this.j.i18n(options.tooltip || 'Upload')}"
15055
15060
  tabindex="-1"
15056
15061
  dir="auto"
15057
15062
  multiple=""
@@ -15552,9 +15557,12 @@ let UIGroup = UIGroup_1 = class UIGroup extends _element_js__WEBPACK_IMPORTED_MO
15552
15557
  className() {
15553
15558
  return 'UIGroup';
15554
15559
  }
15555
- getRole() {
15560
+ /**
15561
+ * A generic container: `group` allows any children. Toolbar button groups
15562
+ * are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
15563
+ */ getRole() {
15556
15564
  var _a;
15557
- return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || 'list';
15565
+ return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || 'group';
15558
15566
  }
15559
15567
  /**
15560
15568
  * All group children
@@ -15760,10 +15768,10 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup
15760
15768
  }
15761
15769
  /**
15762
15770
  * Make new group and append it in list of elements
15763
- */ makeGroup(role) {
15764
- return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit, [], role ? {
15771
+ */ makeGroup(role = 'list') {
15772
+ return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit, [], {
15765
15773
  role
15766
- } : undefined);
15774
+ });
15767
15775
  }
15768
15776
  /**
15769
15777
  * All buttons from list
@@ -24862,12 +24870,13 @@ ContextMenu = __decorate([
24862
24870
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(580);
24863
24871
  /* harmony import */ var _core_helpers_array_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76855);
24864
24872
  /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27613);
24865
- /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43555);
24866
- /* harmony import */ var _core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38837);
24867
- /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67510);
24868
- /* harmony import */ var _core_view_view_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(35608);
24869
- /* harmony import */ var _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84075);
24870
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6441);
24873
+ /* harmony import */ var _core_helpers_html_strip_tags_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91003);
24874
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43555);
24875
+ /* harmony import */ var _core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38837);
24876
+ /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67510);
24877
+ /* harmony import */ var _core_view_view_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(35608);
24878
+ /* harmony import */ var _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84075);
24879
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(6441);
24871
24880
  /*!
24872
24881
  * Jodit Editor (https://xdsoft.net/jodit/)
24873
24882
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -24892,7 +24901,8 @@ var Dialog_1;
24892
24901
 
24893
24902
 
24894
24903
 
24895
- _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.dialog = {
24904
+
24905
+ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.dialog = {
24896
24906
  namespace: '',
24897
24907
  extraButtons: [],
24898
24908
  /**
@@ -24908,7 +24918,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.dialog = {
24908
24918
  toolbarButtonSize: 'middle',
24909
24919
  zIndex: 'inherit'
24910
24920
  };
24911
- _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
24921
+ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
24912
24922
  close: {
24913
24923
  icon: 'cancel',
24914
24924
  exec: (dialog)=>{
@@ -24918,7 +24928,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
24918
24928
  };
24919
24929
  /**
24920
24930
  * Module to generate dialog windows
24921
- */ let Dialog = Dialog_1 = class Dialog extends _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_11__.ViewWithToolbar {
24931
+ */ let Dialog = Dialog_1 = class Dialog extends _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_12__.ViewWithToolbar {
24922
24932
  /** @override */ className() {
24923
24933
  return 'Dialog';
24924
24934
  }
@@ -24982,8 +24992,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
24982
24992
  this.draggable = true;
24983
24993
  this.startX = e.clientX;
24984
24994
  this.startY = e.clientY;
24985
- this.startPoint.x = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, 'left');
24986
- this.startPoint.y = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, 'top');
24995
+ this.startPoint.x = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, 'left');
24996
+ this.startPoint.y = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, 'top');
24987
24997
  this.setMaxZIndex();
24988
24998
  if (e.cancelable) {
24989
24999
  e.preventDefault();
@@ -25073,7 +25083,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25073
25083
  if (h == null) {
25074
25084
  h = this.dialog.offsetHeight;
25075
25085
  }
25076
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, {
25086
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, {
25077
25087
  width: w,
25078
25088
  height: h
25079
25089
  });
@@ -25107,7 +25117,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25107
25117
  this.moved = Math.abs(x - left) > 100 || Math.abs(y - top) > 100;
25108
25118
  }
25109
25119
  // strings on purpose: `css()` would truncate fractional pixels
25110
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, {
25120
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, {
25111
25121
  left: (x || left) + 'px',
25112
25122
  top: (y || top) + 'px'
25113
25123
  });
@@ -25127,6 +25137,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25127
25137
  * ```
25128
25138
  */ setHeader(content) {
25129
25139
  this.setElements(this.dialogbox_header, content);
25140
+ // `role="dialog"` needs an accessible name; a text title is the
25141
+ // natural one (element titles are left to the caller).
25142
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isString)(content)) {
25143
+ const name = (0,_core_helpers_html_strip_tags_js__WEBPACK_IMPORTED_MODULE_7__.stripTags)(content, this.od).trim();
25144
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', name || null);
25145
+ }
25130
25146
  return this;
25131
25147
  }
25132
25148
  /**
@@ -25180,7 +25196,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25180
25196
  /**
25181
25197
  * Get zIndex from dialog
25182
25198
  */ getZIndex() {
25183
- return parseInt((0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex'), 10) || 0;
25199
+ return parseInt((0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex'), 10) || 0;
25184
25200
  }
25185
25201
  /**
25186
25202
  * Get dialog instance with maximum z-index displaying it on top of all the dialog boxes
@@ -25203,7 +25219,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25203
25219
  this.__openedSiblings().forEach((dialog)=>{
25204
25220
  maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
25205
25221
  });
25206
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
25222
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
25207
25223
  }
25208
25224
  /**
25209
25225
  * Expands the dialog on full browser window
@@ -25253,7 +25269,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25253
25269
  this.setPosition(this.offsetX, this.offsetY);
25254
25270
  this.setMaxZIndex();
25255
25271
  } else {
25256
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', null);
25272
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', null);
25257
25273
  }
25258
25274
  if (this.o.fullsize) {
25259
25275
  this.toggleFullSize(true);
@@ -25380,7 +25396,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25380
25396
  * True, if dialog was opened
25381
25397
  */ this.isOpened = false;
25382
25398
  const self1 = this;
25383
- self1.options = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto)(options, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto)(_config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.dialog, Dialog_1.defaultOptions));
25399
+ self1.options = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)(options, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)(_config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.dialog, Dialog_1.defaultOptions));
25384
25400
  // Attach event handlers passed via `options.events` to the dialog's own
25385
25401
  // emitter (as FileBrowser already does), so a consumer — e.g. a plugin
25386
25402
  // forwarding the editor's `events` config — can observe `afterOpen` /
@@ -25398,40 +25414,40 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25398
25414
  </div>
25399
25415
  <div class="${n('content')}"></div>
25400
25416
  <div class="${n('footer')}"></div>
25401
- <div class="${n('resizer')}">${_core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__.Icon.get('resize_handler')}</div>
25417
+ <div class="${n('resizer')}">${_core_ui_index_js__WEBPACK_IMPORTED_MODULE_10__.Icon.get('resize_handler')}</div>
25402
25418
  </div>
25403
25419
  </div>`);
25404
25420
  if (self1.options.direction === 'rtl') {
25405
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(self1.container, 'direction', 'rtl');
25406
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.attr)(self1.container, 'dir', 'rtl');
25421
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(self1.container, 'direction', 'rtl');
25422
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(self1.container, 'dir', 'rtl');
25407
25423
  }
25408
25424
  if (this.o.zIndex) {
25409
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', this.o.zIndex.toString());
25425
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', this.o.zIndex.toString());
25410
25426
  }
25411
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.attr)(self1.container, 'role', 'dialog');
25427
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(self1.container, 'role', 'dialog');
25412
25428
  Object.defineProperty(self1.container, 'component', {
25413
25429
  value: this
25414
25430
  });
25415
25431
  self1.setMod('theme', self1.o.theme || 'default').setMod('resizable', Boolean(self1.o.resizable));
25416
25432
  const dialog = self1.getElm('panel');
25417
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialog != null, 'Panel element does not exist');
25433
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialog != null, 'Panel element does not exist');
25418
25434
  const resizer = self1.getElm('resizer');
25419
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(resizer != null, 'Resizer element does not exist');
25435
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(resizer != null, 'Resizer element does not exist');
25420
25436
  const dialogbox_header = self1.getElm('header-title');
25421
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_header != null, 'header-title element does not exist');
25437
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_header != null, 'header-title element does not exist');
25422
25438
  const dialogbox_content = self1.getElm('content');
25423
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_content != null, 'Content element does not exist');
25439
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_content != null, 'Content element does not exist');
25424
25440
  const dialogbox_footer = self1.getElm('footer');
25425
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_footer != null, 'Footer element does not exist');
25441
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_footer != null, 'Footer element does not exist');
25426
25442
  const dialogbox_toolbar = self1.getElm('header-toolbar');
25427
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
25443
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
25428
25444
  this.dialog = dialog;
25429
25445
  this.resizer = resizer;
25430
25446
  this.dialogbox_header = dialogbox_header;
25431
25447
  this.dialogbox_content = dialogbox_content;
25432
25448
  this.dialogbox_footer = dialogbox_footer;
25433
25449
  this.dialogbox_toolbar = dialogbox_toolbar;
25434
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(self1.dialog, {
25450
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(self1.dialog, {
25435
25451
  maxWidth: self1.options.maxWidth,
25436
25452
  minHeight: self1.options.minHeight,
25437
25453
  minWidth: self1.options.minWidth
@@ -25444,7 +25460,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25444
25460
  this.e.on(self1.container, 'close_dialog', self1.close).on(this.ow, 'keydown', this.__onEsc).on(this.ow, 'resize', this.__onResize);
25445
25461
  if (this.o.closeOnClickOverlay) {
25446
25462
  const overlay = self1.getElm('overlay');
25447
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(overlay != null, 'Overlay element does not exist');
25463
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(overlay != null, 'Overlay element does not exist');
25448
25464
  this.e.on(overlay, 'click', self1.close);
25449
25465
  }
25450
25466
  }
@@ -25454,7 +25470,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25454
25470
  * whole `destination` (usually `document.body`) for every z-index update.
25455
25471
  */ Dialog.__opened = new Set();
25456
25472
  Dialog.defaultOptions = {
25457
- ..._core_view_view_js__WEBPACK_IMPORTED_MODULE_10__.View.defaultOptions,
25473
+ ..._core_view_view_js__WEBPACK_IMPORTED_MODULE_11__.View.defaultOptions,
25458
25474
  closeOnClickOverlay: false,
25459
25475
  closeOnEsc: true
25460
25476
  };
@@ -30569,6 +30585,13 @@ let ToolbarContent = class ToolbarContent extends _core_ui_button_index_js__WEBP
30569
30585
  /** @override */ className() {
30570
30586
  return 'ToolbarContent';
30571
30587
  }
30588
+ /** A toolbar item like `ToolbarButton`: the parent group is a `list`. */ getRole() {
30589
+ return 'listitem';
30590
+ }
30591
+ /**
30592
+ * Arbitrary content is not a toggle button — `aria-pressed` is not
30593
+ * allowed on a `listitem`.
30594
+ */ onChangeActivated() {}
30572
30595
  /** @override */ update() {
30573
30596
  var _a, _b, _c;
30574
30597
  const { control } = this;
@@ -30611,7 +30634,6 @@ let ToolbarContent = class ToolbarContent extends _core_ui_button_index_js__WEBP
30611
30634
  this.control = control;
30612
30635
  this.target = target;
30613
30636
  this.container.classList.add(`${this.componentName}_${this.clearName(control.name)}`);
30614
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.attr)(this.container, 'role', 'content');
30615
30637
  }
30616
30638
  };
30617
30639
  ToolbarContent = __decorate([
@@ -47809,19 +47831,26 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
47809
47831
  onResize();
47810
47832
  this.onReady();
47811
47833
  };
47834
+ let loading = false;
47812
47835
  const initAceEditor = ()=>{
47813
47836
  if (editor.isInDestruct || editor.getRealMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SPLIT) {
47814
47837
  return;
47815
47838
  }
47839
+ // ACE (~400 KiB from the CDN) is only needed once the source view
47840
+ // is actually shown — a page that stays in WYSIWYG must not
47841
+ // download it.
47842
+ if (!this.aceExists()) {
47843
+ if (!loading) {
47844
+ loading = true;
47845
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
47846
+ }
47847
+ return;
47848
+ }
47816
47849
  this.fromWYSIWYG();
47817
47850
  tryInitAceEditor();
47818
47851
  };
47819
47852
  editor.e.on('afterSetMode', initAceEditor);
47820
47853
  initAceEditor();
47821
- // global add ace editor in browser
47822
- if (!this.aceExists()) {
47823
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
47824
- }
47825
47854
  }
47826
47855
  destruct() {
47827
47856
  var _a, _b;
@@ -48351,7 +48380,24 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
48351
48380
  return false;
48352
48381
  };
48353
48382
  if (!addEventListener()) {
48354
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener, ()=>null);
48383
+ // js-beautify is only needed once the source view is shown —
48384
+ // do not download it for a page that stays in WYSIWYG.
48385
+ let loading = false;
48386
+ const loadBeautify = ()=>{
48387
+ if (loading || editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SPLIT) {
48388
+ return;
48389
+ }
48390
+ loading = true;
48391
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
48392
+ // The source view was filled before the
48393
+ // beautifier arrived — format it now.
48394
+ if (addEventListener()) {
48395
+ this.syncValueFromWYSIWYG(true);
48396
+ }
48397
+ }, ()=>null);
48398
+ };
48399
+ editor.e.on('afterSetMode.source', loadBeautify);
48400
+ loadBeautify();
48355
48401
  }
48356
48402
  }
48357
48403
  this.syncValueFromWYSIWYG(true);