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/es2015/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
  */
@@ -1791,7 +1791,7 @@ __webpack_require__.r(__webpack_exports__);
1791
1791
  * ```
1792
1792
  * @packageDocumentation
1793
1793
  * @module constants
1794
- */ const APP_VERSION = "4.15.21";
1794
+ */ const APP_VERSION = "4.16.0";
1795
1795
  // prettier-ignore
1796
1796
  const ES = "es2015";
1797
1797
  const IS_ES_MODERN = true;
@@ -14390,6 +14390,7 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
14390
14390
  this.name = this.state.name;
14391
14391
  (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'data-ref', this.state.name);
14392
14392
  (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'ref', this.state.name);
14393
+ this.updateAriaLabel();
14393
14394
  }
14394
14395
  onChangeTooltip() {
14395
14396
  const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
@@ -14401,9 +14402,12 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
14401
14402
  }
14402
14403
  updateAriaLabel() {
14403
14404
  const hasText = this.state.text.trim().length > 0;
14404
- const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
14405
- (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', i8nTooltip);
14406
- (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.button, 'aria-label', !hasText ? i8nTooltip : null);
14405
+ // An icon-only button without a tooltip would have no accessible
14406
+ // name at all — fall back to its raw name (not translated: control
14407
+ // names are identifiers, not i18n keys).
14408
+ const label = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : !hasText && this.state.name ? this.state.name : null;
14409
+ (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', label);
14410
+ (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.button, 'aria-label', !hasText ? label : null);
14407
14411
  }
14408
14412
  onChangeTabIndex() {
14409
14413
  ;(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'tabindex', this.state.tabIndex);
@@ -15571,6 +15575,7 @@ let UIFileInput = class UIFileInput extends _input_input_js__WEBPACK_IMPORTED_MO
15571
15575
  return this.j.create.fromHTML(`<input
15572
15576
  type="file"
15573
15577
  accept="${options.onlyImages ? 'image/*' : '*'}"
15578
+ aria-label="${this.j.i18n(options.tooltip || 'Upload')}"
15574
15579
  tabindex="-1"
15575
15580
  dir="auto"
15576
15581
  multiple=""
@@ -16141,9 +16146,12 @@ let UIGroup = UIGroup_1 = class UIGroup extends _element_js__WEBPACK_IMPORTED_MO
16141
16146
  className() {
16142
16147
  return 'UIGroup';
16143
16148
  }
16144
- getRole() {
16149
+ /**
16150
+ * A generic container: `group` allows any children. Toolbar button groups
16151
+ * are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
16152
+ */ getRole() {
16145
16153
  var _a;
16146
- return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || 'list';
16154
+ return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || 'group';
16147
16155
  }
16148
16156
  /**
16149
16157
  * All group children
@@ -16349,10 +16357,10 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup
16349
16357
  }
16350
16358
  /**
16351
16359
  * Make new group and append it in list of elements
16352
- */ makeGroup(role) {
16353
- return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit, [], role ? {
16360
+ */ makeGroup(role = 'list') {
16361
+ return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit, [], {
16354
16362
  role
16355
- } : undefined);
16363
+ });
16356
16364
  }
16357
16365
  /**
16358
16366
  * All buttons from list
@@ -25545,12 +25553,13 @@ ContextMenu = __decorate([
25545
25553
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(580);
25546
25554
  /* harmony import */ var _core_helpers_array_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76855);
25547
25555
  /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27613);
