jodit-pro 4.18.15 → 4.19.2

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 (351) 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 +19 -13
  4. package/es2015/jodit.js +2535 -266
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +46 -40
  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/chart/chart.css +1 -1
  22. package/es2015/plugins/chart/chart.js +1 -1
  23. package/es2015/plugins/chart/chart.min.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.css +1 -1
  25. package/es2015/plugins/color-picker/color-picker.js +1 -1
  26. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  27. package/es2015/plugins/emoji/emoji.css +1 -1
  28. package/es2015/plugins/emoji/emoji.js +1 -1
  29. package/es2015/plugins/emoji/emoji.min.js +1 -1
  30. package/es2015/plugins/export-docs/export-docs.js +1 -1
  31. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  32. package/es2015/plugins/finder/finder.css +1 -1
  33. package/es2015/plugins/finder/finder.js +1 -1
  34. package/es2015/plugins/finder/finder.min.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.css +1 -1
  36. package/es2015/plugins/google-maps/google-maps.js +1 -1
  37. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  38. package/es2015/plugins/google-search/google-search.js +1 -1
  39. package/es2015/plugins/google-search/google-search.min.js +1 -1
  40. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  41. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  43. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  44. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  46. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  47. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.css +1 -1
  49. package/es2015/plugins/keyboard/keyboard.js +1 -1
  50. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  51. package/es2015/plugins/math/math.css +1 -1
  52. package/es2015/plugins/math/math.js +1 -1
  53. package/es2015/plugins/math/math.min.js +1 -1
  54. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  55. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  56. package/es2015/plugins/page-break/page-break.js +1 -1
  57. package/es2015/plugins/page-break/page-break.min.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.css +1 -1
  59. package/es2015/plugins/paste-code/paste-code.js +1 -1
  60. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  61. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  62. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  63. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  64. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  65. package/es2015/plugins/style/style.css +1 -1
  66. package/es2015/plugins/style/style.js +1 -1
  67. package/es2015/plugins/style/style.min.js +1 -1
  68. package/es2015/plugins/templates/templates.css +1 -1
  69. package/es2015/plugins/templates/templates.js +1 -1
  70. package/es2015/plugins/templates/templates.min.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.css +1 -1
  72. package/es2015/plugins/todo-list/todo-list.js +1 -1
  73. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  74. package/es2015/plugins/translate/translate.css +1 -1
  75. package/es2015/plugins/translate/translate.js +1 -1
  76. package/es2015/plugins/translate/translate.min.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.css +1 -1
  78. package/es2015/plugins/tune-block/tune-block.js +1 -1
  79. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  80. package/es2018/jodit.fat.min.css +1 -1
  81. package/es2018/jodit.fat.min.js +19 -13
  82. package/es2018/jodit.min.css +1 -1
  83. package/es2018/jodit.min.js +18 -12
  84. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  85. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  86. package/es2018/plugins/backup/backup.min.js +1 -1
  87. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  88. package/es2018/plugins/change-case/change-case.min.js +1 -1
  89. package/es2018/plugins/chart/chart.min.js +1 -1
  90. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  91. package/es2018/plugins/emoji/emoji.min.js +1 -1
  92. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  93. package/es2018/plugins/finder/finder.min.js +1 -1
  94. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  95. package/es2018/plugins/google-search/google-search.min.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  99. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  100. package/es2018/plugins/math/math.min.js +1 -1
  101. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  102. package/es2018/plugins/page-break/page-break.min.js +1 -1
  103. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  104. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  105. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  106. package/es2018/plugins/style/style.min.js +1 -1
  107. package/es2018/plugins/templates/templates.min.js +1 -1
  108. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  109. package/es2018/plugins/translate/translate.min.js +1 -1
  110. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  111. package/es2021/jodit.css +2 -2
  112. package/es2021/jodit.fat.min.css +1 -1
  113. package/es2021/jodit.fat.min.js +28 -21
  114. package/es2021/jodit.js +2487 -266
  115. package/es2021/jodit.min.css +1 -1
  116. package/es2021/jodit.min.js +26 -19
  117. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  118. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  119. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  120. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  121. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  122. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  123. package/es2021/plugins/backup/backup.css +1 -1
  124. package/es2021/plugins/backup/backup.js +1 -1
  125. package/es2021/plugins/backup/backup.min.js +1 -1
  126. package/es2021/plugins/button-generator/button-generator.css +1 -1
  127. package/es2021/plugins/button-generator/button-generator.js +1 -1
  128. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  129. package/es2021/plugins/change-case/change-case.js +1 -1
  130. package/es2021/plugins/change-case/change-case.min.js +1 -1
  131. package/es2021/plugins/chart/chart.css +1 -1
  132. package/es2021/plugins/chart/chart.js +1 -1
  133. package/es2021/plugins/chart/chart.min.js +1 -1
  134. package/es2021/plugins/color-picker/color-picker.css +1 -1
  135. package/es2021/plugins/color-picker/color-picker.js +1 -1
  136. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  137. package/es2021/plugins/emoji/emoji.css +1 -1
  138. package/es2021/plugins/emoji/emoji.js +1 -1
  139. package/es2021/plugins/emoji/emoji.min.js +1 -1
  140. package/es2021/plugins/export-docs/export-docs.js +1 -1
  141. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  142. package/es2021/plugins/finder/finder.css +1 -1
  143. package/es2021/plugins/finder/finder.js +1 -1
  144. package/es2021/plugins/finder/finder.min.js +1 -1
  145. package/es2021/plugins/google-maps/google-maps.css +1 -1
  146. package/es2021/plugins/google-maps/google-maps.js +1 -1
  147. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  148. package/es2021/plugins/google-search/google-search.js +1 -1
  149. package/es2021/plugins/google-search/google-search.min.js +1 -1
  150. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  151. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  152. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  153. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  154. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  155. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  156. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  157. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  158. package/es2021/plugins/keyboard/keyboard.css +1 -1
  159. package/es2021/plugins/keyboard/keyboard.js +1 -1
  160. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  161. package/es2021/plugins/math/math.css +1 -1
  162. package/es2021/plugins/math/math.js +1 -1
  163. package/es2021/plugins/math/math.min.js +1 -1
  164. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  165. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  166. package/es2021/plugins/page-break/page-break.js +1 -1
  167. package/es2021/plugins/page-break/page-break.min.js +1 -1
  168. package/es2021/plugins/paste-code/paste-code.css +1 -1
  169. package/es2021/plugins/paste-code/paste-code.js +1 -1
  170. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  171. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  172. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  173. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  174. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  175. package/es2021/plugins/style/style.css +1 -1
  176. package/es2021/plugins/style/style.js +1 -1
  177. package/es2021/plugins/style/style.min.js +1 -1
  178. package/es2021/plugins/templates/templates.css +1 -1
  179. package/es2021/plugins/templates/templates.js +1 -1
  180. package/es2021/plugins/templates/templates.min.js +1 -1
  181. package/es2021/plugins/todo-list/todo-list.css +1 -1
  182. package/es2021/plugins/todo-list/todo-list.js +1 -1
  183. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  184. package/es2021/plugins/translate/translate.css +1 -1
  185. package/es2021/plugins/translate/translate.js +1 -1
  186. package/es2021/plugins/translate/translate.min.js +1 -1
  187. package/es2021/plugins/tune-block/tune-block.css +1 -1
  188. package/es2021/plugins/tune-block/tune-block.js +1 -1
  189. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  190. package/es2021.en/jodit.css +2 -2
  191. package/es2021.en/jodit.fat.min.css +1 -1
  192. package/es2021.en/jodit.fat.min.js +27 -20
  193. package/es2021.en/jodit.js +2487 -266
  194. package/es2021.en/jodit.min.css +1 -1
  195. package/es2021.en/jodit.min.js +24 -17
  196. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  197. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  198. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  199. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  200. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  201. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  202. package/es2021.en/plugins/backup/backup.css +1 -1
  203. package/es2021.en/plugins/backup/backup.js +1 -1
  204. package/es2021.en/plugins/backup/backup.min.js +1 -1
  205. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  206. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  207. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  208. package/es2021.en/plugins/change-case/change-case.js +1 -1
  209. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  210. package/es2021.en/plugins/chart/chart.css +1 -1
  211. package/es2021.en/plugins/chart/chart.js +1 -1
  212. package/es2021.en/plugins/chart/chart.min.js +1 -1
  213. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  214. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  215. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  216. package/es2021.en/plugins/emoji/emoji.css +1 -1
  217. package/es2021.en/plugins/emoji/emoji.js +1 -1
  218. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  219. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  220. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  221. package/es2021.en/plugins/finder/finder.css +1 -1
  222. package/es2021.en/plugins/finder/finder.js +1 -1
  223. package/es2021.en/plugins/finder/finder.min.js +1 -1
  224. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  225. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  226. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  227. package/es2021.en/plugins/google-search/google-search.js +1 -1
  228. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  229. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  230. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  231. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  232. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  233. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  234. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  235. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  236. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  237. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  238. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  239. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  240. package/es2021.en/plugins/math/math.css +1 -1
  241. package/es2021.en/plugins/math/math.js +1 -1
  242. package/es2021.en/plugins/math/math.min.js +1 -1
  243. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  244. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  245. package/es2021.en/plugins/page-break/page-break.js +1 -1
  246. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  247. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  248. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  249. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  250. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  251. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  252. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  253. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  254. package/es2021.en/plugins/style/style.css +1 -1
  255. package/es2021.en/plugins/style/style.js +1 -1
  256. package/es2021.en/plugins/style/style.min.js +1 -1
  257. package/es2021.en/plugins/templates/templates.css +1 -1
  258. package/es2021.en/plugins/templates/templates.js +1 -1
  259. package/es2021.en/plugins/templates/templates.min.js +1 -1
  260. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  261. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  262. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  263. package/es2021.en/plugins/translate/translate.css +1 -1
  264. package/es2021.en/plugins/translate/translate.js +1 -1
  265. package/es2021.en/plugins/translate/translate.min.js +1 -1
  266. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  267. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  268. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  269. package/es5/jodit.css +3 -3
  270. package/es5/jodit.fat.min.css +1 -1
  271. package/es5/jodit.fat.min.js +2 -2
  272. package/es5/jodit.js +3330 -412
  273. package/es5/jodit.min.css +3 -3
  274. package/es5/jodit.min.js +2 -2
  275. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  276. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  277. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  278. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  279. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  280. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  281. package/es5/plugins/backup/backup.css +1 -1
  282. package/es5/plugins/backup/backup.js +1 -1
  283. package/es5/plugins/backup/backup.min.js +1 -1
  284. package/es5/plugins/button-generator/button-generator.css +1 -1
  285. package/es5/plugins/button-generator/button-generator.js +1 -1
  286. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  287. package/es5/plugins/change-case/change-case.js +1 -1
  288. package/es5/plugins/change-case/change-case.min.js +1 -1
  289. package/es5/plugins/chart/chart.css +1 -1
  290. package/es5/plugins/chart/chart.js +1 -1
  291. package/es5/plugins/chart/chart.min.js +1 -1
  292. package/es5/plugins/color-picker/color-picker.css +1 -1
  293. package/es5/plugins/color-picker/color-picker.js +1 -1
  294. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  295. package/es5/plugins/emoji/emoji.css +1 -1
  296. package/es5/plugins/emoji/emoji.js +1 -1
  297. package/es5/plugins/emoji/emoji.min.js +1 -1
  298. package/es5/plugins/export-docs/export-docs.js +1 -1
  299. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  300. package/es5/plugins/finder/finder.css +1 -1
  301. package/es5/plugins/finder/finder.js +1 -1
  302. package/es5/plugins/finder/finder.min.js +1 -1
  303. package/es5/plugins/google-maps/google-maps.css +1 -1
  304. package/es5/plugins/google-maps/google-maps.js +1 -1
  305. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  306. package/es5/plugins/google-search/google-search.js +1 -1
  307. package/es5/plugins/google-search/google-search.min.js +1 -1
  308. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  309. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  310. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  311. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  312. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  313. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  314. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  315. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  316. package/es5/plugins/keyboard/keyboard.css +1 -1
  317. package/es5/plugins/keyboard/keyboard.js +1 -1
  318. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  319. package/es5/plugins/math/math.css +1 -1
  320. package/es5/plugins/math/math.js +1 -1
  321. package/es5/plugins/math/math.min.js +1 -1
  322. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  323. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  324. package/es5/plugins/page-break/page-break.js +1 -1
  325. package/es5/plugins/page-break/page-break.min.js +1 -1
  326. package/es5/plugins/paste-code/paste-code.css +1 -1
  327. package/es5/plugins/paste-code/paste-code.js +1 -1
  328. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  329. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  330. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  331. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  332. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  333. package/es5/plugins/style/style.css +1 -1
  334. package/es5/plugins/style/style.js +1 -1
  335. package/es5/plugins/style/style.min.js +1 -1
  336. package/es5/plugins/templates/templates.css +1 -1
  337. package/es5/plugins/templates/templates.js +1 -1
  338. package/es5/plugins/templates/templates.min.js +1 -1
  339. package/es5/plugins/todo-list/todo-list.css +1 -1
  340. package/es5/plugins/todo-list/todo-list.js +1 -1
  341. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  342. package/es5/plugins/translate/translate.css +1 -1
  343. package/es5/plugins/translate/translate.js +1 -1
  344. package/es5/plugins/translate/translate.min.js +1 -1
  345. package/es5/plugins/tune-block/tune-block.css +1 -1
  346. package/es5/plugins/tune-block/tune-block.js +1 -1
  347. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  348. package/es5/polyfills.fat.min.js +1 -1
  349. package/es5/polyfills.js +1 -1
  350. package/es5/polyfills.min.js +1 -1
  351. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.15
4
+ * Version: v4.19.2
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -741,7 +741,8 @@ let ConfigPrototype = {};
741
741
  * spaces. An alignment can also list several such sets, to recognise each
742
742
  * of them; aligning writes the first. A media wrapper (see
743
743
  * `mediaWrappers`), and Jodit's own `jodit` and `jodit-media` wrappers,
744
- * are aligned with the classes for the media in them.
744
+ * are aligned with the classes for the media in them, and a captioned
745
+ * image's wrapper (see `imageCaption`) with those for `img`.
745
746
  *
746
747
  * ```javascript
747
748
  * const media = {
@@ -1767,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
1767
1768
  * ```
1768
1769
  * @packageDocumentation
1769
1770
  * @module constants
1770
- */ const APP_VERSION = "4.18.15";
1771
+ */ const APP_VERSION = "4.19.2";
1771
1772
  // prettier-ignore
1772
1773
  const ES = "es2021";
1773
1774
  const IS_ES_MODERN = true;
@@ -3167,7 +3168,10 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
3167
3168
  /**
3168
3169
  * The node is editable
3169
3170
  */ static isContentEditable(node, root) {
3170
- return Dom.isNode(node) && !Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false', root);
3171
+ // The nearest element that says decides, as an editable caption inside
3172
+ // a non-editable figure is editable
3173
+ const host = Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.hasAttribute('contenteditable'), root);
3174
+ return Dom.isNode(node) && (host === null || host === void 0 ? void 0 : host.getAttribute('contenteditable')) !== 'false';
3171
3175
  }
3172
3176
  static isEmpty(node, condNoEmptyElement = _constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS) {
3173
3177
  if (!node) {
@@ -3905,6 +3909,7 @@ __decorate([
3905
3909
  'screenY',
3906
3910
  'clientX',
3907
3911
  'clientY',
3912
+ 'view',
3908
3913
  'target',
3909
3914
  'srcElement',
3910
3915
  'currentTarget',
@@ -6537,6 +6542,7 @@ __webpack_require__.r(__webpack_exports__);
6537
6542
  /* harmony export */ cleanFromWord: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord; },
6538
6543
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearAlign; },
6539
6544
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearCenterAlign; },
6545
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearHAlign; },
6540
6546
  /* harmony export */ clearTimeout: function() { return /* reexport safe */ _async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout; },
6541
6547
  /* harmony export */ cns: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cns; },
6542
6548
  /* harmony export */ colorToHex: function() { return /* reexport safe */ _color_index_js__WEBPACK_IMPORTED_MODULE_3__.colorToHex; },
@@ -6555,11 +6561,14 @@ __webpack_require__.r(__webpack_exports__);
6555
6561
  /* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
6556
6562
  /* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
6557
6563
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
6564
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionWrapper; },
6565
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionedImage; },
6558
6566
  /* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
6559
6567
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
6560
6568
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
6561
6569
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
6562
6570
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
6571
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getImageCaption; },
6563
6572
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
6564
6573
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
6565
6574
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
@@ -7666,6 +7675,7 @@ function trimChars(value, chars) {
7666
7675
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7667
7676
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
7668
7677
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
7678
+ /* harmony export */ clearHAlign: function() { return /* binding */ clearHAlign; },
7669
7679
  /* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
7670
7680
  /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
7671
7681
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
@@ -7674,7 +7684,8 @@ function trimChars(value, chars) {
7674
7684
  /* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
7675
7685
  /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
7676
7686
  /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
7677
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
7687
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
7688
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
7678
7689
  /*!
7679
7690
  * Jodit Editor (https://xdsoft.net/jodit/)
7680
7691
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7684,6 +7695,7 @@ function trimChars(value, chars) {
7684
7695
 
7685
7696
 
7686
7697
 
7698
+
7687
7699
  // The sets of class names an alignment lists, the first being the one to write
7688
7700
  const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
7689
7701
  value !== null && value !== void 0 ? value : ''
@@ -7691,17 +7703,17 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7691
7703
  /**
7692
7704
  * The class names to align `elm` with: `alignClasses` for its tag, or for the
7693
7705
  * media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
7694
- * `jodit-media`)
7706
+ * `jodit-media`) or a captioned image (see `imageCaption`)
7695
7707
  */ function getAlignClasses(jodit, elm) {
7696
- var _a, _b;
7708
+ var _a, _b, _c;
7697
7709
  if (!elm) {
7698
7710
  return null;
7699
7711
  }
7700
7712
  const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
7701
7713
  'jodit',
7702
7714
  'jodit-media'
7703
- ])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
7704
- return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _b !== void 0 ? _b : null;
7715
+ ])) ? elm.firstElementChild : (_a = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm)) !== null && _a !== void 0 ? _a : (0,_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, elm);
7716
+ return (_c = (_b = jodit.o.alignClasses) === null || _b === void 0 ? void 0 : _b[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _c !== void 0 ? _c : null;
7705
7717
  }
7706
7718
  /**
7707
7719
  * Align image, with `classes` (see `alignClasses`) instead of inline styles
@@ -7709,18 +7721,8 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7709
7721
  */ function hAlignElement(image, align, classes) {
7710
7722
  var _a;
7711
7723
  if (classes) {
7712
- hAlignElement(image, 'normal');
7713
- Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
7724
+ clearHAlign(image, classes);
7714
7725
  image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
7715
- [
7716
- 'class',
7717
- 'style'
7718
- ].forEach((name)=>{
7719
- var _a;
7720
- if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7721
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
7722
- }
7723
- });
7724
7726
  return;
7725
7727
  }
7726
7728
  if (align && align !== 'normal') {
@@ -7745,6 +7747,24 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7745
7747
  ;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
7746
7748
  }
7747
7749
  }
7750
+ /**
7751
+ * Remove the alignment `hAlignElement` set on an element, with the classes of
7752
+ * every alignment in `classes`
7753
+ */ function clearHAlign(elm, classes) {
7754
+ hAlignElement(elm, 'normal');
7755
+ if (classes) {
7756
+ Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>elm.classList.remove(...set)));
7757
+ }
7758
+ [
7759
+ 'class',
7760
+ 'style'
7761
+ ].forEach((name)=>{
7762
+ var _a;
7763
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7764
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name, null);
7765
+ }
7766
+ });
7767
+ }
7748
7768
  /**
7749
7769
  * The alignment `hAlignElement` has set on an element
7750
7770
  */ function getHAlign(elm, classes) {
@@ -8876,21 +8896,70 @@ const getClassName = (obj)=>{
8876
8896
  /* harmony export */ ]);
8877
8897
 
8878
8898
 
8899
+ /***/ }),
8900
+
8901
+ /***/ 68645:
8902
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8903
+
8904
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8905
+ /* harmony export */ getCaptionWrapper: function() { return /* binding */ getCaptionWrapper; },
8906
+ /* harmony export */ getCaptionedImage: function() { return /* binding */ getCaptionedImage; },
8907
+ /* harmony export */ getImageCaption: function() { return /* binding */ getImageCaption; }
8908
+ /* harmony export */ });
8909
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
8910
+ /* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
8911
+ /*!
8912
+ * Jodit Editor (https://xdsoft.net/jodit/)
8913
+ * Released under MIT see LICENSE.txt in the project root for license information.
8914
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8915
+ */
8916
+
8917
+ const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === part.tag.toLowerCase() && (!part.className || node.classList.contains(part.className));
8918
+ /**
8919
+ * The caption in `wrapper`, an element holding an image and its caption (see
8920
+ * `imageCaption`)
8921
+ */ function getImageCaption(jodit, wrapper) {
8922
+ var _a;
8923
+ const markup = jodit.o.imageCaption;
8924
+ if (!markup || !isPart(wrapper, markup.wrapper)) {
8925
+ return null;
8926
+ }
8927
+ return (_a = (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(wrapper.getElementsByTagName(markup.caption.tag)).find((elm)=>isPart(elm, markup.caption))) !== null && _a !== void 0 ? _a : null;
8928
+ }
8929
+ /**
8930
+ * The image in `wrapper` when it is an element holding one image and its
8931
+ * caption (see `imageCaption`)
8932
+ */ function getCaptionedImage(jodit, wrapper) {
8933
+ const caption = getImageCaption(jodit, wrapper);
8934
+ if (!caption) {
8935
+ return null;
8936
+ }
8937
+ const images = wrapper.getElementsByTagName('img');
8938
+ return images.length === 1 && !caption.contains(images[0]) ? images[0] : null;
8939
+ }
8940
+ /**
8941
+ * The element holding an image and its caption (see `imageCaption`) that is
8942
+ * or holds `node`
8943
+ */ function getCaptionWrapper(jodit, node) {
8944
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getCaptionedImage(jodit, elm)), jodit.editor);
8945
+ }
8946
+
8947
+
8879
8948
  /***/ }),
