jodit-pro 4.17.7 → 4.18.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 (325) hide show
  1. package/es2015/jodit.css +2 -2
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +8 -8
  4. package/es2015/jodit.js +876 -157
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +10 -10
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  11. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.css +1 -1
  22. package/es2015/plugins/color-picker/color-picker.js +1 -1
  23. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  24. package/es2015/plugins/emoji/emoji.css +1 -1
  25. package/es2015/plugins/emoji/emoji.js +1 -1
  26. package/es2015/plugins/emoji/emoji.min.js +1 -1
  27. package/es2015/plugins/export-docs/export-docs.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  29. package/es2015/plugins/finder/finder.css +1 -1
  30. package/es2015/plugins/finder/finder.js +1 -1
  31. package/es2015/plugins/finder/finder.min.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.css +1 -1
  33. package/es2015/plugins/google-maps/google-maps.js +1 -1
  34. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  35. package/es2015/plugins/google-search/google-search.js +1 -1
  36. package/es2015/plugins/google-search/google-search.min.js +1 -1
  37. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.css +1 -1
  46. package/es2015/plugins/keyboard/keyboard.js +1 -1
  47. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  48. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  49. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  50. package/es2015/plugins/page-break/page-break.js +1 -1
  51. package/es2015/plugins/page-break/page-break.min.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.css +1 -1
  53. package/es2015/plugins/paste-code/paste-code.js +1 -1
  54. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  55. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  56. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  57. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  58. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  59. package/es2015/plugins/style/style.css +1 -1
  60. package/es2015/plugins/style/style.js +1 -1
  61. package/es2015/plugins/style/style.min.js +1 -1
  62. package/es2015/plugins/templates/templates.css +1 -1
  63. package/es2015/plugins/templates/templates.js +1 -1
  64. package/es2015/plugins/templates/templates.min.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.css +1 -1
  66. package/es2015/plugins/todo-list/todo-list.js +1 -1
  67. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  68. package/es2015/plugins/translate/translate.css +1 -1
  69. package/es2015/plugins/translate/translate.js +1 -1
  70. package/es2015/plugins/translate/translate.min.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.css +1 -1
  72. package/es2015/plugins/tune-block/tune-block.js +1 -1
  73. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  74. package/es2018/jodit.fat.min.css +1 -1
  75. package/es2018/jodit.fat.min.js +10 -10
  76. package/es2018/jodit.min.css +1 -1
  77. package/es2018/jodit.min.js +9 -9
  78. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  79. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  80. package/es2018/plugins/backup/backup.min.js +1 -1
  81. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  82. package/es2018/plugins/change-case/change-case.min.js +1 -1
  83. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  84. package/es2018/plugins/emoji/emoji.min.js +1 -1
  85. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  86. package/es2018/plugins/finder/finder.min.js +1 -1
  87. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  88. package/es2018/plugins/google-search/google-search.min.js +1 -1
  89. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  90. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  91. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  92. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  93. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  94. package/es2018/plugins/page-break/page-break.min.js +1 -1
  95. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  96. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  97. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  98. package/es2018/plugins/style/style.min.js +1 -1
  99. package/es2018/plugins/templates/templates.min.js +1 -1
  100. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  101. package/es2018/plugins/translate/translate.min.js +1 -1
  102. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  103. package/es2021/jodit.css +2 -2
  104. package/es2021/jodit.fat.min.css +1 -1
  105. package/es2021/jodit.fat.min.js +18 -18
  106. package/es2021/jodit.js +877 -158
  107. package/es2021/jodit.min.css +1 -1
  108. package/es2021/jodit.min.js +17 -17
  109. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  110. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  112. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  113. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  115. package/es2021/plugins/backup/backup.css +1 -1
  116. package/es2021/plugins/backup/backup.js +1 -1
  117. package/es2021/plugins/backup/backup.min.js +1 -1
  118. package/es2021/plugins/button-generator/button-generator.css +1 -1
  119. package/es2021/plugins/button-generator/button-generator.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  121. package/es2021/plugins/change-case/change-case.js +1 -1
  122. package/es2021/plugins/change-case/change-case.min.js +1 -1
  123. package/es2021/plugins/color-picker/color-picker.css +1 -1
  124. package/es2021/plugins/color-picker/color-picker.js +1 -1
  125. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  126. package/es2021/plugins/emoji/emoji.css +1 -1
  127. package/es2021/plugins/emoji/emoji.js +1 -1
  128. package/es2021/plugins/emoji/emoji.min.js +1 -1
  129. package/es2021/plugins/export-docs/export-docs.js +1 -1
  130. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  131. package/es2021/plugins/finder/finder.css +1 -1
  132. package/es2021/plugins/finder/finder.js +1 -1
  133. package/es2021/plugins/finder/finder.min.js +1 -1
  134. package/es2021/plugins/google-maps/google-maps.css +1 -1
  135. package/es2021/plugins/google-maps/google-maps.js +1 -1
  136. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  137. package/es2021/plugins/google-search/google-search.js +1 -1
  138. package/es2021/plugins/google-search/google-search.min.js +1 -1
  139. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  140. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  141. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  142. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  143. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  144. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  145. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  146. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  147. package/es2021/plugins/keyboard/keyboard.css +1 -1
  148. package/es2021/plugins/keyboard/keyboard.js +1 -1
  149. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  150. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  151. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  152. package/es2021/plugins/page-break/page-break.js +1 -1
  153. package/es2021/plugins/page-break/page-break.min.js +1 -1
  154. package/es2021/plugins/paste-code/paste-code.css +1 -1
  155. package/es2021/plugins/paste-code/paste-code.js +1 -1
  156. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  157. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  158. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  159. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  160. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  161. package/es2021/plugins/style/style.css +1 -1
  162. package/es2021/plugins/style/style.js +1 -1
  163. package/es2021/plugins/style/style.min.js +1 -1
  164. package/es2021/plugins/templates/templates.css +1 -1
  165. package/es2021/plugins/templates/templates.js +1 -1
  166. package/es2021/plugins/templates/templates.min.js +1 -1
  167. package/es2021/plugins/todo-list/todo-list.css +1 -1
  168. package/es2021/plugins/todo-list/todo-list.js +1 -1
  169. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  170. package/es2021/plugins/translate/translate.css +1 -1
  171. package/es2021/plugins/translate/translate.js +1 -1
  172. package/es2021/plugins/translate/translate.min.js +1 -1
  173. package/es2021/plugins/tune-block/tune-block.css +1 -1
  174. package/es2021/plugins/tune-block/tune-block.js +1 -1
  175. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  176. package/es2021.en/jodit.css +2 -2
  177. package/es2021.en/jodit.fat.min.css +1 -1
  178. package/es2021.en/jodit.fat.min.js +18 -18
  179. package/es2021.en/jodit.js +877 -158
  180. package/es2021.en/jodit.min.css +1 -1
  181. package/es2021.en/jodit.min.js +17 -17
  182. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  183. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  184. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  185. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  186. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  187. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  188. package/es2021.en/plugins/backup/backup.css +1 -1
  189. package/es2021.en/plugins/backup/backup.js +1 -1
  190. package/es2021.en/plugins/backup/backup.min.js +1 -1
  191. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  192. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  193. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  194. package/es2021.en/plugins/change-case/change-case.js +1 -1
  195. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  196. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  197. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  198. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  199. package/es2021.en/plugins/emoji/emoji.css +1 -1
  200. package/es2021.en/plugins/emoji/emoji.js +1 -1
  201. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  202. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  203. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  204. package/es2021.en/plugins/finder/finder.css +1 -1
  205. package/es2021.en/plugins/finder/finder.js +1 -1
  206. package/es2021.en/plugins/finder/finder.min.js +1 -1
  207. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  208. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  209. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  210. package/es2021.en/plugins/google-search/google-search.js +1 -1
  211. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  212. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  213. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  214. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  215. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  216. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  217. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  218. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  219. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  220. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  221. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  222. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  223. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  224. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  225. package/es2021.en/plugins/page-break/page-break.js +1 -1
  226. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  227. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  228. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  229. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  230. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  231. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  232. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  233. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  234. package/es2021.en/plugins/style/style.css +1 -1
  235. package/es2021.en/plugins/style/style.js +1 -1
  236. package/es2021.en/plugins/style/style.min.js +1 -1
  237. package/es2021.en/plugins/templates/templates.css +1 -1
  238. package/es2021.en/plugins/templates/templates.js +1 -1
  239. package/es2021.en/plugins/templates/templates.min.js +1 -1
  240. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  241. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  242. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  243. package/es2021.en/plugins/translate/translate.css +1 -1
  244. package/es2021.en/plugins/translate/translate.js +1 -1
  245. package/es2021.en/plugins/translate/translate.min.js +1 -1
  246. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  247. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  248. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  249. package/es5/jodit.css +3 -3
  250. package/es5/jodit.fat.min.css +1 -1
  251. package/es5/jodit.fat.min.js +2 -2
  252. package/es5/jodit.js +1388 -161
  253. package/es5/jodit.min.css +3 -3
  254. package/es5/jodit.min.js +2 -2
  255. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  256. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  257. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  258. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  259. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  260. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  261. package/es5/plugins/backup/backup.css +1 -1
  262. package/es5/plugins/backup/backup.js +1 -1
  263. package/es5/plugins/backup/backup.min.js +1 -1
  264. package/es5/plugins/button-generator/button-generator.css +1 -1
  265. package/es5/plugins/button-generator/button-generator.js +1 -1
  266. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  267. package/es5/plugins/change-case/change-case.js +1 -1
  268. package/es5/plugins/change-case/change-case.min.js +1 -1
  269. package/es5/plugins/color-picker/color-picker.css +1 -1
  270. package/es5/plugins/color-picker/color-picker.js +1 -1
  271. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  272. package/es5/plugins/emoji/emoji.css +1 -1
  273. package/es5/plugins/emoji/emoji.js +1 -1
  274. package/es5/plugins/emoji/emoji.min.js +1 -1
  275. package/es5/plugins/export-docs/export-docs.js +1 -1
  276. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  277. package/es5/plugins/finder/finder.css +1 -1
  278. package/es5/plugins/finder/finder.js +1 -1
  279. package/es5/plugins/finder/finder.min.js +1 -1
  280. package/es5/plugins/google-maps/google-maps.css +1 -1
  281. package/es5/plugins/google-maps/google-maps.js +1 -1
  282. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  283. package/es5/plugins/google-search/google-search.js +1 -1
  284. package/es5/plugins/google-search/google-search.min.js +1 -1
  285. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  286. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  287. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  288. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  289. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  290. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  291. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  292. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  293. package/es5/plugins/keyboard/keyboard.css +1 -1
  294. package/es5/plugins/keyboard/keyboard.js +1 -1
  295. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  296. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  297. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  298. package/es5/plugins/page-break/page-break.js +1 -1
  299. package/es5/plugins/page-break/page-break.min.js +1 -1
  300. package/es5/plugins/paste-code/paste-code.css +1 -1
  301. package/es5/plugins/paste-code/paste-code.js +1 -1
  302. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  303. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  304. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  305. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  306. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  307. package/es5/plugins/style/style.css +1 -1
  308. package/es5/plugins/style/style.js +1 -1
  309. package/es5/plugins/style/style.min.js +1 -1
  310. package/es5/plugins/templates/templates.css +1 -1
  311. package/es5/plugins/templates/templates.js +1 -1
  312. package/es5/plugins/templates/templates.min.js +1 -1
  313. package/es5/plugins/todo-list/todo-list.css +1 -1
  314. package/es5/plugins/todo-list/todo-list.js +1 -1
  315. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  316. package/es5/plugins/translate/translate.css +1 -1
  317. package/es5/plugins/translate/translate.js +1 -1
  318. package/es5/plugins/translate/translate.min.js +1 -1
  319. package/es5/plugins/tune-block/tune-block.css +1 -1
  320. package/es5/plugins/tune-block/tune-block.js +1 -1
  321. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  322. package/es5/polyfills.fat.min.js +1 -1
  323. package/es5/polyfills.js +1 -1
  324. package/es5/polyfills.min.js +1 -1
  325. 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.17.7