25548
- /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43555);
25549
- /* harmony import */ var _core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38837);
25550
- /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67510);
25551
- /* harmony import */ var _core_view_view_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(35608);
25552
- /* harmony import */ var _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84075);
25553
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6441);
25556
+ /* harmony import */ var _core_helpers_html_strip_tags_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91003);
25557
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43555);
25558
+ /* harmony import */ var _core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38837);
25559
+ /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67510);
25560
+ /* harmony import */ var _core_view_view_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(35608);
25561
+ /* harmony import */ var _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84075);
25562
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(6441);
25554
25563
  function _define_property(obj, key, value) {
25555
25564
  if (key in obj) {
25556
25565
  Object.defineProperty(obj, key, {
@@ -25624,7 +25633,8 @@ var Dialog_1;
25624
25633
 
25625
25634
 
25626
25635
 
25627
- _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.dialog = {
25636
+
25637
+ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.dialog = {
25628
25638
  namespace: '',
25629
25639
  extraButtons: [],
25630
25640
  /**
@@ -25640,7 +25650,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.dialog = {
25640
25650
  toolbarButtonSize: 'middle',
25641
25651
  zIndex: 'inherit'
25642
25652
  };
25643
- _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25653
+ _config_js__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.controls.dialog = {
25644
25654
  close: {
25645
25655
  icon: 'cancel',
25646
25656
  exec: (dialog)=>{
@@ -25650,7 +25660,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25650
25660
  };
25651
25661
  /**
25652
25662
  * Module to generate dialog windows
25653
- */ let Dialog = Dialog_1 = class Dialog extends _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_11__.ViewWithToolbar {
25663
+ */ let Dialog = Dialog_1 = class Dialog extends _core_view_view_with_toolbar_js__WEBPACK_IMPORTED_MODULE_12__.ViewWithToolbar {
25654
25664
  /** @override */ className() {
25655
25665
  return 'Dialog';
25656
25666
  }
@@ -25714,8 +25724,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25714
25724
  this.draggable = true;
25715
25725
  this.startX = e.clientX;
25716
25726
  this.startY = e.clientY;
25717
- this.startPoint.x = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, 'left');
25718
- this.startPoint.y = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, 'top');
25727
+ this.startPoint.x = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, 'left');
25728
+ this.startPoint.y = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, 'top');
25719
25729
  this.setMaxZIndex();
25720
25730
  if (e.cancelable) {
25721
25731
  e.preventDefault();
@@ -25805,7 +25815,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25805
25815
  if (h == null) {
25806
25816
  h = this.dialog.offsetHeight;
25807
25817
  }
25808
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, {
25818
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, {
25809
25819
  width: w,
25810
25820
  height: h
25811
25821
  });
@@ -25839,7 +25849,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25839
25849
  this.moved = Math.abs(x - left) > 100 || Math.abs(y - top) > 100;
25840
25850
  }
25841
25851
  // strings on purpose: `css()` would truncate fractional pixels
25842
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.dialog, {
25852
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.dialog, {
25843
25853
  left: (x || left) + 'px',
25844
25854
  top: (y || top) + 'px'
25845
25855
  });
@@ -25859,6 +25869,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25859
25869
  * ```
25860
25870
  */ setHeader(content) {
25861
25871
  this.setElements(this.dialogbox_header, content);
25872
+ // `role="dialog"` needs an accessible name; a text title is the
25873
+ // natural one (element titles are left to the caller).
25874
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_6__.isString)(content)) {
25875
+ const name = (0,_core_helpers_html_strip_tags_js__WEBPACK_IMPORTED_MODULE_7__.stripTags)(content, this.od).trim();
25876
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', name || null);
25877
+ }
25862
25878
  return this;
25863
25879
  }
25864
25880
  /**
@@ -25912,7 +25928,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25912
25928
  /**
25913
25929
  * Get zIndex from dialog
25914
25930
  */ getZIndex() {
25915
- return parseInt((0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex'), 10) || 0;
25931
+ return parseInt((0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex'), 10) || 0;
25916
25932
  }
25917
25933
  /**
25918
25934
  * Get dialog instance with maximum z-index displaying it on top of all the dialog boxes
@@ -25935,7 +25951,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25935
25951
  this.__openedSiblings().forEach((dialog)=>{
25936
25952
  maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
25937
25953
  });
25938
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
25954
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
25939
25955
  }
25940
25956
  /**
25941
25957
  * Expands the dialog on full browser window
@@ -25985,7 +26001,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
25985
26001
  this.setPosition(this.offsetX, this.offsetY);
25986
26002
  this.setMaxZIndex();
25987
26003
  } else {
25988
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', null);
26004
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', null);
25989
26005
  }
25990
26006
  if (this.o.fullsize) {
25991
26007
  this.toggleFullSize(true);
@@ -26112,7 +26128,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
26112
26128
  * True, if dialog was opened
26113
26129
  */ this.isOpened = false;
26114
26130
  const self1 = this;
26115
- 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));
26131
+ 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));
26116
26132
  // Attach event handlers passed via `options.events` to the dialog's own
26117
26133
  // emitter (as FileBrowser already does), so a consumer — e.g. a plugin
26118
26134
  // forwarding the editor's `events` config — can observe `afterOpen` /
@@ -26130,40 +26146,40 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
26130
26146
  </div>
26131
26147
  <div class="${n('content')}"></div>
26132
26148
  <div class="${n('footer')}"></div>
26133
- <div class="${n('resizer')}">${_core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__.Icon.get('resize_handler')}</div>
26149
+ <div class="${n('resizer')}">${_core_ui_index_js__WEBPACK_IMPORTED_MODULE_10__.Icon.get('resize_handler')}</div>
26134
26150
  </div>
26135
26151
  </div>`);
26136
26152
  if (self1.options.direction === 'rtl') {
26137
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(self1.container, 'direction', 'rtl');
26138
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.attr)(self1.container, 'dir', 'rtl');
26153
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(self1.container, 'direction', 'rtl');
26154
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(self1.container, 'dir', 'rtl');
26139
26155
  }
26140
26156
  if (this.o.zIndex) {
26141
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(this.container, 'zIndex', this.o.zIndex.toString());
26157
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(this.container, 'zIndex', this.o.zIndex.toString());
26142
26158
  }
26143
- ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.attr)(self1.container, 'role', 'dialog');
26159
+ ;(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.attr)(self1.container, 'role', 'dialog');
26144
26160
  Object.defineProperty(self1.container, 'component', {
26145
26161
  value: this
26146
26162
  });
26147
26163
  self1.setMod('theme', self1.o.theme || 'default').setMod('resizable', Boolean(self1.o.resizable));
26148
26164
  const dialog = self1.getElm('panel');
26149
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialog != null, 'Panel element does not exist');
26165
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialog != null, 'Panel element does not exist');
26150
26166
  const resizer = self1.getElm('resizer');