8880
8949
 
8881
8950
  /***/ 43555:
8882
8951
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8883
8952
 
8884
8953
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8885
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.$$; },
8954
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.$$; },
8886
8955
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8887
8956
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8888
8957
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8889
8958
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8890
8959
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8891
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8960
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_29__.LimitedStack; },
8892
8961
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8893
- /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8962
+ /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.UNSAFE_PROTO_KEYS; },
8894
8963
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
8895
8964
  /* harmony export */ alignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.alignElement; },
8896
8965
  /* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.alreadyLoadedList; },
@@ -8901,19 +8970,20 @@ const getClassName = (obj)=>{
8901
8970
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8902
8971
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8903
8972
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8904
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.call; },
8905
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8906
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8973
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.call; },
8974
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callPromise; },
8975
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callThis; },
8907
8976
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8908
8977
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8909
- /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
8978
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearHAlign; },
8979
+ /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.cns; },
8910
8980
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
8911
8981
  /* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
8912
8982
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
8913
- /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8983
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.createMediaWrapper; },
8914
8984
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8915
8985
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8916
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8986
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.cssPath; },
8917
8987
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8918
8988
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8919
8989
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8921,38 +8991,41 @@ const getClassName = (obj)=>{
8921
8991
  /* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
8922
8992
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8923
8993
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8994
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionWrapper; },
8995
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionedImage; },
8924
8996
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8925
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8997
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getDataTransfer; },
8926
8998
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8927
- /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8928
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8929
- /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8930
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8999
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getImageCaption; },
9000
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getMediaWrapper; },
9001
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getPropertyDescriptor; },
9002
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getWrappedMedia; },
9003
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.getXPathByElement; },
8931
9004
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8932
9005
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8933
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.inView; },
9006
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.inView; },
8934
9007
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8935
- /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
9008
+ /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.isUnsafeProtoKey; },
8936
9009
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8937
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.keys; },
8938
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
9010
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.keys; },
9011
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.loadImage; },
8939
9012
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8940
9013
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8941
9014
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8942
- /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8943
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8944
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
9015
+ /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.markDeprecated; },
9016
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.markOwner; },
9017
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.memorizeExec; },
8945
9018
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
8946
- /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8947
- /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8948
- /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8949
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8950
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.refs; },
8951
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_24__.reset; },
8952
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8953
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8954
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_27__.set; },
8955
- /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
9019
+ /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_22__.parseQuery; },
9020
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareEmbedCode; },
9021
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareMedia; },
9022
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_24__.previewBox; },
9023
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.refs; },
9024
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_25__.reset; },
9025
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.resolveElement; },
9026
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.scrollIntoViewIfNeeded; },
9027
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_28__.set; },
9028
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.wrapMedia; }
8956
9029
  /* harmony export */ });
8957
9030
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
8958
9031
  /* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
@@ -8972,18 +9045,19 @@ const getClassName = (obj)=>{
8972
9045
  /* harmony import */ var _get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(94643);
8973
9046
  /* harmony import */ var _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(80568);
8974
9047
  /* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
8975
- /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
8976
- /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
8977
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
8978
- /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
8979
- /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(96437);
8980
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(11628);
8981
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(58844);
8982
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26395);
8983
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76078);
8984
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(3703);
8985
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(50535);
8986
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(37790);
9048
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(68645);
9049
+ /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(69175);
9050
+ /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(95942);
9051
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(61477);
9052
+ /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82501);
9053
+ /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(96437);
9054
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(11628);
9055
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58844);
9056
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(26395);
9057
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76078);
9058
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(3703);
9059
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(50535);
9060
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(37790);
8987
9061
  /*!
8988
9062
  * Jodit Editor (https://xdsoft.net/jodit/)
8989
9063
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9020,6 +9094,7 @@ const getClassName = (obj)=>{
9020
9094
 
9021
9095
 
9022
9096
 
9097
+
9023
9098
 
9024
9099
 
9025
9100
  /***/ }),
@@ -11537,7 +11612,10 @@ class Selection {
11537
11612
  /**
11538
11613
  * Checks whether the editor currently in focus
11539
11614
  */ isFocused() {
11540
- return this.doc.hasFocus && this.doc.hasFocus() && this.area === this.doc.activeElement;
11615
+ const active = this.doc.activeElement;
11616
+ // An editable element inside the editor, as an image's caption, has the
11617
+ // focus while the caret is in it
11618
+ return Boolean(this.doc.hasFocus && this.doc.hasFocus() && active && (this.area === active || _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(active) && active.isContentEditable && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, active)));
11541
11619
  }
11542
11620
  /**
11543
11621
  * Returns the current element under the cursor inside editor
@@ -12005,12 +12083,21 @@ class Selection {
12005
12083
  * there: the arrow keys then have nothing to move from and the selection
12006
12084
  * cannot be escaped. Selecting the island itself keeps the range in editable
12007
12085
  * content, so the caret can step over it. See #1184
12086
+ *
12087
+ * An editable element inside an island, as an image's caption, is editable
12088
+ * content of its own, so the search stops there.
12008
12089
  */ __closestNotEditable(node) {
12009
12090
  const { area } = this;
12010
12091
  let result = null, elm = node.parentNode;
12011
12092
  while(elm && elm !== area && area.contains(elm)){
12012
- if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false') {
12013
- result = elm;
12093
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm)) {
12094
+ const editable = elm.getAttribute('contenteditable');
12095
+ if (editable === 'true') {
12096
+ break;
12097
+ }
12098
+ if (editable === 'false') {
12099
+ result = elm;
12100
+ }
12014
12101
  }
12015
12102
  elm = elm.parentNode;
12016
12103
  }
@@ -12946,7 +13033,7 @@ function elementsEqualAttributes(elm1, elm2) {
12946
13033
  /**
12947
13034
  * Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
12948
13035
  * @private
12949
- */ function toggleOrderedList(commitStyle, li, jodit, mode) {
13036
+ */ function toggleOrderedList(commitStyle, li, jodit, mode, collapsed = false) {
12950
13037
  if (!li) {
12951
13038
  return mode;
12952
13039
  }
@@ -12975,16 +13062,36 @@ function elementsEqualAttributes(elm1, elm2) {
12975
13062
  }
12976
13063
  // ul => ol, ol => ul or ul => ul.class1
12977
13064
  if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
12978
- const wrapper = unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, list, li, jodit, commitStyle);
12979
- const newList = (0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, wrapper, jodit);
13065
+ // With just a caret, Word converts the whole list
13066
+ const items = collapsed && !isSameList ? Array.from(list.children).filter((item)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(item)) : [
13067
+ li
13068
+ ];
13069
+ let newList;
13070
+ for (const item of items){
13071
+ newList = keepNumbering(item, (itemList)=>(0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, itemList, item, jodit, commitStyle), jodit));
13072
+ }
12980
13073
  hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
12981
13074
  return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
12982
13075
  }
12983
13076
  }
12984
- const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"), list, li, jodit, commitStyle);
13077
+ const wrapper = keepNumbering(li, (itemList)=>unwrapList((/* inlined export .UNWRAP */"unwrap"), itemList, li, jodit, commitStyle));
12985
13078
  hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
12986
13079
  return (/* inlined export .UNWRAP */"unwrap");
12987
13080
  }
13081
+ /**
13082
+ * Takes `item` out of its list with `takeOut`, and carries a numbered list's
13083
+ * count on past it, as Word does: 1, a bullet, then 2
13084
+ */ function keepNumbering(item, takeOut) {
13085
+ const list = item.parentElement;
13086
+ const rest = item.nextElementSibling;
13087
+ const next = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol') ? (parseInt(list.getAttribute('start') || '1', 10) || 1) + Array.from(list.children).indexOf(item) : 0;
13088
+ const result = takeOut(list);
13089
+ const restList = rest === null || rest === void 0 ? void 0 : rest.parentElement;
13090
+ if (next && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(restList, 'ol')) {
13091
+ next > 1 ? restList.setAttribute('start', String(next)) : restList.removeAttribute('start');
13092
+ }
13093
+ return result;
13094
+ }
12988
13095
  /**
12989
13096
  * Other attributes, such as a class, still move the items into a new list,
12990
13097
  * where the `beforeWrapList` hook can add markup to each of them
@@ -13745,7 +13852,7 @@ const transactions = {
13745
13852
  exec (value) {
13746
13853
  return {
13747
13854
  ...value,
13748
- mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode),
13855
+ mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode, value.collapsed),
13749
13856
  next: states.END
13750
13857
  };
13751
13858
  }
@@ -16672,6 +16779,35 @@ UISpacer = __decorate([
16672
16779
  /* harmony export */ ]);
16673
16780
 
16674
16781
 
16782
+ /***/ }),
16783
+
16784
+ /***/ 20014:
16785
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16786
+
16787
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16788
+ /* harmony export */ focusFormField: function() { return /* binding */ focusFormField; }
16789
+ /* harmony export */ });
16790
+ /* harmony import */ var _helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4510);
16791
+ /*!
16792
+ * Jodit Editor (https://xdsoft.net/jodit/)
16793
+ * Released under MIT see LICENSE.txt in the project root for license information.
16794
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
16795
+ */ /**
16796
+ * @module ui
16797
+ */
16798
+ /**
16799
+ * Focuses the first text field shown in a form inside `box`, so that typing
16800
+ * fills it in rather than replacing the selected content, as in a dialog. A
16801
+ * form round `box`, as the image properties dialog's round its tabs, doesn't
16802
+ * count, and neither do fields outside a form, as the color picker's
16803
+ */ function focusFormField(box) {
16804
+ var _a;
16805
+ (_a = (0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(box.getElementsByTagName('form')).flatMap((form)=>(0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(form.querySelectorAll('input:not([type]), input[type="text"], input[type="url"], textarea'))).find((field)=>field.offsetParent)) === null || _a === void 0 ? void 0 : _a.focus({
16806
+ preventScroll: true
16807
+ });
16808
+ }
16809
+
16810
+
16675
16811
  /***/ }),
16676
16812
 
16677
16813
  /***/ 72157:
@@ -17999,6 +18135,12 @@ var Jodit_1;
17999
18135
 
18000
18136
 
18001
18137
 
18138
+ const FOCUS_EVENTS = new Set([
18139
+ 'focus',
18140
+ 'blur',
18141
+ 'focusin',
18142
+ 'focusout'
18143
+ ]);
18002
18144
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18003
18145
  const __defaultClassesKey = 'data-jodit-default-classes';
18004
18146
  const NOEDIT = {
@@ -19038,16 +19180,30 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19038
19180
  if (place) {
19039
19181
  this.setCurrentPlace(place);
19040
19182
  }
19041
- }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur', (event)=>{
19183
+ }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur focusin focusout', (event)=>{
19042
19184
  if (this.o.readonly || this.__isSilentChange) {
19043
19185
  return;
19044
19186
  }
19187
+ let type = event.type;
19188
+ // `focus` and `blur` don't bubble from an editable element inside
19189
+ // the editor, as an image's caption, so `focusin` and `focusout`
19190
+ // stand in for them there. The focus moving between the editor
19191
+ // and such an element stays in the editor
19192
+ if (FOCUS_EVENTS.has(type)) {
19193
+ const inner = type === 'focusin' || type === 'focusout';
19194
+ if (inner === (event.target === editor) || _modules_index_js__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(editor, event.relatedTarget)) {
19195
+ return;
19196
+ }
19197
+ if (inner) {
19198
+ type = type === 'focusin' ? 'focus' : 'blur';
19199
+ }
19200
+ }
19045
19201
  const w = this.ew;
19046
19202
  if (event instanceof w.KeyboardEvent && event.isComposing) {
19047
19203
  return;
19048
19204
  }