4
+ * Version: v4.18.0
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -732,18 +732,43 @@ let ConfigPrototype = {};
732
732
  /**
733
733
  * Class names to align images with, instead of an inline `float` or
734
734
  * `margin`. Aligning an image removes every class listed here and adds the
735
- * chosen alignment's, which can be several separated by spaces.
735
+ * chosen alignment's, which can be several separated by spaces. An
736
+ * alignment can also list several such sets, to recognise each of them;
737
+ * aligning writes the first. `alignClasses.img` takes its place when set.
736
738
  *
737
739
  * ```javascript
738
740
  * Jodit.make('#editor', {
739
741
  * imageAlignClasses: {
740
742
  * left: 'align-left',
741
743
  * right: 'align-right',
742
- * center: 'align-center'
744
+ * center: ['align-center', 'centered']
743
745
  * }
744
746
  * });
745
747
  * ```
746
748
  */ this.imageAlignClasses = null;
749
+ /**
750
+ * Class names to align elements with, by tag name, as `imageAlignClasses`
751
+ * does for images: `img`, and `video`, `audio` and `iframe` in the media
752
+ * popup. A media wrapper (see `mediaWrappers`), and Jodit's own `jodit` and
753
+ * `jodit-media` wrappers, are aligned with the classes for the media in
754
+ * them.
755
+ *
756
+ * ```javascript
757
+ * const media = {
758
+ * left: 'media-left',
759
+ * right: 'media-right',
760
+ * center: 'media-center'
761
+ * };
762
+ *
763
+ * Jodit.make('#editor', {
764
+ * alignClasses: { video: media, iframe: media }
765
+ * });
766
+ * ```
767
+ */ this.alignClasses = {};
768
+ /**
769
+ * Alignment given to the media the video popup inserts. `'normal'` leaves
770
+ * them unaligned
771
+ */ this.mediaDefaultAlign = 'normal';
747
772
  /**
748
773
  * Do not display these buttons that are on the list
749
774
  *
@@ -1791,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
1791
1816
  * ```
1792
1817
  * @packageDocumentation
1793
1818
  * @module constants
1794
- */ const APP_VERSION = "4.17.7";
1819
+ */ const APP_VERSION = "4.18.0";
1795
1820
  // prettier-ignore
1796
1821
  const ES = "es2015";
1797
1822
  const IS_ES_MODERN = true;
@@ -6358,6 +6383,7 @@ __webpack_require__.r(__webpack_exports__);
6358
6383
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.completeUrl; },
6359
6384
  /* harmony export */ connection: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.connection; },
6360
6385
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
6386
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.createMediaWrapper; },
6361
6387
  /* harmony export */ css: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css; },
6362
6388
  /* harmony export */ cssInline: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssInline; },
6363
6389
  /* harmony export */ cssPath: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssPath; },
@@ -6368,13 +6394,16 @@ __webpack_require__.r(__webpack_exports__);
6368
6394
  /* harmony export */ fastClone: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.fastClone; },
6369
6395
  /* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
6370
6396
  /* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
6397
+ /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
6371
6398
  /* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
6372
6399
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
6373
6400
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
6374
6401
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
6375
6402
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
6403
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
6376
6404
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
6377
6405
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
6406
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getWrappedMedia; },
6378
6407
  /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
6379
6408
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.hAlignElement; },
6380
6409
  /* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
@@ -6455,7 +6484,8 @@ __webpack_require__.r(__webpack_exports__);
6455
6484
  /* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
6456
6485
  /* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
6457
6486
  /* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
6458
- /* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; }
6487
+ /* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
6488
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
6459
6489
  /* harmony export */ });
6460
6490
  /* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
6461
6491
  /* harmony import */ var _async_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91898);
@@ -7463,12 +7493,15 @@ function trimChars(value, chars) {
7463
7493
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7464
7494
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
7465
7495
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
7496
+ /* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
7466
7497
  /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
7467
7498
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
7468
7499
  /* harmony export */ });
7469
7500
  /* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
7470
- /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
7471
- /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
7501
+ /* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
7502
+ /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
7503
+ /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
7504
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
7472
7505
  /*!
7473
7506
  * Jodit Editor (https://xdsoft.net/jodit/)
7474
7507
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7476,32 +7509,54 @@ function trimChars(value, chars) {
7476
7509
  */
7477
7510
 
7478
7511
 
7479
- const classNames = (value)=>(value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
7512
+
7513
+
7514
+ // The sets of class names an alignment lists, the first being the one to write
7515
+ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
7516
+ value !== null && value !== void 0 ? value : ''
7517
+ ]).map((set)=>set.split(/\s+/).filter(Boolean)).filter((set)=>set.length);
7480
7518
  /**
7481
- * Align image, with `classes` (see `imageAlignClasses`) instead of inline
7482
- * styles when they are given
7519
+ * The class names to align `elm` with: `alignClasses` for its tag, or for the
7520
+ * media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
7521
+ * `jodit-media`), falling back to `imageAlignClasses` for an image
7522
+ */ function getAlignClasses(jodit, elm) {
7523
+ var _a, _b;
7524
+ if (!elm) {
7525
+ return null;
7526
+ }
7527
+ const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
7528
+ 'jodit',
7529
+ 'jodit-media'
7530
+ ])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
7531
+ const tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
7532
+ return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[tag]) !== null && _b !== void 0 ? _b : tag === 'img' ? jodit.o.imageAlignClasses : null;
7533
+ }
7534
+ /**
7535
+ * Align image, with `classes` (see `alignClasses`) instead of inline styles
7536
+ * when they are given
7483
7537
  */ function hAlignElement(image, align, classes) {
7538
+ var _a;
7484
7539
  if (classes) {
7485
7540
  hAlignElement(image, 'normal');
7486
- Object.values(classes).forEach((value)=>image.classList.remove(...classNames(value)));
7487
- image.classList.add(...classNames(classes[align || 'normal']));
7541
+ Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
7542
+ image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
7488
7543
  [
7489
7544
  'class',
7490
7545
  'style'
7491
7546
  ].forEach((name)=>{
7492
7547
  var _a;
7493
- if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7494
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name, null);
7548
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7549
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
7495
7550
  }
7496
7551
  });
7497
7552
  return;
7498
7553
  }