26151
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(resizer != null, 'Resizer element does not exist');
26167
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(resizer != null, 'Resizer element does not exist');
26152
26168
  const dialogbox_header = self1.getElm('header-title');
26153
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_header != null, 'header-title element does not exist');
26169
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_header != null, 'header-title element does not exist');
26154
26170
  const dialogbox_content = self1.getElm('content');
26155
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_content != null, 'Content element does not exist');
26171
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_content != null, 'Content element does not exist');
26156
26172
  const dialogbox_footer = self1.getElm('footer');
26157
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_footer != null, 'Footer element does not exist');
26173
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_footer != null, 'Footer element does not exist');
26158
26174
  const dialogbox_toolbar = self1.getElm('header-toolbar');
26159
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
26175
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
26160
26176
  this.dialog = dialog;
26161
26177
  this.resizer = resizer;
26162
26178
  this.dialogbox_header = dialogbox_header;
26163
26179
  this.dialogbox_content = dialogbox_content;
26164
26180
  this.dialogbox_footer = dialogbox_footer;
26165
26181
  this.dialogbox_toolbar = dialogbox_toolbar;
26166
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_7__.css)(self1.dialog, {
26182
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css)(self1.dialog, {
26167
26183
  maxWidth: self1.options.maxWidth,
26168
26184
  minHeight: self1.options.minHeight,
26169
26185
  minWidth: self1.options.minWidth
@@ -26176,7 +26192,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
26176
26192
  this.e.on(self1.container, 'close_dialog', self1.close).on(this.ow, 'keydown', this.__onEsc).on(this.ow, 'resize', this.__onResize);
26177
26193
  if (this.o.closeOnClickOverlay) {
26178
26194
  const overlay = self1.getElm('overlay');
26179
- (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_8__.assert)(overlay != null, 'Overlay element does not exist');
26195
+ (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_9__.assert)(overlay != null, 'Overlay element does not exist');
26180
26196
  this.e.on(overlay, 'click', self1.close);
26181
26197
  }
26182
26198
  }
@@ -26185,7 +26201,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_12__.Config.prototype.controls.dialog = {
26185
26201
  * Registry of the currently opened dialogs. Replaces a DOM scan of the
26186
26202
  * whole `destination` (usually `document.body`) for every z-index update.
26187
26203
  */ Dialog.__opened = new Set();
26188
- Dialog.defaultOptions = _object_spread_props(_object_spread({}, _core_view_view_js__WEBPACK_IMPORTED_MODULE_10__.View.defaultOptions), {
26204
+ Dialog.defaultOptions = _object_spread_props(_object_spread({}, _core_view_view_js__WEBPACK_IMPORTED_MODULE_11__.View.defaultOptions), {
26189
26205
  closeOnClickOverlay: false,
26190
26206
  closeOnEsc: true
26191
26207
  });
@@ -31524,6 +31540,13 @@ let ToolbarContent = class ToolbarContent extends _core_ui_button_index_js__WEBP
31524
31540
  /** @override */ className() {
31525
31541
  return 'ToolbarContent';
31526
31542
  }
31543
+ /** A toolbar item like `ToolbarButton`: the parent group is a `list`. */ getRole() {
31544
+ return 'listitem';
31545
+ }
31546
+ /**
31547
+ * Arbitrary content is not a toggle button — `aria-pressed` is not
31548
+ * allowed on a `listitem`.
31549
+ */ onChangeActivated() {}
31527
31550
  /** @override */ update() {
31528
31551
  var _a, _b, _c;
31529
31552
  const { control } = this;
@@ -31566,7 +31589,6 @@ let ToolbarContent = class ToolbarContent extends _core_ui_button_index_js__WEBP
31566
31589
  this.control = control;
31567
31590
  this.target = target;
31568
31591
  this.container.classList.add(`${this.componentName}_${this.clearName(control.name)}`);
31569
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.attr)(this.container, 'role', 'content');
31570
31592
  }
31571
31593
  };
31572
31594
  ToolbarContent = __decorate([
@@ -49149,19 +49171,26 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49149
49171
  onResize();
49150
49172
  this.onReady();
49151
49173
  };
49174
+ let loading = false;
49152
49175
  const initAceEditor = ()=>{
49153
49176
  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) {
49154
49177
  return;
49155
49178
  }
49179
+ // ACE (~400 KiB from the CDN) is only needed once the source view
49180
+ // is actually shown — a page that stays in WYSIWYG must not
49181
+ // download it.
49182
+ if (!this.aceExists()) {
49183
+ if (!loading) {
49184
+ loading = true;
49185
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
49186
+ }
49187
+ return;
49188
+ }
49156
49189
  this.fromWYSIWYG();
49157
49190
  tryInitAceEditor();
49158
49191
  };
49159
49192
  editor.e.on('afterSetMode', initAceEditor);
49160
49193
  initAceEditor();
49161
- // global add ace editor in browser
49162
- if (!this.aceExists()) {
49163
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
49164
- }
49165
49194
  }
49166
49195
  destruct() {
49167
49196
  var _a, _b;
@@ -49691,7 +49720,24 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
49691
49720
  return false;
49692
49721
  };
49693
49722
  if (!addEventListener()) {
49694
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener, ()=>null);
49723
+ // js-beautify is only needed once the source view is shown —
49724
+ // do not download it for a page that stays in WYSIWYG.
49725
+ let loading = false;
49726
+ const loadBeautify = ()=>{
49727
+ if (loading || editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SPLIT) {
49728
+ return;
49729
+ }
49730
+ loading = true;
49731
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
49732
+ // The source view was filled before the
49733
+ // beautifier arrived — format it now.
49734
+ if (addEventListener()) {
49735
+ this.syncValueFromWYSIWYG(true);
49736
+ }
49737
+ }, ()=>null);
49738
+ };
49739
+ editor.e.on('afterSetMode.source', loadBeautify);
49740
+ loadBeautify();
49695
49741
  }
49696
49742
  }
49697
49743
  this.syncValueFromWYSIWYG(true);