19049
19205
  if (this.e && this.e.fire) {
19050
- if (this.e.fire(event.type, event) === false) {
19206
+ if (this.e.fire(type, event) === false) {
19051
19207
  return false;
19052
19208
  }
19053
19209
  this.synchronizeValues();
@@ -19353,6 +19509,7 @@ function addClassNames(className, elm) {
19353
19509
  Src: 'Src',
19354
19510
  Title: 'العنوان',
19355
19511
  Alternative: 'العنوان البديل',
19512
+ Caption: 'تسمية توضيحية',
19356
19513
  Link: 'الرابط',
19357
19514
  'Open link in new tab': 'افتح الرابط في نافذة جديدة',
19358
19515
  Image: 'الصورة',
@@ -19384,6 +19541,7 @@ function addClassNames(className, elm) {
19384
19541
  'Insert column after': 'إدراج عمود بعد',
19385
19542
  'Insert row above': 'إدراج صف أعلى',
19386
19543
  'Insert row below': 'إدراج صف أسفل',
19544
+ 'Header row': 'صف الرأس',
19387
19545
  'Delete table': 'حذف الجدول',
19388
19546
  'Delete row': 'حذف الصف',
19389
19547
  'Delete column': 'حذف العمود',
@@ -19597,6 +19755,7 @@ function addClassNames(className, elm) {
19597
19755
  Src: 'Mənbə',
19598
19756
  Title: 'Başlıq',
19599
19757
  Alternative: 'Alternativ mətn',
19758
+ Caption: 'Şəkilaltı yazı',
19600
19759
  Link: 'Keçid',
19601
19760
  'Open link in new tab': 'Keçidi yeni vərəqdə aç',
19602
19761
  Image: 'Şəkil',
@@ -19635,6 +19794,7 @@ function addClassNames(className, elm) {
19635
19794
  'Insert column after': 'Sonrasına sütun əlavə et',
19636
19795
  'Insert row above': 'Yuxarıya sətir əlavə et',
19637
19796
  'Insert row below': 'Aşağıya sətir əlavə et',
19797
+ 'Header row': 'Başlıq sətri',
19638
19798
  'Delete table': 'Cədvəli sil',
19639
19799
  'Delete row': 'Sətri sil',
19640
19800
  'Delete column': 'Sütunu sil',
@@ -19838,6 +19998,7 @@ function addClassNames(className, elm) {
19838
19998
  Src: 'src',
19839
19999
  Title: 'Titulek',
19840
20000
  Alternative: 'Alternativní text (alt)',
20001
+ Caption: 'Titulek',
19841
20002
  Link: 'Link',
19842
20003
  'Open link in new tab': 'Otevřít link v nové záložce',
19843
20004
  Image: 'Obrázek',
@@ -19877,6 +20038,7 @@ function addClassNames(className, elm) {
19877
20038
  'Insert column after': 'Vložit sloupec za',
19878
20039
  'Insert row above': 'Vložit řádek nad',
19879
20040
  'Insert row below': 'Vložit řádek pod',
20041
+ 'Header row': 'Řádek záhlaví',
19880
20042
  'Delete table': 'Vymazat tabulku',
19881
20043
  'Delete row': 'Vymazat řádku',
19882
20044
  'Delete column': 'Vymazat sloupec',
@@ -20075,6 +20237,7 @@ function addClassNames(className, elm) {
20075
20237
  Src: 'Pfad',
20076
20238
  Title: 'Titel',
20077
20239
  Alternative: 'Alternativer Text',
20240
+ Caption: 'Beschriftung',
20078
20241
  Link: 'Link',
20079
20242
  'Open link in new tab': 'Link in neuem Tab öffnen',
20080
20243
  Image: 'Bild',
@@ -20113,6 +20276,7 @@ function addClassNames(className, elm) {
20113
20276
  'Insert column after': 'Spalte danach einfügen',
20114
20277
  'Insert row above': 'Zeile oberhalb einfügen',
20115
20278
  'Insert row below': 'Zeile unterhalb einfügen',
20279
+ 'Header row': 'Kopfzeile',
20116
20280
  'Delete table': 'Tabelle löschen',
20117
20281
  'Delete row': 'Zeile löschen',
20118
20282
  'Delete column': 'Spalte löschen',
@@ -20333,6 +20497,7 @@ function addClassNames(className, elm) {
20333
20497
  Src: 'Fuente',
20334
20498
  Title: 'Título',
20335
20499
  Alternative: 'Texto Alternativo',
20500
+ Caption: 'Leyenda',
20336
20501
  Filter: 'Filtrar',
20337
20502
  Link: 'Vínculo',
20338
20503
  'Open link in new tab': 'Abrir vínculo en nueva pestaña',
@@ -20372,6 +20537,7 @@ function addClassNames(className, elm) {
20372
20537
  'Insert column after': 'Interar columna después',
20373
20538
  'Insert row above': 'Insertar fila arriba',
20374
20539
  'Insert row below': 'Insertar fila debajo',
20540
+ 'Header row': 'Fila de encabezado',
20375
20541
  'Delete table': 'Borrar tabla',
20376
20542
  'Delete row': 'Borrar fila',
20377
20543
  'Delete column': 'Borrar columna',
@@ -20574,6 +20740,7 @@ function addClassNames(className, elm) {
20574
20740
  Src: 'سورس',
20575
20741
  Title: 'عنوان',
20576
20742
  Alternative: 'جایگزین',
20743
+ Caption: 'زیرنویس',
20577
20744
  Link: 'لینک',
20578
20745
  'Open link in new tab': 'باز کزدن لینک در تب جدید',
20579
20746
  Image: 'عکس',
@@ -20612,6 +20779,7 @@ function addClassNames(className, elm) {
20612
20779
  'Insert column after': 'افزودن ستون بعد از',
20613
20780
  'Insert row above': 'افزودن خط قبل از',
20614
20781
  'Insert row below': 'افزودن خط بعد از',
20782
+ 'Header row': 'خط سرآیند',
20615
20783
  'Delete table': 'حذف جدول',
20616
20784
  'Delete row': 'حذف خط',
20617
20785
  'Delete column': 'حذف ستون',
@@ -20810,6 +20978,7 @@ function addClassNames(className, elm) {
20810
20978
  Src: 'Fuente',
20811
20979
  Title: 'Otsikko',
20812
20980
  Alternative: 'Vaihtoehtoinen teksti',
20981
+ Caption: 'Kuvateksti',
20813
20982
  Filter: 'Suodatin',
20814
20983
  Link: 'Linkki',
20815
20984
  'Open link in new tab': 'Avaa uudessa välilehdessä',
@@ -20849,6 +21018,7 @@ function addClassNames(className, elm) {
20849
21018
  'Insert column after': 'Lisää sarake jälkeen',
20850
21019
  'Insert row above': 'Lisää rivi ylös',
20851
21020
  'Insert row below': 'Lisää rivi alle',
21021
+ 'Header row': 'Otsikkorivi',
20852
21022
  'Delete table': 'Poista taulukko',
20853
21023
  'Delete row': 'Poista rivi',
20854
21024
  'Delete column': 'Poista sarake',
@@ -21051,6 +21221,7 @@ function addClassNames(className, elm) {
21051
21221
  Src: 'Source',
21052
21222
  Title: 'Titre',
21053
21223
  Alternative: 'Alternative',
21224
+ Caption: 'Légende',
21054
21225
  Filter: 'Filtre',
21055
21226
  Link: 'Lien',
21056
21227
  'Open link in new tab': 'Ouvrir le lien dans un nouvel onglet',
@@ -21092,6 +21263,7 @@ function addClassNames(className, elm) {
21092
21263
  'Insert column after': 'Insérer une colonne après',
21093
21264
  'Insert row above': 'Insérer une ligne au dessus',
21094
21265
  'Insert row below': 'Insérer une ligne en dessous',
21266
+ 'Header row': 'Ligne d’en-tête',
21095
21267
  'Delete table': 'Supprimer le tableau',
21096
21268
  'Delete row': 'Supprimer la ligne',
21097
21269
  'Delete column': 'Supprimer la colonne',
@@ -21288,6 +21460,7 @@ function addClassNames(className, elm) {
21288
21460
  Src: 'מקור',
21289
21461
  Title: 'כותרת',
21290
21462
  Alternative: 'כיתוב חלופי',
21463
+ Caption: 'כיתוב',
21291
21464
  Link: 'קישור',
21292
21465
  'Open link in new tab': 'פתח בכרטיסיה חדשה',
21293
21466
  Image: 'תמונה',
@@ -21326,6 +21499,7 @@ function addClassNames(className, elm) {
21326
21499
  'Insert column after': 'הכנס עמודה אחרי',
21327
21500
  'Insert row above': 'הכנס שורה מעל',
21328
21501
  'Insert row below': 'הכנס שורה מתחת',
21502
+ 'Header row': 'שורת כותרת',
21329
21503
  'Delete table': 'מחק טבלה',
21330
21504
  'Delete row': 'מחק שורה',
21331
21505
  'Delete column': 'מחק עמודה',
@@ -21526,6 +21700,7 @@ function addClassNames(className, elm) {
21526
21700
  Src: 'Forrás',
21527
21701
  Title: 'Cím',
21528
21702
  Alternative: 'Helyettesítő szöveg',
21703
+ Caption: 'Képaláírás',
21529
21704
  Link: 'Link',
21530
21705
  'Open link in new tab': 'Link megnyitása új lapon',
21531
21706
  Image: 'Kép',
@@ -21564,6 +21739,7 @@ function addClassNames(className, elm) {
21564
21739
  'Insert column after': 'Oszlop beszúrás utána',
21565
21740
  'Insert row above': 'Sor beszúrás fölé',
21566
21741
  'Insert row below': 'Sor beszúrás alá',
21742
+ 'Header row': 'Fejlécsor',
21567
21743
  'Delete table': 'Táblázat törlése',
21568
21744
  'Delete row': 'Sor törlése',
21569
21745
  'Delete column': 'Oszlop törlése',
@@ -21762,6 +21938,7 @@ function addClassNames(className, elm) {
21762
21938
  Src: 'Src',
21763
21939
  Title: 'Judul',
21764
21940
  Alternative: 'Teks alternatif',
21941
+ Caption: 'Keterangan',
21765
21942
  Link: 'Tautan',
21766
21943
  'Open link in new tab': 'Buka tautan di tab baru',
21767
21944
  Image: 'Gambar',
@@ -21801,6 +21978,7 @@ function addClassNames(className, elm) {
21801
21978
  'Insert column after': 'Sisipkan kolom setelahnya',
21802
21979
  'Insert row above': 'Sisipkan baris di atasnya',
21803
21980
  'Insert row below': 'Sisipkan baris di bawahnya',
21981
+ 'Header row': 'Baris header',
21804
21982
  'Delete table': 'Hapus tabel',
21805
21983
  'Delete row': 'Hapus baris',
21806
21984
  'Delete column': 'Hapus kolom',
@@ -21999,6 +22177,7 @@ function addClassNames(className, elm) {
21999
22177
  Src: 'Fonte',
22000
22178
  Title: 'Titolo',
22001
22179
  Alternative: 'Testo Alternativo',
22180
+ Caption: 'Didascalia',
22002
22181
  Link: 'Link',
22003
22182
  'Open link in new tab': 'Apri il link in una nuova scheda',
22004
22183
  Image: 'Immagine',
@@ -22037,6 +22216,7 @@ function addClassNames(className, elm) {
22037
22216
  'Insert column after': 'Inserisci la colonna dopo',
22038
22217
  'Insert row above': 'Inserisci la riga sopra',
22039
22218
  'Insert row below': 'Inserisci la riga sotto',
22219
+ 'Header row': 'Riga di intestazione',
22040
22220
  'Delete table': 'Elimina tabella',
22041
22221
  'Delete row': 'Elimina riga',
22042
22222
  'Delete column': 'Elimina colonna',
@@ -22240,6 +22420,7 @@ function addClassNames(className, elm) {
22240
22420
  Src: 'ソース',
22241
22421
  Title: 'タイトル',
22242
22422
  Alternative: '代替テキスト',
22423
+ Caption: 'キャプション',
22243
22424
  Link: 'リンク',
22244
22425
  'Open link in new tab': '新しいタブで開く',
22245
22426
  Image: '画像',
@@ -22278,6 +22459,7 @@ function addClassNames(className, elm) {
22278
22459
  'Insert column after': '右に列を挿入',
22279
22460
  'Insert row above': '上に行を挿入',
22280
22461
  'Insert row below': '下に行を挿入',
22462
+ 'Header row': 'ヘッダー行',
22281
22463
  'Delete table': '表を削除',
22282
22464
  'Delete row': '行を削除',
22283
22465
  'Delete column': '列を削除',
@@ -22492,6 +22674,7 @@ function addClassNames(className, elm) {
22492
22674
  Src: '경로(src)',
22493
22675
  Title: '제목',
22494
22676
  Alternative: '대체 텍스트(alt)',
22677
+ Caption: '캡션',
22495
22678
  Link: '링크',
22496
22679
  'Open link in new tab': '새 탭에서 열기',
22497
22680
  file: '파일',
@@ -22530,6 +22713,7 @@ function addClassNames(className, elm) {
22530
22713
  'Insert column after': '다음 열에 삽입',
22531
22714
  'Insert row above': '위 행에 삽입',
22532
22715
  'Insert row below': '아래 행에 삽입',
22716
+ 'Header row': '머리글 행',
22533
22717
  'Delete table': '테이블 삭제',
22534
22718
  'Delete row': '행 삭제',
22535
22719
  'Delete column': '열 삭제',
@@ -22728,6 +22912,7 @@ function addClassNames(className, elm) {
22728
22912
  Src: 'Эх үүсвэр',
22729
22913
  Title: 'Гарчиг',
22730
22914
  Alternative: 'Алтернатив текст',
22915
+ Caption: 'Тайлбар',
22731
22916
  Link: 'Холбоос',
22732
22917
  'Open link in new tab': 'Холбоосыг шинэ хавтсанд нээх',
22733
22918
  Image: 'Зураг',
@@ -22766,6 +22951,7 @@ function addClassNames(className, elm) {
22766
22951
  'Insert column after': 'Ард нь багана нэмэх',
22767
22952
  'Insert row above': 'Дээр нь мөр нэмэх',
22768
22953
  'Insert row below': 'Доор нь мөр нэмэх',
22954
+ 'Header row': 'Толгой мөр',
22769
22955
  'Delete table': 'Хүснэгт устгах',
22770
22956
  'Delete row': 'Мөр устгах',
22771
22957
  'Delete column': 'Багана устгах',
@@ -22965,6 +23151,7 @@ function addClassNames(className, elm) {
22965
23151
  Src: 'Src',
22966
23152
  Title: 'Titel',
22967
23153
  Alternative: 'Alternatieve tekst',
23154
+ Caption: 'Bijschrift',
22968
23155
  Link: 'Link',
22969
23156
  'Open link in new tab': 'Link in nieuwe tab openen',
22970
23157
  Image: 'Afbeelding',
@@ -23003,6 +23190,7 @@ function addClassNames(className, elm) {
23003
23190
  'Insert column after': 'Kolom invoegen (na)',
23004
23191
  'Insert row above': 'Rij invoegen (boven)',
23005
23192
  'Insert row below': 'Rij invoegen (onder)',
23193
+ 'Header row': 'Koprij',
23006
23194
  'Delete table': 'Tabel verwijderen',
23007
23195
  'Delete row': 'Rij verwijderen',
23008
23196
  'Delete column': 'Kolom verwijderen',
@@ -23200,6 +23388,7 @@ function addClassNames(className, elm) {
23200
23388
  Src: 'Kilde',
23201
23389
  Title: 'Tittel',
23202
23390
  Alternative: 'Alternativ',
23391
+ Caption: 'Bildetekst',
23203
23392
  Filter: 'Filter',
23204
23393
  Link: 'Lenke',
23205
23394
  'Open link in new tab': 'Åpne lenke i ny fane',
@@ -23241,6 +23430,7 @@ function addClassNames(className, elm) {
23241
23430
  'Insert column after': 'Sett inn kolonne etter',
23242
23431
  'Insert row above': 'Sett inn rad over',
23243
23432
  'Insert row below': 'Sett inn rad under',
23433
+ 'Header row': 'Overskriftsrad',
23244
23434
  'Delete table': 'Slett tabell',
23245
23435
  'Delete row': 'Slett rad',
23246
23436
  'Delete column': 'Slett kolonne',
@@ -23446,6 +23636,7 @@ function addClassNames(className, elm) {
23446
23636
  Src: 'Źródło',
23447
23637
  Title: 'Tytuł',
23448
23638
  Alternative: 'Tekst alternatywny',
23639
+ Caption: 'Podpis',
23449
23640
  Link: 'Link',
23450
23641
  'Open link in new tab': 'Otwórz w nowej zakładce',
23451
23642
  Image: 'Grafika',
@@ -23484,6 +23675,7 @@ function addClassNames(className, elm) {
23484
23675
  'Insert column after': 'Wstaw kolumnę po',
23485
23676
  'Insert row above': 'Wstaw wiersz przed',
23486
23677
  'Insert row below': 'Wstaw wiersz po',
23678
+ 'Header row': 'Wiersz nagłówka',
23487
23679
  'Delete table': 'Usuń tabelę',
23488
23680
  'Delete row': 'Usuń wiersz',
23489
23681
  'Delete column': 'Usuń kolumnę',
@@ -23682,6 +23874,7 @@ function addClassNames(className, elm) {
23682
23874
  Src: 'Fonte',
23683
23875
  Title: 'Título',
23684
23876
  Alternative: 'Texto Alternativo',
23877
+ Caption: 'Legenda',
23685
23878
  Link: 'Link',
23686
23879
  'Open link in new tab': 'Abrir link em nova aba',
23687
23880
  Image: 'Imagem',
@@ -23720,6 +23913,7 @@ function addClassNames(className, elm) {
23720
23913
  'Insert column after': 'Inserir coluna depois',
23721
23914
  'Insert row above': 'Inserir linha acima',
23722
23915
  'Insert row below': 'Inserir linha abaixo',
23916
+ 'Header row': 'Linha de cabeçalho',
23723
23917
  'Delete table': 'Excluir tabela',
23724
23918
  'Delete row': 'Excluir linha',
23725
23919
  'Delete column': 'Excluir coluna',
@@ -23922,6 +24116,7 @@ function addClassNames(className, elm) {
23922
24116
  Src: 'src',
23923
24117
  Title: 'Заголовок',
23924
24118
  Alternative: 'Альтернативный текст (alt)',
24119
+ Caption: 'Подпись',
23925
24120
  Link: 'Ссылка',
23926
24121
  'Open link in new tab': 'Открывать ссылку в новом окне',
23927
24122
  file: 'Файл',
@@ -23960,6 +24155,7 @@ function addClassNames(className, elm) {
23960
24155
  'Insert column after': 'Вставить столбец после',
23961
24156
  'Insert row above': 'Вставить ряд выше',
23962
24157
  'Insert row below': 'Вставить ряд ниже',
24158
+ 'Header row': 'Строка заголовка',
23963
24159
  'Delete table': 'Удалить таблицу',
23964
24160
  'Delete row': 'Удалять ряд',
23965
24161
  'Delete column': 'Удалить столбец',
@@ -24158,6 +24354,7 @@ function addClassNames(className, elm) {
24158
24354
  Src: 'Zdroj',
24159
24355
  Title: 'Názov',
24160
24356
  Alternative: 'Alternatívny text (alt)',
24357
+ Caption: 'Popis',
24161
24358
  Link: 'Odkaz',
24162
24359
  'Open link in new tab': 'Otvoriť odkaz na novej karte',
24163
24360
  Image: 'Obrázok',
@@ -24196,6 +24393,7 @@ function addClassNames(className, elm) {
24196
24393
  'Insert column after': 'Vložiť stĺpec za',
24197
24394
  'Insert row above': 'Vložiť riadok nad',
24198
24395
  'Insert row below': 'Vložiť riadok pod',
24396
+ 'Header row': 'Riadok hlavičky',
24199
24397
  'Delete table': 'Odstrániť tabuľku',
24200
24398
  'Delete row': 'Odstrániť riadok',
24201
24399
  'Delete column': 'Odstrániť stĺpec',
@@ -24400,6 +24598,7 @@ function addClassNames(className, elm) {
24400
24598
  Src: 'Källa',
24401
24599
  Title: 'Titel',
24402
24600
  Alternative: 'Alternativ',
24601
+ Caption: 'Bildtext',
24403
24602
  Filter: 'Filter',
24404
24603
  Link: 'Länk',
24405
24604
  'Open link in new tab': 'Öppna länk i ny flik',
@@ -24441,6 +24640,7 @@ function addClassNames(className, elm) {
24441
24640
  'Insert column after': 'Infoga kolumn efter',
24442
24641
  'Insert row above': 'Infoga rad ovanför',
24443
24642
  'Insert row below': 'Infoga rad nedanför',
24643
+ 'Header row': 'Rubrikrad',
24444
24644
  'Delete table': 'Radera tabell',
24445
24645
  'Delete row': 'Radera rad',
24446
24646
  'Delete column': 'Radera kolumn',
@@ -24645,6 +24845,7 @@ function addClassNames(className, elm) {
24645
24845
  Src: 'Kaynak',
24646
24846
  Title: 'Başlık',
24647
24847
  Alternative: 'Alternatif Yazı',
24848
+ Caption: 'Resim yazısı',
24648
24849
  Link: 'Link',
24649
24850
  'Open link in new tab': 'Bağlantıyı yeni sekmede aç',
24650
24851
  Image: 'Resim',
@@ -24683,6 +24884,7 @@ function addClassNames(className, elm) {
24683
24884
  'Insert column after': 'Sonrasına kolon ekle',
24684
24885
  'Insert row above': 'Üstüne satır ekle',
24685
24886
  'Insert row below': 'Altına satır ekle',
24887
+ 'Header row': 'Başlık satırı',
24686
24888
  'Delete table': 'Tabloyu sil',
24687
24889
  'Delete row': 'Satırı sil',
24688
24890
  'Delete column': 'Kolonu sil',
@@ -24880,6 +25082,7 @@ function addClassNames(className, elm) {
24880
25082
  Src: 'src',
24881
25083
  Title: 'Заголовок',
24882
25084
  Alternative: 'Альтернативний текст (alt)',
25085
+ Caption: 'Підпис',
24883
25086
  Link: 'Посилання',
24884
25087
  'Open link in new tab': 'Відкрити посилання в новій вкладці',
24885
25088
  file: 'Файл',
@@ -24918,6 +25121,7 @@ function addClassNames(className, elm) {
24918
25121
  'Insert column after': 'Вставити стовпець після',
24919
25122
  'Insert row above': 'Вставити рядок вище',
24920
25123
  'Insert row below': 'Вставити рядок нижче',
25124
+ 'Header row': 'Рядок заголовка',
24921
25125
  'Delete table': 'Видалити таблицю',
24922
25126
  'Delete row': 'Видалити рядок',
24923
25127
  'Delete column': 'Видалити стовпчик',
@@ -25117,6 +25321,7 @@ function addClassNames(className, elm) {
25117
25321
  Src: 'Src',
25118
25322
  Title: 'Title',
25119
25323
  Alternative: 'Alternative',
25324
+ Caption: '题注',
25120
25325
  Link: 'Link',
25121
25326
  'Open link in new tab': '在新窗口打开链接',
25122
25327
  Image: '图片',
@@ -25155,6 +25360,7 @@ function addClassNames(className, elm) {
25155
25360
  'Insert column after': '在之后插入列',
25156
25361
  'Insert row above': '在之前插入行',
25157
25362
  'Insert row below': '在之后插入行',
25363
+ 'Header row': '标题行',
25158
25364
  'Delete table': '删除表格',
25159
25365
  'Delete row': '删除行',
25160
25366
  'Delete column': '删除列',
@@ -25353,6 +25559,7 @@ function addClassNames(className, elm) {
25353
25559
  Src: 'Src',
25354
25560
  Title: 'Title',
25355
25561
  Alternative: '替代',
25562
+ Caption: '標號',
25356
25563
  Link: 'Link',
25357
25564
  'Open link in new tab': '在新分頁開啟連結',
25358
25565
  Image: '圖片',
@@ -25391,6 +25598,7 @@ function addClassNames(className, elm) {
25391
25598
  'Insert column after': '插入右方欄',
25392
25599
  'Insert row above': '插入上方列',
25393
25600
  'Insert row below': '插入下方列',
25601
+ 'Header row': '標題列',
25394
25602
  'Delete table': '刪除表格',
25395
25603
  'Delete row': '刪除整列',
25396
25604
  'Delete column': '刪除整欄',
@@ -30420,6 +30628,11 @@ StatusBar = __decorate([
30420
30628
 
30421
30629
 
30422
30630
 
30631
+ const SECTIONS = new Set([
30632
+ 'thead',
30633
+ 'tbody',
30634
+ 'tfoot'
30635
+ ]);
30423
30636
  const markedValue = new WeakMap();
30424
30637
  class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
30425
30638
  /** @override */ className() {
@@ -30578,7 +30791,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30578
30791
  }
30579
30792
  });
30580
30793
  }
30581
- if (after && line && line.nextSibling) {
30794
+ const section = line && line.parentElement;
30795
+ // Below the header rows, a row is a body row
30796
+ if (after && line && !line.nextElementSibling && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, 'thead')) {
30797
+ const body = Table.__bodyOf(table, section, create);
30798
+ body.insertBefore(row, body.firstChild);
30799
+ Table.__setCellsTag(row, 'td', create);
30800
+ } else if (after && line && line.nextSibling) {
30582
30801
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
30583
30802
  } else if (!after && line) {
30584
30803
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
@@ -30586,6 +30805,79 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30586
30805
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.first(table, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'tbody')) || table, row);
30587
30806
  }
30588
30807
  }
30808
+ /**
30809
+ * The table's first `<tbody>`, made after `head` when there's none
30810
+ */ static __bodyOf(table, head, create) {
30811
+ let body = table.tBodies[0];
30812
+ if (!body) {
30813
+ body = create.element('tbody');
30814
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(head, body);
30815
+ }
30816
+ return body;
30817
+ }
30818
+ /**
30819
+ * Makes the row's cells `<td>`, or `<th>` with a column scope unless they
30820
+ * have one, keeping their content and attributes. The cells it replaces
30821
+ * go in `replaced`, with their replacements
30822
+ */ static __setCellsTag(row, tag, create, replaced) {
30823
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).forEach((cell)=>{
30824
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(cell, tag) ? cell : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.replace(cell, tag, create, true);
30825
+ if (next !== cell) {
30826
+ replaced === null || replaced === void 0 ? void 0 : replaced.set(cell, next);
30827
+ }
30828
+ if (tag === 'td') {
30829
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', null);
30830
+ } else if (!next.hasAttribute('scope')) {
30831
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', 'col');
30832
+ }
30833
+ });
30834
+ }
30835
+ /**
30836
+ * The table has a header row: a `<thead>` with a row in it
30837
+ */ hasHeaderRow(table) {
30838
+ var _a;
30839
+ return Boolean((_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows.length);
30840
+ }
30841
+ /**
30842
+ * Header rows can always go back into the body. The first row can become
30843
+ * one unless a cell in it spans into the next, as a span can't cross from
30844
+ * the `<thead>` into the `<tbody>`
30845
+ */ canToggleHeaderRow(table) {
30846
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
30847
+ return this.hasHeaderRow(table) || Boolean(row && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).every((cell)=>cell.rowSpan < 2));
30848
+ }
30849
+ /**
30850
+ * Moves the first row into a `<thead>`, its cells becoming
30851
+ * `<th scope="col">`, or the header rows back to the start of the
30852
+ * `<tbody>` as `<td>`. Their content, attributes and spans stay. Returns
30853
+ * the cells it replaced, with their replacements
30854
+ */ toggleHeaderRow(table) {
30855
+ const replaced = new Map();
30856
+ const create = this.j.createInside;
30857
+ const head = table.tHead;
30858
+ if (!this.canToggleHeaderRow(table)) {
30859
+ return replaced;
30860
+ }
30861
+ if (head && this.hasHeaderRow(table)) {
30862
+ const body = Table.__bodyOf(table, head, create);
30863
+ const first = body.firstChild;
30864
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(head.rows).forEach((row)=>{
30865
+ body.insertBefore(row, first);
30866
+ Table.__setCellsTag(row, 'td', create, replaced);
30867
+ });
30868
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
30869
+ } else {
30870
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
30871
+ const thead = head || create.element('thead');
30872
+ if (!head) {
30873
+ // Setting it puts it after a caption and column groups
30874
+ table.tHead = thead;
30875
+ }
30876
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(thead, row);
30877
+ Table.__setCellsTag(row, 'th', create, replaced);
30878
+ }
30879
+ return replaced;
30880
+ }
30589
30881
  /**
30590
30882
  * Inserts a new line after row what contains the selected cell
30591
30883
  *
@@ -30642,7 +30934,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30642
30934
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
30643
30935
  }
30644
30936
  });
30937
+ const section = row.parentElement;
30645
30938
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
30939
+ // A section left without rows goes too, so a table whose header row
30940
+ // was deleted has no `<thead>`
30941
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, SECTIONS) && !section.rows.length) {
30942
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(section);
30943
+ }
30646
30944
  }
30647
30945
  /**
30648
30946
  * Remove row
@@ -31066,7 +31364,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31066
31364
  const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
31067
31365
  selector && selectors.push(selector);
31068
31366
  });
31069
- style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
31367
+ // Across cells, the browser's own text selection, which a drag makes
31368
+ // as well, isn't shown
31369
+ const hidden = selectors.length > 1 ? selectors.map((selector)=>`${selector}::selection,${selector} ::selection`).join(',') + '{background:transparent}' : '';
31370
+ style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` + hidden : '';
31070
31371
  });
31071
31372
  }
31072
31373
  }
@@ -31100,10 +31401,11 @@ const instance = (j)=>j.getInstance('Table', j.o);
31100
31401
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
31101
31402
  /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37790);
31102
31403
  /* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62843);
31103
- /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(72157);
31104
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12153);
31105
- /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56917);
31106
- /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(21491);
31404
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20014);
31405
+ /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72157);
31406
+ /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12153);
31407
+ /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(56917);
31408
+ /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21491);
31107
31409
  /*!
31108
31410
  * Jodit Editor (https://xdsoft.net/jodit/)
31109
31411
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -31134,6 +31436,7 @@ const instance = (j)=>j.getInstance('Table', j.o);
31134
31436
 
31135
31437
 
31136
31438
 
31439
+
31137
31440
 
31138
31441
 
31139
31442
  const INPUT_TAGS = new Set([
@@ -31239,7 +31542,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31239
31542
  configurable: true
31240
31543
  });
31241
31544
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(container, button);
31242
- const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.get('chevron')}</span>`);
31545
+ const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.get('chevron')}</span>`);
31243
31546
  // For caching
31244
31547
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(button, trigger);
31245
31548
  return container;
@@ -31296,7 +31599,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31296
31599
  state.icon.iconURL = ctr.iconURL;
31297
31600
  } else {
31298
31601
  const name = ctr.icon || ctr.name;
31299
- state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
31602
+ state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
31300
31603
  }
31301
31604
  if (!ctr.iconURL && !state.icon.name) {
31302
31605
  state.text = ctr.text || ctr.name;
@@ -31327,6 +31630,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31327
31630
  const elm = ctr.popup(this.j, target, this.__closePopup, this);
31328
31631
  if (elm) {
31329
31632
  popup.setContent((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? this.j.c.fromHTML(elm) : elm).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
31633
+ // The focus stays in the content for a list, which
31634
+ // typing searches, but goes to a form, as in a dialog
31635
+ (0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__.focusFormField)(popup.container);
31330
31636
  } else {
31331
31637
  this.__closePopup();
31332
31638
  }
@@ -31469,7 +31775,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31469
31775
  * Create an open popup list
31470
31776
  */ __openControlList(control) {
31471
31777
  var _a, _b, _c, _d, _e;
31472
- 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);
31778
+ 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_19__.findControlType)(key, controls);
31473
31779
  const list = control.list;
31474
31780
  const menu = this.openPopup();
31475
31781
  menu.parentElement = this;
@@ -31477,7 +31783,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31477
31783
  if (content) {
31478
31784
  return this.__openMenu(menu, content);
31479
31785
  }
31480
- const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
31786
+ const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_22__.makeCollection)(this.j);
31481
31787
  toolbar.parentElement = menu;
31482
31788
  toolbar.mode = 'vertical';
31483
31789
  const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
@@ -31544,7 +31850,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31544
31850
  }
31545
31851
  openPopup() {
31546
31852
  this.__closePopup();
31547
- this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
31853
+ this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__.Popup(this.j, false);
31548
31854
  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);
31549
31855
  return this.openedPopup;
31550
31856
  }
@@ -31562,15 +31868,18 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31562
31868
  this.openedPopup = null;
31563
31869
  this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
31564
31870
  // The keyboard brought the focus into the dropdown: give it back to
31565
- // the button, otherwise it would fall out to the document
31566
- const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
31871
+ // the button, otherwise it would fall out to the document. A form
31872
+ // gives it back to the content, with the selection it was opened for
31873
+ const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement), inForm = hadFocus && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.closest(activeElement, 'form', popup.container);
31567
31874
  this.state.activated = false;
31568
31875
  popup.close();
31569
31876
  popup.destruct();
31570
31877
  if (this.trigger) {
31571
31878
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__.attr)(this.trigger, 'aria-expanded', false);
31572
31879
  }
31573
- if (hadFocus) {
31880
+ if (inForm && (0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_9__.isJoditObject)(this.j)) {
31881
+ this.j.s.focus();
31882
+ } else if (hadFocus) {
31574
31883
  this.focus();
31575
31884
  }
31576
31885
  }
@@ -32554,6 +32863,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32554
32863
  continue;
32555
32864
  }
32556
32865
  const reader = new FileReader();
32866
+ const { name } = file;
32557
32867
  const readerPromise = uploader.j.async.promise((resolve, reject)=>{
32558
32868
  reader.onerror = reject;
32559
32869
  reader.onloadend = ()=>{
@@ -32564,6 +32874,9 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32564
32874
  ],
32565
32875
  isImages: [
32566
32876
  true
32877
+ ],
32878
+ fileNames: [
32879
+ name
32567
32880
  ]
32568
32881
  };
32569
32882
  const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
@@ -33197,6 +33510,7 @@ function val(elm, name, value) {
33197
33510
  /* harmony import */ var _core_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23282);
33198
33511
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29960);
33199
33512
  /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67510);
33513
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20014);
33200
33514
  /*!
33201
33515
  * Jodit Editor (https://xdsoft.net/jodit/)
33202
33516
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33206,6 +33520,7 @@ function val(elm, name, value) {
33206
33520
 
33207
33521
 
33208
33522
 
33523
+
33209
33524
  /**
33210
33525
  * Build tabs system
33211
33526
  *
@@ -33286,6 +33601,7 @@ function val(elm, name, value) {
33286
33601
  if (state) {
33287
33602
  state.activeTab = name;
33288
33603
  }
33604
+ ;(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__.focusFormField)(tab);
33289
33605
  return false;
33290
33606
  });
33291
33607
  nameToTab[name] = {
@@ -34220,49 +34536,50 @@ UiAiAssistant = __decorate([
34220
34536
  /* harmony import */ var _hr_hr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16233);
34221
34537
  /* harmony import */ var _iframe_iframe_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(77469);
34222
34538
  /* harmony import */ var _image_image_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(23531);
34223
- /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(80763);
34224
- /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(3215);
34225
- /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(70045);
34226
- /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(93401);
34227
- /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76295);
34228
- /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(59483);
34229
- /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(91071);
34230
- /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(61019);
34231
- /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(65517);
34232
- /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(20071);
34233
- /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(32309);
34234
- /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(64837);
34235
- /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(79799);
34236
- /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31571);
34237
- /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(85407);
34238
- /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(59451);
34239
- /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(18363);
34240
- /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(8355);
34241
- /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(58519);
34242
- /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(6687);
34243
- /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(56113);
34244
- /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(9159);
34245
- /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(12019);
34246
- /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(36125);
34247
- /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(9881);
34248
- /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(28545);
34249
- /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(45927);
34250
- /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(52951);
34251
- /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(43809);
34252
- /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(7309);
34253
- /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(68687);
34254
- /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(59495);
34255
- /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(39627);
34256
- /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(767);
34257
- /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(43003);
34258
- /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(72439);
34259
- /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(94529);
34260
- /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(26551);
34261
- /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(96139);
34262
- /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(72253);
34263
- /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(65735);
34264
- /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(83671);
34265
- /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(3115);
34539
+ /* harmony import */ var _image_caption_image_caption_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84571);
34540
+ /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(80763);
34541
+ /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3215);
34542
+ /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(70045);
34543
+ /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(93401);
34544
+ /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76295);
34545
+ /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(59483);
34546
+ /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(91071);
34547
+ /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(61019);
34548
+ /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(65517);
34549
+ /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(20071);
34550
+ /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(32309);
34551
+ /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(64837);
34552
+ /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(79799);
34553
+ /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(31571);
34554
+ /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(85407);
34555
+ /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(59451);
34556
+ /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(18363);
34557
+ /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(8355);
34558
+ /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(58519);
34559
+ /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(6687);
34560
+ /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(56113);
34561
+ /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(9159);
34562
+ /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(12019);
34563
+ /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(36125);
34564
+ /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(9881);
34565
+ /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(28545);
34566
+ /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(45927);
34567
+ /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(52951);
34568
+ /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(43809);
34569
+ /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(7309);
34570
+ /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(68687);
34571
+ /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(59495);
34572
+ /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(39627);
34573
+ /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(767);
34574
+ /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(43003);
34575
+ /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(72439);
34576
+ /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(94529);
34577
+ /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(26551);
34578
+ /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(96139);
34579
+ /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(72253);
34580
+ /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(65735);
34581
+ /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(83671);
34582
+ /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(3115);
34266
34583
  /*!
34267
34584
  * Jodit Editor (https://xdsoft.net/jodit/)
34268
34585
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34334,6 +34651,7 @@ UiAiAssistant = __decorate([
34334
34651
 
34335
34652
 
34336
34653
 
34654
+
34337
34655
 
34338
34656
 
34339
34657
  // JODIT-START:FAT
@@ -34422,6 +34740,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34422
34740
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, fakeNode)) {
34423
34741
  return;
34424
34742
  }
34743
+ // An editable element inside non-editable content, as an image's
34744
+ // caption is, keeps the caret, so nothing past its edge goes
34745
+ const host = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, (elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(elm) && elm.hasAttribute('contenteditable') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(elm.parentNode, jodit.editor), jodit.editor);
34746
+ if (host && sel.cursorInTheEdge(backspace, host, fakeNode)) {
34747
+ return false;
34748
+ }
34425
34749
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
34426
34750
  return false;
34427
34751
  }
@@ -34470,7 +34794,13 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34470
34794
  if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
34471
34795
  return;
34472
34796
  }
34473
- const text = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
34797
+ // The search for text skips text of only non-breaking spaces, but the
34798
+ // browser types after it
34799
+ let before = fakeNode.previousSibling;
34800
+ while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && !/\S|\u00A0/.test(before.data)){
34801
+ before = before.previousSibling;
34802
+ }
34803
+ const text = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) ? before : (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
34474
34804
  const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
34475
34805
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(text) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(text, jodit.editor) || link && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(link, fakeNode) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor) !== _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) {
34476
34806
  return;
@@ -35046,7 +35376,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
35046
35376
  }
35047
35377
  if (charRemoved) {
35048
35378
  removeEmptyForParent(fakeNode, 'a');
35049
- addBRInsideEmptyBlock(jodit, fakeNode);
35379
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, fakeNode);
35050
35380
  jodit.s.setCursorBefore(fakeNode);
35051
35381
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(fakeNode.previousSibling, 'br') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, false)) {
35052
35382
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fakeNode, jodit.createInside.element('br'));
@@ -35081,13 +35411,6 @@ function getNextInlineSibling(sibling, backspace, root) {
35081
35411
  parent = p;
35082
35412
  }
35083
35413
  }
35084
- /**
35085
- * Helper add BR element inside empty block element
35086
- */ function addBRInsideEmptyBlock(jodit, node) {
35087
- if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode)) {
35088
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(node, jodit.createInside.element('br'));
35089
- }
35090
- }
35091
35414
  function tryRemoveChar(sibling, backspace, step, anotherSibling) {
35092
35415
  // For Unicode escapes
35093
35416
  let value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
@@ -35651,6 +35974,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35651
35974
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35652
35975
 
35653
35976
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35977
+ /* harmony export */ addBRInsideEmptyBlock: function() { return /* binding */ addBRInsideEmptyBlock; },
35654
35978
  /* harmony export */ findMostNestedNeighbor: function() { return /* binding */ findMostNestedNeighbor; },
35655
35979
  /* harmony export */ getMoveFilter: function() { return /* binding */ getMoveFilter; }
35656
35980
  /* harmony export */ });
@@ -35686,6 +36010,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35686
36010
  */ function getMoveFilter(jodit) {
35687
36011
  return (node)=>jodit.e.fire('backSpaceIsMovedIgnore', node) !== true;
35688
36012
  }
36013
+ /**
36014
+ * Helper add BR element inside empty block element
36015
+ * @private
36016
+ */ function addBRInsideEmptyBlock(jodit, node) {
36017
+ if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmptyTextNode)) {
36018
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(node, jodit.createInside.element('br'));
36019
+ }
36020
+ }
35689
36021
 
35690
36022
 
35691
36023
  /***/ }),
@@ -36103,7 +36435,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
36103
36435
  beforeCommand(command) {
36104
36436
  if (command.toLowerCase() === 'removeformat') {
36105
36437
  if (this.j.s.isCollapsed()) {
36106
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
36438
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForWord)(this.j);
36107
36439
  } else {
36108
36440
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
36109
36441
  }
@@ -36399,16 +36731,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36399
36731
 
36400
36732
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36401
36733
  /* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
36402
- /* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
36403
36734
  /* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
36404
- /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
36405
- /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__.visitNodeWalker; }
36735
+ /* harmony export */ removeFormatForWord: function() { return /* reexport safe */ _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__.removeFormatForWord; },
36736
+ /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__.removePlaceholderBr; },
36737
+ /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__.visitNodeWalker; }
36406
36738
  /* harmony export */ });
36407
36739
  /* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
36408
36740
  /* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
36409
36741
  /* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
36410
- /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
36411
- /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39516);
36742
+ /* harmony import */ var _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70464);
36743
+ /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56385);
36744
+ /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39516);
36412
36745
  /*!
36413
36746
  * Jodit Editor (https://xdsoft.net/jodit/)
36414
36747
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36423,6 +36756,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36423
36756
 
36424
36757
 
36425
36758
 
36759
+
36426
36760
  /***/ }),
36427
36761
 
36428
36762
  /***/ 15908:
@@ -36575,6 +36909,126 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
36575
36909
  }
36576
36910
 
36577
36911
 
36912
+ /***/ }),
36913
+
36914
+ /***/ 70464:
36915
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36916
+
36917
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36918
+ /* harmony export */ removeFormatForWord: function() { return /* binding */ removeFormatForWord; }
36919
+ /* harmony export */ });
36920
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
36921
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
36922
+ /* harmony import */ var _remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
36923
+ /*!
36924
+ * Jodit Editor (https://xdsoft.net/jodit/)
36925
+ * Released under MIT see LICENSE.txt in the project root for license information.
36926
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
36927
+ */
36928
+
36929
+
36930
+ /**
36931
+ * With just a caret, Word clears the formatting of the word the caret is
36932
+ * inside, and does nothing at a word's start or end. This selects the word,
36933
+ * clears it as a selection, and puts the caret back where it was.
36934
+ * @private
36935
+ */ function removeFormatForWord(jodit) {
36936
+ const { range } = jodit.s;
36937
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
36938
+ if (!block) {
36939
+ return;
36940
+ }
36941
+ const texts = textsOf(block);
36942
+ const text = texts.map((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.nodeValue : ' ').join('');
36943
+ const at = textOffset(texts, range);
36944
+ if (!isWordChar(text[at - 1]) || !isWordChar(text[at])) {
36945
+ return;
36946
+ }
36947
+ let start = at, end = at;
36948
+ while(isWordChar(text[start - 1])){
36949
+ start -= 1;
36950
+ }
36951
+ while(isWordChar(text[end])){
36952
+ end += 1;
36953
+ }
36954
+ const word = jodit.s.createRange();
36955
+ word.setStart(...positionAt(texts, start, true));
36956
+ word.setEnd(...positionAt(texts, end, false));
36957
+ jodit.s.selectRange(word);
36958
+ (0,_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection)(jodit);
36959
+ // The text is the same, so the caret goes back to the same character
36960
+ const caret = jodit.s.createRange();
36961
+ caret.setStart(...positionAt(textsOf(block), at, false));
36962
+ jodit.s.selectRange(caret);
36963
+ }
36964
+ function isWordChar(char) {
36965
+ return Boolean(char && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && /\S/.test(char));
36966
+ }
36967
+ /**
36968
+ * The block's own text nodes, in order, leaving out those of blocks inside
36969
+ * it. A line break, an image or another inseparable element ends a word, so
36970
+ * it is kept as a one-character piece
36971
+ */ function textsOf(block) {
36972
+ const texts = [];
36973
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
36974
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, block)) {
36975
+ return;
36976
+ }
36977
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
36978
+ texts.push(node);
36979
+ }
36980
+ });
36981
+ return texts;
36982
+ }
36983
+ function lengthOf(piece) {
36984
+ var _a, _b;
36985
+ return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? (_b = (_a = piece.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0 : 1;
36986
+ }
36987
+ /**
36988
+ * How many characters of `texts` come before the caret, which can be in a
36989
+ * text node or between nodes
36990
+ */ function textOffset(texts, caret) {
36991
+ let at = 0;
36992
+ for (const piece of texts){
36993
+ if (piece === caret.startContainer) {
36994
+ return at + caret.startOffset;
36995
+ }
36996
+ const length = lengthOf(piece);
36997
+ // This piece ends after the caret, so the caret is before it
36998
+ if (caret.comparePoint(piece, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? length : 0) > 0) {
36999
+ return at;
37000
+ }
37001
+ at += length;
37002
+ }
37003
+ return at;
37004
+ }
37005
+ /**
37006
+ * The text node and offset of the `at`th character. Where two text nodes
37007
+ * meet, `later` picks the start of the second over the end of the first
37008
+ */ function positionAt(texts, at, later) {
37009
+ var _a, _b;
37010
+ let before = 0;
37011
+ let last = null;
37012
+ for (const piece of texts){
37013
+ const length = lengthOf(piece);
37014
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) && (at < before + length || !later && at === before + length)) {
37015
+ return [
37016
+ piece,
37017
+ at - before
37018
+ ];
37019
+ }
37020
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece)) {
37021
+ last = piece;
37022
+ }
37023
+ before += length;
37024
+ }
37025
+ return [
37026
+ last,
37027
+ (_b = (_a = last === null || last === void 0 ? void 0 : last.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0
37028
+ ];
37029
+ }
37030
+
37031
+
36578
37032
  /***/ }),
36579
37033
 
36580
37034
  /***/ 56385:
@@ -38512,6 +38966,7 @@ var DragState;
38512
38966
  /**
38513
38967
  * Drag start handler
38514
38968
  */ onDragStart(event) {
38969
+ var _a;
38515
38970
  if (event.type === 'dragstart' && this.draggable) {
38516
38971
  return false;
38517
38972
  }
@@ -38530,7 +38985,8 @@ var DragState;
38530
38985
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(lastTarget.parentElement, 'a') && lastTarget.parentElement.firstChild === lastTarget && lastTarget.parentElement.lastChild === lastTarget) {
38531
38986
  lastTarget = lastTarget.parentElement;
38532
38987
  }
38533
- this.startDragging(lastTarget, event);
38988
+ // A captioned image goes with its caption
38989
+ this.startDragging((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, lastTarget)) !== null && _a !== void 0 ? _a : lastTarget, event);
38534
38990
  }
38535
38991
  /**
38536
38992
  * Prepare the ghost element and switch to the waiting state.
@@ -40564,7 +41020,8 @@ const libraries = new Map();
40564
41020
  /* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
40565
41021
  /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
40566
41022
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
40567
- /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89816);
41023
+ /* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
41024
+ /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
40568
41025
  /*!
40569
41026
  * Jodit Editor (https://xdsoft.net/jodit/)
40570
41027
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -40574,7 +41031,39 @@ const libraries = new Map();
40574
41031
 
40575
41032
 
40576
41033
 
40577
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
41034
+
41035
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
41036
+ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
41037
+ // Opt in: previews keep the toolbar's styles unless the integrator lists
41038
+ // the properties to copy, e.g. ['font-family', 'font-weight', 'color']
41039
+ previewProperties: []
41040
+ };
41041
+ /**
41042
+ * The list is outside the editing area, and in iframe mode outside its
41043
+ * document, so a preview would take the toolbar's styles. This reads how the
41044
+ * content shows a tag from a probe in the editing area
41045
+ */ function previewStyle(editor, tag) {
41046
+ const { previewProperties } = editor.o.formatBlock;
41047
+ if (!previewProperties.length) {
41048
+ return '';
41049
+ }
41050
+ const probe = editor.createInside.element(tag, {
41051
+ style: 'display: none'
41052
+ });
41053
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
41054
+ const style = editor.ew.getComputedStyle(probe);
41055
+ const size = parseFloat(style.fontSize) || 16;
41056
+ const css = previewProperties.map((prop)=>{
41057
+ let value = style.getPropertyValue(prop);
41058
+ if (value && prop === 'font-family') {
41059
+ value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
41060
+ }
41061
+ // Each browser knows only one of the smoothing properties
41062
+ return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
41063
+ }).join('');
41064
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
41065
+ return css;
41066
+ }
40578
41067
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40579
41068
  command: 'formatBlock',
40580
41069
  value (editor, button) {
@@ -40615,11 +41104,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40615
41104
  isActive: (editor, button)=>{
40616
41105
  return button.state.value !== editor.o.enter && (0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(button.control.list) && Boolean(button.control.list[button.state.value]);
40617
41106
  },
40618
- childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
41107
+ childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
40619
41108
  tooltip: 'Insert format block'
40620
41109
  };
40621
41110
 
40622
41111
 
41112
+ /***/ }),
41113
+
41114
+ /***/ 4932:
41115
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
41116
+
41117
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41118
+ /* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
41119
+ /* harmony export */ });
41120
+ /*!
41121
+ * Jodit Editor (https://xdsoft.net/jodit/)
41122
+ * Released under MIT see LICENSE.txt in the project root for license information.
41123
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41124
+ */ const carried = new WeakMap();
41125
+ const fetched = new Map();
41126
+ let editors = 0;
41127
+ /**
41128
+ * In iframe mode the content's web fonts load only in the iframe, but the
41129
+ * Paragraph list is in the page, so its previews would fall back to the
41130
+ * page's fonts. This adds the content's web fonts to the page under names
41131
+ * only this editor uses, so nothing else on the page can pick them up, and
41132
+ * puts those names first in a preview's `font-family`
41133
+ */ function withContentFonts(editor, fontFamily) {
41134
+ const { ed, od } = editor;
41135
+ if (ed === od) {
41136
+ return fontFamily;
41137
+ }
41138
+ const state = carriedFor(editor);
41139
+ carry(editor, state);
41140
+ const webFonts = new Set();
41141
+ ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
41142
+ return fontFamily.split(',').map((family)=>{
41143
+ const name = familyName(family);
41144
+ return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
41145
+ }).join(', ');
41146
+ }
41147
+ function carriedFor(editor) {
41148
+ let state = carried.get(editor);
41149
+ if (!state) {
41150
+ const { od } = editor;
41151
+ const created = {
41152
+ prefix: `jodit-preview-${++editors}-`,
41153
+ faces: new Map(),
41154
+ pending: false
41155
+ };
41156
+ carried.set(editor, created);
41157
+ editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
41158
+ state = created;
41159
+ }
41160
+ return state;
41161
+ }
41162
+ /**
41163
+ * It looks each time the list opens, since the content's stylesheets may
41164
+ * still have been loading the time before
41165
+ */ function carry(editor, state) {
41166
+ // Every preview in the list asks, but one look is enough
41167
+ if (state.pending) {
41168
+ return;
41169
+ }
41170
+ state.pending = true;
41171
+ const { ed, od } = editor;
41172
+ Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
41173
+ state.pending = false;
41174
+ if (editor.isInDestruct) {
41175
+ return;
41176
+ }
41177
+ lists.flat().forEach((font)=>{
41178
+ const key = JSON.stringify(font);
41179
+ if (!state.faces.has(key)) {
41180
+ const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
41181
+ od.fonts.add(face);
41182
+ state.faces.set(key, face);
41183
+ }
41184
+ });
41185
+ });
41186
+ }
41187
+ /**
41188
+ * The web fonts a stylesheet and those it imports declare
41189
+ */ function fontsOf(sheet, base) {
41190
+ var _a;
41191
+ let rules;
41192
+ try {
41193
+ rules = sheet.cssRules;
41194
+ } catch (_b) {
41195
+ // Another site's stylesheet can't be read, but it can be fetched if
41196
+ // the site allows it, as Google Fonts does
41197
+ const { href } = sheet;
41198
+ if (!href) {
41199
+ return Promise.resolve([]);
41200
+ }
41201
+ let fonts = fetched.get(href);
41202
+ if (!fonts) {
41203
+ fonts = fetchFonts(href);
41204
+ fetched.set(href, fonts);
41205
+ }
41206
+ return fonts;
41207
+ }
41208
+ return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
41209
+ }
41210
+ function fontsIn(rules, base) {
41211
+ return Promise.all(Array.from(rules, (rule)=>{
41212
+ if ('styleSheet' in rule) {
41213
+ const { styleSheet } = rule;
41214
+ return styleSheet ? fontsOf(styleSheet, base) : [];
41215
+ }
41216
+ if ('cssRules' in rule) {
41217
+ return fontsIn(rule.cssRules, base);
41218
+ }
41219
+ return rule.cssText.startsWith('@font-face') ? [
41220
+ fontOf(rule, base)
41221
+ ] : [];
41222
+ })).then((lists)=>lists.flat());
41223
+ }
41224
+ function fontOf(rule, base) {
41225
+ const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
41226
+ return {
41227
+ family: familyName(rule.style.getPropertyValue('font-family')),
41228
+ source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
41229
+ descriptors: {
41230
+ style: value('font-style'),
41231
+ weight: value('font-weight'),
41232
+ stretch: value('font-stretch'),
41233
+ unicodeRange: value('unicode-range')
41234
+ }
41235
+ };
41236
+ }
41237
+ function fetchFonts(href) {
41238
+ return fetch(href).then((response)=>response.text()).then((text)=>{
41239
+ const doc = document.implementation.createHTMLDocument('');
41240
+ const style = doc.createElement('style');
41241
+ style.textContent = text;
41242
+ doc.head.appendChild(style);
41243
+ return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
41244
+ }).catch(()=>[]);
41245
+ }
41246
+ function familyName(family) {
41247
+ return family.replace(/["']/g, '').trim().toLowerCase();
41248
+ }
41249
+ /**
41250
+ * The fonts are added to the page, so a relative URL would point somewhere
41251
+ * else
41252
+ */ function withAbsoluteUrls(css, base) {
41253
+ return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
41254
+ try {
41255
+ return `url("${new URL(url, base).href}")`;
41256
+ } catch (_a) {
41257
+ return match;
41258
+ }
41259
+ });
41260
+ }
41261
+
41262
+
40623
41263
  /***/ }),