7499
7554
  if (align && align !== 'normal') {
7500
7555
  if (align !== 'center') {
7501
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', align);
7502
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
7556
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
7557
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
7503
7558
  } else {
7504
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
7559
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
7505
7560
  float: '',
7506
7561
  display: 'block',
7507
7562
  marginLeft: 'auto',
@@ -7509,13 +7564,13 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
7509
7564
  });
7510
7565
  }
7511
7566
  } else {
7512
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float') && [
7567
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
7513
7568
  'right',
7514
7569
  'left'
7515
- ].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float').toString().toLowerCase()) !== -1) {
7516
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', '');
7570
+ ].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
7571
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
7517
7572
  }
7518
- ;(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
7573
+ ;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
7519
7574
  }
7520
7575
  }
7521
7576
  /**
@@ -7528,17 +7583,16 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
7528
7583
  'center',
7529
7584
  'normal'
7530
7585
  ]){
7531
- const names = classNames(classes[align]);
7532
- if (names.length && names.every((name)=>elm.classList.contains(name))) {
7586
+ if (classSets(classes[align]).some((set)=>set.every((name)=>elm.classList.contains(name)))) {
7533
7587
  return align;
7534
7588
  }
7535
7589
  }
7536
7590
  }
7537
- const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'float').toLowerCase();
7591
+ const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
7538
7592
  if (float === 'left' || float === 'right') {
7539
7593
  return float;
7540
7594
  }
7541
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-right') === 'auto') {
7595
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-right') === 'auto') {
7542
7596
  return 'center';
7543
7597
  }
7544
7598
  return 'normal';
@@ -7548,10 +7602,10 @@ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').sp
7548
7602
  */ function clearAlign(node) {
7549
7603
  _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node, (elm)=>{
7550
7604
  if (_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm)) {
7551
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'textAlign')) {
7552
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'textAlign', '');
7553
- if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style') || '').trim().length) {
7554
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
7605
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
7606
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
7607
+ if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
7608
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
7555
7609
  }
7556
7610
  }
7557
7611
  }
@@ -7582,7 +7636,7 @@ function alignElement(command, box) {
7582
7636
  clearAlign(box);
7583
7637
  const align = ALIGN_BY_COMMAND.get(command.toLowerCase());
7584
7638
  if (align) {
7585
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'textAlign', align);
7639
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
7586
7640
  }
7587
7641
  }
7588
7642
  }
@@ -8656,13 +8710,13 @@ const getClassName = (obj)=>{
8656
8710
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8657
8711
 
8658
8712
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8659
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.$$; },
8713
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
8660
8714
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8661
8715
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8662
8716
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8663
8717
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8664
8718
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8665
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_26__.LimitedStack; },
8719
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
8666
8720
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8667
8721
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8668
8722
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -8675,51 +8729,56 @@ const getClassName = (obj)=>{
8675
8729
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8676
8730
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8677
8731
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8678
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.call; },
8679
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.callPromise; },
8680
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.callThis; },
8732
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
8733
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
8734
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
8681
8735
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8682
8736
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8683
8737
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
8684
8738
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
8685
8739
  /* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
8686
8740
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
8741
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8687
8742
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8688
8743
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8689
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.cssPath; },
8744
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
8690
8745
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8691
8746
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8692
8747
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
8693
8748
  /* harmony export */ error: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.error; },
8694
8749
  /* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
8695
8750
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8751
+ /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8696
8752
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8697
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
8753
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
8698
8754
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8699
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
8700
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
8755
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8756
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
8757
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8758
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
8701
8759
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8702
8760
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8703
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__.inView; },
8761
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
8704
8762
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8705
8763
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
8706
8764
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8707
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.keys; },
8708
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.loadImage; },
8765
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
8766
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
8709
8767
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8710
8768
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8711
8769
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8712
8770
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8713
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.markOwner; },
8714
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.memorizeExec; },
8771
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
8772
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
8715
8773
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
8716
- /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_20__.parseQuery; },
8717
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_21__.previewBox; },
8718
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.refs; },
8719
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_22__.reset; },
8720
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.resolveElement; },
8721
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__.scrollIntoViewIfNeeded; },
8722
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_25__.set; }
8774
+ /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8775
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
8776
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
8777
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
8778
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
8779
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
8780
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
8781
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
8723
8782
  /* harmony export */ });
8724
8783
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
8725
8784
  /* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
@@ -8741,14 +8800,15 @@ const getClassName = (obj)=>{
8741
8800
  /* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
8742
8801
  /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
8743
8802
  /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
8744
- /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(82501);
8745
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(11628);
8746
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(58844);
8747
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(26395);
8748
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(76078);
8749
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(3703);
8750
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(50535);
8751
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(37790);
8803
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
8804
+ /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
8805
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
8806
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
8807
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
8808
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
8809
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
8810
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
8811
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
8752
8812
  /*!
8753
8813
  * Jodit Editor (https://xdsoft.net/jodit/)
8754
8814
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8783,6 +8843,7 @@ const getClassName = (obj)=>{
8783
8843
 
8784
8844
 
8785
8845
 
8846
+
8786
8847
 
8787
8848
 
8788
8849
  /***/ }),
@@ -8853,6 +8914,76 @@ const getClassName = (obj)=>{
8853
8914
  /* harmony export */ ]);
8854
8915
 
8855
8916
 
8917
+ /***/ }),
8918
+
8919
+ /***/ 61477:
8920
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8921
+
8922
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8923
+ /* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
8924
+ /* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
8925
+ /* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
8926
+ /* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
8927
+ /* harmony export */ });
8928
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
8929
+ /*!
8930
+ * Jodit Editor (https://xdsoft.net/jodit/)
8931
+ * Released under MIT see LICENSE.txt in the project root for license information.
8932
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8933
+ */
8934
+ const isWrapper = (node, wrapper)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
8935
+ /**
8936
+ * The media in `elm` when `elm` is a wrapper media keep in the content (see
8937
+ * `mediaWrappers`): an element of a type `elm` is the wrapper for
8938
+ */ function getWrappedMedia(jodit, elm) {
8939
+ var _a;
8940
+ for (const [tag, wrapper] of Object.entries((_a = jodit.o.mediaWrappers) !== null && _a !== void 0 ? _a : {})){
8941
+ if (isWrapper(elm, wrapper)) {
8942
+ const media = elm.querySelector(tag);
8943
+ if (media) {
8944
+ return media;
8945
+ }
8946
+ }
8947
+ }
8948
+ return null;
8949
+ }
8950
+ /**
8951
+ * The wrapper media keep in the content (see `mediaWrappers`) that is or
8952
+ * holds `node`
8953
+ */ function getMediaWrapper(jodit, node) {
8954
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getWrappedMedia(jodit, elm)), jodit.editor);
8955
+ }
8956
+ /**
8957
+ * An empty wrapper for media of type `tag` to keep in the content (see
8958
+ * `mediaWrappers`), or null when there is none for it
8959
+ */ function createMediaWrapper(jodit, tag) {
8960
+ var _a;
8961
+ const wrapper = (_a = jodit.o.mediaWrappers) === null || _a === void 0 ? void 0 : _a[tag.toLowerCase()];
8962
+ if (!wrapper) {
8963
+ return null;
8964
+ }
8965
+ return jodit.createInside.element(wrapper.tag, {
8966
+ class: wrapper.className,
8967
+ contenteditable: false,
8968
+ draggable: true
8969
+ });
8970
+ }
8971
+ /**
8972
+ * Puts `element` in the wrapper for its type (see `mediaWrappers`), and
8973
+ * returns the wrapper, or `element` when there is none for it
8974
+ */ function wrapMedia(jodit, element) {
8975
+ const wrapper = createMediaWrapper(jodit, element.nodeName);
8976
+ if (!wrapper) {
8977
+ return element;
8978
+ }
8979
+ if (element.parentNode) {
8980
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(element, wrapper);
8981
+ }
8982
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, element);
8983
+ return wrapper;
8984
+ }
8985
+
8986
+
8856
8987
  /***/ }),
8857
8988
 
8858
8989
  /***/ 82501:
@@ -10837,6 +10968,12 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
10837
10968
 
10838
10969
 
10839
10970
 