40624
41264
 
40625
41265
  /***/ 96111:
@@ -41300,6 +41940,810 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
41300
41940
  _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
41301
41941
 
41302
41942
 
41943
+ /***/ }),
41944
+
41945
+ /***/ 43687:
41946
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41947
+
41948
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
41949
+ /*!
41950
+ * Jodit Editor (https://xdsoft.net/jodit/)
41951
+ * Released under MIT see LICENSE.txt in the project root for license information.
41952
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41953
+ */
41954
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
41955
+ wrapper: {
41956
+ tag: 'figure',
41957
+ className: ''
41958
+ },
41959
+ inner: null,
41960
+ caption: {
41961
+ tag: 'figcaption',
41962
+ className: ''
41963
+ }
41964
+ };
41965
+
41966
+
41967
+ /***/ }),
41968
+
41969
+ /***/ 84571:
41970
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41971
+
41972
+ /* unused harmony export imageCaption */
41973
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
41974
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
41975
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
41976
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
41977
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
41978
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
41979
+ /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
41980
+ /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
41981
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
41982
+ /*!
41983
+ * Jodit Editor (https://xdsoft.net/jodit/)
41984
+ * Released under MIT see LICENSE.txt in the project root for license information.
41985
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41986
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
41987
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41988
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41989
+ 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;
41990
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
41991
+ };
41992
+
41993
+
41994
+
41995
+
41996
+
41997
+
41998
+
41999
+
42000
+
42001
+ const MARGINS = [
42002
+ 'margin-top',
42003
+ 'margin-right',
42004
+ 'margin-bottom',
42005
+ 'margin-left'
42006
+ ];
42007
+ const ARROWS = new Set([
42008
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
42009
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
42010
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
42011
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
42012
+ ]);
42013
+ // Blocks that only hold text, which a block wrapper can't go inside
42014
+ const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
42015
+ // They would replace the caption with a heading, quote or list
42016
+ const BLOCK_COMMANDS = new Set([
42017
+ 'formatblock',
42018
+ 'insertorderedlist',
42019
+ 'insertunorderedlist'
42020
+ ]);
42021
+ const PLACEHOLDER = 'data-jodit-placeholder';
42022
+ /**
42023
+ * Jodit's focus colour round a caption being typed in, in place of the
42024
+ * browser's, and a placeholder in a blank caption. `:where` leaves both for
42025
+ * the content's own styles to change
42026
+ */ const CAPTION_STYLE = ':where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}' + `:where(.jodit-wysiwyg [${PLACEHOLDER}]){position:relative}` + `:where(.jodit-wysiwyg [${PLACEHOLDER}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${PLACEHOLDER});pointer-events:none}`;
42027
+ /**
42028
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
42029
+ * keeps the caret in the caption
42030
+ */ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
42031
+ /** @override */ afterInit(jodit) {
42032
+ // It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
42033
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
42034
+ jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
42035
+ top: true
42036
+ });
42037
+ this.onChangePlace();
42038
+ }
42039
+ /**
42040
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
42041
+ * other way round from how it is. Returns the caption it gave, or null
42042
+ * when it took one away
42043
+ */ onToggleImageCaption(image, on) {
42044
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
42045
+ if (wrapper && on !== true) {
42046
+ const fresh = this.__freshCaption(wrapper);
42047
+ if (fresh) {
42048
+ this.__unrecorded(()=>this.__restore(fresh));
42049
+ } else {
42050
+ this.__uncaption(wrapper, image);
42051
+ }
42052
+ return null;
42053
+ }
42054
+ if (!wrapper && on !== false) {
42055
+ return this.__caption(image);
42056
+ }
42057
+ }
42058
+ __freshCaption(wrapper) {
42059
+ const fresh = this.__fresh;
42060
+ if (!fresh || fresh.wrapper !== wrapper || wrapper.parentNode !== fresh.parent || wrapper.previousSibling !== fresh.previous || wrapper.nextSibling !== fresh.next || shape(wrapper, fresh.image) !== fresh.shape || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper) !== fresh.caption || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(fresh.caption)) {
42061
+ return null;
42062
+ }
42063
+ return fresh;
42064
+ }
42065
+ /**
42066
+ * Giving a caption isn't a step in the history of its own, as the first
42067
+ * thing typed in it is, so Undo never brings back a blank caption
42068
+ */ __caption(image) {
42069
+ const { j } = this;
42070
+ const { snapshot } = j.history;
42071
+ // The steps before it are recorded first
42072
+ j.setEditorValue();
42073
+ j.e.fire('internalUpdate');
42074
+ const before = snapshot.make();
42075
+ let fresh;
42076
+ snapshot.transaction(()=>{
42077
+ fresh = this.__fresh = {
42078
+ ...this.__wrap(image),
42079
+ before
42080
+ };
42081
+ j.setEditorValue();
42082
+ });
42083
+ // The value is as it was, so no `change` updates the toolbars
42084
+ j.e.fire('updateToolbar');
42085
+ return fresh.caption;
42086
+ }
42087
+ /**
42088
+ * Changes the content with no step in the history of its own, so Undo
42089
+ * never brings back a blank caption. A step still open takes it in
42090
+ */ __unrecorded(changes) {
42091
+ const { j } = this;
42092
+ j.setEditorValue();
42093
+ this.__fresh = null;
42094
+ j.history.snapshot.transaction(()=>{
42095
+ changes();
42096
+ j.setEditorValue();
42097
+ });
42098
+ j.e.fire('internalUpdate');
42099
+ j.e.fire('updateToolbar');
42100
+ }
42101
+ __wrap(image) {
42102
+ var _a;
42103
+ const { j } = this;
42104
+ const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
42105
+ const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
42106
+ const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
42107
+ const attributes = [
42108
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
42109
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
42110
+ ];
42111
+ const place = target.parentNode;
42112
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(image, 'width') || pixels((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width')) || (image.offsetWidth ? `${image.offsetWidth}px` : '');
42113
+ const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
42114
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
42115
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
42116
+ const wrapper = this.__create(wrapperPart);
42117
+ const box = inner ? this.__create(inner) : wrapper;
42118
+ const caption = this.__create(captionPart);
42119
+ caption.appendChild(j.createInside.element('br'));
42120
+ const split = this.__insert(wrapper, target);
42121
+ if (box !== wrapper) {
42122
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
42123
+ }
42124
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
42125
+ target,
42126
+ caption
42127
+ ]);
42128
+ moveMargins(image, wrapper);
42129
+ // The wrapper takes the image's width, and the image fills it, so the
42130
+ // caption wraps under the image
42131
+ if (width) {
42132
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
42133
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
42134
+ }
42135
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
42136
+ this.__mark(wrapper);
42137
+ return {
42138
+ caption,
42139
+ wrapper,
42140
+ image,
42141
+ target,
42142
+ place,
42143
+ split,
42144
+ attributes,
42145
+ parent: wrapper.parentNode,
42146
+ previous: wrapper.previousSibling,
42147
+ next: wrapper.nextSibling,
42148
+ shape: shape(wrapper, image)
42149
+ };
42150
+ }
42151
+ /**
42152
+ * Puts the image back as it was before its caption: in the line the
42153
+ * caption split, and with its own alignment, margins and width. The image
42154
+ * goes into the part of the line holding the caret, so the caret stays
42155
+ */ __restore(fresh) {
42156
+ var _a, _b;
42157
+ const { wrapper, image, target, place, split, attributes } = fresh;
42158
+ if (!split) {
42159
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
42160
+ } else if (!split.head && !split.tail) {
42161
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
42162
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
42163
+ } else {
42164
+ const { sel } = this.j.s;
42165
+ const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
42166
+ const { head, tail } = split;
42167
+ if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
42168
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
42169
+ target,
42170
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_a = tail === null || tail === void 0 ? void 0 : tail.childNodes) !== null && _a !== void 0 ? _a : [])
42171
+ ]);
42172
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
42173
+ } else if (tail) {
42174
+ const first = tail.firstChild;
42175
+ [
42176
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_b = head === null || head === void 0 ? void 0 : head.childNodes) !== null && _b !== void 0 ? _b : []),
42177
+ target
42178
+ ].forEach((node)=>tail.insertBefore(node, first));
42179
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
42180
+ }
42181
+ }
42182
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42183
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
42184
+ style: attributes[0],
42185
+ class: attributes[1]
42186
+ });
42187
+ }
42188
+ __uncaption(wrapper, image) {
42189
+ var _a;
42190
+ const { j } = this;
42191
+ // Read while the wrapper is still one, with its caption
42192
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(wrapper, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
42193
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
42194
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
42195
+ const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
42196
+ moveMargins(wrapper, image);
42197
+ if (width) {
42198
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
42199
+ }
42200
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
42201
+ // A block wrapper leaves the image in a paragraph of its own
42202
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) && wrapper.parentNode === j.editor && j.o.enter.toLowerCase() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.BR) {
42203
+ const line = j.createInside.element(j.o.enter);
42204
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
42205
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
42206
+ } else {
42207
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
42208
+ }
42209
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42210
+ }
42211
+ __create({ tag, className }) {
42212
+ return this.j.createInside.element(tag, className ? {
42213
+ class: className
42214
+ } : {});
42215
+ }
42216
+ /**
42217
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
42218
+ * paragraph is split round it, and a part left empty goes
42219
+ */ __insert(wrapper, target) {
42220
+ const { j } = this;
42221
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, j.editor) : null;
42222
+ if (!block || !TEXT_BLOCK.test(block.nodeName)) {
42223
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
42224
+ return null;
42225
+ }
42226
+ const range = j.ed.createRange();
42227
+ range.setStartBefore(block);
42228
+ range.setEndBefore(target);
42229
+ const start = range.extractContents();
42230
+ range.setStartAfter(target);
42231
+ range.setEndAfter(block);
42232
+ const end = range.extractContents();
42233
+ const [head, tail] = [
42234
+ start,
42235
+ end
42236
+ ].map((part, index)=>{
42237
+ const line = part.firstChild;
42238
+ if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
42239
+ return null;
42240
+ }
42241
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(index ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, block, line);
42242
+ return line;
42243
+ });
42244
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
42245
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
42246
+ return {
42247
+ block,
42248
+ head,
42249
+ tail
42250
+ };
42251
+ }
42252
+ /**
42253
+ * The wrapper can't be edited, apart from its caption, so typing can't
42254
+ * land between the image and the caption
42255
+ */ __mark(wrapper) {
42256
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
42257
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
42258
+ if (caption) {
42259
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
42260
+ this.__placeholder(caption);
42261
+ }
42262
+ }
42263
+ __placeholder(caption) {
42264
+ const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
42265
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
42266
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
42267
+ }
42268
+ }
42269
+ onChange() {
42270
+ const { j } = this;
42271
+ if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
42272
+ return;
42273
+ }
42274
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
42275
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
42276
+ this.__mark(elm);
42277
+ }
42278
+ });
42279
+ }
42280
+ /**
42281
+ * The placeholder goes with the first letter typed or pasted, and comes
42282
+ * back when the last is deleted
42283
+ */ onInput() {
42284
+ const caption = this.__caretCaption();
42285
+ if (caption) {
42286
+ this.__placeholder(caption);
42287
+ }
42288
+ }
42289
+ /**
42290
+ * The editor's own attributes stay out of the value, as the caption would
42291
+ * be editable on the page. So does a caption given and left blank, as
42292
+ * leaving it takes it off, so saving at once keeps the image as it was
42293
+ */ onAfterGetValueFromEditor(data) {
42294
+ if (!data.value.includes('contenteditable')) {
42295
+ return;
42296
+ }
42297
+ const { j } = this;
42298
+ const template = j.c.element('template');
42299
+ template.innerHTML = data.value;
42300
+ const wrappers = (root)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(root.querySelectorAll(j.o.imageCaption.wrapper.tag)).filter((wrapper)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper));
42301
+ const copies = wrappers(template.content);
42302
+ const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
42303
+ const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
42304
+ const placed = fresh && copy && placedIn(j, fresh, copy);
42305
+ let changed = false;
42306
+ if (placed) {
42307
+ this.__restore(placed);
42308
+ changed = true;
42309
+ }
42310
+ copies.forEach((wrapper)=>{
42311
+ [
42312
+ wrapper,
42313
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
42314
+ ].forEach((elm)=>[
42315
+ 'contenteditable',
42316
+ PLACEHOLDER
42317
+ ].forEach((name)=>{
42318
+ if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
42319
+ elm.removeAttribute(name);
42320
+ changed = true;
42321
+ }
42322
+ }));
42323
+ });
42324
+ if (changed) {
42325
+ data.value = template.innerHTML;
42326
+ }
42327
+ }
42328
+ onChangePlace() {
42329
+ const { j } = this;
42330
+ // Captured, to come first: the editor's own `focusout` listener can stop
42331
+ // the event as it fires `blur`, and an image's `mousedown` listener
42332
+ // moves the focus before the press reaches the editor
42333
+ j.e.off([
42334
+ j.editor,
42335
+ j.ow,
42336
+ j.ew
42337
+ ], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
42338
+ capture: true
42339
+ }).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
42340
+ capture: true
42341
+ }).on([
42342
+ j.ow,
42343
+ j.ew
42344
+ ], 'mouseup.imageCaption', this.__onMouseUp);
42345
+ }
42346
+ __onMouseDown(event) {
42347
+ this.__press = event.target;
42348
+ }
42349
+ /**
42350
+ * A caption left blank goes when the focus leaves it. That's checked once
42351
+ * the focus has landed, as switching windows or opening the editor's own
42352
+ * popups keeps it, and once a press that took the focus is over, as the
42353
+ * browsers fire no click when its target moves
42354
+ */ __onFocusOut(event) {
42355
+ const caption = event.target;
42356
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption)) !== caption) {
42357
+ return;
42358
+ }
42359
+ if (this.__press) {
42360
+ this.__afterPress.push(caption);
42361
+ } else {
42362
+ this.__dropBlank(caption, null);
42363
+ }
42364
+ }
42365
+ __onMouseUp() {
42366
+ const press = this.__press;
42367
+ this.__press = null;
42368
+ this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
42369
+ }
42370
+ __dropBlank(caption, press) {
42371
+ // `async.setTimeout` runs a timeout of 0 at once
42372
+ this.j.async.setTimeout(()=>{
42373
+ const { j } = this;
42374
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
42375
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
42376
+ if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
42377
+ return;
42378
+ }
42379
+ const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
42380
+ const fresh = this.__freshCaption(wrapper);
42381
+ this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
42382
+ // The click opened the image's popup below the caption, so it
42383
+ // opens again below the image, as after the popup's Caption button
42384
+ if (clicked) {
42385
+ j.e.fire('recalcPositionPopup');
42386
+ j.e.fire('closeAllPopups');
42387
+ }
42388
+ }, 1);
42389
+ }
42390
+ /**
42391
+ * The caption has the focus, or had it when another window took it, or
42392
+ * the editor's own popups and dialogs have it, as the link form
42393
+ */ __keepsFocus(caption) {
42394
+ const { j } = this;
42395
+ const doc = caption.ownerDocument;
42396
+ if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
42397
+ return true;
42398
+ }
42399
+ const active = j.od.activeElement;
42400
+ return Boolean(active && active !== j.iframe && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.editor, active) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.container, active) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(active, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'data-editor_id') === j.id, j.od.body)));
42401
+ }
42402
+ /**
42403
+ * The caption the caret is in
42404
+ */ __caretCaption() {
42405
+ const { s } = this.j;
42406
+ if (!s.isInsideArea) {
42407
+ return null;
42408
+ }
42409
+ const node = s.range.startContainer;
42410
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, node));
42411
+ return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
42412
+ }
42413
+ /**
42414
+ * Enter in a caption starts a line after the image, and Shift+Enter
42415
+ * breaks the caption's line, as everywhere
42416
+ */ onBeforeEnter(event) {
42417
+ const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
42418
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
42419
+ if (!wrapper) {
42420
+ return;
42421
+ }
42422
+ const { j } = this;
42423
+ this.__focusEditor();
42424
+ // The Enter plugin breaks the line after an inline wrapper
42425
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42426
+ j.s.setCursorAfter(wrapper);
42427
+ return;
42428
+ }
42429
+ const line = this.__line();
42430
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42431
+ j.s.setCursorIn(line);
42432
+ j.synchronizeValues();
42433
+ return false;
42434
+ }
42435
+ /**
42436
+ * The caption keeps the focus, as an editable element of its own, and
42437
+ * would take the caret back, so the editor takes it before the caret
42438
+ * leaves the caption
42439
+ */ __focusEditor() {
42440
+ this.j.editor.focus({
42441
+ preventScroll: true
42442
+ });
42443
+ }
42444
+ __line() {
42445
+ const { j } = this;
42446
+ const line = j.createInside.element(j.o.enter);
42447
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
42448
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
42449
+ }
42450
+ return line;
42451
+ }
42452
+ /**
42453
+ * A caption holds text. An image, a table or a block put in it would end
42454
+ * the captioned image, so it goes after the image, as Enter would
42455
+ */ onBeforeInsertNode(node) {
42456
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
42457
+ if (!wrapper || !holdsMoreThanText(node)) {
42458
+ return;
42459
+ }
42460
+ const { j } = this;
42461
+ this.__focusEditor();
42462
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42463
+ j.s.setCursorAfter(wrapper);
42464
+ return;
42465
+ }
42466
+ const line = this.__line();
42467
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42468
+ j.s.setCursorIn(line);
42469
+ }
42470
+ /**
42471
+ * A selected captioned image goes as an image on a line of its own does,
42472
+ * leaving the line empty, rather than joining the lines either side
42473
+ */ onBeforeCommandDelete() {
42474
+ const wrapper = this.__selectedWrapper();
42475
+ if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42476
+ return;
42477
+ }
42478
+ const line = this.__line();
42479
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
42480
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42481
+ this.j.s.setCursorIn(line);
42482
+ return false;
42483
+ }
42484
+ /**
42485
+ * The captioned image the selection holds, as a click on the image selects
42486
+ */ __selectedWrapper() {
42487
+ const { s } = this.j;
42488
+ if (!s.isInsideArea || s.isCollapsed()) {
42489
+ return null;
42490
+ }
42491
+ const { startContainer, startOffset, endContainer, endOffset } = s.range;
42492
+ const node = startContainer.childNodes[startOffset];
42493
+ return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
42494
+ }
42495
+ onKeyDown(event) {
42496
+ var _a;
42497
+ this.__arrow = null;
42498
+ // Typing replaces a selected captioned image, on the line it leaves
42499
+ if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
42500
+ this.j.execCommand('Delete');
42501
+ return;
42502
+ }
42503
+ if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
42504
+ return;
42505
+ }
42506
+ const caption = this.__caretCaption();
42507
+ if (caption) {
42508
+ this.__arrow = {
42509
+ key: event.key,
42510
+ range: this.j.s.range.cloneRange(),
42511
+ caption
42512
+ };
42513
+ }
42514
+ }
42515
+ /**
42516
+ * An arrow key that couldn't move the caret in the caption takes it out,
42517
+ * past the image, as the caption is an editable element of its own
42518
+ */ onKeyUp(event) {
42519
+ const arrow = this.__arrow;
42520
+ this.__arrow = null;
42521
+ if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
42522
+ return;
42523
+ }
42524
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
42525
+ if (!wrapper) {
42526
+ return;
42527
+ }
42528
+ const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
42529
+ const { s } = this.j;
42530
+ this.__focusEditor();
42531
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42532
+ if (forward) {
42533
+ s.setCursorAfter(wrapper);
42534
+ } else {
42535
+ s.setCursorBefore(wrapper);
42536
+ }
42537
+ return;
42538
+ }
42539
+ const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
42540
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
42541
+ s.setCursorIn(sibling, forward);
42542
+ return;
42543
+ }
42544
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
42545
+ if (forward) {
42546
+ s.setCursorBefore(sibling);
42547
+ } else {
42548
+ s.setCursorAfter(sibling);
42549
+ }
42550
+ return;
42551
+ }
42552
+ const line = this.__line();
42553
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(forward ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, wrapper, line);
42554
+ s.setCursorIn(line);
42555
+ this.j.synchronizeValues();
42556
+ }
42557
+ onBeforeCommand(command) {
42558
+ const name = command.toLowerCase();
42559
+ if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
42560
+ return false;
42561
+ }
42562
+ // A caption given and left blank was never a step, so Undo takes it off
42563
+ const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
42564
+ if (fresh) {
42565
+ this.__unrecorded(()=>{
42566
+ this.__restore(fresh);
42567
+ this.j.history.snapshot.restore(fresh.before);
42568
+ });
42569
+ return false;
42570
+ }
42571
+ }
42572
+ /**
42573
+ * Select all in a caption selects the caption, as the caption is an
42574
+ * editable element of its own
42575
+ */ __onSelectAll() {
42576
+ const caption = this.__caretCaption();
42577
+ if (caption) {
42578
+ this.j.e.stopPropagation('beforeCommandSelectall');
42579
+ this.j.s.select(caption, true);
42580
+ return false;
42581
+ }
42582
+ }
42583
+ /** @override */ beforeDestruct(jodit) {
42584
+ jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
42585
+ jodit.editor,
42586
+ jodit.ow,
42587
+ jodit.ew
42588
+ ], '.imageCaption');
42589
+ }
42590
+ constructor(){
42591
+ super(...arguments);
42592
+ /**
42593
+ * The caption given last, while nothing has changed round it and it's
42594
+ * still blank, so taking it off can put everything back as it was
42595
+ */ this.__fresh = null;
42596
+ this.__press = null;
42597
+ this.__afterPress = [];
42598
+ this.__arrow = null;
42599
+ }
42600
+ }
42601
+ __decorate([
42602
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
42603
+ ], imageCaption.prototype, "onToggleImageCaption", null);
42604
+ __decorate([
42605
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42606
+ ':change',
42607
+ ':afterInit',
42608
+ ':afterSetMode',
42609
+ ':changePlace'
42610
+ ]),
42611
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
42612
+ ], imageCaption.prototype, "onChange", null);
42613
+ __decorate([
42614
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42615
+ ':input',
42616
+ ':keyup',
42617
+ ':afterPaste'
42618
+ ])
42619
+ ], imageCaption.prototype, "onInput", null);
42620
+ __decorate([
42621
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
42622
+ ], imageCaption.prototype, "onAfterGetValueFromEditor", null);
42623
+ __decorate([
42624
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
42625
+ ], imageCaption.prototype, "onChangePlace", null);
42626
+ __decorate([
42627
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42628
+ ], imageCaption.prototype, "__onMouseDown", null);
42629
+ __decorate([
42630
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42631
+ ], imageCaption.prototype, "__onFocusOut", null);
42632
+ __decorate([
42633
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42634
+ ], imageCaption.prototype, "__onMouseUp", null);
42635
+ __decorate([
42636
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
42637
+ ], imageCaption.prototype, "onBeforeEnter", null);
42638
+ __decorate([
42639
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
42640
+ ], imageCaption.prototype, "onBeforeInsertNode", null);
42641
+ __decorate([
42642
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
42643
+ ], imageCaption.prototype, "onBeforeCommandDelete", null);
42644
+ __decorate([
42645
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
42646
+ ], imageCaption.prototype, "onKeyDown", null);
42647
+ __decorate([
42648
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
42649
+ ], imageCaption.prototype, "onKeyUp", null);
42650
+ __decorate([
42651
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
42652
+ ], imageCaption.prototype, "onBeforeCommand", null);
42653
+ __decorate([
42654
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42655
+ ], imageCaption.prototype, "__onSelectAll", null);
42656
+ /**
42657
+ * `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
42658
+ * from the editor's value
42659
+ */ function placedIn(jodit, fresh, wrapper) {
42660
+ var _a;
42661
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
42662
+ const { split } = fresh;
42663
+ if (!image) {
42664
+ return null;
42665
+ }
42666
+ const placed = {
42667
+ wrapper,
42668
+ image,
42669
+ target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
42670
+ place: fresh.place,
42671
+ split: null,
42672
+ attributes: fresh.attributes
42673
+ };
42674
+ if (split) {
42675
+ const head = split.head ? wrapper.previousSibling : null;
42676
+ const tail = split.tail ? wrapper.nextSibling : null;
42677
+ if (split.head && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(head) || split.tail && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(tail)) {
42678
+ return null;
42679
+ }
42680
+ const block = split.block.cloneNode(true);
42681
+ placed.split = {
42682
+ block,
42683
+ head: head,
42684
+ tail: tail
42685
+ };
42686
+ placed.place = counterpart(split.block, fresh.place, block);
42687
+ }
42688
+ return placed;
42689
+ }
42690
+ /**
42691
+ * The node in `copy`, a clone of `root`, where `node` is in `root`
42692
+ */ function counterpart(root, node, copy) {
42693
+ const path = [];
42694
+ for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
42695
+ path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
42696
+ }
42697
+ return path.reduce((elm, index)=>elm.childNodes[index], copy);
42698
+ }
42699
+ /**
42700
+ * The attributes of a caption's wrapper and image that the image's
42701
+ * alignment, margins and size are in
42702
+ */ function shape(wrapper, image) {
42703
+ return [
42704
+ wrapper,
42705
+ image
42706
+ ].flatMap((elm)=>[
42707
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
42708
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
42709
+ ]).join('|');
42710
+ }
42711
+ /**
42712
+ * The node is, or holds, more than text and inline formatting: an image, a
42713
+ * table, a rule or another block
42714
+ */ function holdsMoreThanText(node) {
42715
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
42716
+ return false;
42717
+ }
42718
+ return [
42719
+ node,
42720
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
42721
+ ].some((elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(elm) || _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS.has(elm.nodeName.toLowerCase())));
42722
+ }
42723
+ /**
42724
+ * A `width` attribute's value as a CSS width
42725
+ */ function pixels(value) {
42726
+ if (!value) {
42727
+ return '';
42728
+ }
42729
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
42730
+ }
42731
+ function moveMargins(from, to) {
42732
+ var _a;
42733
+ MARGINS.forEach((side)=>{
42734
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
42735
+ if (value) {
42736
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
42737
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
42738
+ }
42739
+ });
42740
+ if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
42741
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
42742
+ }
42743
+ }
42744
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
42745
+
42746
+
41303
42747
  /***/ }),
41304
42748
 
41305
42749
  /***/ 85745:
@@ -41405,7 +42849,8 @@ const SELECTED_TAGS = new Set([
41405
42849
  * paints the rest of a block image's line with its parent's highlight. See #1528.
41406
42850
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
41407
42851
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
41408
- * wrapper's whole line, and its resize frame shows it's selected
42852
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
42853
+ * a captioned image's caption
41409
42854
  */ onSelectionChange() {
41410
42855
  const { jodit } = this;
41411
42856
  jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
@@ -41428,9 +42873,12 @@ const SELECTED_TAGS = new Set([
41428
42873
  if (elm.src && /^data:/.test(elm.src)) {
41429
42874
  replaceDataURIToBlobUUID(editor, elm);
41430
42875
  }
42876
+ // A captioned image is selected with its caption, so Delete
42877
+ // removes both
41431
42878
  editor.e.on(elm, 'mousedown touchstart', ()=>{
42879
+ var _a;
41432
42880
  removeCaretText(elm);
41433
- editor.s.select(elm);
42881
+ editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
41434
42882
  });
41435
42883
  }
41436
42884
  });
@@ -41454,13 +42902,14 @@ __decorate([
41454
42902
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
41455
42903
  ], imageProcessor.prototype, "afterChange", null);
41456
42904
  function isImageSelected(jodit) {
42905
+ var _a;
41457
42906
  const { sel } = jodit.s;
41458
42907
  if (!sel || !sel.rangeCount) {
41459
42908
  return false;
41460
42909
  }
41461
42910
  const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
41462
42911
  const node = startContainer.childNodes[startOffset];
41463
- return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
42912
+ return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node)) !== null && _a !== void 0 ? _a : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
41464
42913
  }