10971
+ /**
10972
+ * A text node that is empty or holds only invisible caret placeholders.
10973
+ */ function isBlankTextNode(node) {
10974
+ var _a;
10975
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').replace(_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '').length === 0;
10976
+ }
10840
10977
  class Selection {
10841
10978
  /**
10842
10979
  * Short alias for this.jodit
@@ -11068,6 +11205,7 @@ class Selection {
11068
11205
  /**
11069
11206
  * Create marker element
11070
11207
  */ marker(atStart = false, range) {
11208
+ var _a;
11071
11209
  let newRange = null;
11072
11210
  if (range) {
11073
11211
  newRange = range.cloneRange();
@@ -11084,10 +11222,21 @@ class Selection {
11084
11222
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(marker, this.j.createInside.text(_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE));
11085
11223
  if (newRange) {
11086
11224
  if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, atStart ? newRange.startContainer : newRange.endContainer)) {
11087
- // Here need do unsafe inserting
11088
- // Deny Dom.safeInsertNode(newRange, marker);
11089
- // Apply style -> Test Style module -> Base apply -> For selection <p><strong>|test|</strong></p> apply style {"element":"em","style":{"fontStyle":"italic"}}
11090
- newRange.insertNode(marker);
11225
+ const { startContainer: node, startOffset: offset } = newRange;
11226
+ // At either end of a text node the marker goes beside it. Splitting
11227
+ // the node there would leave the selection's boundary in an empty
11228
+ // text node, and WebKit neither repaints a selection that leaves one
11229
+ // nor moves a selection that follows one when it's removed.
11230
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && offset === 0) {
11231
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(node, marker);
11232
+ } else if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && offset === ((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length)) {
11233
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(node, marker);
11234
+ } else {
11235
+ // Here need do unsafe inserting
11236
+ // Deny Dom.safeInsertNode(newRange, marker);
11237
+ // Apply style -> Test Style module -> Base apply -> For selection <p><strong>|test|</strong></p> apply style {"element":"em","style":{"fontStyle":"italic"}}
11238
+ newRange.insertNode(marker);
11239
+ }
11091
11240
  }
11092
11241
  }
11093
11242
  return marker;
@@ -11415,7 +11564,9 @@ class Selection {
11415
11564
  }
11416
11565
  ].forEach((getChildNode)=>{
11417
11566
  const childNode = getChildNode();
11418
- if (childNode && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(childNode)) {
11567
+ // Only a text node left with nothing in it by the split
11568
+ // goes; one holding a space is content (`<b>a</b> |`).
11569
+ if (childNode && isBlankTextNode(childNode)) {
11419
11570
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(childNode);
11420
11571
  }
11421
11572
  });
@@ -11505,9 +11656,9 @@ class Selection {
11505
11656
  if (styles && typeof styles === 'object') {
11506
11657
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
11507
11658
  }
11508
- const { imageDefaultAlign, imageAlignClasses } = this.j.o;
11659
+ const { imageDefaultAlign } = this.j.o;
11509
11660
  if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
11510
- (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
11661
+ (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.getAlignClasses)(this.j, image));
11511
11662
  }
11512
11663
  const onload = ()=>{
11513
11664
  if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
@@ -28922,19 +29073,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28922
29073
  * Update history stack
28923
29074
  */ updateStack(replace = false) {
28924
29075
  const newValue = this.snapshot.make();
28925
- if (!_snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
28926
- const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
28927
- if (replace) {
28928
- const command = this.__stack.current();
28929
- if (command && this.updateTick === command.tick) {
28930
- this.__stack.replace(newCommand);
28931
- }
28932
- } else {
28933
- this.__stack.push(newCommand);
28934
- }
29076
+ if (_snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
29077
+ return;
29078
+ }
29079
+ // Only the selection moved, for example when the selection markers
29080
+ // went in before a switch to the source view. There is nothing to
29081
+ // undo, but the next change has to start from this selection.
29082
+ if (newValue.html === this.startValue.html) {
28935
29083
  this.startValue = newValue;
28936
- this.fireChangeStack();
29084
+ return;
28937
29085
  }
29086
+ const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
29087
+ if (replace) {
29088
+ const command = this.__stack.current();
29089
+ if (command && this.updateTick === command.tick) {
29090
+ this.__stack.replace(newCommand);
29091
+ }
29092
+ } else {
29093
+ this.__stack.push(newCommand);
29094
+ }
29095
+ this.startValue = newValue;
29096
+ this.fireChangeStack();
28938
29097
  }
28939
29098
  fireChangeStack() {
28940
29099
  var _a;
@@ -31225,6 +31384,7 @@ const INPUT_TAGS = new Set([
31225
31384
  'textarea',
31226
31385
  'select'
31227
31386
  ]);
31387
+ const TYPE_AHEAD_TIMEOUT = 1000;
31228
31388
  const FOCUSABLE_SELECTOR = [
31229
31389
  'button:not([disabled])',
31230
31390
  'a[href]',
@@ -31489,11 +31649,56 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31489
31649
  items[(index + 1) % items.length].focus();
31490
31650
  break;
31491
31651
  default:
31492
- return;
31652
+ if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
31653
+ return;
31654
+ }
31493
31655
  }
31494
31656
  e.preventDefault();
31495
31657
  e.stopPropagation();
31496
31658
  }
31659
+ /**
31660
+ * The mouse opens a dropdown without taking the focus out of the editor.
31661
+ * While a dropdown list is open, typing there searches the list, as in an
31662
+ * open `<select>`, instead of writing into the content
31663
+ */ __onEditorKeyDown(e) {
31664
+ if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
31665
+ return;
31666
+ }
31667
+ e.preventDefault();
31668
+ return false;
31669
+ }
31670
+ /**
31671
+ * Typing in a dropdown list focuses the next item whose label starts with
31672
+ * the typed text, whatever their case and accents, and repeating one letter
31673
+ * cycles through the items that start with it, like the WAI-ARIA menu
31674
+ * pattern's type-ahead. The typed text starts again after a pause, or once
31675
+ * the focus has moved on
31676
+ */ __typeAhead(key, items, index) {
31677
+ var _a, _b;
31678
+ const now = Date.now();
31679
+ if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
31680
+ this.__typed = '';
31681
+ }
31682
+ if (key.length !== 1 || key === ' ' && !this.__typed) {
31683
+ return false;
31684
+ }
31685
+ this.__typedAt = now;
31686
+ this.__typed += key;
31687
+ this.__typedTo = items[index];
31688
+ const { compare } = new Intl.Collator(undefined, {
31689
+ usage: 'search',
31690
+ sensitivity: 'base'
31691
+ }), typed = this.__typed, cycle = Array.from(typed).every((char)=>compare(char, typed[0]) === 0), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
31692
+ for(let i = 0; i < items.length; i += 1){
31693
+ const item = items[(start + i) % items.length], label = (_b = (_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
31694
+ if (compare(label.slice(0, prefix.length), prefix) === 0) {
31695
+ item.focus();
31696
+ this.__typedTo = item;
31697
+ break;
31698
+ }
31699
+ }
31700
+ return true;
31701
+ }
31497
31702
  /**
31498
31703
  * Visible controls of the opened dropdown that can take the focus
31499
31704
  */ __popupFocusables() {
@@ -31506,12 +31711,16 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31506
31711
  /**
31507
31712
  * Create an open popup list
31508
31713
  */ __openControlList(control) {
31509
- var _a;
31714
+ var _a, _b, _c, _d, _e;
31510
31715
  const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
31511
31716
  const list = control.list;
31512
31717
  const menu = this.openPopup();
31513
- const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
31514
31718
  menu.parentElement = this;
31719
+ const content = (_b = control.popup) === null || _b === void 0 ? void 0 : _b.call(control, this.j, (_e = (_d = (_c = this.toolbar) === null || _c === void 0 ? void 0 : _c.getTarget(this)) !== null && _d !== void 0 ? _d : this.target) !== null && _e !== void 0 ? _e : null, this.__closePopup, this);
31720
+ if (content) {
31721
+ return this.__openMenu(menu, content);
31722
+ }
31723
+ const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
31515
31724
  toolbar.parentElement = menu;
31516
31725
  toolbar.mode = 'vertical';
31517
31726
  const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
@@ -31558,7 +31767,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31558
31767
  return childControl;
31559
31768
  };
31560
31769
  toolbar.build((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(list) ? list.map(getButton) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map((key)=>getButton(key, list[key])), this.target);
31561
- menu.setContent(toolbar).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
31770
+ this.__openMenu(menu, toolbar);
31771
+ }
31772
+ __openMenu(menu, content) {
31773
+ menu.setContent(content).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
31562
31774
  this.state.activated = true;
31563
31775
  }
31564
31776
  onOutsideClick(e) {
@@ -31572,7 +31784,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31572
31784
  openPopup() {
31573
31785
  this.__closePopup();
31574
31786
  this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
31575
- this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
31787
+ this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
31576
31788
  return this.openedPopup;
31577
31789
  }
31578
31790
  __closePopup() {
@@ -31587,7 +31799,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31587
31799
  // popup while the outer `removeChild` is still running and Chrome
31588
31800
  // throws NotFoundError. See #1458
31589
31801
  this.openedPopup = null;
31590
- this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
31802
+ this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
31591
31803
  // The keyboard brought the focus into the dropdown: give it back to
31592
31804
  // the button, otherwise it would fall out to the document
31593
31805
  const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
@@ -31651,6 +31863,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31651
31863
  currentValue: '',
31652
31864
  hasTrigger: false
31653
31865
  });
31866
+ this.__typed = '';
31867
+ this.__typedAt = 0;
31868
+ this.__typedTo = null;
31654
31869
  this.openedPopup = null;
31655
31870
  const button = this.getElm('button');
31656
31871
  (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_14__.assert)(button, 'Element button should exists');
@@ -31700,6 +31915,9 @@ __decorate([
31700
31915
  __decorate([
31701
31916
  _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
31702
31917
  ], ToolbarButton.prototype, "__onPopupKeyDown", null);
31918
+ __decorate([
31919
+ _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
31920
+ ], ToolbarButton.prototype, "__onEditorKeyDown", null);
31703
31921
  __decorate([
31704
31922
  _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
31705
31923
  ], ToolbarButton.prototype, "onOutsideClick", null);
@@ -39213,12 +39431,14 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
39213
39431
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
39214
39432
 
39215
39433
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
39216
- /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49055);
39217
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
39218
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12153);
39219
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6441);
39220
- /* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4104);
39221
- /* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83709);
39434
+ /* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
39435
+ /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
39436
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
39437
+ /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12153);
39438
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
39439
+ /* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4104);
39440
+ /* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83709);
39441
+ /* harmony import */ var _font_picker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40222);
39222
39442
  function _define_property(obj, key, value) {
39223
39443
  if (key in obj) {
39224
39444
  Object.defineProperty(obj, key, {
@@ -39279,11 +39499,18 @@ function _object_spread_props(target, source) {
39279
39499
 
39280
39500
 
39281
39501
 
39502
+
39503
+
39282
39504
  /**
39283
39505
  * Default font-size points
39284
- */ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.defaultFontSizePoints = 'px';
39285
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]);
39286
- _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
39506
+ */ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.defaultFontSizePoints = 'px';
39507
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
39508
+ googleFonts: {
39509
+ url: ''
39510
+ }
39511
+ };
39512
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__["default"]);
39513
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
39287
39514
  command: 'fontsize',
39288
39515
  data: {
39289
39516
  cssRule: 'font-size',
@@ -39329,7 +39556,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
39329
39556
  }
39330
39557
  const control = button.control;
39331
39558
  const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
39332
- const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, cssKey);
39559
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
39333
39560
  if (cssKey === 'font-size') {
39334
39561
  const numValue = parseFloat(value.toString());
39335
39562
  if (editor.o.defaultFontSizePoints === 'pt') {
@@ -39361,11 +39588,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
39361
39588
  return keySet.has(normalize(value.toString()));
39362
39589
  }
39363
39590
  };
39364
- _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object_spread_props(_object_spread({}, _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize), {
39591
+ const hadSelection = new WeakSet();
39592
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = _object_spread_props(_object_spread({}, _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize), {
39365
39593
  command: 'fontname',
39366
39594
  textTemplate: (j, value)=>{
39367
39595
  const [first] = value.split(',');
39368
- return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_1__.trimChars)(first, '"\'');
39596
+ return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimChars)(first, '"\'');
39369
39597
  },
39370
39598
  list: {
39371
39599
  '': 'Default',
@@ -39387,6 +39615,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39387
39615
  } catch (_a) {}
39388
39616
  return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
39389
39617
  },
39618
+ popup: (editor, current, close, button)=>editor.o.font.googleFonts.url ? new _font_picker_js__WEBPACK_IMPORTED_MODULE_8__.UIFontPicker(editor, button, close) : false,
39390
39619
  data: {
39391
39620
  cssRule: 'font-family',
39392
39621
  normalize: (v)=>{
@@ -39395,19 +39624,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39395
39624
  },
39396
39625
  // When no font is explicitly set, the computed font-family equals the
39397
39626
  // editor's own default (e.g. `-apple-system, …`). Return '' so the
39398
- // button shows the `Default` list entry instead of that raw stack.
39399
- // See #1370
39400
- value: (editor)=>{
39401
- const current = editor.s.current();
39402
- if (!current) {
39403
- return;
39404
- }
39405
- const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
39406
- if (!box) {
39627
+ // button shows the list's `Default` entry, when it has one, instead of
39628
+ // that raw stack. See #1370
39629
+ value: (editor, button)=>{
39630
+ const current = editor.s.current(), box = current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
39631
+ // Until there is a selection the button shows the editor's own font,
39632
+ // and afterwards the font of the last one
39633
+ if (box) {
39634
+ hadSelection.add(button);
39635
+ } else if (hadSelection.has(button)) {
39407
39636
  return;
39408
39637
  }
39409
- const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'font-family').toString();
39410
- if (value === (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(editor.editor, 'font-family').toString()) {
39638
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, 'font-family').toString(), { list } = button.control;
39639
+ if (value === (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(editor.editor, 'font-family').toString() && ((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(list) ? list.includes('') : '' in (list !== null && list !== void 0 ? list : {}))) {
39411
39640
  return '';
39412
39641
  }
39413
39642
  return value;
@@ -39416,6 +39645,267 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39416
39645
  });
39417
39646
 
39418
39647
 
39648
+ /***/ }),
39649
+
39650
+ /***/ 40222:
39651
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
39652
+
39653
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39654
+ /* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
39655
+ /* harmony export */ });
39656
+ /* harmony import */ var _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87325);
39657
+ /* harmony import */ var _core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37133);
39658
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
39659
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
39660
+ /* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68345);
39661
+ /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
39662
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
39663
+ /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37790);
39664
+ /* harmony import */ var _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48538);
39665
+ /* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41870);
39666
+ /*!
39667
+ * Jodit Editor (https://xdsoft.net/jodit/)
39668
+ * Released under MIT see LICENSE.txt in the project root for license information.
39669
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
39670
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
39671
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39672
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39673
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39674
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
39675
+ };
39676
+
39677
+
39678
+
39679
+
39680
+
39681
+
39682
+
39683
+
39684
+
39685
+
39686
+ const HEADINGS = [
39687
+ 'h1',
39688
+ 'h2',
39689
+ 'h3',
39690
+ 'h4',
39691
+ 'h5',
39692
+ 'h6'
39693
+ ];
39694
+ const GENERIC_FAMILIES = new Set([
39695
+ 'serif',
39696
+ 'sans-serif',
39697
+ 'monospace',
39698
+ 'cursive',
39699
+ 'fantasy',
39700
+ 'system-ui',
39701
+ 'ui-serif',
39702
+ 'ui-sans-serif',
39703
+ 'ui-monospace',
39704
+ 'ui-rounded'
39705
+ ]);
39706
+ /**
39707
+ * A family that names a font, not a generic family or a vendor keyword such
39708
+ * as `-apple-system`
39709
+ */ function isFontName(family) {
39710
+ return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
39711
+ }
39712
+ /**
39713
+ * The font family dropdown with Google Fonts. Under their own headings it
39714
+ * lists the fonts the editor's styles give text and headings, the fonts the
39715
+ * content uses, the control's list and the Google Fonts library
39716
+ */ let UIFontPicker = class UIFontPicker extends _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__.UIElement {
39717
+ className() {
39718
+ return 'UIFontPicker';
39719
+ }
39720
+ __render() {
39721
+ var _a, _b;
39722
+ const { control } = this.__button, { list = {} } = control, listed = (0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.map((key)=>({
39723
+ value: key.toString(),
39724
+ title: key.toString()
39725
+ })) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__.keys)(list, false).map((key)=>({
39726
+ value: key,
39727
+ title: list[key].toString()
39728
+ })), google = Array.from(this.__googleFonts.fonts.values(), (font)=>({
39729
+ value: this.__googleFonts.value(font),
39730
+ title: font.family,
39731
+ font
39732
+ })), byFamily = new Map();
39733
+ [
39734
+ ...google,
39735
+ ...listed
39736
+ ].forEach((entry)=>byFamily.set((0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value), entry));
39737
+ const theme = new Map(), used = new Map();
39738
+ // The theme's own fonts are listed too, so its body font can be chosen
39739
+ // to take a font off
39740
+ this.__themeFonts().forEach((fontFamily)=>{
39741
+ var _a;
39742
+ const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), title = fontFamily.split(',')[0].replace(/["']/g, '').trim(), entry = (_a = byFamily.get(family)) !== null && _a !== void 0 ? _a : isFontName(family) ? {
39743
+ value: fontFamily,
39744
+ title
39745
+ } : undefined;
39746
+ entry && !theme.has(family) && theme.set(family, entry);
39747
+ });
39748
+ this.__usedFonts().forEach((fontFamily)=>{
39749
+ const family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), entry = byFamily.get(family);
39750
+ entry && !theme.has(family) && used.set(family, entry);
39751
+ });
39752
+ const defaultEntry = listed.find((entry)=>entry.value === ''), current = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)((_b = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, this.j, this.__button)) !== null && _b !== void 0 ? _b : '');
39753
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(this.container);
39754
+ this.__fonts.clear();
39755
+ defaultEntry && this.__append(current, [
39756
+ defaultEntry
39757
+ ]);
39758
+ this.__append(current, [
39759
+ ...theme.values()
39760
+ ], 'Theme fonts');
39761
+ this.__append(current, [
39762
+ ...used.values()
39763
+ ], 'Used fonts');
39764
+ this.__append(current, listed.filter((entry)=>entry !== defaultEntry), 'System fonts');
39765
+ this.__append(current, google, 'Google Fonts');
39766
+ this.__observeGoogleFonts();
39767
+ }
39768
+ /**
39769
+ * The fonts the editor's styles give text and each heading
39770
+ */ __themeFonts() {
39771
+ const { editor } = this.j, fonts = [
39772
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(editor, 'font-family').toString()
39773
+ ];
39774
+ HEADINGS.forEach((tag)=>{
39775
+ const heading = this.j.createInside.element(tag, {
39776
+ style: 'display: none'
39777
+ });
39778
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(editor, heading);
39779
+ fonts.push((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(heading, 'font-family').toString());
39780
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(heading);
39781
+ });
39782
+ return fonts;
39783
+ }
39784
+ /**
39785
+ * The fonts the content sets
39786
+ */ __usedFonts() {
39787
+ return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), (element)=>element.style.fontFamily);
39788
+ }
39789
+ __append(current, entries, heading) {
39790
+ if (!entries.length) {
39791
+ return;
39792
+ }
39793
+ const { control } = this.__button, group = this.j.c.div(this.getFullElName('group'));
39794
+ if (heading) {
39795
+ const title = this.j.c.div(this.getFullElName('heading'), {
39796
+ id: `${this.getFullElName('heading')}-${(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.uniqueUid)()}`
39797
+ });
39798
+ title.textContent = this.i18n(heading);
39799
+ (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(group, {
39800
+ role: 'group',
39801
+ 'aria-labelledby': title.id
39802
+ });
39803
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, title);
39804
+ }
39805
+ entries.forEach((entry)=>{
39806
+ var _a, _b;
39807
+ const item = this.j.c.element('button', {
39808
+ type: 'button',
39809
+ class: this.getFullElName('item'),
39810
+ 'data-value': entry.value,
39811
+ 'aria-pressed': (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value) === current
39812
+ });
39813
+ if (entry.font) {
39814
+ item.textContent = entry.title;
39815
+ this.__fonts.set(item, entry.font);
39816
+ } else {
39817
+ item.innerHTML = (_b = (_a = control.childTemplate) === null || _a === void 0 ? void 0 : _a.call(control, this.j, entry.value, entry.title, this.__button)) !== null && _b !== void 0 ? _b : entry.title;
39818
+ }
39819
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, item);
39820
+ });
39821
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, group);
39822
+ }
39823
+ /**
39824
+ * Shows the names of the Google Fonts in view, and those just below it,
39825
+ * in their own fonts. Setting every item's font up front would have the
39826
+ * browser look for each of the library's families among the installed
39827
+ * fonts the first time the list opens
39828
+ */ __observeGoogleFonts() {
39829
+ this.j.async.requestAnimationFrame(()=>{
39830
+ var _a;
39831
+ (_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
39832
+ if (this.isDestructed || !this.__fonts.size) {
39833
+ return;
39834
+ }
39835
+ const observer = new IntersectionObserver((entries)=>{
39836
+ const fonts = [];
39837
+ entries.forEach(({ isIntersecting, target })=>{
39838
+ const font = this.__fonts.get(target);
39839
+ if (isIntersecting && font) {
39840
+ fonts.push(font);
39841
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(target, {
39842
+ fontFamily: this.__googleFonts.value(font)
39843
+ });
39844
+ observer.unobserve(target);
39845
+ }
39846
+ });
39847
+ this.__googleFonts.preview(fonts);
39848
+ }, {
39849
+ root: this.container.parentElement,
39850
+ rootMargin: '0px 0px 400px 0px'
39851
+ });
39852
+ this.__fonts.forEach((_, item)=>observer.observe(item));
39853
+ this.__observer = observer;
39854
+ });
39855
+ }
39856
+ /**
39857
+ * Keeps the editor's selection, as the toolbar buttons do
39858
+ */ onMouseDown(e) {
39859
+ e.preventDefault();
39860
+ }
39861
+ onClick(e) {
39862
+ var _a;
39863
+ const item = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(e.target, (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(node) && node.hasAttribute('data-value'), this.container);
39864
+ if (!item) {
39865
+ return;
39866
+ }
39867
+ const value = (_a = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(item, 'data-value')) !== null && _a !== void 0 ? _a : '', font = this.__googleFonts.find(value), // The font the text has anyway is taken off rather than written
39868
+ inherited = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(value) === (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(this.__blockFont());
39869
+ font && !inherited && this.__googleFonts.load(font);
39870
+ this.j.execCommand('fontname', false, inherited ? '' : value);
39871
+ this.__close();
39872
+ }
39873
+ /**
39874
+ * The font the selected text has without a font of its own: its block's
39875
+ */ __blockFont() {
39876
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.j.s.current(), _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, this.j.editor);
39877
+ return (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
39878
+ }
39879
+ destruct() {
39880
+ var _a;
39881
+ (_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
39882
+ super.destruct();
39883
+ }
39884
+ constructor(jodit, __button, __close){
39885
+ super(jodit);
39886
+ this.__button = __button;
39887
+ this.__close = __close;
39888
+ this.__fonts = new Map();
39889
+ this.__observer = null;
39890
+ this.__googleFonts = jodit.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.GoogleFonts);
39891
+ this.__render();
39892
+ if (!this.__googleFonts.fonts.size) {
39893
+ this.__googleFonts.ready.then(()=>!this.isDestructed && this.__render());
39894
+ }
39895
+ }
39896
+ };
39897
+ __decorate([
39898
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:mousedown')
39899
+ ], UIFontPicker.prototype, "onMouseDown", null);
39900
+ __decorate([
39901
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:click')
39902
+ ], UIFontPicker.prototype, "onClick", null);
39903
+ UIFontPicker = __decorate([
39904
+ _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__.component
39905
+ ], UIFontPicker);
39906
+
39907
+
39908
+
39419
39909
  /***/ }),
39420
39910
 
39421
39911
  /***/ 23399:
@@ -39425,6 +39915,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39425
39915
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(580);
39426
39916
  /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
39427
39917
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28252);
39918
+ /* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41870);
39428
39919
  /*!
39429
39920
  * Jodit Editor (https://xdsoft.net/jodit/)
39430
39921
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -39432,6 +39923,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39432
39923
  */
39433
39924
 
39434
39925
 
39926
+
39435
39927
  /**
39436
39928
  * Process commands `fontsize` and `fontname`
39437
39929
  */ function font(editor) {
@@ -39442,6 +39934,18 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39442
39934
  name: 'fontsize',
39443
39935
  group: 'font'
39444
39936
  });
39937
+ if (editor.o.font.googleFonts.url) {
39938
+ const googleFonts = editor.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(()=>googleFonts.loadUsed(), editor.defaultTimeout);
39939
+ googleFonts.ready.then(loadUsed);
39940
+ editor.e.on('afterInit afterSetMode change', loadUsed);
39941
+ }
39942
+ // An iframe's stylesheets can arrive after the toolbar first shows the
39943
+ // editor's font
39944
+ editor.e.on('afterInit', ()=>{
39945
+ editor.iframe && editor.e.on(editor.ed, 'load', ()=>editor.e.fire('updateToolbar'), {
39946
+ capture: true
39947
+ });
39948
+ });
39445
39949
  const callback = (command, second, third)=>{
39446
39950
  switch(command){
39447
39951
  case 'fontsize':
@@ -39471,6 +39975,161 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
39471
39975
  _core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
39472
39976
 
39473
39977
 
39978
+ /***/ }),
39979
+
39980
+ /***/ 41870:
39981
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
39982
+
39983
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39984
+ /* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
39985
+ /* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
39986
+ /* harmony export */ });
39987
+ /* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
39988
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
39989
+ /* harmony import */ var _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54079);
39990
+ /*!
39991
+ * Jodit Editor (https://xdsoft.net/jodit/)
39992
+ * Released under MIT see LICENSE.txt in the project root for license information.
39993
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
39994
+ */
39995
+
39996
+
39997
+ const CSS_URL = 'https://fonts.googleapis.com/css2';
39998
+ // `cursive` and `fantasy` stand in badly for a handwriting or display font
39999
+ const GENERIC_FAMILIES = {
40000
+ serif: 'serif',
40001
+ monospace: 'monospace'
40002
+ };
40003
+ const libraries = new Map();
40004
+ /**
40005
+ * The fonts of the library at `url`, fetched once for every editor on the page
40006
+ */ function library(jodit, url) {
40007
+ let fonts = libraries.get(url);
40008
+ if (!fonts) {
40009
+ const ajax = new _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__.Ajax({
40010
+ url,
40011
+ method: 'GET'
40012
+ }, jodit.o.defaultAjaxOptions);
40013
+ fonts = ajax.send().then((response)=>response.json())// A font without a regular style can't be asked for by its name alone
40014
+ .then(({ items })=>items.filter((font)=>font.variants.includes('regular'))).catch(()=>{
40015
+ libraries.delete(url);
40016
+ return [];
40017
+ }).finally(()=>ajax.destruct());
40018
+ libraries.set(url, fonts);
40019
+ }
40020
+ return fonts;
40021
+ }
40022
+ /**
40023
+ * The first family of a `font-family` value, unquoted and in lower case for
40024
+ * comparing
40025
+ */ function firstFamily(fontFamily) {
40026
+ return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
40027
+ }
40028
+ /**
40029
+ * Loads fonts from Google Fonts: the whole of each font the content uses into
40030
+ * the editor's document, and just the letters of its name for the font list
40031
+ */ class GoogleFonts extends _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
40032
+ className() {
40033
+ return 'GoogleFonts';
40034
+ }
40035
+ /**
40036
+ * The library's font named first in a `font-family` value
40037
+ */ find(fontFamily) {
40038
+ return this.fonts.get(firstFamily(fontFamily));
40039
+ }
40040
+ /**
40041
+ * The `font-family` value that applies a font
40042
+ */ value(font) {
40043
+ var _a;
40044
+ return `'${font.family}', ${(_a = GENERIC_FAMILIES[font.category]) !== null && _a !== void 0 ? _a : 'sans-serif'}`;
40045
+ }
40046
+ /**
40047
+ * Loads the regular, italic, bold and bold italic styles that a font has
40048
+ * into the editor's document
40049
+ */ load(font) {
40050
+ const loaded = this.__loadedInto(this.j.ed);
40051
+ if (loaded.has(font.family)) {
40052
+ return;
40053
+ }
40054
+ loaded.add(font.family);
40055
+ const styles = [
40056
+ [
40057
+ 'regular',
40058
+ '0,400'
40059
+ ],
40060
+ [
40061
+ '700',
40062
+ '0,700'
40063
+ ],
40064
+ [
40065
+ 'italic',
40066
+ '1,400'
40067
+ ],
40068
+ [
40069
+ '700italic',
40070
+ '1,700'
40071
+ ]
40072
+ ].filter(([variant])=>font.variants.includes(variant)).map(([, style])=>style);
40073
+ this.__append(this.j.ed, `family=${this.__family(font)}:ital,wght@${styles.join(';')}`);
40074
+ }
40075
+ /**
40076
+ * Loads every font of the library that the content uses
40077
+ */ loadUsed() {
40078
+ this.j.editor.querySelectorAll('[style*="font-family"]').forEach((element)=>{
40079
+ const font = this.find(element.style.fontFamily);
40080
+ font && this.load(font);
40081
+ });
40082
+ }
40083
+ /**
40084
+ * Loads into the page just the letters of each font's name, so the font
40085
+ * list can show the name in its font
40086
+ */ preview(fonts) {
40087
+ const loaded = this.__loadedInto(this.j.od);
40088
+ fonts = fonts.filter((font)=>!this.__previewed.has(font.family) && !loaded.has(font.family));
40089
+ if (!fonts.length) {
40090
+ return;
40091
+ }
40092
+ fonts.forEach((font)=>this.__previewed.add(font.family));
40093
+ const families = fonts.map((font)=>`family=${this.__family(font)}`), letters = new Set(fonts.map((font)=>font.family).join(''));
40094
+ this.__append(this.j.od, `${families.join('&')}&text=${encodeURIComponent([
40095
+ ...letters
40096
+ ].join(''))}`);
40097
+ }
40098
+ __loadedInto(doc) {
40099
+ var _a;
40100
+ const loaded = (_a = this.__loaded.get(doc)) !== null && _a !== void 0 ? _a : new Set();
40101
+ this.__loaded.set(doc, loaded);
40102
+ return loaded;
40103
+ }
40104
+ __family(font) {
40105
+ return encodeURIComponent(font.family).replace(/%20/g, '+');
40106
+ }
40107
+ __append(doc, query) {
40108
+ const link = doc.createElement('link');
40109
+ link.rel = 'stylesheet';
40110
+ link.href = `${CSS_URL}?${query}&display=swap`;
40111
+ doc.head.appendChild(link);
40112
+ this.__links.push(link);
40113
+ }
40114
+ destruct() {
40115
+ this.__links.forEach((link)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(link));
40116
+ super.destruct();
40117
+ }
40118
+ constructor(jodit){
40119
+ super(jodit);
40120
+ /**
40121
+ * The library by lower-case family, empty until it arrives
40122
+ */ this.fonts = new Map();
40123
+ this.__links = [];
40124
+ this.__loaded = new WeakMap();
40125
+ this.__previewed = new Set();
40126
+ this.ready = library(jodit, jodit.o.font.googleFonts.url).then((fonts)=>{
40127
+ fonts.forEach((font)=>this.fonts.set(font.family.toLowerCase(), font));
40128
+ });
40129
+ }
40130
+ }
40131
+
40132
+
39474
40133
  /***/ }),