41465
42914
  /**
41466
42915
  * Remove the invisible-space text beside an image, which only held a caret.
@@ -41524,6 +42973,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41524
42973
  useImageEditor: true,
41525
42974
  editTitle: true,
41526
42975
  editAlt: true,
42976
+ showCaptionCheckbox: true,
41527
42977
  editLink: true,
41528
42978
  editSize: true,
41529
42979
  editBorderRadius: true,
@@ -41618,10 +43068,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41618
43068
  dialog.close();
41619
43069
  });
41620
43070
  buttons.remove.onAction(()=>{
43071
+ var _a;
43072
+ const { sourceImage } = this.state;
43073
+ const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
41621
43074
  const caret = j.s.createRange();
41622
- caret.setStartBefore(this.state.sourceImage);
43075
+ caret.setStartBefore(target);
41623
43076
  caret.collapse(true);
41624
- j.s.removeNode(this.state.sourceImage);
43077
+ j.s.removeNode(target);
41625
43078
  dialog.close();
41626
43079
  j.s.selectRange(caret);
41627
43080
  });
@@ -41643,12 +43096,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41643
43096
  if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
41644
43097
  return;
41645
43098
  }
43099
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
43100
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
43101
+ // A blank caption, as one the dialog has added, takes the caret, as
43102
+ // the image popup's Caption button does
43103
+ if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
43104
+ j.s.setCursorIn(caption);
43105
+ return;
43106
+ }
43107
+ // A captioned image is selected with its caption, as a click selects it
43108
+ const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
41646
43109
  if (j.o.image.selectImageAfterClose) {
41647
- j.s.select(sourceImage);
43110
+ j.s.select(target);
41648
43111
  return;
41649
43112
  }
41650
43113
  const caret = j.s.createRange();
41651
- caret.setStartAfter(sourceImage);
43114
+ caret.setStartAfter(target);
41652
43115
  caret.collapse(true);
41653
43116
  j.s.selectRange(caret);
41654
43117
  });
@@ -41784,6 +43247,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41784
43247
  borderRadius: 0,
41785
43248
  imageTitle: '',
41786
43249
  imageAlt: '',
43250
+ imageCaption: false,
41787
43251
  imageLink: '',
41788
43252
  imageLinkOpenInNewTab: false,
41789
43253
  imageWidth: 0,
@@ -41850,10 +43314,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41850
43314
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
41851
43315
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
41852
43316
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
41853
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
41854
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
41855
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
41856
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
43317
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
43318
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
43319
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
43320
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
43321
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
41857
43322
  /*!
41858
43323
  * Jodit Editor (https://xdsoft.net/jodit/)
41859
43324
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41865,12 +43330,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41865
43330
 
41866
43331
 
41867
43332
 
43333
+
41868
43334
  /**
41869
43335
  * Read values from image and set it to state
41870
43336
  * @private
41871
43337
  */ async function readValuesFromImage(j, state) {
41872
43338
  const { sourceImage: image, values } = state;
41873
- (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
43339
+ // A captioned image's caption element holds its place on the page and
43340
+ // its width
43341
+ const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
43342
+ const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
43343
+ values.imageCaption = Boolean(wrapper);
43344
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
41874
43345
  // Border radius
41875
43346
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
41876
43347
  // Id
@@ -41884,13 +43355,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41884
43355
  // Classes
41885
43356
  values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
41886
43357
  // Margins
41887
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
43358
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
41888
43359
  // Link
41889
- (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
43360
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
41890
43361
  // Src
41891
43362
  values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
41892
43363
  // Image size
41893
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
43364
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
41894
43365
  }
41895
43366
 
41896
43367
 
@@ -41981,19 +43452,17 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41981
43452
  * Jodit Editor (https://xdsoft.net/jodit/)
41982
43453
  * Released under MIT see LICENSE.txt in the project root for license information.
41983
43454
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41984
- */ /**
41985
- * @module plugins/image-properties
41986
43455
  */
41987
43456
 
41988
43457
 
41989
43458
 
41990
- /** @private */ async function readSizes(image, values, state) {
43459
+ /** @private */ async function readSizes(image, values, state, captionWrapper) {
41991
43460
  try {
41992
43461
  await image.decode();
41993
43462
  } catch (e) {
41994
43463
  console.error(e);
41995
43464
  }
41996
- const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
43465
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(captionWrapper !== null && captionWrapper !== void 0 ? captionWrapper : image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
41997
43466
  const height = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'height') || false;
41998
43467
  values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
41999
43468
  if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
@@ -42268,6 +43737,12 @@ UIImagePropertiesForm = __decorate([
42268
43737
  <label>~Alternative~</label>
42269
43738
  <input type="text" class="jodit-input &__imageAlt"/>
42270
43739
  </div>
43740
+ <div class="jodit-form__group &__captionCheckbox">
43741
+ <label class="jodit_vertical_middle">
43742
+ <input type="checkbox" class="jodit-checkbox &__imageCaption"/>
43743
+ <span>~Caption~</span>
43744
+ </label>
43745
+ </div>
42271
43746
  <div class="jodit-form__group &__editLink">
42272
43747
  <label>~Link~</label>
42273
43748
  <input type="text" class="jodit-input &__imageLink"/>
@@ -42312,6 +43787,13 @@ UIImagePropertiesForm = __decorate([
42312
43787
  onAltChange() {
42313
43788
  this.state.values.imageAlt = this.getElm('imageAlt').value;
42314
43789
  }
43790
+ onStateCaptionChange() {
43791
+ const caption = this.getElm('imageCaption');
43792
+ caption.checked = this.state.values.imageCaption;
43793
+ }
43794
+ onCaptionChange() {
43795
+ this.state.values.imageCaption = this.getElm('imageCaption').checked;
43796
+ }
42315
43797
  onStateImageLinkChange() {
42316
43798
  const imageLink = this.getElm('imageLink');
42317
43799
  imageLink.value = this.state.values.imageLink;
@@ -42342,6 +43824,10 @@ UIImagePropertiesForm = __decorate([
42342
43824
  'editAlt',
42343
43825
  'editAlt'
42344
43826
  ],
43827
+ [
43828
+ 'showCaptionCheckbox',
43829
+ 'captionCheckbox'
43830
+ ],
42345
43831
  [
42346
43832
  'editLink',
42347
43833
  'editLink'
@@ -42397,6 +43883,12 @@ __decorate([
42397
43883
  __decorate([
42398
43884
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
42399
43885
  ], UIImageMainTab.prototype, "onAltChange", null);
43886
+ __decorate([
43887
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
43888
+ ], UIImageMainTab.prototype, "onStateCaptionChange", null);
43889
+ __decorate([
43890
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
43891
+ ], UIImageMainTab.prototype, "onCaptionChange", null);
42400
43892
  __decorate([
42401
43893
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
42402
43894
  ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
@@ -42841,6 +44333,33 @@ UIImagePositionTab = __decorate([
42841
44333
  /* harmony export */ ]);
42842
44334
 
42843
44335
 
44336
+ /***/ }),
44337
+
44338
+ /***/ 29509:
44339
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44340
+
44341
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44342
+ /* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
44343
+ /* harmony export */ });
44344
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
44345
+ /*!
44346
+ * Jodit Editor (https://xdsoft.net/jodit/)
44347
+ * Released under MIT see LICENSE.txt in the project root for license information.
44348
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44349
+ */
44350
+ /**
44351
+ * Gives the image a caption or takes it away, and returns the element that
44352
+ * holds the image's place on the page: the caption's, or the image
44353
+ * @private
44354
+ */ function applyCaption(j, image, imageCaption) {
44355
+ var _a;
44356
+ if (j.o.image.showCaptionCheckbox) {
44357
+ j.e.fire('toggleImageCaption', image, imageCaption);
44358
+ }
44359
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
44360
+ }
44361
+
44362
+
42844
44363
  /***/ }),
42845
44364
 
42846
44365
  /***/ 34755:
@@ -42852,9 +44371,10 @@ UIImagePositionTab = __decorate([
42852
44371
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42853
44372
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
42854
44373
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42855
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29615);
42856
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14721);
42857
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87602);
44374
+ /* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
44375
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
44376
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
44377
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
42858
44378
  /*!
42859
44379
  * Jodit Editor (https://xdsoft.net/jodit/)
42860
44380
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42865,11 +44385,13 @@ UIImagePositionTab = __decorate([
42865
44385
 
42866
44386
 
42867
44387
 
44388
+
42868
44389
  /**
42869
44390
  * Apply form's values to image
42870
44391
  * @private
42871
44392
  */ function applyValuesToImage(j, state, image) {
42872
- const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
44393
+ var _a;
44394
+ const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
42873
44395
  const opt = j.o;
42874
44396
  // styles
42875
44397
  if (opt.image.editStyle) {
@@ -42879,7 +44401,7 @@ UIImagePositionTab = __decorate([
42879
44401
  if (imageSrc) {
42880
44402
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
42881
44403
  } else {
42882
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
44404
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove((_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image);
42883
44405
  return;
42884
44406
  }
42885
44407
  // Border radius
@@ -42889,21 +44411,24 @@ UIImagePositionTab = __decorate([
42889
44411
  // Alt
42890
44412
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
42891
44413
  // Link
42892
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42893
- // Size
42894
- (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked);
42895
- // Margin
42896
- if (j.o.image.editMargins) {
42897
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
42898
- }
44414
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42899
44415
  if (opt.image.editClass) {
42900
44416
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
42901
44417
  }
42902
44418
  if (opt.image.editId) {
42903
44419
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
42904
44420
  }
44421
+ // The caption's element takes the image's place on the page and its width,
44422
+ // so it's added or taken away after the image's own style and classes
44423
+ const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
44424
+ // Size
44425
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
44426
+ // Margin
44427
+ if (j.o.image.editMargins) {
44428
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
44429
+ }
42905
44430
  if (opt.image.editAlign) {
42906
- (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));
44431
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(box, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, box));
42907
44432
  }
42908
44433
  }
42909
44434
 
@@ -42918,12 +44443,14 @@ UIImagePositionTab = __decorate([
42918
44443
  /* harmony export */ });
42919
44444
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42920
44445
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
44446
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
42921
44447
  /*!
42922
44448
  * Jodit Editor (https://xdsoft.net/jodit/)
42923
44449
  * Released under MIT see LICENSE.txt in the project root for license information.
42924
44450
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42925
44451
  */
42926
44452
 
44453
+
42927
44454
  /** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
42928
44455
  // Link
42929
44456
  let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
@@ -42937,8 +44464,11 @@ UIImagePositionTab = __decorate([
42937
44464
  const relParts = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
42938
44465
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
42939
44466
  }
42940
- } else {
42941
- if (link && link.parentNode) {
44467
+ } else if (link && link.parentNode) {
44468
+ // Froala keeps a linked image's caption inside the link
44469
+ if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
44470
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
44471
+ } else {
42942
44472
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
42943
44473
  }
42944
44474
  }
@@ -43016,7 +44546,19 @@ UIImagePositionTab = __decorate([
43016
44546
 
43017
44547
 
43018
44548
 
43019
- /** @private */ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
44549
+ /**
44550
+ * A captioned image fills its caption's element, `box`, which takes the width
44551
+ * @private
44552
+ */ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
44553
+ if (box !== image) {
44554
+ const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
44555
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
44556
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
44557
+ width: width && '100%',
44558
+ height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
44559
+ });
44560
+ return;
44561
+ }
43020
44562
  // Size
43021
44563
  if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
43022
44564
  const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
@@ -43180,19 +44722,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
43180
44722
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43181
44723
 
43182
44724
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44725
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
44726
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
43183
44727
  /*!
43184
44728
  * Jodit Editor (https://xdsoft.net/jodit/)
43185
44729
  * Released under MIT see LICENSE.txt in the project root for license information.
43186
44730
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43187
- */ /**
43188
- * @module plugins/indent
43189
44731
  */
44732
+
44733
+
43190
44734
  /**
43191
44735
  * Get style rule key for current direction
43192
44736
  * @internal
43193
44737
  */ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
44738
+ /**
44739
+ * Indents or outdents a box by `indentMargin`
44740
+ * @internal
44741
+ */ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44742
+ if (!currentBox) {
44743
+ return;
44744
+ }
44745
+ if (processedElements.has(currentBox)) {
44746
+ return;
44747
+ }
44748
+ const key = getKey(editor.o.direction, currentBox);
44749
+ processedElements.add(currentBox);
44750
+ const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
44751
+ let value = current ? parseInt(current, 10) : 0;
44752
+ value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
44753
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
44754
+ if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
44755
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
44756
+ }
44757
+ };
43194
44758
 
43195
44759
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
44760
+ /* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
43196
44761
  /* harmony export */ "getKey", 0, /* binding */ getKey
43197
44762
  /* harmony export */ ]);
43198
44763
 
@@ -43223,9 +44788,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
43223
44788
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
43224
44789
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
43225
44790
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43555);
43226
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
43227
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54389);
43228
- /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(302);
44791
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
44792
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
43229
44793
  /*!
43230
44794
  * Jodit Editor (https://xdsoft.net/jodit/)
43231
44795
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43236,24 +44800,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
43236
44800
 
43237
44801
 
43238
44802
 
43239
-
43240
- const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
43241
- if (!currentBox) {
43242
- return;
43243
- }
43244
- if (processedElements.has(currentBox)) {
43245
- return;
43246
- }
43247
- const key = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_6__.getKey)(editor.o.direction, currentBox);
43248
- processedElements.add(currentBox);
43249
- const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.cssInline)(currentBox, key);
43250
- let value = current ? parseInt(current, 10) : 0;
43251
- value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
43252
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(currentBox, key, value > 0 ? value : '');
43253
- if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style')) {
43254
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style', null);
43255
- }
43256
- };
43257
44803
  /**
43258
44804
  * Indents the line containing the selection or insertion point.
43259
44805
  */ function indent(editor) {
@@ -43272,7 +44818,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
43272
44818
  if (isBrMode && editor.s.isCollapsed()) {
43273
44819
  if (current) {
43274
44820
  const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
43275
- applyIndentToBox(processedElements, box, editor, command);
44821
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
43276
44822
  return false;
43277
44823
  }
43278
44824
  }
@@ -43286,7 +44832,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
43286
44832
  editor.s.restore();
43287
44833
  return false;
43288
44834
  }
43289
- applyIndentToBox(processedElements, currentBox, editor, command);
44835
+ ;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
43290
44836
  editor.s.restore();
43291
44837
  });
43292
44838
  editor.synchronizeValues();
@@ -43387,11 +44933,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43387
44933
  /* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
43388
44934
  /* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
43389
44935
  /* harmony import */ var _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75393);
43390
- /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14862);
43391
- /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96257);
43392
- /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9914);
43393
- /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53696);
43394
- /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(33489);
44936
+ /* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
44937
+ /* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
44938
+ /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
44939
+ /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
44940
+ /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
44941
+ /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
44942
+ /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
43395
44943
  /*!
43396
44944
  * Jodit Editor (https://xdsoft.net/jodit/)
43397
44945
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43411,13 +44959,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43411
44959
 
43412
44960
 
43413
44961
 
44962
+
44963
+
43414
44964
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
43415
44965
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
43416
44966
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
43417
44967
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
43418
44968
  'source'
43419
44969
  ];
43420
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]);
44970
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('caption', _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('headerrow', _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__["default"]);
43421
44971
  // Register cell popup buttons as global controls so they can be
43422
44972
  // referenced by name in custom popup configurations.
43423
44973
  // Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
@@ -43494,15 +45044,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
43494
45044
  /***/ 62000:
43495
45045
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43496
45046
 
43497
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27613);
43498
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
45047
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
45048
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
45049
+ /* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
45050
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43499
45051
  /*!
43500
45052
  * Jodit Editor (https://xdsoft.net/jodit/)
43501
45053
  * Released under MIT see LICENSE.txt in the project root for license information.
43502
45054
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43503
45055
  */
43504
45056
 
43505
- const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
45057
+
45058
+
45059
+ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43506
45060
  /* harmony default export */ __webpack_exports__["default"] = ([
43507
45061
  'brushCell',
43508
45062
  {
@@ -43517,7 +45071,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43517
45071
  exec: (editor, table, { control })=>{
43518
45072
  const command = cmd(control);
43519
45073
  editor.getInstance('Table', editor.o).getAllSelectedCells().forEach((cell)=>{
43520
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
45074
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
43521
45075
  });
43522
45076
  },
43523
45077
  tooltip: 'Vertical align'
@@ -43547,7 +45101,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43547
45101
  tableaddcolumnafter: 'Insert column after'
43548
45102
  },
43549
45103
  exec: (editor, table, { control })=>{
43550
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
45104
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43551
45105
  return;
43552
45106
  }
43553
45107
  if (!control.args) {
@@ -43565,7 +45119,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43565
45119
  tableaddrowafter: 'Insert row below'
43566
45120
  },
43567
45121
  exec: (editor, table, { control })=>{
43568
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
45122
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43569
45123
  return;
43570
45124
  }
43571
45125
  if (!control.args) {
@@ -43576,6 +45130,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43576
45130
  },
43577
45131
  tooltip: 'Add row'
43578
45132
  },
45133
+ {
45134
+ name: 'headerrow',
45135
+ exec: (editor, table)=>{
45136
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(table, 'table')) {
45137
+ return;
45138
+ }
45139
+ editor.execCommand('tableheaderrow', false, table);
45140
+ const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
45141
+ // Beside the cell that replaced the one it opened for
45142
+ if (cell) {
45143
+ editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
45144
+ }
45145
+ // The popup stays open, so the button shows the new state
45146
+ return true;
45147
+ },
45148
+ isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
45149
+ isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
45150
+ tooltip: 'Header row'
45151
+ },
43579
45152
  {
43580
45153
  name: 'deleteTable',
43581
45154
  icon: 'bin',
@@ -43586,7 +45159,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43586
45159
  tableempty: 'Empty cell'
43587
45160
  },
43588
45161
  exec: (editor, table, { control })=>{
43589
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
45162
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43590
45163
  return;
43591
45164
  }
43592
45165
  if (!control.args) {
@@ -43646,7 +45219,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43646
45219
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
43647
45220
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
43648
45221
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43649
- /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
45222
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
45223
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
43650
45224
  /*!
43651
45225
  * Jodit Editor (https://xdsoft.net/jodit/)
43652
45226
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43656,6 +45230,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43656
45230
 
43657
45231
 
43658
45232
 
45233
+
43659
45234
  // A Normal image sits where the text of its line is aligned (#1531)
43660
45235
  const lineAlign = (editor, elm)=>{
43661
45236
  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;
@@ -43676,7 +45251,15 @@ const lineAlign = (editor, elm)=>{
43676
45251
  return 'left';
43677
45252
  }
43678
45253
  };
43679
- 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';
45254
+ // A captioned image is aligned by the element holding it and its caption
45255
+ const alignedBox = (editor, elm)=>{
45256
+ var _a;
45257
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
45258
+ };
45259
+ const currentAlign = (editor, elm)=>{
45260
+ const box = alignedBox(editor, elm);
45261
+ return box ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(box, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box)) : 'normal';
45262
+ };
43680
45263
  const align = {
43681
45264
  name: 'left',
43682
45265
  childTemplate: (_, __, value)=>value,
@@ -43702,14 +45285,15 @@ const align = {
43702
45285
  'img',
43703
45286
  'jodit',
43704
45287
  'jodit-media'
43705
- ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
45288
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
43706
45289
  return;
43707
45290
  }
43708
45291
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43709
45292
  if (!command) {
43710
45293
  return false;
43711
45294
  }
43712
- ;(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));
45295
+ const box = alignedBox(editor, elm);
45296
+ (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(box, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box));
43713
45297
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
43714
45298
  'jodit',
43715
45299
  'jodit-media'
@@ -43728,7 +45312,8 @@ const align = {
43728
45312
  icon: 'bin',
43729
45313
  tooltip: 'Delete',
43730
45314
  exec: (editor, image)=>{
43731
- image && editor.s.removeNode(image);
45315
+ var _a;
45316
+ image && editor.s.removeNode((_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)) !== null && _a !== void 0 ? _a : image);
43732
45317
  }
43733
45318
  },
43734
45319
  {
@@ -43741,6 +45326,24 @@ const align = {
43741
45326
  },
43742
45327
  tooltip: 'Edit'
43743
45328
  },
45329
+ {
45330
+ name: 'caption',
45331
+ exec: (editor, image)=>{
45332
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
45333
+ return;
45334
+ }
45335
+ const caption = editor.e.fire('toggleImageCaption', image);
45336
+ editor.synchronizeValues();
45337
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
45338
+ editor.e.fire('hideResizer');
45339
+ editor.s.setCursorIn(caption);
45340
+ } else {
45341
+ editor.e.fire('recalcPositionPopup');
45342
+ }
45343
+ },
45344
+ isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
45345
+ tooltip: 'Caption'
45346
+ },
43744
45347
  {
43745
45348
  name: 'valign',
43746
45349
  list: [
@@ -43750,13 +45353,14 @@ const align = {
43750
45353
  'Normal'
43751
45354
  ],
43752
45355
  tooltip: 'Vertical align',
43753
- // `vertical-align` only moves an image in the line, not a floated or block one
45356
+ // `vertical-align` only moves an image in the line, not a floated or block
45357
+ // one, nor a captioned one, which is placed by its caption's element
43754
45358
  isDisabled: (editor, button)=>{
43755
45359
  const image = button.target;
43756
45360
  return Boolean(image && ([
43757
45361
  'left',
43758
45362
  'right'
43759
- ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
45363
+ ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block' || (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)));
43760
45364
  },
43761
45365
  exec: (editor, image, { control })=>{
43762
45366
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
@@ -43834,6 +45438,22 @@ const align = {
43834
45438
  /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"7\" rx=\"1\"/><path d=\"M12 3v7M12 14v7m-3.5-3.5h7\"/> </g> </svg> ");
43835
45439
 
43836
45440
 
45441
+ /***/ }),
45442
+
45443
+ /***/ 72972:
45444
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45445
+
45446
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3 13 5-4 4 3 3-3 6 5\"/><path d=\"M7 21h10\"/> </g> </svg> ");
45447
+
45448
+
45449
+ /***/ }),
45450
+
45451
+ /***/ 44597:
45452
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45453
+
45454
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2.5\"/><path d=\"M3 9V5.5A2.5 2.5 0 0 1 5.5 3h13A2.5 2.5 0 0 1 21 5.5V9z\" fill=\"currentColor\"/><path d=\"M3 15h18M9 9v12M15 9v12\"/> </g> </svg> ");
45455
+
45456
+
43837
45457
  /***/ }),
43838
45458
 
43839
45459
  /***/ 14862:
@@ -43926,8 +45546,8 @@ const align = {
43926
45546
  if (target && type && this.canShowPopupForType(type)) {
43927
45547
  const isMedia = type === 'jodit-media';
43928
45548
  // Beside the media in a wrapper kept in the content, which can fill
43929
- // the line
43930
- const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
45549
+ // the line, and below a captioned image's caption, so it stays in view
45550
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, target) || target;
43931
45551
  this.showPopup(()=>this.__bound(bound, isMedia), type, target);
43932
45552
  return false;
43933
45553
  }
@@ -47205,6 +48825,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
47205
48825
  * Check if root node is empty
47206
48826
  * @private
47207
48827
  */ function isEditorEmpty(root) {
48828
+ var _a;
48829
+ // A non-breaking space is typed, where other white space can just lay out
48830
+ // the HTML
48831
+ return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
48832
+ }
48833
+ function isBlank(root) {
47208
48834
  var _a;
47209
48835
  if (!root.firstChild) {
47210
48836
  return true;
@@ -47725,6 +49351,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
47725
49351
 
47726
49352
 
47727
49353
  const key = 'table_processor_observer-resize';
49354
+ /**
49355
+ * How near the top or bottom of what a row scrolls in the pointer starts
49356
+ * scrolling it, as the editor's iframe passes on no moves outside it
49357
+ */ const SCROLL_EDGE = 20;
47728
49358
  /**
47729
49359
  * Process tables in editor
47730
49360
  */ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
@@ -47744,7 +49374,11 @@ const key = 'table_processor_observer-resize';
47744
49374
  }
47745
49375
  hideResizeHandle() {
47746
49376
  this.hideTimeout = this.j.async.setTimeout(()=>{
47747
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
49377
+ // A late move from inside the cell can come once the pointer
49378
+ // is on the handle, which covers the border
49379
+ if (!this.resizeHandler.matches(':hover')) {
49380
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
49381
+ }
47748
49382
  }, {
47749
49383
  timeout: this.j.defaultTimeout,
47750
49384
  label: 'hideResizer'
@@ -47761,6 +49395,30 @@ const key = 'table_processor_observer-resize';
47761
49395
  this.startX = event.clientX;
47762
49396
  this.j.lock(key);
47763
49397
  this.resizeHandler.classList.add('jodit-table-resizer_moved');
49398
+ if (this.workRow) {
49399
+ this.startY = event.clientY;
49400
+ this.startHeight = this.workRow.offsetHeight;
49401
+ this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
49402
+ this.scrolled = 0;
49403
+ this.anchored = scrollersOf(this.workRow).map((elm)=>{
49404
+ const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
49405
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
49406
+ return [
49407
+ elm,
49408
+ style
49409
+ ];
49410
+ });
49411
+ return false;
49412
+ }
49413
+ this.startStyles = [
49414
+ this.workTable,
49415
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
49416
+ ].map((elm)=>[
49417
+ elm,
49418
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
49419
+ ]);
49420
+ this.startLeft = parseFloat(this.resizeHandler.style.left);
49421
+ this.startEdge = this.columnEdge();
47764
49422
  let box;
47765
49423
  this.minX = 0;
47766
49424
  this.maxX = 1000000;
@@ -47787,12 +49445,21 @@ const key = 'table_processor_observer-resize';
47787
49445
  /**
47788
49446
  * Mouse move after click on resize handle
47789
49447
  */ onMouseMove(event) {
49448
+ var _a;
47790
49449
  if (!this.drag) {
47791
49450
  return;
47792
49451
  }
47793
49452
  this.j.e.fire('closeAllPopups');
47794
49453
  let x = event.clientX;
47795
49454
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.resizeHandler.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
49455
+ if (this.workRow) {
49456
+ const view = scrollViewOf(this.workRow);
49457
+ this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
49458
+ this.resizeRow(this.workRow);
49459
+ this.scrollAlong(view, event.clientY);
49460
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
49461
+ return;
49462
+ }
47796
49463
  if (x < this.minX) {
47797
49464
  x = this.minX;
47798
49465
  }
@@ -47800,7 +49467,14 @@ const key = 'table_processor_observer-resize';
47800
49467
  x = this.maxX;
47801
49468
  }
47802
49469
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
47803
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', x - (this.j.o.iframe ? 0 : workplacePosition.left) + 'px');
49470
+ this.restoreStyles();
49471
+ this.resizeColumnsOrTable();
49472
+ const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
49473
+ Object.assign(this.resizeHandler.style, {
49474
+ left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
49475
+ top: tableBox.top - workplacePosition.top + 'px',
49476
+ height: tableBox.height + 'px'
49477
+ });
47804
49478
  const sel = this.j.s.sel;
47805
49479
  sel && sel.removeAllRanges();
47806
49480
  }
@@ -47817,17 +49491,96 @@ const key = 'table_processor_observer-resize';
47817
49491
  this.drag = false;
47818
49492
  this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
47819
49493
  this.resizeHandler.classList.remove('jodit-table-resizer_moved');
47820
- if (this.startX !== e.clientX) {
47821
- // resize column
47822
- if (this.wholeTable == null) {
47823
- this.resizeColumns();
49494
+ if (this.workRow) {
49495
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
49496
+ this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
49497
+ this.anchored = [];
49498
+ const height = this.workRow.offsetHeight;
49499
+ if (height !== this.startHeight) {
49500
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
47824
49501
  } else {
47825
- this.resizeTable();
49502
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
49503
+ }
49504
+ } else {
49505
+ this.restoreStyles();
49506
+ if (this.startX !== e.clientX) {
49507
+ this.resizeColumnsOrTable();
47826
49508
  }
47827
49509
  }
47828
49510
  this.j.synchronizeValues();
47829
49511
  this.j.s.focus();
47830
49512
  }
49513
+ resizeColumnsOrTable() {
49514
+ if (this.wholeTable == null) {
49515
+ this.resizeColumns();
49516
+ } else {
49517
+ this.resizeTable();
49518
+ }
49519
+ }
49520
+ restoreStyles() {
49521
+ this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
49522
+ }
49523
+ /**
49524
+ * Where the border the handle is on lies: the work cell's left side
49525
+ * for the table's left edge, otherwise its right side
49526
+ */ columnEdge() {
49527
+ const { left, right } = this.workCell.getBoundingClientRect();
49528
+ return this.wholeTable === true ? left : right;
49529
+ }
49530
+ /**
49531
+ * Sets the row's height from where the pointer is, and how far the drag
49532
+ * has scrolled. The browser keeps the row as tall as its content
49533
+ */ resizeRow(row) {
49534
+ const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
49535
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
49536
+ this.placeRowHandle(row);
49537
+ return row.offsetHeight === height;
49538
+ }
49539
+ /**
49540
+ * While the pointer is near or past the top or bottom of the part of the
49541
+ * row's scroller in view, scrolls it on, and the row's border with it
49542
+ */ scrollAlong(view, clientY) {
49543
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
49544
+ const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
49545
+ if (!past) {
49546
+ return;
49547
+ }
49548
+ const { scroller } = view;
49549
+ const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
49550
+ const scroll = ()=>{
49551
+ const { workRow } = this;
49552
+ if (!workRow) {
49553
+ return;
49554
+ }
49555
+ const scrollTop = scroller.scrollTop;
49556
+ if (step > 0) {
49557
+ // Growing the row first makes the room to scroll down into
49558
+ this.scrolled += step;
49559
+ this.resizeRow(workRow);
49560
+ scroller.scrollTop = scrollTop + step;
49561
+ const missed = step - (scroller.scrollTop - scrollTop);
49562
+ if (missed > 0.5) {
49563
+ this.scrolled -= missed;
49564
+ this.resizeRow(workRow);
49565
+ return;
49566
+ }
49567
+ this.placeRowHandle(workRow);
49568
+ } else {
49569
+ scroller.scrollTop = scrollTop + step;
49570
+ const moved = scroller.scrollTop - scrollTop;
49571
+ this.scrolled += moved;
49572
+ // A row at its content's height can't follow the pointer up
49573
+ if (!moved || !this.resizeRow(workRow)) {
49574
+ scroller.scrollTop = scrollTop;
49575
+ this.scrolled -= moved;
49576
+ this.resizeRow(workRow);
49577
+ return;
49578
+ }
49579
+ }
49580
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
49581
+ };
49582
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
49583
+ }
47831
49584
  /**
47832
49585
  * Resize only one column
47833
49586
  */ resizeColumns() {
@@ -47870,15 +49623,20 @@ const key = 'table_processor_observer-resize';
47870
49623
  }
47871
49624
  /**
47872
49625
  * Calc helper resize handle position
47873
- */ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
49626
+ */ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
47874
49627
  const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
47875
49628
  if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
47876
- this.hideResizeHandle();
49629
+ if (!this.calcRowHandlePosition(cell, clientY)) {
49630
+ this.hideResizeHandle();
49631
+ }
47877
49632
  return;
47878
49633
  }
49634
+ this.workRow = null;
49635
+ this.resizeHandler.classList.remove('jodit-table-resizer_row');
47879
49636
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), parentBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(table, this.j, this.j.ed);
47880
49637
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', (offsetX <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + 'px');
47881
49638
  Object.assign(this.resizeHandler.style, {
49639
+ width: '',
47882
49640
  height: parentBox.height + 'px',
47883
49641
  top: parentBox.top - workplacePosition.top + 'px'
47884
49642
  });
@@ -47891,6 +49649,36 @@ const key = 'table_processor_observer-resize';
47891
49649
  this.setWorkCell(cell, !nextTD ? false : null);
47892
49650
  }
47893
49651
  }
49652
+ /**
49653
+ * Shows the handle across the table on the border below a row, near the
49654
+ * cell's bottom or near its top, which is the bottom of the row above.
49655
+ * The table's top edge has no row above it
49656
+ */ calcRowHandlePosition(cell, clientY) {
49657
+ const { top, bottom } = cell.getBoundingClientRect();
49658
+ const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(cell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), this.j.editor);
49659
+ const index = cell.parentNode.rowIndex;
49660
+ const row = Math.abs(bottom - clientY) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index + cell.rowSpan - 1] : Math.abs(clientY - top) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index - 1] : null;
49661
+ if (!row) {
49662
+ return false;
49663
+ }
49664
+ this.workRow = row;
49665
+ this.workTable = table;
49666
+ this.resizeHandler.classList.add('jodit-table-resizer_row');
49667
+ this.placeRowHandle(row);
49668
+ this.showResizeHandle();
49669
+ return true;
49670
+ }
49671
+ /**
49672
+ * Lays the handle across the table on the border below the row
49673
+ */ placeRowHandle(row) {
49674
+ const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed), rowBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(row, this.j, this.j.ed);
49675
+ Object.assign(this.resizeHandler.style, {
49676
+ left: tableBox.left - workplacePosition.left + 'px',
49677
+ width: tableBox.width + 'px',
49678
+ height: '',
49679
+ top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
49680
+ });
49681
+ }
47894
49682
  /** @override */ afterInit(editor) {
47895
49683
  if (!editor.o.tableAllowCellResize) {
47896
49684
  return;
@@ -47898,7 +49686,7 @@ const key = 'table_processor_observer-resize';
47898
49686
  editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
47899
49687
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
47900
49688
  }).on(this.j.ow, 'scroll.resize-cells', ()=>{
47901
- if (!this.drag) {
49689
+ if (!this.drag || this.workRow) {
47902
49690
  return;
47903
49691
  }
47904
49692
  const parent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.workCell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), editor.editor);
@@ -47922,7 +49710,7 @@ const key = 'table_processor_observer-resize';
47922
49710
  }