39475
40134
 
39476
40135
  /***/ 4104:
@@ -40782,12 +41441,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
40782
41441
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40783
41442
  /* harmony export */ readValuesFromImage: function() { return /* binding */ readValuesFromImage; }
40784
41443
  /* harmony export */ });
40785
- /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29960);
40786
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
40787
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51642);
40788
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75595);
40789
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47749);
40790
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32566);
41444
+ /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
41445
+ /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
41446
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
41447
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
41448
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
41449
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
41450
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
40791
41451
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
40792
41452
  try {
40793
41453
  var info = gen[key](arg);
@@ -40824,33 +41484,34 @@ function _async_to_generator(fn) {
40824
41484
 
40825
41485
 
40826
41486
 
41487
+
40827
41488
  /**
40828
41489
  * Read values from image and set it to state
40829
41490
  * @private
40830
41491
  */ function readValuesFromImage(j, state) {
40831
41492
  return _async_to_generator(function*() {
40832
41493
  const { sourceImage: image, values } = state;
40833
- (0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values, j.o.imageAlignClasses);
41494
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
40834
41495
  // Border radius
40835
- values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.cssInline)(image, 'border-radius') || '0', 10) || 0;
41496
+ values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
40836
41497
  // Id
40837
- values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'id') || '';
41498
+ values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id') || '';
40838
41499
  // Title
40839
- values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'title') || '';
41500
+ values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title') || '';
40840
41501
  // Alt
40841
- values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'alt') || '';
41502
+ values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt') || '';
40842
41503
  // Style
40843
- values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'style') || '';
41504
+ values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style') || '';
40844
41505
  // Classes
40845
- values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
41506
+ values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
40846
41507
  // Margins
40847
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.readMargins)(image, values, state);
41508
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
40848
41509
  // Link
40849
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.readLink)(state, j, values);
41510
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
40850
41511
  // Src
40851
- values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'src') || '';
41512
+ values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
40852
41513
  // Image size
40853
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.readSizes)(image, values, state);
41514
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
40854
41515
  })();
40855
41516
  }
40856
41517
 
@@ -41946,7 +42607,7 @@ function _async_to_generator(fn) {
41946
42607
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
41947
42608
  }
41948
42609
  if (opt.image.editAlign) {
41949
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
42610
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
41950
42611
  }
41951
42612
  }
41952
42613
 
@@ -42702,6 +43363,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
42702
43363
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
42703
43364
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
42704
43365
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43366
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
42705
43367
  /*!
42706
43368
  * Jodit Editor (https://xdsoft.net/jodit/)
42707
43369
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42710,9 +43372,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
42710
43372
 
42711
43373
 
42712
43374
 
42713
- // Images align with `imageAlignClasses`; the wrappers of iframes and media
42714
- // keep inline styles
42715
- const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
43375
+
42716
43376
  // A Normal image sits where the text of its line is aligned (#1531)
42717
43377
  const lineAlign = (editor, elm)=>{
42718
43378
  const block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
@@ -42733,7 +43393,7 @@ const lineAlign = (editor, elm)=>{
42733
43393
  return 'left';
42734
43394
  }
42735
43395
  };
42736
- const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
43396
+ const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm)) : 'normal';
42737
43397
  const align = {
42738
43398
  name: 'left',
42739
43399
  childTemplate: (_, __, value)=>value,
@@ -42754,23 +43414,25 @@ const align = {
42754
43414
  return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
42755
43415
  },
42756
43416
  exec: (editor, elm, { control })=>{
42757
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
43417
+ // A media wrapper kept in the content (`mediaWrappers`) is aligned itself
43418
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
42758
43419
  'img',
42759
43420
  'jodit',
42760
43421
  'jodit-media'
42761
- ]))) {
43422
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
42762
43423
  return;
42763
43424
  }
42764
43425
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
42765
43426
  if (!command) {
42766
43427
  return false;
42767
43428
  }
42768
- ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, alignClasses(editor, elm));
43429
+ ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm));
42769
43430
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
42770
43431
  'jodit',
42771
43432
  'jodit-media'
42772
43433
  ])) && elm.firstElementChild) {
42773
- (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm.firstElementChild, command);
43434
+ const media = elm.firstElementChild;
43435
+ (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(media, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, media));
42774
43436
  }
42775
43437
  editor.synchronizeValues();
42776
43438
  editor.e.fire('recalcPositionPopup');
@@ -42973,9 +43635,11 @@ const align = {
42973
43635
  return (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_7__.makeCollection)(this.jodit, this.popup);
42974
43636
  }
42975
43637
  onClick(node) {
42976
- const elements = this.elmsList, target = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
42977
- if (target && this.canShowPopupForType(target.nodeName.toLowerCase())) {
42978
- this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), target.nodeName.toLowerCase(), target);
43638
+ const elements = this.elmsList, mediaWrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
43639
+ // A media wrapper kept in the content gets the media popup
43640
+ const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
43641
+ if (target && type && this.canShowPopupForType(type)) {
43642
+ this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
42979
43643
  return false;
42980
43644
  }
42981
43645
  }
@@ -43158,7 +43822,12 @@ const align = {
43158
43822
  this.removeListenersForElements();
43159
43823
  }
43160
43824
  _eventsList() {
43161
- const el = this.elmsList;
43825
+ var _a;
43826
+ // Clicks on a media wrapper kept in the content (`mediaWrappers`)
43827
+ const wrapperTags = Object.values((_a = this.j.o.mediaWrappers) !== null && _a !== void 0 ? _a : {}).map(({ tag })=>tag.toLowerCase());
43828
+ const el = [
43829
+ ...new Set(this.elmsList.concat(wrapperTags))
43830
+ ];
43162
43831
  return el.map((e)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`click_${e}`)).concat(el.map((e)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`touchstart_${e}`))).join(' ');
43163
43832
  }
43164
43833
  addListenersForElements() {
@@ -44102,7 +44771,7 @@ class lineHeight extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plug
44102
44771
  try {
44103
44772
  if (s.isCollapsed()) {
44104
44773
  const fake = c.fake();
44105
- s.insertNode(fake, false, false);
44774
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(s.range, fake);
44106
44775
  apply(fake);
44107
44776
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
44108
44777
  } else {
@@ -44722,8 +45391,6 @@ const formTemplate = (editor)=>{
44722
45391
  * Jodit Editor (https://xdsoft.net/jodit/)
44723
45392
  * Released under MIT see LICENSE.txt in the project root for license information.
44724
45393
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44725
- */ /**
44726
- * @module plugins/media
44727
45394
  */