47923
49711
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
47924
49712
  this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
47925
- if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
49713
+ if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
47926
49714
  this.hideResizeHandle();
47927
49715
  }
47928
49716
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
@@ -47933,7 +49721,7 @@ const key = 'table_processor_observer-resize';
47933
49721
  if (!cell) {
47934
49722
  return;
47935
49723
  }
47936
- this.calcHandlePosition(table, cell, event.offsetX);
49724
+ this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
47937
49725
  }, {
47938
49726
  timeout: this.j.defaultTimeout
47939
49727
  }));
@@ -47954,6 +49742,10 @@ const key = 'table_processor_observer-resize';
47954
49742
  this.resizeHandler = this.j.c.div('jodit-table-resizer');
47955
49743
  this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
47956
49744
  this.j.async.clearTimeout(this.hideTimeout);
49745
+ }).on(this.resizeHandler, 'mouseleave.table', ()=>{
49746
+ if (!this.drag) {
49747
+ this.hideResizeHandle();
49748
+ }
47957
49749
  });
47958
49750
  }
47959
49751
  };
@@ -47962,6 +49754,25 @@ const key = 'table_processor_observer-resize';
47962
49754
  this.minX = 0;
47963
49755
  this.maxX = 0;
47964
49756
  this.startX = 0;
49757
+ /**
49758
+ * The table's and its cells' styles as a column drag started, put back
49759
+ * before each new width
49760
+ */ this.startStyles = [];
49761
+ this.startLeft = 0;
49762
+ this.startEdge = 0;
49763
+ /**
49764
+ * The row whose height the handle sets, or null while it sets a width
49765
+ */ this.workRow = null;
49766
+ this.startY = 0;
49767
+ this.startHeight = 0;
49768
+ this.rowStyle = null;
49769
+ /**
49770
+ * The boxes that scroll the row, with their styles, as a row drag turns
49771
+ * off their scroll anchoring, which would move the border off the pointer
49772
+ */ this.anchored = [];
49773
+ this.scrolled = 0;
49774
+ this.scrollFrame = 0;
49775
+ this.pointerY = 0;
47965
49776
  }
47966
49777
  }
47967
49778
  __decorate([
@@ -47976,6 +49787,45 @@ __decorate([
47976
49787
  __decorate([
47977
49788
  _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
47978
49789
  ], resizeCells.prototype, "observe", null);
49790
+ /**
49791
+ * The boxes around the row that can scroll it, nearest first, and its
49792
+ * document's
49793
+ */ function scrollersOf(row) {
49794
+ const doc = row.ownerDocument;
49795
+ const root = doc.scrollingElement || doc.documentElement;
49796
+ const scrollers = [];
49797
+ for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
49798
+ if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
49799
+ scrollers.push(elm);
49800
+ }
49801
+ }
49802
+ return [
49803
+ ...scrollers,
49804
+ root
49805
+ ];
49806
+ }
49807
+ /**
49808
+ * What scrolls the row up and down, the nearest box around it with more
49809
+ * than it shows or else its document, and the part of it in the window's view
49810
+ */ function scrollViewOf(row) {
49811
+ var _a, _b, _c;
49812
+ const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
49813
+ const scrollers = scrollersOf(row);
49814
+ const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
49815
+ if (scroller === scrollers[scrollers.length - 1]) {
49816
+ return {
49817
+ scroller,
49818
+ top: 0,
49819
+ bottom: height
49820
+ };
49821
+ }
49822
+ const top = scroller.getBoundingClientRect().top + scroller.clientTop;
49823
+ return {
49824
+ scroller,
49825
+ top: Math.max(top, 0),
49826
+ bottom: Math.min(top + scroller.clientHeight, height)
49827
+ };
49828
+ }
47979
49829
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
47980
49830
 
47981
49831
 
@@ -48451,6 +50301,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
48451
50301
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
48452
50302
  }
48453
50303
  applySize(element, key, value) {
50304
+ // A captioned image fills the element holding it and its caption,
50305
+ // which takes the width
50306
+ const wrapper = key === 'width' && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'img') ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, element) : null;
50307
+ if (wrapper) {
50308
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
50309
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
50310
+ return;
50311
+ }
48454
50312
  const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
48455
50313
  if (changeAttrs) {
48456
50314
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
@@ -48465,6 +50323,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
48465
50323
  return Boolean(this.element && this.j.editor.contains(this.element));
48466
50324
  }
48467
50325
  onDelete(e) {
50326
+ var _a;
48468
50327
  if (!this.element) {
48469
50328
  return;
48470
50329
  }
@@ -48473,7 +50332,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
48473
50332
  return;
48474
50333
  }
48475
50334
  if (this.element.tagName !== 'JODIT') {
48476
- this.j.s.select(this.element);
50335
+ this.j.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.element)) !== null && _a !== void 0 ? _a : this.element);
48477
50336
  } else {
48478
50337
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
48479
50338
  this.hide();
@@ -49702,8 +51561,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49702
51561
  'touchstartTd',
49703
51562
  'touchstartTh'
49704
51563
  ].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
49705
- // and mouseup on another cell call `click` only for `TR` element.
49706
- .on('clickTr clickTbody', ()=>{
51564
+ // and mouseup on another cell call `click` only for their common
51565
+ // ancestor: the row, the section, or the table across sections
51566
+ .on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
49707
51567
  var _a;
49708
51568
  const cellsCount = this.__tableModule.getAllSelectedCells().length;
49709
51569
  if (cellsCount) {
@@ -49867,14 +51727,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49867
51727
  }
49868
51728
  this.j.e.fire('hidePopup');
49869
51729
  e.stopPropagation();
49870
- // Hack for FireFox for force redraw selection
49871
- (()=>{
49872
- const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>');
49873
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, n);
49874
- this.j.async.setTimeout(()=>{
49875
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(n);
49876
- }, this.j.defaultTimeout / 5);
49877
- })();
49878
51730
  }
49879
51731
  /**
49880
51732
  * On click in outside - remove selection
@@ -49973,7 +51825,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49973
51825
  this.j.synchronizeValues();
49974
51826
  return false;
49975
51827
  }
49976
- if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
51828
+ if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
49977
51829
  command = command.replace('table', '');
49978
51830
  const cells = this.__tableModule.getAllSelectedCells();
49979
51831
  if (cells.length) {
@@ -50040,6 +51892,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
50040
51892
  case 'addrowbefore':
50041
51893
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
50042
51894
  break;
51895
+ case 'headerrow':
51896
+ this.__toggleHeaderRow(table, cells);
51897
+ break;
50043
51898
  }
50044
51899
  if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
50045
51900
  this.__removeTable(table);
@@ -50048,6 +51903,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
50048
51903
  return false;
50049
51904
  }
50050
51905
  }
51906
+ /**
51907
+ * Turns the table's header row on or off. The caret and the marked cells
51908
+ * move to the cells that replace them
51909
+ */ __toggleHeaderRow(table, cells) {
51910
+ var _a, _b;
51911
+ const module = this.__tableModule;
51912
+ this.j.s.save();
51913
+ const replaced = module.toggleHeaderRow(table);
51914
+ this.j.s.restore();
51915
+ cells.forEach((cell)=>{
51916
+ const next = replaced.get(cell);
51917
+ if (next) {
51918
+ module.removeSelection(cell);
51919
+ module.addSelection(next);
51920
+ }
51921
+ });
51922
+ // As after the click that marked it, the command's own change keeps
51923
+ // the marks, so the popup can stay open for another toggle
51924
+ const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
51925
+ this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
51926
+ }
50051
51927
  /**
50052
51928
  * The cell that takes the caret when rows or columns are deleted: the next
50053
51929
  * one in the same column (or row) that is not deleted, else the previous one
@@ -54303,9 +56179,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
54303
56179
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
54304
56180
 
54305
56181
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54306
- /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; }
56182
+ /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
56183
+ /* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
56184
+ /* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
56185
+ /* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
54307
56186
  /* harmony export */ });
54308
56187
  /* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
56188
+ /* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
54309
56189
  /*!
54310
56190
  * Jodit Editor (https://xdsoft.net/jodit/)
54311
56191
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -54315,6 +56195,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
54315
56195
  */
54316
56196
 
54317
56197
 
56198
+
54318
56199
  /***/ }),
54319
56200
 
54320
56201
  /***/ 26658:
@@ -54336,7 +56217,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
54336
56217
  * If so then add an internal list
54337
56218
  * @private
54338
56219
  */ function onTabInsideLi(jodit, shift = false) {
54339
- if (!jodit.o.tab.tabInsideLiInsertNewList) {
56220
+ // Focused with no range, as WebKit can leave it, there's no caret to
56221
+ // mark
56222
+ if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
54340
56223
  return false;
54341
56224
  }
54342
56225
  const [fake, fake2] = fakeCursors(jodit);
@@ -54433,6 +56316,279 @@ function removeNestedList(jodit, list, li) {
54433
56316
  }
54434
56317
 
54435
56318
 
56319
+ /***/ }),
56320
+
56321
+ /***/ 39481:
56322
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
56323
+
56324
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
56325
+ /* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
56326
+ /* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
56327
+ /* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
56328
+ /* harmony export */ });
56329
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
56330
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
56331
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
56332
+ /* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
56333
+ /* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
56334
+ /*!
56335
+ * Jodit Editor (https://xdsoft.net/jodit/)
56336
+ * Released under MIT see LICENSE.txt in the project root for license information.
56337
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
56338
+ */
56339
+
56340
+
56341
+
56342
+
56343
+ const KEEPS_TABS = new Set([
56344
+ 'pre',
56345
+ 'pre-wrap',
56346
+ 'break-spaces'
56347
+ ]);
56348
+ const KEEPS_TABS_TAGS = new Set([
56349
+ 'pre',
56350
+ 'textarea',
56351
+ 'style',
56352
+ 'script'
56353
+ ]);
56354
+ /**
56355
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
56356
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
56357
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
56358
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
56359
+ * on: Escape and then Tab does that
56360
+ * @private
56361
+ */ function onTabSpaces(jodit, shift) {
56362
+ const { spaces } = jodit.o.tab;
56363
+ const current = jodit.s.current();
56364
+ if (!spaces || jodit.o.readonly || jodit.isLocked) {
56365
+ return false;
56366
+ }
56367
+ // The editor has the focus but no caret, so there's nowhere to put
56368
+ // anything, but the focus stays
56369
+ if (!current) {
56370
+ return true;
56371
+ }
56372
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
56373
+ return false;
56374
+ }
56375
+ if (!jodit.s.isCollapsed()) {
56376
+ jodit.execCommand(shift ? 'outdent' : 'indent');
56377
+ return true;
56378
+ }
56379
+ const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
56380
+ const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
56381
+ if (list && (!shift || isIndented(jodit, list))) {
56382
+ (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
56383
+ jodit.synchronizeValues();
56384
+ return true;
56385
+ }
56386
+ if (shift) {
56387
+ unindent(jodit, current, spaces);
56388
+ return true;
56389
+ }
56390
+ const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
56391
+ const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
56392
+ jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
56393
+ return true;
56394
+ }
56395
+ /**
56396
+ * Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
56397
+ * it, then a tab or up to `spaces` spaces at the start of its line, then the
56398
+ * indent of its block
56399
+ */ function unindent(jodit, current, spaces) {
56400
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
56401
+ const caret = jodit.createInside.fake();
56402
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
56403
+ let removed;
56404
+ try {
56405
+ removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
56406
+ if (removed) {
56407
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
56408
+ }
56409
+ } finally{
56410
+ jodit.s.setCursorBefore(caret);
56411
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
56412
+ }
56413
+ if (removed) {
56414
+ jodit.synchronizeValues();
56415
+ } else if (block && isIndented(jodit, block)) {
56416
+ jodit.execCommand('outdent');
56417
+ }
56418
+ }
56419
+ function removeTabBefore(caret) {
56420
+ const before = caret.previousSibling;
56421
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
56422
+ before.deleteData(before.length - 1, 1);
56423
+ return true;
56424
+ }
56425
+ return false;
56426
+ }
56427
+ function removeLineIndent(jodit, block, caret, spaces) {
56428
+ const { whiteSpace } = jodit.ew.getComputedStyle(block);
56429
+ const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
56430
+ acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
56431
+ });
56432
+ const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
56433
+ return removeIndentAt(walker, start, offset, caret, spaces);
56434
+ }
56435
+ /**
56436
+ * Where the caret's line starts: after a `<br>`, after a newline where white
56437
+ * space keeps it, or at the caret
56438
+ */ function lineStart(walker, caret, keepsBreaks) {
56439
+ let start = null;
56440
+ let offset = 0;
56441
+ for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
56442
+ const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
56443
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
56444
+ start = null;
56445
+ } else if (lineBreak >= 0) {
56446
+ start = node;
56447
+ offset = lineBreak + 1;
56448
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
56449
+ start = node;
56450
+ offset = 0;
56451
+ }
56452
+ }
56453
+ return start ? [
56454
+ start,
56455
+ offset
56456
+ ] : [
56457
+ caret,
56458
+ 0
56459
+ ];
56460
+ }
56461
+ function removeIndentAt(walker, start, startOffset, caret, spaces) {
56462
+ let removed = 0;
56463
+ let offset = startOffset;
56464
+ walker.currentNode = start;
56465
+ for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
56466
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
56467
+ const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
56468
+ node.deleteData(offset, end - offset);
56469
+ removed += count;
56470
+ if (offset < node.length) {
56471
+ break;
56472
+ }
56473
+ }
56474
+ offset = 0;
56475
+ }
56476
+ return removed > 0;
56477
+ }
56478
+ /**
56479
+ * Where up to `count` spaces from `offset` end, and how many there were. A
56480
+ * tab at the start of a line is a whole indent
56481
+ */ function scanIndent(text, offset, count, atLineStart) {
56482
+ if (atLineStart && text[offset] === '\t') {
56483
+ return [
56484
+ offset + 1,
56485
+ count
56486
+ ];
56487
+ }
56488
+ let end = offset;
56489
+ let found = 0;
56490
+ for(; end < text.length && found < count; end += 1){
56491
+ const char = text[end];
56492
+ if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
56493
+ break;
56494
+ }
56495
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
56496
+ found += 1;
56497
+ }
56498
+ }
56499
+ return [
56500
+ end,
56501
+ found
56502
+ ];
56503
+ }
56504
+ function isIndented(jodit, box) {
56505
+ return parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(box, (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.getKey)(jodit.o.direction, box)) || '0', 10) > 0;
56506
+ }
56507
+ /**
56508
+ * With `tab.spaces`, Backspace just after that many spaces removes them
56509
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
56510
+ * if one of them is non-breaking, so a space between words stays
56511
+ * @private
56512
+ */ function removeTabSpaces(jodit, caret, upTo = false) {
56513
+ const { spaces } = jodit.o.tab;
56514
+ if (!spaces) {
56515
+ return false;
56516
+ }
56517
+ const range = jodit.s.createRange();
56518
+ range.setEndBefore(caret);
56519
+ let count = 0;
56520
+ let nonBreaking = false;
56521
+ for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
56522
+ let offset = node.length;
56523
+ for(; offset > 0 && count < spaces; offset -= 1){
56524
+ const char = node.data[offset - 1];
56525
+ if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
56526
+ nonBreaking = true;
56527
+ } else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
56528
+ break;
56529
+ }
56530
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
56531
+ count += 1;
56532
+ }
56533
+ }
56534
+ range.setStart(node, offset);
56535
+ if (offset && count < spaces) {
56536
+ break;
56537
+ }
56538
+ }
56539
+ if (upTo ? !nonBreaking : count < spaces) {
56540
+ return false;
56541
+ }
56542
+ range.deleteContents();
56543
+ // An emptied line keeps a <br>, as after any Backspace, or it has no
56544
+ // height to hold the caret
56545
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
56546
+ return true;
56547
+ }
56548
+ /**
56549
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
56550
+ * show it as one space. Tabs in white space that's kept, and those that only
56551
+ * lay out the HTML, stay as they are
56552
+ * @private
56553
+ */ function tabsToSpaces(jodit, html) {
56554
+ var _a;
56555
+ const { spaces } = jodit.o.tab;
56556
+ const current = jodit.s.current();
56557
+ const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
56558
+ if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
56559
+ return;
56560
+ }
56561
+ // A template parses without loading images or running scripts
56562
+ const template = jodit.ed.createElement('template');
56563
+ template.innerHTML = html;
56564
+ const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
56565
+ let changed = false;
56566
+ for(let node = walker.nextNode(); node; node = walker.nextNode()){
56567
+ const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
56568
+ if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
56569
+ node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
56570
+ changed = true;
56571
+ }
56572
+ }
56573
+ return changed ? template.innerHTML : undefined;
56574
+ }
56575
+ /**
56576
+ * The fragment isn't rendered, so this reads the white space its own styles
56577
+ * and tags set. The text of `<style>` and `<script>` isn't shown at all
56578
+ */ function keepsTabs(node) {
56579
+ for(let el = node.parentElement; el; el = el.parentElement){
56580
+ const { whiteSpace } = el.style;
56581
+ if (whiteSpace) {
56582
+ return KEEPS_TABS.has(whiteSpace);
56583
+ }
56584
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
56585
+ return true;
56586
+ }
56587
+ }
56588
+ return false;
56589
+ }
56590
+
56591
+
54436
56592
  /***/ }),
54437
56593
 
54438
56594
  /***/ 66288:
@@ -54447,7 +56603,8 @@ function removeNestedList(jodit, list, li) {
54447
56603
  * @module plugins/tab
54448
56604
  */
54449
56605
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
54450
- tabInsideLiInsertNewList: true
56606
+ tabInsideLiInsertNewList: true,
56607
+ spaces: 0
54451
56608
  };
54452
56609
 
54453
56610
 
@@ -54459,9 +56616,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
54459
56616
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
54460
56617
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
54461
56618
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
54462
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50911);
54463
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66288);
54464
- /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47686);
56619
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
56620
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
56621
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
56622
+ /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
54465
56623
  /*!
54466
56624
  * Jodit Editor (https://xdsoft.net/jodit/)
54467
56625
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -54478,30 +56636,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
54478
56636
 
54479
56637
 
54480
56638
 
54481
- class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.Plugin {
54482
- afterInit(jodit) {}
56639
+
56640
+ const MODIFIER_KEYS = new Set([
56641
+ 'Shift',
56642
+ 'Control',
56643
+ 'Alt',
56644
+ 'Meta',
56645
+ 'CapsLock'
56646
+ ]);
56647
+ class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
56648
+ afterInit(jodit) {
56649
+ // Without a namespace it runs ahead of table navigation, which would
56650
+ // take a released Tab
56651
+ jodit.e.on('keydown', this.__onKeyDownFirst, {
56652
+ top: true
56653
+ });
56654
+ }
56655
+ // An Escape that closes a popup has done its job
56656
+ __endRelease() {
56657
+ this.__released = false;
56658
+ }
56659
+ __onKeyDownFirst(event) {
56660
+ const released = this.__released;
56661
+ if (!MODIFIER_KEYS.has(event.key)) {
56662
+ this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
56663
+ }
56664
+ // The browser moves the focus
56665
+ if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
56666
+ this.j.e.stopPropagation('keydown');
56667
+ }
56668
+ }
54483
56669
  __onTab(event) {
54484
- if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
56670
+ if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && (this.__onShift(event.shiftKey) || (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabSpaces)(this.j, event.shiftKey))) {
54485
56671
  return false;
54486
56672
  }
54487
56673
  }
56674
+ __onBackspace(backspace, fakeNode) {
56675
+ if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
56676
+ return true;
56677
+ }
56678
+ }
56679
+ __onPasteInsert(html) {
56680
+ if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
56681
+ return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
56682
+ }
56683
+ }
54488
56684
  __onCommand(command) {
54489
56685
  if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
54490
56686
  return false;
54491
56687
  }
54492
56688
  }
54493
56689
  __onShift(shift) {
54494
- const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_5__.onTabInsideLi)(this.j, shift);
56690
+ const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
54495
56691
  if (res) {
54496
56692
  this.j.e.fire('afterTab', shift);
54497
56693
  }
54498
56694
  return res;
54499
56695
  }
54500
- beforeDestruct(jodit) {}
56696
+ beforeDestruct(jodit) {
56697
+ jodit.e.off('keydown', this.__onKeyDownFirst);
56698
+ }
56699
+ constructor(){
56700
+ super(...arguments);
56701
+ /**
56702
+ * With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
56703
+ * Tab move the focus on, as in code editors. A modifier key keeps it, and
56704
+ * any other key or a click ends it
56705
+ */ this.__released = false;
56706
+ }
54501
56707
  }
56708
+ __decorate([
56709
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
56710
+ ':mousedown.tab',
56711
+ ':beforePopupClose.tab'
56712
+ ])
56713
+ ], tab.prototype, "__endRelease", null);
56714
+ __decorate([
56715
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
56716
+ ], tab.prototype, "__onKeyDownFirst", null);
54502
56717
  __decorate([
54503
56718
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
54504
56719
  ], tab.prototype, "__onTab", null);
56720
+ __decorate([
56721
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
56722
+ ], tab.prototype, "__onBackspace", null);
56723
+ __decorate([
56724
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
56725
+ ], tab.prototype, "__onPasteInsert", null);
54505
56726
  __decorate([
54506
56727
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
54507
56728
  ], tab.prototype, "__onCommand", null);