44728
45395
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaFakeTag = 'jodit-media';
44729
45396
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaInFakeBlock = true;
@@ -44731,6 +45398,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
44731
45398
  'video',
44732
45399
  'audio'
44733
45400
  ];
45401
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
44734
45402
 
44735
45403
 
44736
45404
  /***/ }),
@@ -44759,11 +45427,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
44759
45427
  * Process `video` and `audio`
44760
45428
  */ function media(editor) {
44761
45429
  const keyFake = 'jodit_fake_wrapper';
44762
- const { mediaFakeTag, mediaBlocks, mediaInFakeBlock } = editor.options;
45430
+ const { mediaFakeTag, mediaBlocks, mediaInFakeBlock, mediaWrappers } = editor.options;
44763
45431
  const wrap = (element)=>{
45432
+ var _a;
44764
45433
  if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
44765
45434
  element = element.parentNode;
44766
- } else {
45435
+ } else if (mediaWrappers[element.nodeName.toLowerCase()]) {
45436
+ element = (_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(editor, element)) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.wrapMedia)(editor, element);
45437
+ } else if (mediaInFakeBlock) {
44767
45438
  const wrapper = editor.createInside.element(mediaFakeTag, {
44768
45439
  'data-jodit-temp': 1,
44769
45440
  contenteditable: false,
@@ -44781,12 +45452,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
44781
45452
  }
44782
45453
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
44783
45454
  element = wrapper;
45455
+ } else {
45456
+ return;
44784
45457
  }
44785
45458
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
44786
45459
  editor.s.setCursorAfter(element);
44787
45460
  });
44788
45461
  };
44789
- if (mediaInFakeBlock) {
45462
+ if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
44790
45463
  editor.e.on('afterGetValueFromEditor', (data)=>{
44791
45464
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
44792
45465
  if (rxp.test(data.value)) {
@@ -46164,7 +46837,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
46164
46837
  this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
46165
46838
  }
46166
46839
  editor.e.fire('placeholder', this.placeholderElm.innerHTML);
46167
- editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder', this.toggle).on(window, 'load', this.toggle);
46840
+ editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder afterCommand.placeholder', this.toggle).on(window, 'load', this.toggle);
46168
46841
  this.addNativeListeners();
46169
46842
  this.toggle();
46170
46843
  };
@@ -49382,18 +50055,26 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.source = {
49382
50055
  /* harmony export */ AceEditor: function() { return /* binding */ AceEditor; }
49383
50056
  /* harmony export */ });
49384
50057
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
49385
- /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
49386
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21537);
49387
- /* harmony import */ var _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23370);
50058
+ /* harmony import */ var _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45219);
50059
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
50060
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
50061
+ /* harmony import */ var _sourceEditor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23370);
49388
50062
  /*!
49389
50063
  * Jodit Editor (https://xdsoft.net/jodit/)
49390
50064
  * Released under MIT see LICENSE.txt in the project root for license information.
49391
50065
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
49392
- */
50066
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
50067
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50068
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
50069
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
50070
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
50071
+ };
50072
+
50073
+
49393
50074
 
49394
50075
 
49395
50076
 
49396
- class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEditor {
50077
+ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_4__.SourceEditor {
49397
50078
  aceExists() {
49398
50079
  return this.j.ow.ace !== undefined;
49399
50080
  }
@@ -49451,7 +50132,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49451
50132
  return;
49452
50133
  }
49453
50134
  const fakeMirror = this.j.c.div('jodit-source__mirror-fake');
49454
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(this.container, fakeMirror);
50135
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, fakeMirror);
49455
50136
  const ace = editor.ow.ace;
49456
50137
  this.instance = ace.edit(fakeMirror);
49457
50138
  if (editor.o.direction === 'rtl') {
@@ -49472,7 +50153,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49472
50153
  this.instance.setOption('wrap', editor.o.sourceEditorNativeOptions.wrap);
49473
50154
  this.instance.getSession().setUseWorker(false);
49474
50155
  this.instance.$blockScrolling = Infinity;
49475
- this.instance.on('change', this.toWYSIWYG);
50156
+ this.instance.on('change', this.__onChange);
49476
50157
  this.instance.on('focus', this.proxyOnFocus);
49477
50158
  this.instance.on('mousedown', this.proxyOnMouseDown);
49478
50159
  this.instance.on('blur', this.proxyOnBlur);
@@ -49507,7 +50188,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49507
50188
  if (!this.aceExists()) {
49508
50189
  if (!loading) {
49509
50190
  loading = true;
49510
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
50191
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
49511
50192
  }
49512
50193
  return;
49513
50194
  }
@@ -49520,7 +50201,7 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49520
50201
  }
49521
50202
  destruct() {
49522
50203
  var _a, _b;
49523
- this.instance.off('change', this.toWYSIWYG);
50204
+ this.instance.off('change', this.__onChange);
49524
50205
  this.instance.off('focus', this.proxyOnFocus);
49525
50206
  this.instance.off('mousedown', this.proxyOnMouseDown);
49526
50207
  this.instance.destroy();
@@ -49529,13 +50210,29 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49529
50210
  setValue(value) {
49530
50211
  if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
49531
50212
  const html = this.j.e.fire('beautifyHTML', value);
49532
- if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
50213
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
49533
50214
  value = html;
49534
50215
  }
49535
50216
  }
49536
- this.instance.setValue(value);
50217
+ // ACE reports its own `setValue` as two changes, the removal of the
50218
+ // old text and the insertion of the new one. Fed back into the
50219
+ // editor they became two history entries, `content -> ''` and
50220
+ // `'' -> content`, so the first undo after a switch to the source
50221
+ // view and back emptied the editor. The text came from the editor
50222
+ // in the first place, so there is nothing to send back.
50223
+ this.__settingValue = true;
50224
+ try {
50225
+ this.instance.setValue(value);
50226
+ } finally{
50227
+ this.__settingValue = false;
50228
+ }
49537
50229
  this.instance.clearSelection();
49538
50230
  }
50231
+ __onChange() {
50232
+ if (!this.__settingValue) {
50233
+ this.toWYSIWYG();
50234
+ }
50235
+ }
49539
50236
  getValue() {
49540
50237
  return this.instance.getValue();
49541
50238
  }
@@ -49614,8 +50311,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_3__.SourceEdit
49614
50311
  this.proxyOnMouseDown = (e)=>{
49615
50312
  this.j.e.fire('mousedown', e);
49616
50313
  };
50314
+ this.__settingValue = false;
49617
50315
  }
49618
50316
  }
50317
+ __decorate([
50318
+ _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_1__.autobind
50319
+ ], AceEditor.prototype, "__onChange", null);
49619
50320
 
49620
50321
 
49621
50322
  /***/ }),
@@ -53692,15 +54393,33 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
53692
54393
 
53693
54394
 
53694
54395
 
54396
+ // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
54397
+ // with `mediaDefaultAlign`
54398
+ function prepareMedia(jodit, element) {
54399
+ const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
54400
+ const { mediaDefaultAlign } = jodit.o;
54401
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
54402
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
54403
+ }
54404
+ return media;
54405
+ }
53695
54406
  function insertVideos(data) {
53696
54407
  var _a;
53697
54408
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
53698
- this.s.insertNode(this.createInside.element('video', {
54409
+ this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
53699
54410
  controls: '',
53700
54411
  src: data.baseurl + file
53701
- }));
54412
+ })));
53702
54413
  });
53703
54414
  }
54415
+ // Embed code that is one element is prepared as media; other code goes in as
54416
+ // it is
54417
+ function prepareEmbedCode(jodit, code) {
54418
+ const box = jodit.createInside.div();
54419
+ box.innerHTML = code.trim();
54420
+ const element = box.firstElementChild;
54421
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
54422
+ }
53704
54423
  _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
53705
54424
  parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
53706
54425
  defaultWidth: 400,
@@ -53738,7 +54457,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
53738
54457
  ])
53739
54458
  ]), tabs = [], insertCode = (code)=>{
53740
54459
  jodit.s.restore();
53741
- jodit.s.insertHTML(code);
54460
+ jodit.s.insertHTML(prepareEmbedCode(jodit, code));
53742
54461
  close();
53743
54462
  };
53744
54463
  jodit.s.save();