jodit-pro 4.18.17 → 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 +2510 -261
  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 +2462 -261
  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 +2462 -261
  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 +3280 -407
  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
@@ -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.17
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.17";
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
  }
@@ -16692,6 +16779,35 @@ UISpacer = __decorate([
16692
16779
  /* harmony export */ ]);
16693
16780
 
16694
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
+
16695
16811
  /***/ }),
16696
16812
 
16697
16813
  /***/ 72157:
@@ -18019,6 +18135,12 @@ var Jodit_1;
18019
18135
 
18020
18136
 
18021
18137
 
18138
+ const FOCUS_EVENTS = new Set([
18139
+ 'focus',
18140
+ 'blur',
18141
+ 'focusin',
18142
+ 'focusout'
18143
+ ]);
18022
18144
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18023
18145
  const __defaultClassesKey = 'data-jodit-default-classes';
18024
18146
  const NOEDIT = {
@@ -19058,16 +19180,30 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19058
19180
  if (place) {
19059
19181
  this.setCurrentPlace(place);
19060
19182
  }
19061
- }).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)=>{
19062
19184
  if (this.o.readonly || this.__isSilentChange) {
19063
19185
  return;
19064
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
+ }
19065
19201
  const w = this.ew;
19066
19202
  if (event instanceof w.KeyboardEvent && event.isComposing) {
19067
19203
  return;
19068
19204
  }
19069
19205
  if (this.e && this.e.fire) {
19070
- if (this.e.fire(event.type, event) === false) {
19206
+ if (this.e.fire(type, event) === false) {
19071
19207
  return false;
19072
19208
  }
19073
19209
  this.synchronizeValues();
@@ -19373,6 +19509,7 @@ function addClassNames(className, elm) {
19373
19509
  Src: 'Src',
19374
19510
  Title: 'العنوان',
19375
19511
  Alternative: 'العنوان البديل',
19512
+ Caption: 'تسمية توضيحية',
19376
19513
  Link: 'الرابط',
19377
19514
  'Open link in new tab': 'افتح الرابط في نافذة جديدة',
19378
19515
  Image: 'الصورة',
@@ -19404,6 +19541,7 @@ function addClassNames(className, elm) {
19404
19541
  'Insert column after': 'إدراج عمود بعد',
19405
19542
  'Insert row above': 'إدراج صف أعلى',
19406
19543
  'Insert row below': 'إدراج صف أسفل',
19544
+ 'Header row': 'صف الرأس',
19407
19545
  'Delete table': 'حذف الجدول',
19408
19546
  'Delete row': 'حذف الصف',
19409
19547
  'Delete column': 'حذف العمود',
@@ -19617,6 +19755,7 @@ function addClassNames(className, elm) {
19617
19755
  Src: 'Mənbə',
19618
19756
  Title: 'Başlıq',
19619
19757
  Alternative: 'Alternativ mətn',
19758
+ Caption: 'Şəkilaltı yazı',
19620
19759
  Link: 'Keçid',
19621
19760
  'Open link in new tab': 'Keçidi yeni vərəqdə aç',
19622
19761
  Image: 'Şəkil',
@@ -19655,6 +19794,7 @@ function addClassNames(className, elm) {
19655
19794
  'Insert column after': 'Sonrasına sütun əlavə et',
19656
19795
  'Insert row above': 'Yuxarıya sətir əlavə et',
19657
19796
  'Insert row below': 'Aşağıya sətir əlavə et',
19797
+ 'Header row': 'Başlıq sətri',
19658
19798
  'Delete table': 'Cədvəli sil',
19659
19799
  'Delete row': 'Sətri sil',
19660
19800
  'Delete column': 'Sütunu sil',
@@ -19858,6 +19998,7 @@ function addClassNames(className, elm) {
19858
19998
  Src: 'src',
19859
19999
  Title: 'Titulek',
19860
20000
  Alternative: 'Alternativní text (alt)',
20001
+ Caption: 'Titulek',
19861
20002
  Link: 'Link',
19862
20003
  'Open link in new tab': 'Otevřít link v nové záložce',
19863
20004
  Image: 'Obrázek',
@@ -19897,6 +20038,7 @@ function addClassNames(className, elm) {
19897
20038
  'Insert column after': 'Vložit sloupec za',
19898
20039
  'Insert row above': 'Vložit řádek nad',
19899
20040
  'Insert row below': 'Vložit řádek pod',
20041
+ 'Header row': 'Řádek záhlaví',
19900
20042
  'Delete table': 'Vymazat tabulku',
19901
20043
  'Delete row': 'Vymazat řádku',
19902
20044
  'Delete column': 'Vymazat sloupec',
@@ -20095,6 +20237,7 @@ function addClassNames(className, elm) {
20095
20237
  Src: 'Pfad',
20096
20238
  Title: 'Titel',
20097
20239
  Alternative: 'Alternativer Text',
20240
+ Caption: 'Beschriftung',
20098
20241
  Link: 'Link',
20099
20242
  'Open link in new tab': 'Link in neuem Tab öffnen',
20100
20243
  Image: 'Bild',
@@ -20133,6 +20276,7 @@ function addClassNames(className, elm) {
20133
20276
  'Insert column after': 'Spalte danach einfügen',
20134
20277
  'Insert row above': 'Zeile oberhalb einfügen',
20135
20278
  'Insert row below': 'Zeile unterhalb einfügen',
20279
+ 'Header row': 'Kopfzeile',
20136
20280
  'Delete table': 'Tabelle löschen',
20137
20281
  'Delete row': 'Zeile löschen',
20138
20282
  'Delete column': 'Spalte löschen',
@@ -20353,6 +20497,7 @@ function addClassNames(className, elm) {
20353
20497
  Src: 'Fuente',
20354
20498
  Title: 'Título',
20355
20499
  Alternative: 'Texto Alternativo',
20500
+ Caption: 'Leyenda',
20356
20501
  Filter: 'Filtrar',
20357
20502
  Link: 'Vínculo',
20358
20503
  'Open link in new tab': 'Abrir vínculo en nueva pestaña',
@@ -20392,6 +20537,7 @@ function addClassNames(className, elm) {
20392
20537
  'Insert column after': 'Interar columna después',
20393
20538
  'Insert row above': 'Insertar fila arriba',
20394
20539
  'Insert row below': 'Insertar fila debajo',
20540
+ 'Header row': 'Fila de encabezado',
20395
20541
  'Delete table': 'Borrar tabla',
20396
20542
  'Delete row': 'Borrar fila',
20397
20543
  'Delete column': 'Borrar columna',
@@ -20594,6 +20740,7 @@ function addClassNames(className, elm) {
20594
20740
  Src: 'سورس',
20595
20741
  Title: 'عنوان',
20596
20742
  Alternative: 'جایگزین',
20743
+ Caption: 'زیرنویس',
20597
20744
  Link: 'لینک',
20598
20745
  'Open link in new tab': 'باز کزدن لینک در تب جدید',
20599
20746
  Image: 'عکس',
@@ -20632,6 +20779,7 @@ function addClassNames(className, elm) {
20632
20779
  'Insert column after': 'افزودن ستون بعد از',
20633
20780
  'Insert row above': 'افزودن خط قبل از',
20634
20781
  'Insert row below': 'افزودن خط بعد از',
20782
+ 'Header row': 'خط سرآیند',
20635
20783
  'Delete table': 'حذف جدول',
20636
20784
  'Delete row': 'حذف خط',
20637
20785
  'Delete column': 'حذف ستون',
@@ -20830,6 +20978,7 @@ function addClassNames(className, elm) {
20830
20978
  Src: 'Fuente',
20831
20979
  Title: 'Otsikko',
20832
20980
  Alternative: 'Vaihtoehtoinen teksti',
20981
+ Caption: 'Kuvateksti',
20833
20982
  Filter: 'Suodatin',
20834
20983
  Link: 'Linkki',
20835
20984
  'Open link in new tab': 'Avaa uudessa välilehdessä',
@@ -20869,6 +21018,7 @@ function addClassNames(className, elm) {
20869
21018
  'Insert column after': 'Lisää sarake jälkeen',
20870
21019
  'Insert row above': 'Lisää rivi ylös',
20871
21020
  'Insert row below': 'Lisää rivi alle',
21021
+ 'Header row': 'Otsikkorivi',
20872
21022
  'Delete table': 'Poista taulukko',
20873
21023
  'Delete row': 'Poista rivi',
20874
21024
  'Delete column': 'Poista sarake',
@@ -21071,6 +21221,7 @@ function addClassNames(className, elm) {
21071
21221
  Src: 'Source',
21072
21222
  Title: 'Titre',
21073
21223
  Alternative: 'Alternative',
21224
+ Caption: 'Légende',
21074
21225
  Filter: 'Filtre',
21075
21226
  Link: 'Lien',
21076
21227
  'Open link in new tab': 'Ouvrir le lien dans un nouvel onglet',
@@ -21112,6 +21263,7 @@ function addClassNames(className, elm) {
21112
21263
  'Insert column after': 'Insérer une colonne après',
21113
21264
  'Insert row above': 'Insérer une ligne au dessus',
21114
21265
  'Insert row below': 'Insérer une ligne en dessous',
21266
+ 'Header row': 'Ligne d’en-tête',
21115
21267
  'Delete table': 'Supprimer le tableau',
21116
21268
  'Delete row': 'Supprimer la ligne',
21117
21269
  'Delete column': 'Supprimer la colonne',
@@ -21308,6 +21460,7 @@ function addClassNames(className, elm) {
21308
21460
  Src: 'מקור',
21309
21461
  Title: 'כותרת',
21310
21462
  Alternative: 'כיתוב חלופי',
21463
+ Caption: 'כיתוב',
21311
21464
  Link: 'קישור',
21312
21465
  'Open link in new tab': 'פתח בכרטיסיה חדשה',
21313
21466
  Image: 'תמונה',
@@ -21346,6 +21499,7 @@ function addClassNames(className, elm) {
21346
21499
  'Insert column after': 'הכנס עמודה אחרי',
21347
21500
  'Insert row above': 'הכנס שורה מעל',
21348
21501
  'Insert row below': 'הכנס שורה מתחת',
21502
+ 'Header row': 'שורת כותרת',
21349
21503
  'Delete table': 'מחק טבלה',
21350
21504
  'Delete row': 'מחק שורה',
21351
21505
  'Delete column': 'מחק עמודה',
@@ -21546,6 +21700,7 @@ function addClassNames(className, elm) {
21546
21700
  Src: 'Forrás',
21547
21701
  Title: 'Cím',
21548
21702
  Alternative: 'Helyettesítő szöveg',
21703
+ Caption: 'Képaláírás',
21549
21704
  Link: 'Link',
21550
21705
  'Open link in new tab': 'Link megnyitása új lapon',
21551
21706
  Image: 'Kép',
@@ -21584,6 +21739,7 @@ function addClassNames(className, elm) {
21584
21739
  'Insert column after': 'Oszlop beszúrás utána',
21585
21740
  'Insert row above': 'Sor beszúrás fölé',
21586
21741
  'Insert row below': 'Sor beszúrás alá',
21742
+ 'Header row': 'Fejlécsor',
21587
21743
  'Delete table': 'Táblázat törlése',
21588
21744
  'Delete row': 'Sor törlése',
21589
21745
  'Delete column': 'Oszlop törlése',
@@ -21782,6 +21938,7 @@ function addClassNames(className, elm) {
21782
21938
  Src: 'Src',
21783
21939
  Title: 'Judul',
21784
21940
  Alternative: 'Teks alternatif',
21941
+ Caption: 'Keterangan',
21785
21942
  Link: 'Tautan',
21786
21943
  'Open link in new tab': 'Buka tautan di tab baru',
21787
21944
  Image: 'Gambar',
@@ -21821,6 +21978,7 @@ function addClassNames(className, elm) {
21821
21978
  'Insert column after': 'Sisipkan kolom setelahnya',
21822
21979
  'Insert row above': 'Sisipkan baris di atasnya',
21823
21980
  'Insert row below': 'Sisipkan baris di bawahnya',
21981
+ 'Header row': 'Baris header',
21824
21982
  'Delete table': 'Hapus tabel',
21825
21983
  'Delete row': 'Hapus baris',
21826
21984
  'Delete column': 'Hapus kolom',
@@ -22019,6 +22177,7 @@ function addClassNames(className, elm) {
22019
22177
  Src: 'Fonte',
22020
22178
  Title: 'Titolo',
22021
22179
  Alternative: 'Testo Alternativo',
22180
+ Caption: 'Didascalia',
22022
22181
  Link: 'Link',
22023
22182
  'Open link in new tab': 'Apri il link in una nuova scheda',
22024
22183
  Image: 'Immagine',
@@ -22057,6 +22216,7 @@ function addClassNames(className, elm) {
22057
22216
  'Insert column after': 'Inserisci la colonna dopo',
22058
22217
  'Insert row above': 'Inserisci la riga sopra',
22059
22218
  'Insert row below': 'Inserisci la riga sotto',
22219
+ 'Header row': 'Riga di intestazione',
22060
22220
  'Delete table': 'Elimina tabella',
22061
22221
  'Delete row': 'Elimina riga',
22062
22222
  'Delete column': 'Elimina colonna',
@@ -22260,6 +22420,7 @@ function addClassNames(className, elm) {
22260
22420
  Src: 'ソース',
22261
22421
  Title: 'タイトル',
22262
22422
  Alternative: '代替テキスト',
22423
+ Caption: 'キャプション',
22263
22424
  Link: 'リンク',
22264
22425
  'Open link in new tab': '新しいタブで開く',
22265
22426
  Image: '画像',
@@ -22298,6 +22459,7 @@ function addClassNames(className, elm) {
22298
22459
  'Insert column after': '右に列を挿入',
22299
22460
  'Insert row above': '上に行を挿入',
22300
22461
  'Insert row below': '下に行を挿入',
22462
+ 'Header row': 'ヘッダー行',
22301
22463
  'Delete table': '表を削除',
22302
22464
  'Delete row': '行を削除',
22303
22465
  'Delete column': '列を削除',
@@ -22512,6 +22674,7 @@ function addClassNames(className, elm) {
22512
22674
  Src: '경로(src)',
22513
22675
  Title: '제목',
22514
22676
  Alternative: '대체 텍스트(alt)',
22677
+ Caption: '캡션',
22515
22678
  Link: '링크',
22516
22679
  'Open link in new tab': '새 탭에서 열기',
22517
22680
  file: '파일',
@@ -22550,6 +22713,7 @@ function addClassNames(className, elm) {
22550
22713
  'Insert column after': '다음 열에 삽입',
22551
22714
  'Insert row above': '위 행에 삽입',
22552
22715
  'Insert row below': '아래 행에 삽입',
22716
+ 'Header row': '머리글 행',
22553
22717
  'Delete table': '테이블 삭제',
22554
22718
  'Delete row': '행 삭제',
22555
22719
  'Delete column': '열 삭제',
@@ -22748,6 +22912,7 @@ function addClassNames(className, elm) {
22748
22912
  Src: 'Эх үүсвэр',
22749
22913
  Title: 'Гарчиг',
22750
22914
  Alternative: 'Алтернатив текст',
22915
+ Caption: 'Тайлбар',
22751
22916
  Link: 'Холбоос',
22752
22917
  'Open link in new tab': 'Холбоосыг шинэ хавтсанд нээх',
22753
22918
  Image: 'Зураг',
@@ -22786,6 +22951,7 @@ function addClassNames(className, elm) {
22786
22951
  'Insert column after': 'Ард нь багана нэмэх',
22787
22952
  'Insert row above': 'Дээр нь мөр нэмэх',
22788
22953
  'Insert row below': 'Доор нь мөр нэмэх',
22954
+ 'Header row': 'Толгой мөр',
22789
22955
  'Delete table': 'Хүснэгт устгах',
22790
22956
  'Delete row': 'Мөр устгах',
22791
22957
  'Delete column': 'Багана устгах',
@@ -22985,6 +23151,7 @@ function addClassNames(className, elm) {
22985
23151
  Src: 'Src',
22986
23152
  Title: 'Titel',
22987
23153
  Alternative: 'Alternatieve tekst',
23154
+ Caption: 'Bijschrift',
22988
23155
  Link: 'Link',
22989
23156
  'Open link in new tab': 'Link in nieuwe tab openen',
22990
23157
  Image: 'Afbeelding',
@@ -23023,6 +23190,7 @@ function addClassNames(className, elm) {
23023
23190
  'Insert column after': 'Kolom invoegen (na)',
23024
23191
  'Insert row above': 'Rij invoegen (boven)',
23025
23192
  'Insert row below': 'Rij invoegen (onder)',
23193
+ 'Header row': 'Koprij',
23026
23194
  'Delete table': 'Tabel verwijderen',
23027
23195
  'Delete row': 'Rij verwijderen',
23028
23196
  'Delete column': 'Kolom verwijderen',
@@ -23220,6 +23388,7 @@ function addClassNames(className, elm) {
23220
23388
  Src: 'Kilde',
23221
23389
  Title: 'Tittel',
23222
23390
  Alternative: 'Alternativ',
23391
+ Caption: 'Bildetekst',
23223
23392
  Filter: 'Filter',
23224
23393
  Link: 'Lenke',
23225
23394
  'Open link in new tab': 'Åpne lenke i ny fane',
@@ -23261,6 +23430,7 @@ function addClassNames(className, elm) {
23261
23430
  'Insert column after': 'Sett inn kolonne etter',
23262
23431
  'Insert row above': 'Sett inn rad over',
23263
23432
  'Insert row below': 'Sett inn rad under',
23433
+ 'Header row': 'Overskriftsrad',
23264
23434
  'Delete table': 'Slett tabell',
23265
23435
  'Delete row': 'Slett rad',
23266
23436
  'Delete column': 'Slett kolonne',
@@ -23466,6 +23636,7 @@ function addClassNames(className, elm) {
23466
23636
  Src: 'Źródło',
23467
23637
  Title: 'Tytuł',
23468
23638
  Alternative: 'Tekst alternatywny',
23639
+ Caption: 'Podpis',
23469
23640
  Link: 'Link',
23470
23641
  'Open link in new tab': 'Otwórz w nowej zakładce',
23471
23642
  Image: 'Grafika',
@@ -23504,6 +23675,7 @@ function addClassNames(className, elm) {
23504
23675
  'Insert column after': 'Wstaw kolumnę po',
23505
23676
  'Insert row above': 'Wstaw wiersz przed',
23506
23677
  'Insert row below': 'Wstaw wiersz po',
23678
+ 'Header row': 'Wiersz nagłówka',
23507
23679
  'Delete table': 'Usuń tabelę',
23508
23680
  'Delete row': 'Usuń wiersz',
23509
23681
  'Delete column': 'Usuń kolumnę',
@@ -23702,6 +23874,7 @@ function addClassNames(className, elm) {
23702
23874
  Src: 'Fonte',
23703
23875
  Title: 'Título',
23704
23876
  Alternative: 'Texto Alternativo',
23877
+ Caption: 'Legenda',
23705
23878
  Link: 'Link',
23706
23879
  'Open link in new tab': 'Abrir link em nova aba',
23707
23880
  Image: 'Imagem',
@@ -23740,6 +23913,7 @@ function addClassNames(className, elm) {
23740
23913
  'Insert column after': 'Inserir coluna depois',
23741
23914
  'Insert row above': 'Inserir linha acima',
23742
23915
  'Insert row below': 'Inserir linha abaixo',
23916
+ 'Header row': 'Linha de cabeçalho',
23743
23917
  'Delete table': 'Excluir tabela',
23744
23918
  'Delete row': 'Excluir linha',
23745
23919
  'Delete column': 'Excluir coluna',
@@ -23942,6 +24116,7 @@ function addClassNames(className, elm) {
23942
24116
  Src: 'src',
23943
24117
  Title: 'Заголовок',
23944
24118
  Alternative: 'Альтернативный текст (alt)',
24119
+ Caption: 'Подпись',
23945
24120
  Link: 'Ссылка',
23946
24121
  'Open link in new tab': 'Открывать ссылку в новом окне',
23947
24122
  file: 'Файл',
@@ -23980,6 +24155,7 @@ function addClassNames(className, elm) {
23980
24155
  'Insert column after': 'Вставить столбец после',
23981
24156
  'Insert row above': 'Вставить ряд выше',
23982
24157
  'Insert row below': 'Вставить ряд ниже',
24158
+ 'Header row': 'Строка заголовка',
23983
24159
  'Delete table': 'Удалить таблицу',
23984
24160
  'Delete row': 'Удалять ряд',
23985
24161
  'Delete column': 'Удалить столбец',
@@ -24178,6 +24354,7 @@ function addClassNames(className, elm) {
24178
24354
  Src: 'Zdroj',
24179
24355
  Title: 'Názov',
24180
24356
  Alternative: 'Alternatívny text (alt)',
24357
+ Caption: 'Popis',
24181
24358
  Link: 'Odkaz',
24182
24359
  'Open link in new tab': 'Otvoriť odkaz na novej karte',
24183
24360
  Image: 'Obrázok',
@@ -24216,6 +24393,7 @@ function addClassNames(className, elm) {
24216
24393
  'Insert column after': 'Vložiť stĺpec za',
24217
24394
  'Insert row above': 'Vložiť riadok nad',
24218
24395
  'Insert row below': 'Vložiť riadok pod',
24396
+ 'Header row': 'Riadok hlavičky',
24219
24397
  'Delete table': 'Odstrániť tabuľku',
24220
24398
  'Delete row': 'Odstrániť riadok',
24221
24399
  'Delete column': 'Odstrániť stĺpec',
@@ -24420,6 +24598,7 @@ function addClassNames(className, elm) {
24420
24598
  Src: 'Källa',
24421
24599
  Title: 'Titel',
24422
24600
  Alternative: 'Alternativ',
24601
+ Caption: 'Bildtext',
24423
24602
  Filter: 'Filter',
24424
24603
  Link: 'Länk',
24425
24604
  'Open link in new tab': 'Öppna länk i ny flik',
@@ -24461,6 +24640,7 @@ function addClassNames(className, elm) {
24461
24640
  'Insert column after': 'Infoga kolumn efter',
24462
24641
  'Insert row above': 'Infoga rad ovanför',
24463
24642
  'Insert row below': 'Infoga rad nedanför',
24643
+ 'Header row': 'Rubrikrad',
24464
24644
  'Delete table': 'Radera tabell',
24465
24645
  'Delete row': 'Radera rad',
24466
24646
  'Delete column': 'Radera kolumn',
@@ -24665,6 +24845,7 @@ function addClassNames(className, elm) {
24665
24845
  Src: 'Kaynak',
24666
24846
  Title: 'Başlık',
24667
24847
  Alternative: 'Alternatif Yazı',
24848
+ Caption: 'Resim yazısı',
24668
24849
  Link: 'Link',
24669
24850
  'Open link in new tab': 'Bağlantıyı yeni sekmede aç',
24670
24851
  Image: 'Resim',
@@ -24703,6 +24884,7 @@ function addClassNames(className, elm) {
24703
24884
  'Insert column after': 'Sonrasına kolon ekle',
24704
24885
  'Insert row above': 'Üstüne satır ekle',
24705
24886
  'Insert row below': 'Altına satır ekle',
24887
+ 'Header row': 'Başlık satırı',
24706
24888
  'Delete table': 'Tabloyu sil',
24707
24889
  'Delete row': 'Satırı sil',
24708
24890
  'Delete column': 'Kolonu sil',
@@ -24900,6 +25082,7 @@ function addClassNames(className, elm) {
24900
25082
  Src: 'src',
24901
25083
  Title: 'Заголовок',
24902
25084
  Alternative: 'Альтернативний текст (alt)',
25085
+ Caption: 'Підпис',
24903
25086
  Link: 'Посилання',
24904
25087
  'Open link in new tab': 'Відкрити посилання в новій вкладці',
24905
25088
  file: 'Файл',
@@ -24938,6 +25121,7 @@ function addClassNames(className, elm) {
24938
25121
  'Insert column after': 'Вставити стовпець після',
24939
25122
  'Insert row above': 'Вставити рядок вище',
24940
25123
  'Insert row below': 'Вставити рядок нижче',
25124
+ 'Header row': 'Рядок заголовка',
24941
25125
  'Delete table': 'Видалити таблицю',
24942
25126
  'Delete row': 'Видалити рядок',
24943
25127
  'Delete column': 'Видалити стовпчик',
@@ -25137,6 +25321,7 @@ function addClassNames(className, elm) {
25137
25321
  Src: 'Src',
25138
25322
  Title: 'Title',
25139
25323
  Alternative: 'Alternative',
25324
+ Caption: '题注',
25140
25325
  Link: 'Link',
25141
25326
  'Open link in new tab': '在新窗口打开链接',
25142
25327
  Image: '图片',
@@ -25175,6 +25360,7 @@ function addClassNames(className, elm) {
25175
25360
  'Insert column after': '在之后插入列',
25176
25361
  'Insert row above': '在之前插入行',
25177
25362
  'Insert row below': '在之后插入行',
25363
+ 'Header row': '标题行',
25178
25364
  'Delete table': '删除表格',
25179
25365
  'Delete row': '删除行',
25180
25366
  'Delete column': '删除列',
@@ -25373,6 +25559,7 @@ function addClassNames(className, elm) {
25373
25559
  Src: 'Src',
25374
25560
  Title: 'Title',
25375
25561
  Alternative: '替代',
25562
+ Caption: '標號',
25376
25563
  Link: 'Link',
25377
25564
  'Open link in new tab': '在新分頁開啟連結',
25378
25565
  Image: '圖片',
@@ -25411,6 +25598,7 @@ function addClassNames(className, elm) {
25411
25598
  'Insert column after': '插入右方欄',
25412
25599
  'Insert row above': '插入上方列',
25413
25600
  'Insert row below': '插入下方列',
25601
+ 'Header row': '標題列',
25414
25602
  'Delete table': '刪除表格',
25415
25603
  'Delete row': '刪除整列',
25416
25604
  'Delete column': '刪除整欄',
@@ -30440,6 +30628,11 @@ StatusBar = __decorate([
30440
30628
 
30441
30629
 
30442
30630
 
30631
+ const SECTIONS = new Set([
30632
+ 'thead',
30633
+ 'tbody',
30634
+ 'tfoot'
30635
+ ]);
30443
30636
  const markedValue = new WeakMap();
30444
30637
  class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
30445
30638
  /** @override */ className() {
@@ -30598,7 +30791,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30598
30791
  }
30599
30792
  });
30600
30793
  }
30601
- 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) {
30602
30801
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
30603
30802
  } else if (!after && line) {
30604
30803
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
@@ -30606,6 +30805,79 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30606
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);
30607
30806
  }
30608
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
+ }
30609
30881
  /**
30610
30882
  * Inserts a new line after row what contains the selected cell
30611
30883
  *
@@ -30662,7 +30934,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30662
30934
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
30663
30935
  }
30664
30936
  });
30937
+ const section = row.parentElement;
30665
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
+ }
30666
30944
  }
30667
30945
  /**
30668
30946
  * Remove row
@@ -31086,7 +31364,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31086
31364
  const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
31087
31365
  selector && selectors.push(selector);
31088
31366
  });
31089
- 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 : '';
31090
31371
  });
31091
31372
  }
31092
31373
  }
@@ -31120,10 +31401,11 @@ const instance = (j)=>j.getInstance('Table', j.o);
31120
31401
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
31121
31402
  /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37790);
31122
31403
  /* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62843);
31123
- /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(72157);
31124
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12153);
31125
- /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56917);
31126
- /* 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);
31127
31409
  /*!
31128
31410
  * Jodit Editor (https://xdsoft.net/jodit/)
31129
31411
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -31154,6 +31436,7 @@ const instance = (j)=>j.getInstance('Table', j.o);
31154
31436
 
31155
31437
 
31156
31438
 
31439
+
31157
31440
 
31158
31441
 
31159
31442
  const INPUT_TAGS = new Set([
@@ -31259,7 +31542,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31259
31542
  configurable: true
31260
31543
  });
31261
31544
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(container, button);
31262
- 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>`);
31263
31546
  // For caching
31264
31547
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(button, trigger);
31265
31548
  return container;
@@ -31316,7 +31599,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31316
31599
  state.icon.iconURL = ctr.iconURL;
31317
31600
  } else {
31318
31601
  const name = ctr.icon || ctr.name;
31319
- 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 : '';
31320
31603
  }
31321
31604
  if (!ctr.iconURL && !state.icon.name) {
31322
31605
  state.text = ctr.text || ctr.name;
@@ -31347,6 +31630,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31347
31630
  const elm = ctr.popup(this.j, target, this.__closePopup, this);
31348
31631
  if (elm) {
31349
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);
31350
31636
  } else {
31351
31637
  this.__closePopup();
31352
31638
  }
@@ -31489,7 +31775,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31489
31775
  * Create an open popup list
31490
31776
  */ __openControlList(control) {
31491
31777
  var _a, _b, _c, _d, _e;
31492
- 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);
31493
31779
  const list = control.list;
31494
31780
  const menu = this.openPopup();
31495
31781
  menu.parentElement = this;
@@ -31497,7 +31783,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31497
31783
  if (content) {
31498
31784
  return this.__openMenu(menu, content);
31499
31785
  }
31500
- 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);
31501
31787
  toolbar.parentElement = menu;
31502
31788
  toolbar.mode = 'vertical';
31503
31789
  const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
@@ -31564,7 +31850,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31564
31850
  }
31565
31851
  openPopup() {
31566
31852
  this.__closePopup();
31567
- 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);
31568
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);
31569
31855
  return this.openedPopup;
31570
31856
  }
@@ -31582,15 +31868,18 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31582
31868
  this.openedPopup = null;
31583
31869
  this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
31584
31870
  // The keyboard brought the focus into the dropdown: give it back to
31585
- // the button, otherwise it would fall out to the document
31586
- 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);
31587
31874
  this.state.activated = false;
31588
31875
  popup.close();
31589
31876
  popup.destruct();
31590
31877
  if (this.trigger) {
31591
31878
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__.attr)(this.trigger, 'aria-expanded', false);
31592
31879
  }
31593
- 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) {
31594
31883
  this.focus();
31595
31884
  }
31596
31885
  }
@@ -32574,6 +32863,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32574
32863
  continue;
32575
32864
  }
32576
32865
  const reader = new FileReader();
32866
+ const { name } = file;
32577
32867
  const readerPromise = uploader.j.async.promise((resolve, reject)=>{
32578
32868
  reader.onerror = reject;
32579
32869
  reader.onloadend = ()=>{
@@ -32584,6 +32874,9 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32584
32874
  ],
32585
32875
  isImages: [
32586
32876
  true
32877
+ ],
32878
+ fileNames: [
32879
+ name
32587
32880
  ]
32588
32881
  };
32589
32882
  const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
@@ -33217,6 +33510,7 @@ function val(elm, name, value) {
33217
33510
  /* harmony import */ var _core_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23282);
33218
33511
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29960);
33219
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);
33220
33514
  /*!
33221
33515
  * Jodit Editor (https://xdsoft.net/jodit/)
33222
33516
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33226,6 +33520,7 @@ function val(elm, name, value) {
33226
33520
 
33227
33521
 
33228
33522
 
33523
+
33229
33524
  /**
33230
33525
  * Build tabs system
33231
33526
  *
@@ -33306,6 +33601,7 @@ function val(elm, name, value) {
33306
33601
  if (state) {
33307
33602
  state.activeTab = name;
33308
33603
  }
33604
+ ;(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__.focusFormField)(tab);
33309
33605
  return false;
33310
33606
  });
33311
33607
  nameToTab[name] = {
@@ -34189,49 +34485,50 @@ UiAiAssistant = __decorate([
34189
34485
  /* harmony import */ var _hr_hr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16233);
34190
34486
  /* harmony import */ var _iframe_iframe_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(77469);
34191
34487
  /* harmony import */ var _image_image_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(23531);
34192
- /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(80763);
34193
- /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(3215);
34194
- /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(70045);
34195
- /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(93401);
34196
- /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76295);
34197
- /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(59483);
34198
- /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(91071);
34199
- /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(61019);
34200
- /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(65517);
34201
- /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(20071);
34202
- /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(32309);
34203
- /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(64837);
34204
- /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(79799);
34205
- /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31571);
34206
- /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(85407);
34207
- /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(59451);
34208
- /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(18363);
34209
- /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(8355);
34210
- /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(58519);
34211
- /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(6687);
34212
- /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(56113);
34213
- /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(9159);
34214
- /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(12019);
34215
- /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(36125);
34216
- /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(9881);
34217
- /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(28545);
34218
- /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(45927);
34219
- /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(52951);
34220
- /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(43809);
34221
- /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(7309);
34222
- /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(68687);
34223
- /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(59495);
34224
- /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(39627);
34225
- /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(767);
34226
- /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(43003);
34227
- /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(72439);
34228
- /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(94529);
34229
- /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(26551);
34230
- /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(96139);
34231
- /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(72253);
34232
- /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(65735);
34233
- /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(83671);
34234
- /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(3115);
34488
+ /* harmony import */ var _image_caption_image_caption_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84571);
34489
+ /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(80763);
34490
+ /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3215);
34491
+ /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(70045);
34492
+ /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(93401);
34493
+ /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76295);
34494
+ /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(59483);
34495
+ /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(91071);
34496
+ /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(61019);
34497
+ /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(65517);
34498
+ /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(20071);
34499
+ /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(32309);
34500
+ /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(64837);
34501
+ /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(79799);
34502
+ /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(31571);
34503
+ /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(85407);
34504
+ /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(59451);
34505
+ /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(18363);
34506
+ /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(8355);
34507
+ /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(58519);
34508
+ /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(6687);
34509
+ /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(56113);
34510
+ /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(9159);
34511
+ /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(12019);
34512
+ /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(36125);
34513
+ /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(9881);
34514
+ /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(28545);
34515
+ /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(45927);
34516
+ /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(52951);
34517
+ /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(43809);
34518
+ /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(7309);
34519
+ /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(68687);
34520
+ /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(59495);
34521
+ /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(39627);
34522
+ /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(767);
34523
+ /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(43003);
34524
+ /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(72439);
34525
+ /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(94529);
34526
+ /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(26551);
34527
+ /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(96139);
34528
+ /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(72253);
34529
+ /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(65735);
34530
+ /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(83671);
34531
+ /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(3115);
34235
34532
  /*!
34236
34533
  * Jodit Editor (https://xdsoft.net/jodit/)
34237
34534
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34303,6 +34600,7 @@ UiAiAssistant = __decorate([
34303
34600
 
34304
34601
 
34305
34602
 
34603
+
34306
34604
 
34307
34605
 
34308
34606
  // JODIT-START:FAT
@@ -34391,6 +34689,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34391
34689
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, fakeNode)) {
34392
34690
  return;
34393
34691
  }
34692
+ // An editable element inside non-editable content, as an image's
34693
+ // caption is, keeps the caret, so nothing past its edge goes
34694
+ 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);
34695
+ if (host && sel.cursorInTheEdge(backspace, host, fakeNode)) {
34696
+ return false;
34697
+ }
34394
34698
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
34395
34699
  return false;
34396
34700
  }
@@ -34439,7 +34743,13 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34439
34743
  if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
34440
34744
  return;
34441
34745
  }
34442
- const text = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
34746
+ // The search for text skips text of only non-breaking spaces, but the
34747
+ // browser types after it
34748
+ let before = fakeNode.previousSibling;
34749
+ while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && !/\S|\u00A0/.test(before.data)){
34750
+ before = before.previousSibling;
34751
+ }
34752
+ 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);
34443
34753
  const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
34444
34754
  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)) {
34445
34755
  return;
@@ -35015,7 +35325,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
35015
35325
  }
35016
35326
  if (charRemoved) {
35017
35327
  removeEmptyForParent(fakeNode, 'a');
35018
- addBRInsideEmptyBlock(jodit, fakeNode);
35328
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, fakeNode);
35019
35329
  jodit.s.setCursorBefore(fakeNode);
35020
35330
  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)) {
35021
35331
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fakeNode, jodit.createInside.element('br'));
@@ -35050,13 +35360,6 @@ function getNextInlineSibling(sibling, backspace, root) {
35050
35360
  parent = p;
35051
35361
  }
35052
35362
  }
35053
- /**
35054
- * Helper add BR element inside empty block element
35055
- */ function addBRInsideEmptyBlock(jodit, node) {
35056
- 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)) {
35057
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(node, jodit.createInside.element('br'));
35058
- }
35059
- }
35060
35363
  function tryRemoveChar(sibling, backspace, step, anotherSibling) {
35061
35364
  // For Unicode escapes
35062
35365
  let value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
@@ -35620,6 +35923,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35620
35923
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35621
35924
 
35622
35925
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35926
+ /* harmony export */ addBRInsideEmptyBlock: function() { return /* binding */ addBRInsideEmptyBlock; },
35623
35927
  /* harmony export */ findMostNestedNeighbor: function() { return /* binding */ findMostNestedNeighbor; },
35624
35928
  /* harmony export */ getMoveFilter: function() { return /* binding */ getMoveFilter; }
35625
35929
  /* harmony export */ });
@@ -35655,6 +35959,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35655
35959
  */ function getMoveFilter(jodit) {
35656
35960
  return (node)=>jodit.e.fire('backSpaceIsMovedIgnore', node) !== true;
35657
35961
  }
35962
+ /**
35963
+ * Helper add BR element inside empty block element
35964
+ * @private
35965
+ */ function addBRInsideEmptyBlock(jodit, node) {
35966
+ 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)) {
35967
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(node, jodit.createInside.element('br'));
35968
+ }
35969
+ }
35658
35970
 
35659
35971
 
35660
35972
  /***/ }),
@@ -36072,7 +36384,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
36072
36384
  beforeCommand(command) {
36073
36385
  if (command.toLowerCase() === 'removeformat') {
36074
36386
  if (this.j.s.isCollapsed()) {
36075
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
36387
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForWord)(this.j);
36076
36388
  } else {
36077
36389
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
36078
36390
  }
@@ -36368,16 +36680,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36368
36680
 
36369
36681
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36370
36682
  /* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
36371
- /* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
36372
36683
  /* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
36373
- /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
36374
- /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__.visitNodeWalker; }
36684
+ /* harmony export */ removeFormatForWord: function() { return /* reexport safe */ _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__.removeFormatForWord; },
36685
+ /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__.removePlaceholderBr; },
36686
+ /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__.visitNodeWalker; }
36375
36687
  /* harmony export */ });
36376
36688
  /* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
36377
36689
  /* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
36378
36690
  /* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
36379
- /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
36380
- /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39516);
36691
+ /* harmony import */ var _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70464);
36692
+ /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56385);
36693
+ /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39516);
36381
36694
  /*!
36382
36695
  * Jodit Editor (https://xdsoft.net/jodit/)
36383
36696
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36392,6 +36705,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36392
36705
 
36393
36706
 
36394
36707
 
36708
+
36395
36709
  /***/ }),
36396
36710
 
36397
36711
  /***/ 15908:
@@ -36544,6 +36858,126 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
36544
36858
  }
36545
36859
 
36546
36860
 
36861
+ /***/ }),
36862
+
36863
+ /***/ 70464:
36864
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36865
+
36866
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36867
+ /* harmony export */ removeFormatForWord: function() { return /* binding */ removeFormatForWord; }
36868
+ /* harmony export */ });
36869
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
36870
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
36871
+ /* harmony import */ var _remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
36872
+ /*!
36873
+ * Jodit Editor (https://xdsoft.net/jodit/)
36874
+ * Released under MIT see LICENSE.txt in the project root for license information.
36875
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
36876
+ */
36877
+
36878
+
36879
+ /**
36880
+ * With just a caret, Word clears the formatting of the word the caret is
36881
+ * inside, and does nothing at a word's start or end. This selects the word,
36882
+ * clears it as a selection, and puts the caret back where it was.
36883
+ * @private
36884
+ */ function removeFormatForWord(jodit) {
36885
+ const { range } = jodit.s;
36886
+ 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);
36887
+ if (!block) {
36888
+ return;
36889
+ }
36890
+ const texts = textsOf(block);
36891
+ const text = texts.map((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.nodeValue : ' ').join('');
36892
+ const at = textOffset(texts, range);
36893
+ if (!isWordChar(text[at - 1]) || !isWordChar(text[at])) {
36894
+ return;
36895
+ }
36896
+ let start = at, end = at;
36897
+ while(isWordChar(text[start - 1])){
36898
+ start -= 1;
36899
+ }
36900
+ while(isWordChar(text[end])){
36901
+ end += 1;
36902
+ }
36903
+ const word = jodit.s.createRange();
36904
+ word.setStart(...positionAt(texts, start, true));
36905
+ word.setEnd(...positionAt(texts, end, false));
36906
+ jodit.s.selectRange(word);
36907
+ (0,_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection)(jodit);
36908
+ // The text is the same, so the caret goes back to the same character
36909
+ const caret = jodit.s.createRange();
36910
+ caret.setStart(...positionAt(textsOf(block), at, false));
36911
+ jodit.s.selectRange(caret);
36912
+ }
36913
+ function isWordChar(char) {
36914
+ return Boolean(char && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && /\S/.test(char));
36915
+ }
36916
+ /**
36917
+ * The block's own text nodes, in order, leaving out those of blocks inside
36918
+ * it. A line break, an image or another inseparable element ends a word, so
36919
+ * it is kept as a one-character piece
36920
+ */ function textsOf(block) {
36921
+ const texts = [];
36922
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
36923
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, block)) {
36924
+ return;
36925
+ }
36926
+ 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)) {
36927
+ texts.push(node);
36928
+ }
36929
+ });
36930
+ return texts;
36931
+ }
36932
+ function lengthOf(piece) {
36933
+ var _a, _b;
36934
+ 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;
36935
+ }
36936
+ /**
36937
+ * How many characters of `texts` come before the caret, which can be in a
36938
+ * text node or between nodes
36939
+ */ function textOffset(texts, caret) {
36940
+ let at = 0;
36941
+ for (const piece of texts){
36942
+ if (piece === caret.startContainer) {
36943
+ return at + caret.startOffset;
36944
+ }
36945
+ const length = lengthOf(piece);
36946
+ // This piece ends after the caret, so the caret is before it
36947
+ if (caret.comparePoint(piece, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? length : 0) > 0) {
36948
+ return at;
36949
+ }
36950
+ at += length;
36951
+ }
36952
+ return at;
36953
+ }
36954
+ /**
36955
+ * The text node and offset of the `at`th character. Where two text nodes
36956
+ * meet, `later` picks the start of the second over the end of the first
36957
+ */ function positionAt(texts, at, later) {
36958
+ var _a, _b;
36959
+ let before = 0;
36960
+ let last = null;
36961
+ for (const piece of texts){
36962
+ const length = lengthOf(piece);
36963
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) && (at < before + length || !later && at === before + length)) {
36964
+ return [
36965
+ piece,
36966
+ at - before
36967
+ ];
36968
+ }
36969
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece)) {
36970
+ last = piece;
36971
+ }
36972
+ before += length;
36973
+ }
36974
+ return [
36975
+ last,
36976
+ (_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
36977
+ ];
36978
+ }
36979
+
36980
+
36547
36981
  /***/ }),
36548
36982
 
36549
36983
  /***/ 56385:
@@ -38147,6 +38581,7 @@ var DragState;
38147
38581
  /**
38148
38582
  * Drag start handler
38149
38583
  */ onDragStart(event) {
38584
+ var _a;
38150
38585
  if (event.type === 'dragstart' && this.draggable) {
38151
38586
  return false;
38152
38587
  }
@@ -38165,7 +38600,8 @@ var DragState;
38165
38600
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(lastTarget.parentElement, 'a') && lastTarget.parentElement.firstChild === lastTarget && lastTarget.parentElement.lastChild === lastTarget) {
38166
38601
  lastTarget = lastTarget.parentElement;
38167
38602
  }
38168
- this.startDragging(lastTarget, event);
38603
+ // A captioned image goes with its caption
38604
+ this.startDragging((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, lastTarget)) !== null && _a !== void 0 ? _a : lastTarget, event);
38169
38605
  }
38170
38606
  /**
38171
38607
  * Prepare the ghost element and switch to the waiting state.
@@ -40199,7 +40635,8 @@ const libraries = new Map();
40199
40635
  /* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
40200
40636
  /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
40201
40637
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
40202
- /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89816);
40638
+ /* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
40639
+ /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
40203
40640
  /*!
40204
40641
  * Jodit Editor (https://xdsoft.net/jodit/)
40205
40642
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -40209,7 +40646,39 @@ const libraries = new Map();
40209
40646
 
40210
40647
 
40211
40648
 
40212
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
40649
+
40650
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
40651
+ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
40652
+ // Opt in: previews keep the toolbar's styles unless the integrator lists
40653
+ // the properties to copy, e.g. ['font-family', 'font-weight', 'color']
40654
+ previewProperties: []
40655
+ };
40656
+ /**
40657
+ * The list is outside the editing area, and in iframe mode outside its
40658
+ * document, so a preview would take the toolbar's styles. This reads how the
40659
+ * content shows a tag from a probe in the editing area
40660
+ */ function previewStyle(editor, tag) {
40661
+ const { previewProperties } = editor.o.formatBlock;
40662
+ if (!previewProperties.length) {
40663
+ return '';
40664
+ }
40665
+ const probe = editor.createInside.element(tag, {
40666
+ style: 'display: none'
40667
+ });
40668
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
40669
+ const style = editor.ew.getComputedStyle(probe);
40670
+ const size = parseFloat(style.fontSize) || 16;
40671
+ const css = previewProperties.map((prop)=>{
40672
+ let value = style.getPropertyValue(prop);
40673
+ if (value && prop === 'font-family') {
40674
+ value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
40675
+ }
40676
+ // Each browser knows only one of the smoothing properties
40677
+ return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
40678
+ }).join('');
40679
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
40680
+ return css;
40681
+ }
40213
40682
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40214
40683
  command: 'formatBlock',
40215
40684
  value (editor, button) {
@@ -40250,11 +40719,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40250
40719
  isActive: (editor, button)=>{
40251
40720
  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]);
40252
40721
  },
40253
- childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
40722
+ childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
40254
40723
  tooltip: 'Insert format block'
40255
40724
  };
40256
40725
 
40257
40726
 
40727
+ /***/ }),
40728
+
40729
+ /***/ 4932:
40730
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
40731
+
40732
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40733
+ /* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
40734
+ /* harmony export */ });
40735
+ /*!
40736
+ * Jodit Editor (https://xdsoft.net/jodit/)
40737
+ * Released under MIT see LICENSE.txt in the project root for license information.
40738
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
40739
+ */ const carried = new WeakMap();
40740
+ const fetched = new Map();
40741
+ let editors = 0;
40742
+ /**
40743
+ * In iframe mode the content's web fonts load only in the iframe, but the
40744
+ * Paragraph list is in the page, so its previews would fall back to the
40745
+ * page's fonts. This adds the content's web fonts to the page under names
40746
+ * only this editor uses, so nothing else on the page can pick them up, and
40747
+ * puts those names first in a preview's `font-family`
40748
+ */ function withContentFonts(editor, fontFamily) {
40749
+ const { ed, od } = editor;
40750
+ if (ed === od) {
40751
+ return fontFamily;
40752
+ }
40753
+ const state = carriedFor(editor);
40754
+ carry(editor, state);
40755
+ const webFonts = new Set();
40756
+ ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
40757
+ return fontFamily.split(',').map((family)=>{
40758
+ const name = familyName(family);
40759
+ return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
40760
+ }).join(', ');
40761
+ }
40762
+ function carriedFor(editor) {
40763
+ let state = carried.get(editor);
40764
+ if (!state) {
40765
+ const { od } = editor;
40766
+ const created = {
40767
+ prefix: `jodit-preview-${++editors}-`,
40768
+ faces: new Map(),
40769
+ pending: false
40770
+ };
40771
+ carried.set(editor, created);
40772
+ editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
40773
+ state = created;
40774
+ }
40775
+ return state;
40776
+ }
40777
+ /**
40778
+ * It looks each time the list opens, since the content's stylesheets may
40779
+ * still have been loading the time before
40780
+ */ function carry(editor, state) {
40781
+ // Every preview in the list asks, but one look is enough
40782
+ if (state.pending) {
40783
+ return;
40784
+ }
40785
+ state.pending = true;
40786
+ const { ed, od } = editor;
40787
+ Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
40788
+ state.pending = false;
40789
+ if (editor.isInDestruct) {
40790
+ return;
40791
+ }
40792
+ lists.flat().forEach((font)=>{
40793
+ const key = JSON.stringify(font);
40794
+ if (!state.faces.has(key)) {
40795
+ const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
40796
+ od.fonts.add(face);
40797
+ state.faces.set(key, face);
40798
+ }
40799
+ });
40800
+ });
40801
+ }
40802
+ /**
40803
+ * The web fonts a stylesheet and those it imports declare
40804
+ */ function fontsOf(sheet, base) {
40805
+ var _a;
40806
+ let rules;
40807
+ try {
40808
+ rules = sheet.cssRules;
40809
+ } catch (_b) {
40810
+ // Another site's stylesheet can't be read, but it can be fetched if
40811
+ // the site allows it, as Google Fonts does
40812
+ const { href } = sheet;
40813
+ if (!href) {
40814
+ return Promise.resolve([]);
40815
+ }
40816
+ let fonts = fetched.get(href);
40817
+ if (!fonts) {
40818
+ fonts = fetchFonts(href);
40819
+ fetched.set(href, fonts);
40820
+ }
40821
+ return fonts;
40822
+ }
40823
+ return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
40824
+ }
40825
+ function fontsIn(rules, base) {
40826
+ return Promise.all(Array.from(rules, (rule)=>{
40827
+ if ('styleSheet' in rule) {
40828
+ const { styleSheet } = rule;
40829
+ return styleSheet ? fontsOf(styleSheet, base) : [];
40830
+ }
40831
+ if ('cssRules' in rule) {
40832
+ return fontsIn(rule.cssRules, base);
40833
+ }
40834
+ return rule.cssText.startsWith('@font-face') ? [
40835
+ fontOf(rule, base)
40836
+ ] : [];
40837
+ })).then((lists)=>lists.flat());
40838
+ }
40839
+ function fontOf(rule, base) {
40840
+ const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
40841
+ return {
40842
+ family: familyName(rule.style.getPropertyValue('font-family')),
40843
+ source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
40844
+ descriptors: {
40845
+ style: value('font-style'),
40846
+ weight: value('font-weight'),
40847
+ stretch: value('font-stretch'),
40848
+ unicodeRange: value('unicode-range')
40849
+ }
40850
+ };
40851
+ }
40852
+ function fetchFonts(href) {
40853
+ return fetch(href).then((response)=>response.text()).then((text)=>{
40854
+ const doc = document.implementation.createHTMLDocument('');
40855
+ const style = doc.createElement('style');
40856
+ style.textContent = text;
40857
+ doc.head.appendChild(style);
40858
+ return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
40859
+ }).catch(()=>[]);
40860
+ }
40861
+ function familyName(family) {
40862
+ return family.replace(/["']/g, '').trim().toLowerCase();
40863
+ }
40864
+ /**
40865
+ * The fonts are added to the page, so a relative URL would point somewhere
40866
+ * else
40867
+ */ function withAbsoluteUrls(css, base) {
40868
+ return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
40869
+ try {
40870
+ return `url("${new URL(url, base).href}")`;
40871
+ } catch (_a) {
40872
+ return match;
40873
+ }
40874
+ });
40875
+ }
40876
+
40877
+
40258
40878
  /***/ }),
40259
40879
 
40260
40880
  /***/ 96111:
@@ -40935,6 +41555,810 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
40935
41555
  _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
40936
41556
 
40937
41557
 
41558
+ /***/ }),
41559
+
41560
+ /***/ 43687:
41561
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41562
+
41563
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
41564
+ /*!
41565
+ * Jodit Editor (https://xdsoft.net/jodit/)
41566
+ * Released under MIT see LICENSE.txt in the project root for license information.
41567
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41568
+ */
41569
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
41570
+ wrapper: {
41571
+ tag: 'figure',
41572
+ className: ''
41573
+ },
41574
+ inner: null,
41575
+ caption: {
41576
+ tag: 'figcaption',
41577
+ className: ''
41578
+ }
41579
+ };
41580
+
41581
+
41582
+ /***/ }),
41583
+
41584
+ /***/ 84571:
41585
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41586
+
41587
+ /* unused harmony export imageCaption */
41588
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
41589
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
41590
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
41591
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
41592
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
41593
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
41594
+ /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
41595
+ /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
41596
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
41597
+ /*!
41598
+ * Jodit Editor (https://xdsoft.net/jodit/)
41599
+ * Released under MIT see LICENSE.txt in the project root for license information.
41600
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41601
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
41602
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41603
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41604
+ 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;
41605
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
41606
+ };
41607
+
41608
+
41609
+
41610
+
41611
+
41612
+
41613
+
41614
+
41615
+
41616
+ const MARGINS = [
41617
+ 'margin-top',
41618
+ 'margin-right',
41619
+ 'margin-bottom',
41620
+ 'margin-left'
41621
+ ];
41622
+ const ARROWS = new Set([
41623
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
41624
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
41625
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
41626
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
41627
+ ]);
41628
+ // Blocks that only hold text, which a block wrapper can't go inside
41629
+ const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
41630
+ // They would replace the caption with a heading, quote or list
41631
+ const BLOCK_COMMANDS = new Set([
41632
+ 'formatblock',
41633
+ 'insertorderedlist',
41634
+ 'insertunorderedlist'
41635
+ ]);
41636
+ const PLACEHOLDER = 'data-jodit-placeholder';
41637
+ /**
41638
+ * Jodit's focus colour round a caption being typed in, in place of the
41639
+ * browser's, and a placeholder in a blank caption. `:where` leaves both for
41640
+ * the content's own styles to change
41641
+ */ 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}`;
41642
+ /**
41643
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
41644
+ * keeps the caret in the caption
41645
+ */ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
41646
+ /** @override */ afterInit(jodit) {
41647
+ // It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
41648
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
41649
+ jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
41650
+ top: true
41651
+ });
41652
+ this.onChangePlace();
41653
+ }
41654
+ /**
41655
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
41656
+ * other way round from how it is. Returns the caption it gave, or null
41657
+ * when it took one away
41658
+ */ onToggleImageCaption(image, on) {
41659
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
41660
+ if (wrapper && on !== true) {
41661
+ const fresh = this.__freshCaption(wrapper);
41662
+ if (fresh) {
41663
+ this.__unrecorded(()=>this.__restore(fresh));
41664
+ } else {
41665
+ this.__uncaption(wrapper, image);
41666
+ }
41667
+ return null;
41668
+ }
41669
+ if (!wrapper && on !== false) {
41670
+ return this.__caption(image);
41671
+ }
41672
+ }
41673
+ __freshCaption(wrapper) {
41674
+ const fresh = this.__fresh;
41675
+ 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)) {
41676
+ return null;
41677
+ }
41678
+ return fresh;
41679
+ }
41680
+ /**
41681
+ * Giving a caption isn't a step in the history of its own, as the first
41682
+ * thing typed in it is, so Undo never brings back a blank caption
41683
+ */ __caption(image) {
41684
+ const { j } = this;
41685
+ const { snapshot } = j.history;
41686
+ // The steps before it are recorded first
41687
+ j.setEditorValue();
41688
+ j.e.fire('internalUpdate');
41689
+ const before = snapshot.make();
41690
+ let fresh;
41691
+ snapshot.transaction(()=>{
41692
+ fresh = this.__fresh = {
41693
+ ...this.__wrap(image),
41694
+ before
41695
+ };
41696
+ j.setEditorValue();
41697
+ });
41698
+ // The value is as it was, so no `change` updates the toolbars
41699
+ j.e.fire('updateToolbar');
41700
+ return fresh.caption;
41701
+ }
41702
+ /**
41703
+ * Changes the content with no step in the history of its own, so Undo
41704
+ * never brings back a blank caption. A step still open takes it in
41705
+ */ __unrecorded(changes) {
41706
+ const { j } = this;
41707
+ j.setEditorValue();
41708
+ this.__fresh = null;
41709
+ j.history.snapshot.transaction(()=>{
41710
+ changes();
41711
+ j.setEditorValue();
41712
+ });
41713
+ j.e.fire('internalUpdate');
41714
+ j.e.fire('updateToolbar');
41715
+ }
41716
+ __wrap(image) {
41717
+ var _a;
41718
+ const { j } = this;
41719
+ const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
41720
+ const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
41721
+ const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
41722
+ const attributes = [
41723
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
41724
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
41725
+ ];
41726
+ const place = target.parentNode;
41727
+ 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` : '');
41728
+ const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
41729
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
41730
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
41731
+ const wrapper = this.__create(wrapperPart);
41732
+ const box = inner ? this.__create(inner) : wrapper;
41733
+ const caption = this.__create(captionPart);
41734
+ caption.appendChild(j.createInside.element('br'));
41735
+ const split = this.__insert(wrapper, target);
41736
+ if (box !== wrapper) {
41737
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
41738
+ }
41739
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
41740
+ target,
41741
+ caption
41742
+ ]);
41743
+ moveMargins(image, wrapper);
41744
+ // The wrapper takes the image's width, and the image fills it, so the
41745
+ // caption wraps under the image
41746
+ if (width) {
41747
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
41748
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
41749
+ }
41750
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
41751
+ this.__mark(wrapper);
41752
+ return {
41753
+ caption,
41754
+ wrapper,
41755
+ image,
41756
+ target,
41757
+ place,
41758
+ split,
41759
+ attributes,
41760
+ parent: wrapper.parentNode,
41761
+ previous: wrapper.previousSibling,
41762
+ next: wrapper.nextSibling,
41763
+ shape: shape(wrapper, image)
41764
+ };
41765
+ }
41766
+ /**
41767
+ * Puts the image back as it was before its caption: in the line the
41768
+ * caption split, and with its own alignment, margins and width. The image
41769
+ * goes into the part of the line holding the caret, so the caret stays
41770
+ */ __restore(fresh) {
41771
+ var _a, _b;
41772
+ const { wrapper, image, target, place, split, attributes } = fresh;
41773
+ if (!split) {
41774
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41775
+ } else if (!split.head && !split.tail) {
41776
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
41777
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
41778
+ } else {
41779
+ const { sel } = this.j.s;
41780
+ const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
41781
+ const { head, tail } = split;
41782
+ if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
41783
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
41784
+ target,
41785
+ ...(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 : [])
41786
+ ]);
41787
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
41788
+ } else if (tail) {
41789
+ const first = tail.firstChild;
41790
+ [
41791
+ ...(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 : []),
41792
+ target
41793
+ ].forEach((node)=>tail.insertBefore(node, first));
41794
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
41795
+ }
41796
+ }
41797
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41798
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
41799
+ style: attributes[0],
41800
+ class: attributes[1]
41801
+ });
41802
+ }
41803
+ __uncaption(wrapper, image) {
41804
+ var _a;
41805
+ const { j } = this;
41806
+ // Read while the wrapper is still one, with its caption
41807
+ 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));
41808
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
41809
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
41810
+ const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
41811
+ moveMargins(wrapper, image);
41812
+ if (width) {
41813
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
41814
+ }
41815
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
41816
+ // A block wrapper leaves the image in a paragraph of its own
41817
+ 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) {
41818
+ const line = j.createInside.element(j.o.enter);
41819
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
41820
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
41821
+ } else {
41822
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41823
+ }
41824
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41825
+ }
41826
+ __create({ tag, className }) {
41827
+ return this.j.createInside.element(tag, className ? {
41828
+ class: className
41829
+ } : {});
41830
+ }
41831
+ /**
41832
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
41833
+ * paragraph is split round it, and a part left empty goes
41834
+ */ __insert(wrapper, target) {
41835
+ const { j } = this;
41836
+ 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;
41837
+ if (!block || !TEXT_BLOCK.test(block.nodeName)) {
41838
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
41839
+ return null;
41840
+ }
41841
+ const range = j.ed.createRange();
41842
+ range.setStartBefore(block);
41843
+ range.setEndBefore(target);
41844
+ const start = range.extractContents();
41845
+ range.setStartAfter(target);
41846
+ range.setEndAfter(block);
41847
+ const end = range.extractContents();
41848
+ const [head, tail] = [
41849
+ start,
41850
+ end
41851
+ ].map((part, index)=>{
41852
+ const line = part.firstChild;
41853
+ if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
41854
+ return null;
41855
+ }
41856
+ ;(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);
41857
+ return line;
41858
+ });
41859
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
41860
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
41861
+ return {
41862
+ block,
41863
+ head,
41864
+ tail
41865
+ };
41866
+ }
41867
+ /**
41868
+ * The wrapper can't be edited, apart from its caption, so typing can't
41869
+ * land between the image and the caption
41870
+ */ __mark(wrapper) {
41871
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
41872
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
41873
+ if (caption) {
41874
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
41875
+ this.__placeholder(caption);
41876
+ }
41877
+ }
41878
+ __placeholder(caption) {
41879
+ const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
41880
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
41881
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
41882
+ }
41883
+ }
41884
+ onChange() {
41885
+ const { j } = this;
41886
+ if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
41887
+ return;
41888
+ }
41889
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
41890
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
41891
+ this.__mark(elm);
41892
+ }
41893
+ });
41894
+ }
41895
+ /**
41896
+ * The placeholder goes with the first letter typed or pasted, and comes
41897
+ * back when the last is deleted
41898
+ */ onInput() {
41899
+ const caption = this.__caretCaption();
41900
+ if (caption) {
41901
+ this.__placeholder(caption);
41902
+ }
41903
+ }
41904
+ /**
41905
+ * The editor's own attributes stay out of the value, as the caption would
41906
+ * be editable on the page. So does a caption given and left blank, as
41907
+ * leaving it takes it off, so saving at once keeps the image as it was
41908
+ */ onAfterGetValueFromEditor(data) {
41909
+ if (!data.value.includes('contenteditable')) {
41910
+ return;
41911
+ }
41912
+ const { j } = this;
41913
+ const template = j.c.element('template');
41914
+ template.innerHTML = data.value;
41915
+ 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));
41916
+ const copies = wrappers(template.content);
41917
+ const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
41918
+ const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
41919
+ const placed = fresh && copy && placedIn(j, fresh, copy);
41920
+ let changed = false;
41921
+ if (placed) {
41922
+ this.__restore(placed);
41923
+ changed = true;
41924
+ }
41925
+ copies.forEach((wrapper)=>{
41926
+ [
41927
+ wrapper,
41928
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
41929
+ ].forEach((elm)=>[
41930
+ 'contenteditable',
41931
+ PLACEHOLDER
41932
+ ].forEach((name)=>{
41933
+ if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
41934
+ elm.removeAttribute(name);
41935
+ changed = true;
41936
+ }
41937
+ }));
41938
+ });
41939
+ if (changed) {
41940
+ data.value = template.innerHTML;
41941
+ }
41942
+ }
41943
+ onChangePlace() {
41944
+ const { j } = this;
41945
+ // Captured, to come first: the editor's own `focusout` listener can stop
41946
+ // the event as it fires `blur`, and an image's `mousedown` listener
41947
+ // moves the focus before the press reaches the editor
41948
+ j.e.off([
41949
+ j.editor,
41950
+ j.ow,
41951
+ j.ew
41952
+ ], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
41953
+ capture: true
41954
+ }).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
41955
+ capture: true
41956
+ }).on([
41957
+ j.ow,
41958
+ j.ew
41959
+ ], 'mouseup.imageCaption', this.__onMouseUp);
41960
+ }
41961
+ __onMouseDown(event) {
41962
+ this.__press = event.target;
41963
+ }
41964
+ /**
41965
+ * A caption left blank goes when the focus leaves it. That's checked once
41966
+ * the focus has landed, as switching windows or opening the editor's own
41967
+ * popups keeps it, and once a press that took the focus is over, as the
41968
+ * browsers fire no click when its target moves
41969
+ */ __onFocusOut(event) {
41970
+ const caption = event.target;
41971
+ 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) {
41972
+ return;
41973
+ }
41974
+ if (this.__press) {
41975
+ this.__afterPress.push(caption);
41976
+ } else {
41977
+ this.__dropBlank(caption, null);
41978
+ }
41979
+ }
41980
+ __onMouseUp() {
41981
+ const press = this.__press;
41982
+ this.__press = null;
41983
+ this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
41984
+ }
41985
+ __dropBlank(caption, press) {
41986
+ // `async.setTimeout` runs a timeout of 0 at once
41987
+ this.j.async.setTimeout(()=>{
41988
+ const { j } = this;
41989
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
41990
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
41991
+ if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
41992
+ return;
41993
+ }
41994
+ const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
41995
+ const fresh = this.__freshCaption(wrapper);
41996
+ this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
41997
+ // The click opened the image's popup below the caption, so it
41998
+ // opens again below the image, as after the popup's Caption button
41999
+ if (clicked) {
42000
+ j.e.fire('recalcPositionPopup');
42001
+ j.e.fire('closeAllPopups');
42002
+ }
42003
+ }, 1);
42004
+ }
42005
+ /**
42006
+ * The caption has the focus, or had it when another window took it, or
42007
+ * the editor's own popups and dialogs have it, as the link form
42008
+ */ __keepsFocus(caption) {
42009
+ const { j } = this;
42010
+ const doc = caption.ownerDocument;
42011
+ if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
42012
+ return true;
42013
+ }
42014
+ const active = j.od.activeElement;
42015
+ 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)));
42016
+ }
42017
+ /**
42018
+ * The caption the caret is in
42019
+ */ __caretCaption() {
42020
+ const { s } = this.j;
42021
+ if (!s.isInsideArea) {
42022
+ return null;
42023
+ }
42024
+ const node = s.range.startContainer;
42025
+ 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));
42026
+ return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
42027
+ }
42028
+ /**
42029
+ * Enter in a caption starts a line after the image, and Shift+Enter
42030
+ * breaks the caption's line, as everywhere
42031
+ */ onBeforeEnter(event) {
42032
+ const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
42033
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
42034
+ if (!wrapper) {
42035
+ return;
42036
+ }
42037
+ const { j } = this;
42038
+ this.__focusEditor();
42039
+ // The Enter plugin breaks the line after an inline wrapper
42040
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42041
+ j.s.setCursorAfter(wrapper);
42042
+ return;
42043
+ }
42044
+ const line = this.__line();
42045
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42046
+ j.s.setCursorIn(line);
42047
+ j.synchronizeValues();
42048
+ return false;
42049
+ }
42050
+ /**
42051
+ * The caption keeps the focus, as an editable element of its own, and
42052
+ * would take the caret back, so the editor takes it before the caret
42053
+ * leaves the caption
42054
+ */ __focusEditor() {
42055
+ this.j.editor.focus({
42056
+ preventScroll: true
42057
+ });
42058
+ }
42059
+ __line() {
42060
+ const { j } = this;
42061
+ const line = j.createInside.element(j.o.enter);
42062
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
42063
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
42064
+ }
42065
+ return line;
42066
+ }
42067
+ /**
42068
+ * A caption holds text. An image, a table or a block put in it would end
42069
+ * the captioned image, so it goes after the image, as Enter would
42070
+ */ onBeforeInsertNode(node) {
42071
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
42072
+ if (!wrapper || !holdsMoreThanText(node)) {
42073
+ return;
42074
+ }
42075
+ const { j } = this;
42076
+ this.__focusEditor();
42077
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42078
+ j.s.setCursorAfter(wrapper);
42079
+ return;
42080
+ }
42081
+ const line = this.__line();
42082
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42083
+ j.s.setCursorIn(line);
42084
+ }
42085
+ /**
42086
+ * A selected captioned image goes as an image on a line of its own does,
42087
+ * leaving the line empty, rather than joining the lines either side
42088
+ */ onBeforeCommandDelete() {
42089
+ const wrapper = this.__selectedWrapper();
42090
+ if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42091
+ return;
42092
+ }
42093
+ const line = this.__line();
42094
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
42095
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42096
+ this.j.s.setCursorIn(line);
42097
+ return false;
42098
+ }
42099
+ /**
42100
+ * The captioned image the selection holds, as a click on the image selects
42101
+ */ __selectedWrapper() {
42102
+ const { s } = this.j;
42103
+ if (!s.isInsideArea || s.isCollapsed()) {
42104
+ return null;
42105
+ }
42106
+ const { startContainer, startOffset, endContainer, endOffset } = s.range;
42107
+ const node = startContainer.childNodes[startOffset];
42108
+ return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
42109
+ }
42110
+ onKeyDown(event) {
42111
+ var _a;
42112
+ this.__arrow = null;
42113
+ // Typing replaces a selected captioned image, on the line it leaves
42114
+ if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
42115
+ this.j.execCommand('Delete');
42116
+ return;
42117
+ }
42118
+ if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
42119
+ return;
42120
+ }
42121
+ const caption = this.__caretCaption();
42122
+ if (caption) {
42123
+ this.__arrow = {
42124
+ key: event.key,
42125
+ range: this.j.s.range.cloneRange(),
42126
+ caption
42127
+ };
42128
+ }
42129
+ }
42130
+ /**
42131
+ * An arrow key that couldn't move the caret in the caption takes it out,
42132
+ * past the image, as the caption is an editable element of its own
42133
+ */ onKeyUp(event) {
42134
+ const arrow = this.__arrow;
42135
+ this.__arrow = null;
42136
+ if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
42137
+ return;
42138
+ }
42139
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
42140
+ if (!wrapper) {
42141
+ return;
42142
+ }
42143
+ const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
42144
+ const { s } = this.j;
42145
+ this.__focusEditor();
42146
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42147
+ if (forward) {
42148
+ s.setCursorAfter(wrapper);
42149
+ } else {
42150
+ s.setCursorBefore(wrapper);
42151
+ }
42152
+ return;
42153
+ }
42154
+ const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
42155
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
42156
+ s.setCursorIn(sibling, forward);
42157
+ return;
42158
+ }
42159
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
42160
+ if (forward) {
42161
+ s.setCursorBefore(sibling);
42162
+ } else {
42163
+ s.setCursorAfter(sibling);
42164
+ }
42165
+ return;
42166
+ }
42167
+ const line = this.__line();
42168
+ (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);
42169
+ s.setCursorIn(line);
42170
+ this.j.synchronizeValues();
42171
+ }
42172
+ onBeforeCommand(command) {
42173
+ const name = command.toLowerCase();
42174
+ if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
42175
+ return false;
42176
+ }
42177
+ // A caption given and left blank was never a step, so Undo takes it off
42178
+ const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
42179
+ if (fresh) {
42180
+ this.__unrecorded(()=>{
42181
+ this.__restore(fresh);
42182
+ this.j.history.snapshot.restore(fresh.before);
42183
+ });
42184
+ return false;
42185
+ }
42186
+ }
42187
+ /**
42188
+ * Select all in a caption selects the caption, as the caption is an
42189
+ * editable element of its own
42190
+ */ __onSelectAll() {
42191
+ const caption = this.__caretCaption();
42192
+ if (caption) {
42193
+ this.j.e.stopPropagation('beforeCommandSelectall');
42194
+ this.j.s.select(caption, true);
42195
+ return false;
42196
+ }
42197
+ }
42198
+ /** @override */ beforeDestruct(jodit) {
42199
+ jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
42200
+ jodit.editor,
42201
+ jodit.ow,
42202
+ jodit.ew
42203
+ ], '.imageCaption');
42204
+ }
42205
+ constructor(){
42206
+ super(...arguments);
42207
+ /**
42208
+ * The caption given last, while nothing has changed round it and it's
42209
+ * still blank, so taking it off can put everything back as it was
42210
+ */ this.__fresh = null;
42211
+ this.__press = null;
42212
+ this.__afterPress = [];
42213
+ this.__arrow = null;
42214
+ }
42215
+ }
42216
+ __decorate([
42217
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
42218
+ ], imageCaption.prototype, "onToggleImageCaption", null);
42219
+ __decorate([
42220
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42221
+ ':change',
42222
+ ':afterInit',
42223
+ ':afterSetMode',
42224
+ ':changePlace'
42225
+ ]),
42226
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
42227
+ ], imageCaption.prototype, "onChange", null);
42228
+ __decorate([
42229
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42230
+ ':input',
42231
+ ':keyup',
42232
+ ':afterPaste'
42233
+ ])
42234
+ ], imageCaption.prototype, "onInput", null);
42235
+ __decorate([
42236
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
42237
+ ], imageCaption.prototype, "onAfterGetValueFromEditor", null);
42238
+ __decorate([
42239
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
42240
+ ], imageCaption.prototype, "onChangePlace", null);
42241
+ __decorate([
42242
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42243
+ ], imageCaption.prototype, "__onMouseDown", null);
42244
+ __decorate([
42245
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42246
+ ], imageCaption.prototype, "__onFocusOut", null);
42247
+ __decorate([
42248
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42249
+ ], imageCaption.prototype, "__onMouseUp", null);
42250
+ __decorate([
42251
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
42252
+ ], imageCaption.prototype, "onBeforeEnter", null);
42253
+ __decorate([
42254
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
42255
+ ], imageCaption.prototype, "onBeforeInsertNode", null);
42256
+ __decorate([
42257
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
42258
+ ], imageCaption.prototype, "onBeforeCommandDelete", null);
42259
+ __decorate([
42260
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
42261
+ ], imageCaption.prototype, "onKeyDown", null);
42262
+ __decorate([
42263
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
42264
+ ], imageCaption.prototype, "onKeyUp", null);
42265
+ __decorate([
42266
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
42267
+ ], imageCaption.prototype, "onBeforeCommand", null);
42268
+ __decorate([
42269
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42270
+ ], imageCaption.prototype, "__onSelectAll", null);
42271
+ /**
42272
+ * `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
42273
+ * from the editor's value
42274
+ */ function placedIn(jodit, fresh, wrapper) {
42275
+ var _a;
42276
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
42277
+ const { split } = fresh;
42278
+ if (!image) {
42279
+ return null;
42280
+ }
42281
+ const placed = {
42282
+ wrapper,
42283
+ image,
42284
+ target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
42285
+ place: fresh.place,
42286
+ split: null,
42287
+ attributes: fresh.attributes
42288
+ };
42289
+ if (split) {
42290
+ const head = split.head ? wrapper.previousSibling : null;
42291
+ const tail = split.tail ? wrapper.nextSibling : null;
42292
+ 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)) {
42293
+ return null;
42294
+ }
42295
+ const block = split.block.cloneNode(true);
42296
+ placed.split = {
42297
+ block,
42298
+ head: head,
42299
+ tail: tail
42300
+ };
42301
+ placed.place = counterpart(split.block, fresh.place, block);
42302
+ }
42303
+ return placed;
42304
+ }
42305
+ /**
42306
+ * The node in `copy`, a clone of `root`, where `node` is in `root`
42307
+ */ function counterpart(root, node, copy) {
42308
+ const path = [];
42309
+ for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
42310
+ path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
42311
+ }
42312
+ return path.reduce((elm, index)=>elm.childNodes[index], copy);
42313
+ }
42314
+ /**
42315
+ * The attributes of a caption's wrapper and image that the image's
42316
+ * alignment, margins and size are in
42317
+ */ function shape(wrapper, image) {
42318
+ return [
42319
+ wrapper,
42320
+ image
42321
+ ].flatMap((elm)=>[
42322
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
42323
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
42324
+ ]).join('|');
42325
+ }
42326
+ /**
42327
+ * The node is, or holds, more than text and inline formatting: an image, a
42328
+ * table, a rule or another block
42329
+ */ function holdsMoreThanText(node) {
42330
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
42331
+ return false;
42332
+ }
42333
+ return [
42334
+ node,
42335
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
42336
+ ].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())));
42337
+ }
42338
+ /**
42339
+ * A `width` attribute's value as a CSS width
42340
+ */ function pixels(value) {
42341
+ if (!value) {
42342
+ return '';
42343
+ }
42344
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
42345
+ }
42346
+ function moveMargins(from, to) {
42347
+ var _a;
42348
+ MARGINS.forEach((side)=>{
42349
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
42350
+ if (value) {
42351
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
42352
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
42353
+ }
42354
+ });
42355
+ if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
42356
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
42357
+ }
42358
+ }
42359
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
42360
+
42361
+
40938
42362
  /***/ }),
40939
42363
 
40940
42364
  /***/ 85745:
@@ -41040,7 +42464,8 @@ const SELECTED_TAGS = new Set([
41040
42464
  * paints the rest of a block image's line with its parent's highlight. See #1528.
41041
42465
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
41042
42466
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
41043
- * wrapper's whole line, and its resize frame shows it's selected
42467
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
42468
+ * a captioned image's caption
41044
42469
  */ onSelectionChange() {
41045
42470
  const { jodit } = this;
41046
42471
  jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
@@ -41063,9 +42488,12 @@ const SELECTED_TAGS = new Set([
41063
42488
  if (elm.src && /^data:/.test(elm.src)) {
41064
42489
  replaceDataURIToBlobUUID(editor, elm);
41065
42490
  }
42491
+ // A captioned image is selected with its caption, so Delete
42492
+ // removes both
41066
42493
  editor.e.on(elm, 'mousedown touchstart', ()=>{
42494
+ var _a;
41067
42495
  removeCaretText(elm);
41068
- editor.s.select(elm);
42496
+ editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
41069
42497
  });
41070
42498
  }
41071
42499
  });
@@ -41089,13 +42517,14 @@ __decorate([
41089
42517
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
41090
42518
  ], imageProcessor.prototype, "afterChange", null);
41091
42519
  function isImageSelected(jodit) {
42520
+ var _a;
41092
42521
  const { sel } = jodit.s;
41093
42522
  if (!sel || !sel.rangeCount) {
41094
42523
  return false;
41095
42524
  }
41096
42525
  const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
41097
42526
  const node = startContainer.childNodes[startOffset];
41098
- 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);
42527
+ 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);
41099
42528
  }
41100
42529
  /**
41101
42530
  * Remove the invisible-space text beside an image, which only held a caret.
@@ -41159,6 +42588,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41159
42588
  useImageEditor: true,
41160
42589
  editTitle: true,
41161
42590
  editAlt: true,
42591
+ showCaptionCheckbox: true,
41162
42592
  editLink: true,
41163
42593
  editSize: true,
41164
42594
  editBorderRadius: true,
@@ -41253,10 +42683,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41253
42683
  dialog.close();
41254
42684
  });
41255
42685
  buttons.remove.onAction(()=>{
42686
+ var _a;
42687
+ const { sourceImage } = this.state;
42688
+ const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
41256
42689
  const caret = j.s.createRange();
41257
- caret.setStartBefore(this.state.sourceImage);
42690
+ caret.setStartBefore(target);
41258
42691
  caret.collapse(true);
41259
- j.s.removeNode(this.state.sourceImage);
42692
+ j.s.removeNode(target);
41260
42693
  dialog.close();
41261
42694
  j.s.selectRange(caret);
41262
42695
  });
@@ -41278,12 +42711,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41278
42711
  if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
41279
42712
  return;
41280
42713
  }
42714
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
42715
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
42716
+ // A blank caption, as one the dialog has added, takes the caret, as
42717
+ // the image popup's Caption button does
42718
+ if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
42719
+ j.s.setCursorIn(caption);
42720
+ return;
42721
+ }
42722
+ // A captioned image is selected with its caption, as a click selects it
42723
+ const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
41281
42724
  if (j.o.image.selectImageAfterClose) {
41282
- j.s.select(sourceImage);
42725
+ j.s.select(target);
41283
42726
  return;
41284
42727
  }
41285
42728
  const caret = j.s.createRange();
41286
- caret.setStartAfter(sourceImage);
42729
+ caret.setStartAfter(target);
41287
42730
  caret.collapse(true);
41288
42731
  j.s.selectRange(caret);
41289
42732
  });
@@ -41419,6 +42862,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41419
42862
  borderRadius: 0,
41420
42863
  imageTitle: '',
41421
42864
  imageAlt: '',
42865
+ imageCaption: false,
41422
42866
  imageLink: '',
41423
42867
  imageLinkOpenInNewTab: false,
41424
42868
  imageWidth: 0,
@@ -41485,10 +42929,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41485
42929
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
41486
42930
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
41487
42931
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
41488
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
41489
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
41490
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
41491
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
42932
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
42933
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
42934
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
42935
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
42936
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
41492
42937
  /*!
41493
42938
  * Jodit Editor (https://xdsoft.net/jodit/)
41494
42939
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41500,12 +42945,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41500
42945
 
41501
42946
 
41502
42947
 
42948
+
41503
42949
  /**
41504
42950
  * Read values from image and set it to state
41505
42951
  * @private
41506
42952
  */ async function readValuesFromImage(j, state) {
41507
42953
  const { sourceImage: image, values } = state;
41508
- (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
42954
+ // A captioned image's caption element holds its place on the page and
42955
+ // its width
42956
+ const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
42957
+ const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
42958
+ values.imageCaption = Boolean(wrapper);
42959
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
41509
42960
  // Border radius
41510
42961
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
41511
42962
  // Id
@@ -41519,13 +42970,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41519
42970
  // Classes
41520
42971
  values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
41521
42972
  // Margins
41522
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
42973
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
41523
42974
  // Link
41524
- (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
42975
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
41525
42976
  // Src
41526
42977
  values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
41527
42978
  // Image size
41528
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
42979
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
41529
42980
  }
41530
42981
 
41531
42982
 
@@ -41616,19 +43067,17 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41616
43067
  * Jodit Editor (https://xdsoft.net/jodit/)
41617
43068
  * Released under MIT see LICENSE.txt in the project root for license information.
41618
43069
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41619
- */ /**
41620
- * @module plugins/image-properties
41621
43070
  */
41622
43071
 
41623
43072
 
41624
43073
 
41625
- /** @private */ async function readSizes(image, values, state) {
43074
+ /** @private */ async function readSizes(image, values, state, captionWrapper) {
41626
43075
  try {
41627
43076
  await image.decode();
41628
43077
  } catch (e) {
41629
43078
  console.error(e);
41630
43079
  }
41631
- 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;
43080
+ 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;
41632
43081
  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;
41633
43082
  values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
41634
43083
  if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
@@ -41903,6 +43352,12 @@ UIImagePropertiesForm = __decorate([
41903
43352
  <label>~Alternative~</label>
41904
43353
  <input type="text" class="jodit-input &__imageAlt"/>
41905
43354
  </div>
43355
+ <div class="jodit-form__group &__captionCheckbox">
43356
+ <label class="jodit_vertical_middle">
43357
+ <input type="checkbox" class="jodit-checkbox &__imageCaption"/>
43358
+ <span>~Caption~</span>
43359
+ </label>
43360
+ </div>
41906
43361
  <div class="jodit-form__group &__editLink">
41907
43362
  <label>~Link~</label>
41908
43363
  <input type="text" class="jodit-input &__imageLink"/>
@@ -41947,6 +43402,13 @@ UIImagePropertiesForm = __decorate([
41947
43402
  onAltChange() {
41948
43403
  this.state.values.imageAlt = this.getElm('imageAlt').value;
41949
43404
  }
43405
+ onStateCaptionChange() {
43406
+ const caption = this.getElm('imageCaption');
43407
+ caption.checked = this.state.values.imageCaption;
43408
+ }
43409
+ onCaptionChange() {
43410
+ this.state.values.imageCaption = this.getElm('imageCaption').checked;
43411
+ }
41950
43412
  onStateImageLinkChange() {
41951
43413
  const imageLink = this.getElm('imageLink');
41952
43414
  imageLink.value = this.state.values.imageLink;
@@ -41977,6 +43439,10 @@ UIImagePropertiesForm = __decorate([
41977
43439
  'editAlt',
41978
43440
  'editAlt'
41979
43441
  ],
43442
+ [
43443
+ 'showCaptionCheckbox',
43444
+ 'captionCheckbox'
43445
+ ],
41980
43446
  [
41981
43447
  'editLink',
41982
43448
  'editLink'
@@ -42032,6 +43498,12 @@ __decorate([
42032
43498
  __decorate([
42033
43499
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
42034
43500
  ], UIImageMainTab.prototype, "onAltChange", null);
43501
+ __decorate([
43502
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
43503
+ ], UIImageMainTab.prototype, "onStateCaptionChange", null);
43504
+ __decorate([
43505
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
43506
+ ], UIImageMainTab.prototype, "onCaptionChange", null);
42035
43507
  __decorate([
42036
43508
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
42037
43509
  ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
@@ -42476,6 +43948,33 @@ UIImagePositionTab = __decorate([
42476
43948
  /* harmony export */ ]);
42477
43949
 
42478
43950
 
43951
+ /***/ }),
43952
+
43953
+ /***/ 29509:
43954
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43955
+
43956
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43957
+ /* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
43958
+ /* harmony export */ });
43959
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
43960
+ /*!
43961
+ * Jodit Editor (https://xdsoft.net/jodit/)
43962
+ * Released under MIT see LICENSE.txt in the project root for license information.
43963
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43964
+ */
43965
+ /**
43966
+ * Gives the image a caption or takes it away, and returns the element that
43967
+ * holds the image's place on the page: the caption's, or the image
43968
+ * @private
43969
+ */ function applyCaption(j, image, imageCaption) {
43970
+ var _a;
43971
+ if (j.o.image.showCaptionCheckbox) {
43972
+ j.e.fire('toggleImageCaption', image, imageCaption);
43973
+ }
43974
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
43975
+ }
43976
+
43977
+
42479
43978
  /***/ }),
42480
43979
 
42481
43980
  /***/ 34755:
@@ -42487,9 +43986,10 @@ UIImagePositionTab = __decorate([
42487
43986
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42488
43987
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
42489
43988
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42490
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29615);
42491
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14721);
42492
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87602);
43989
+ /* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
43990
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
43991
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
43992
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
42493
43993
  /*!
42494
43994
  * Jodit Editor (https://xdsoft.net/jodit/)
42495
43995
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42500,11 +44000,13 @@ UIImagePositionTab = __decorate([
42500
44000
 
42501
44001
 
42502
44002
 
44003
+
42503
44004
  /**
42504
44005
  * Apply form's values to image
42505
44006
  * @private
42506
44007
  */ function applyValuesToImage(j, state, image) {
42507
- const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
44008
+ var _a;
44009
+ const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
42508
44010
  const opt = j.o;
42509
44011
  // styles
42510
44012
  if (opt.image.editStyle) {
@@ -42514,7 +44016,7 @@ UIImagePositionTab = __decorate([
42514
44016
  if (imageSrc) {
42515
44017
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
42516
44018
  } else {
42517
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
44019
+ _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);
42518
44020
  return;
42519
44021
  }
42520
44022
  // Border radius
@@ -42524,21 +44026,24 @@ UIImagePositionTab = __decorate([
42524
44026
  // Alt
42525
44027
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
42526
44028
  // Link
42527
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42528
- // Size
42529
- (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked);
42530
- // Margin
42531
- if (j.o.image.editMargins) {
42532
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
42533
- }
44029
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42534
44030
  if (opt.image.editClass) {
42535
44031
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
42536
44032
  }
42537
44033
  if (opt.image.editId) {
42538
44034
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
42539
44035
  }
44036
+ // The caption's element takes the image's place on the page and its width,
44037
+ // so it's added or taken away after the image's own style and classes
44038
+ const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
44039
+ // Size
44040
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
44041
+ // Margin
44042
+ if (j.o.image.editMargins) {
44043
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
44044
+ }
42540
44045
  if (opt.image.editAlign) {
42541
- (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));
44046
+ (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));
42542
44047
  }
42543
44048
  }
42544
44049
 
@@ -42553,12 +44058,14 @@ UIImagePositionTab = __decorate([
42553
44058
  /* harmony export */ });
42554
44059
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42555
44060
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
44061
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
42556
44062
  /*!
42557
44063
  * Jodit Editor (https://xdsoft.net/jodit/)
42558
44064
  * Released under MIT see LICENSE.txt in the project root for license information.
42559
44065
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42560
44066
  */
42561
44067
 
44068
+
42562
44069
  /** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
42563
44070
  // Link
42564
44071
  let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
@@ -42572,8 +44079,11 @@ UIImagePositionTab = __decorate([
42572
44079
  const relParts = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
42573
44080
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
42574
44081
  }
42575
- } else {
42576
- if (link && link.parentNode) {
44082
+ } else if (link && link.parentNode) {
44083
+ // Froala keeps a linked image's caption inside the link
44084
+ if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
44085
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
44086
+ } else {
42577
44087
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
42578
44088
  }
42579
44089
  }
@@ -42651,7 +44161,19 @@ UIImagePositionTab = __decorate([
42651
44161
 
42652
44162
 
42653
44163
 
42654
- /** @private */ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
44164
+ /**
44165
+ * A captioned image fills its caption's element, `box`, which takes the width
44166
+ * @private
44167
+ */ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
44168
+ if (box !== image) {
44169
+ const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
44170
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
44171
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
44172
+ width: width && '100%',
44173
+ height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
44174
+ });
44175
+ return;
44176
+ }
42655
44177
  // Size
42656
44178
  if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
42657
44179
  const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
@@ -42815,19 +44337,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42815
44337
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
42816
44338
 
42817
44339
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44340
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
44341
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42818
44342
  /*!
42819
44343
  * Jodit Editor (https://xdsoft.net/jodit/)
42820
44344
  * Released under MIT see LICENSE.txt in the project root for license information.
42821
44345
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42822
- */ /**
42823
- * @module plugins/indent
42824
44346
  */
44347
+
44348
+
42825
44349
  /**
42826
44350
  * Get style rule key for current direction
42827
44351
  * @internal
42828
44352
  */ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
44353
+ /**
44354
+ * Indents or outdents a box by `indentMargin`
44355
+ * @internal
44356
+ */ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44357
+ if (!currentBox) {
44358
+ return;
44359
+ }
44360
+ if (processedElements.has(currentBox)) {
44361
+ return;
44362
+ }
44363
+ const key = getKey(editor.o.direction, currentBox);
44364
+ processedElements.add(currentBox);
44365
+ const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
44366
+ let value = current ? parseInt(current, 10) : 0;
44367
+ value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
44368
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
44369
+ if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
44370
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
44371
+ }
44372
+ };
42829
44373
 
42830
44374
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
44375
+ /* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
42831
44376
  /* harmony export */ "getKey", 0, /* binding */ getKey
42832
44377
  /* harmony export */ ]);
42833
44378
 
@@ -42858,9 +44403,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42858
44403
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
42859
44404
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
42860
44405
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43555);
42861
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
42862
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54389);
42863
- /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(302);
44406
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
44407
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
42864
44408
  /*!
42865
44409
  * Jodit Editor (https://xdsoft.net/jodit/)
42866
44410
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42871,24 +44415,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42871
44415
 
42872
44416
 
42873
44417
 
42874
-
42875
- const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42876
- if (!currentBox) {
42877
- return;
42878
- }
42879
- if (processedElements.has(currentBox)) {
42880
- return;
42881
- }
42882
- const key = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_6__.getKey)(editor.o.direction, currentBox);
42883
- processedElements.add(currentBox);
42884
- const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.cssInline)(currentBox, key);
42885
- let value = current ? parseInt(current, 10) : 0;
42886
- value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
42887
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(currentBox, key, value > 0 ? value : '');
42888
- if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style')) {
42889
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style', null);
42890
- }
42891
- };
42892
44418
  /**
42893
44419
  * Indents the line containing the selection or insertion point.
42894
44420
  */ function indent(editor) {
@@ -42907,7 +44433,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42907
44433
  if (isBrMode && editor.s.isCollapsed()) {
42908
44434
  if (current) {
42909
44435
  const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
42910
- applyIndentToBox(processedElements, box, editor, command);
44436
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
42911
44437
  return false;
42912
44438
  }
42913
44439
  }
@@ -42921,7 +44447,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42921
44447
  editor.s.restore();
42922
44448
  return false;
42923
44449
  }
42924
- applyIndentToBox(processedElements, currentBox, editor, command);
44450
+ ;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
42925
44451
  editor.s.restore();
42926
44452
  });
42927
44453
  editor.synchronizeValues();
@@ -43022,11 +44548,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43022
44548
  /* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
43023
44549
  /* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
43024
44550
  /* harmony import */ var _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75393);
43025
- /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14862);
43026
- /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96257);
43027
- /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9914);
43028
- /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53696);
43029
- /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(33489);
44551
+ /* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
44552
+ /* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
44553
+ /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
44554
+ /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
44555
+ /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
44556
+ /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
44557
+ /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
43030
44558
  /*!
43031
44559
  * Jodit Editor (https://xdsoft.net/jodit/)
43032
44560
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43046,13 +44574,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43046
44574
 
43047
44575
 
43048
44576
 
44577
+
44578
+
43049
44579
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
43050
44580
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
43051
44581
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
43052
44582
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
43053
44583
  'source'
43054
44584
  ];
43055
- _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"]);
44585
+ _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"]);
43056
44586
  // Register cell popup buttons as global controls so they can be
43057
44587
  // referenced by name in custom popup configurations.
43058
44588
  // Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
@@ -43129,15 +44659,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
43129
44659
  /***/ 62000:
43130
44660
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43131
44661
 
43132
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27613);
43133
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
44662
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44663
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
44664
+ /* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
44665
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43134
44666
  /*!
43135
44667
  * Jodit Editor (https://xdsoft.net/jodit/)
43136
44668
  * Released under MIT see LICENSE.txt in the project root for license information.
43137
44669
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43138
44670
  */
43139
44671
 
43140
- const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
44672
+
44673
+
44674
+ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43141
44675
  /* harmony default export */ __webpack_exports__["default"] = ([
43142
44676
  'brushCell',
43143
44677
  {
@@ -43152,7 +44686,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43152
44686
  exec: (editor, table, { control })=>{
43153
44687
  const command = cmd(control);
43154
44688
  editor.getInstance('Table', editor.o).getAllSelectedCells().forEach((cell)=>{
43155
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
44689
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
43156
44690
  });
43157
44691
  },
43158
44692
  tooltip: 'Vertical align'
@@ -43182,7 +44716,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43182
44716
  tableaddcolumnafter: 'Insert column after'
43183
44717
  },
43184
44718
  exec: (editor, table, { control })=>{
43185
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44719
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43186
44720
  return;
43187
44721
  }
43188
44722
  if (!control.args) {
@@ -43200,7 +44734,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43200
44734
  tableaddrowafter: 'Insert row below'
43201
44735
  },
43202
44736
  exec: (editor, table, { control })=>{
43203
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44737
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43204
44738
  return;
43205
44739
  }
43206
44740
  if (!control.args) {
@@ -43211,6 +44745,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43211
44745
  },
43212
44746
  tooltip: 'Add row'
43213
44747
  },
44748
+ {
44749
+ name: 'headerrow',
44750
+ exec: (editor, table)=>{
44751
+ 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')) {
44752
+ return;
44753
+ }
44754
+ editor.execCommand('tableheaderrow', false, table);
44755
+ const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
44756
+ // Beside the cell that replaced the one it opened for
44757
+ if (cell) {
44758
+ editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
44759
+ }
44760
+ // The popup stays open, so the button shows the new state
44761
+ return true;
44762
+ },
44763
+ isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
44764
+ isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
44765
+ tooltip: 'Header row'
44766
+ },
43214
44767
  {
43215
44768
  name: 'deleteTable',
43216
44769
  icon: 'bin',
@@ -43221,7 +44774,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43221
44774
  tableempty: 'Empty cell'
43222
44775
  },
43223
44776
  exec: (editor, table, { control })=>{
43224
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44777
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43225
44778
  return;
43226
44779
  }
43227
44780
  if (!control.args) {
@@ -43281,7 +44834,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43281
44834
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
43282
44835
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
43283
44836
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43284
- /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
44837
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
44838
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
43285
44839
  /*!
43286
44840
  * Jodit Editor (https://xdsoft.net/jodit/)
43287
44841
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43291,6 +44845,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43291
44845
 
43292
44846
 
43293
44847
 
44848
+
43294
44849
  // A Normal image sits where the text of its line is aligned (#1531)
43295
44850
  const lineAlign = (editor, elm)=>{
43296
44851
  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;
@@ -43311,7 +44866,15 @@ const lineAlign = (editor, elm)=>{
43311
44866
  return 'left';
43312
44867
  }
43313
44868
  };
43314
- 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';
44869
+ // A captioned image is aligned by the element holding it and its caption
44870
+ const alignedBox = (editor, elm)=>{
44871
+ var _a;
44872
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
44873
+ };
44874
+ const currentAlign = (editor, elm)=>{
44875
+ const box = alignedBox(editor, elm);
44876
+ 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';
44877
+ };
43315
44878
  const align = {
43316
44879
  name: 'left',
43317
44880
  childTemplate: (_, __, value)=>value,
@@ -43337,14 +44900,15 @@ const align = {
43337
44900
  'img',
43338
44901
  'jodit',
43339
44902
  'jodit-media'
43340
- ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
44903
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
43341
44904
  return;
43342
44905
  }
43343
44906
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43344
44907
  if (!command) {
43345
44908
  return false;
43346
44909
  }
43347
- ;(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));
44910
+ const box = alignedBox(editor, elm);
44911
+ (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));
43348
44912
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
43349
44913
  'jodit',
43350
44914
  'jodit-media'
@@ -43363,7 +44927,8 @@ const align = {
43363
44927
  icon: 'bin',
43364
44928
  tooltip: 'Delete',
43365
44929
  exec: (editor, image)=>{
43366
- image && editor.s.removeNode(image);
44930
+ var _a;
44931
+ 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);
43367
44932
  }
43368
44933
  },
43369
44934
  {
@@ -43376,6 +44941,24 @@ const align = {
43376
44941
  },
43377
44942
  tooltip: 'Edit'
43378
44943
  },
44944
+ {
44945
+ name: 'caption',
44946
+ exec: (editor, image)=>{
44947
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
44948
+ return;
44949
+ }
44950
+ const caption = editor.e.fire('toggleImageCaption', image);
44951
+ editor.synchronizeValues();
44952
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
44953
+ editor.e.fire('hideResizer');
44954
+ editor.s.setCursorIn(caption);
44955
+ } else {
44956
+ editor.e.fire('recalcPositionPopup');
44957
+ }
44958
+ },
44959
+ isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
44960
+ tooltip: 'Caption'
44961
+ },
43379
44962
  {
43380
44963
  name: 'valign',
43381
44964
  list: [
@@ -43385,13 +44968,14 @@ const align = {
43385
44968
  'Normal'
43386
44969
  ],
43387
44970
  tooltip: 'Vertical align',
43388
- // `vertical-align` only moves an image in the line, not a floated or block one
44971
+ // `vertical-align` only moves an image in the line, not a floated or block
44972
+ // one, nor a captioned one, which is placed by its caption's element
43389
44973
  isDisabled: (editor, button)=>{
43390
44974
  const image = button.target;
43391
44975
  return Boolean(image && ([
43392
44976
  'left',
43393
44977
  'right'
43394
- ].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'));
44978
+ ].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)));
43395
44979
  },
43396
44980
  exec: (editor, image, { control })=>{
43397
44981
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
@@ -43469,6 +45053,22 @@ const align = {
43469
45053
  /* 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> ");
43470
45054
 
43471
45055
 
45056
+ /***/ }),
45057
+
45058
+ /***/ 72972:
45059
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45060
+
45061
+ /* 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> ");
45062
+
45063
+
45064
+ /***/ }),
45065
+
45066
+ /***/ 44597:
45067
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45068
+
45069
+ /* 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> ");
45070
+
45071
+
43472
45072
  /***/ }),
43473
45073
 
43474
45074
  /***/ 14862:
@@ -43561,8 +45161,8 @@ const align = {
43561
45161
  if (target && type && this.canShowPopupForType(type)) {
43562
45162
  const isMedia = type === 'jodit-media';
43563
45163
  // Beside the media in a wrapper kept in the content, which can fill
43564
- // the line
43565
- const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
45164
+ // the line, and below a captioned image's caption, so it stays in view
45165
+ 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;
43566
45166
  this.showPopup(()=>this.__bound(bound, isMedia), type, target);
43567
45167
  return false;
43568
45168
  }
@@ -46451,6 +48051,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
46451
48051
  * Check if root node is empty
46452
48052
  * @private
46453
48053
  */ function isEditorEmpty(root) {
48054
+ var _a;
48055
+ // A non-breaking space is typed, where other white space can just lay out
48056
+ // the HTML
48057
+ return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
48058
+ }
48059
+ function isBlank(root) {
46454
48060
  var _a;
46455
48061
  if (!root.firstChild) {
46456
48062
  return true;
@@ -46971,6 +48577,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
46971
48577
 
46972
48578
 
46973
48579
  const key = 'table_processor_observer-resize';
48580
+ /**
48581
+ * How near the top or bottom of what a row scrolls in the pointer starts
48582
+ * scrolling it, as the editor's iframe passes on no moves outside it
48583
+ */ const SCROLL_EDGE = 20;
46974
48584
  /**
46975
48585
  * Process tables in editor
46976
48586
  */ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
@@ -46990,7 +48600,11 @@ const key = 'table_processor_observer-resize';
46990
48600
  }
46991
48601
  hideResizeHandle() {
46992
48602
  this.hideTimeout = this.j.async.setTimeout(()=>{
46993
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48603
+ // A late move from inside the cell can come once the pointer
48604
+ // is on the handle, which covers the border
48605
+ if (!this.resizeHandler.matches(':hover')) {
48606
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48607
+ }
46994
48608
  }, {
46995
48609
  timeout: this.j.defaultTimeout,
46996
48610
  label: 'hideResizer'
@@ -47007,6 +48621,30 @@ const key = 'table_processor_observer-resize';
47007
48621
  this.startX = event.clientX;
47008
48622
  this.j.lock(key);
47009
48623
  this.resizeHandler.classList.add('jodit-table-resizer_moved');
48624
+ if (this.workRow) {
48625
+ this.startY = event.clientY;
48626
+ this.startHeight = this.workRow.offsetHeight;
48627
+ this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
48628
+ this.scrolled = 0;
48629
+ this.anchored = scrollersOf(this.workRow).map((elm)=>{
48630
+ const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
48631
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
48632
+ return [
48633
+ elm,
48634
+ style
48635
+ ];
48636
+ });
48637
+ return false;
48638
+ }
48639
+ this.startStyles = [
48640
+ this.workTable,
48641
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
48642
+ ].map((elm)=>[
48643
+ elm,
48644
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
48645
+ ]);
48646
+ this.startLeft = parseFloat(this.resizeHandler.style.left);
48647
+ this.startEdge = this.columnEdge();
47010
48648
  let box;
47011
48649
  this.minX = 0;
47012
48650
  this.maxX = 1000000;
@@ -47033,12 +48671,21 @@ const key = 'table_processor_observer-resize';
47033
48671
  /**
47034
48672
  * Mouse move after click on resize handle
47035
48673
  */ onMouseMove(event) {
48674
+ var _a;
47036
48675
  if (!this.drag) {
47037
48676
  return;
47038
48677
  }
47039
48678
  this.j.e.fire('closeAllPopups');
47040
48679
  let x = event.clientX;
47041
48680
  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);
48681
+ if (this.workRow) {
48682
+ const view = scrollViewOf(this.workRow);
48683
+ this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
48684
+ this.resizeRow(this.workRow);
48685
+ this.scrollAlong(view, event.clientY);
48686
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
48687
+ return;
48688
+ }
47042
48689
  if (x < this.minX) {
47043
48690
  x = this.minX;
47044
48691
  }
@@ -47046,7 +48693,14 @@ const key = 'table_processor_observer-resize';
47046
48693
  x = this.maxX;
47047
48694
  }
47048
48695
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
47049
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', x - (this.j.o.iframe ? 0 : workplacePosition.left) + 'px');
48696
+ this.restoreStyles();
48697
+ this.resizeColumnsOrTable();
48698
+ const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
48699
+ Object.assign(this.resizeHandler.style, {
48700
+ left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
48701
+ top: tableBox.top - workplacePosition.top + 'px',
48702
+ height: tableBox.height + 'px'
48703
+ });
47050
48704
  const sel = this.j.s.sel;
47051
48705
  sel && sel.removeAllRanges();
47052
48706
  }
@@ -47063,17 +48717,96 @@ const key = 'table_processor_observer-resize';
47063
48717
  this.drag = false;
47064
48718
  this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
47065
48719
  this.resizeHandler.classList.remove('jodit-table-resizer_moved');
47066
- if (this.startX !== e.clientX) {
47067
- // resize column
47068
- if (this.wholeTable == null) {
47069
- this.resizeColumns();
48720
+ if (this.workRow) {
48721
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48722
+ this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48723
+ this.anchored = [];
48724
+ const height = this.workRow.offsetHeight;
48725
+ if (height !== this.startHeight) {
48726
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
47070
48727
  } else {
47071
- this.resizeTable();
48728
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
48729
+ }
48730
+ } else {
48731
+ this.restoreStyles();
48732
+ if (this.startX !== e.clientX) {
48733
+ this.resizeColumnsOrTable();
47072
48734
  }
47073
48735
  }
47074
48736
  this.j.synchronizeValues();
47075
48737
  this.j.s.focus();
47076
48738
  }
48739
+ resizeColumnsOrTable() {
48740
+ if (this.wholeTable == null) {
48741
+ this.resizeColumns();
48742
+ } else {
48743
+ this.resizeTable();
48744
+ }
48745
+ }
48746
+ restoreStyles() {
48747
+ this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48748
+ }
48749
+ /**
48750
+ * Where the border the handle is on lies: the work cell's left side
48751
+ * for the table's left edge, otherwise its right side
48752
+ */ columnEdge() {
48753
+ const { left, right } = this.workCell.getBoundingClientRect();
48754
+ return this.wholeTable === true ? left : right;
48755
+ }
48756
+ /**
48757
+ * Sets the row's height from where the pointer is, and how far the drag
48758
+ * has scrolled. The browser keeps the row as tall as its content
48759
+ */ resizeRow(row) {
48760
+ const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
48761
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
48762
+ this.placeRowHandle(row);
48763
+ return row.offsetHeight === height;
48764
+ }
48765
+ /**
48766
+ * While the pointer is near or past the top or bottom of the part of the
48767
+ * row's scroller in view, scrolls it on, and the row's border with it
48768
+ */ scrollAlong(view, clientY) {
48769
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48770
+ const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
48771
+ if (!past) {
48772
+ return;
48773
+ }
48774
+ const { scroller } = view;
48775
+ const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
48776
+ const scroll = ()=>{
48777
+ const { workRow } = this;
48778
+ if (!workRow) {
48779
+ return;
48780
+ }
48781
+ const scrollTop = scroller.scrollTop;
48782
+ if (step > 0) {
48783
+ // Growing the row first makes the room to scroll down into
48784
+ this.scrolled += step;
48785
+ this.resizeRow(workRow);
48786
+ scroller.scrollTop = scrollTop + step;
48787
+ const missed = step - (scroller.scrollTop - scrollTop);
48788
+ if (missed > 0.5) {
48789
+ this.scrolled -= missed;
48790
+ this.resizeRow(workRow);
48791
+ return;
48792
+ }
48793
+ this.placeRowHandle(workRow);
48794
+ } else {
48795
+ scroller.scrollTop = scrollTop + step;
48796
+ const moved = scroller.scrollTop - scrollTop;
48797
+ this.scrolled += moved;
48798
+ // A row at its content's height can't follow the pointer up
48799
+ if (!moved || !this.resizeRow(workRow)) {
48800
+ scroller.scrollTop = scrollTop;
48801
+ this.scrolled -= moved;
48802
+ this.resizeRow(workRow);
48803
+ return;
48804
+ }
48805
+ }
48806
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48807
+ };
48808
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48809
+ }
47077
48810
  /**
47078
48811
  * Resize only one column
47079
48812
  */ resizeColumns() {
@@ -47116,15 +48849,20 @@ const key = 'table_processor_observer-resize';
47116
48849
  }
47117
48850
  /**
47118
48851
  * Calc helper resize handle position
47119
- */ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
48852
+ */ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
47120
48853
  const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
47121
48854
  if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
47122
- this.hideResizeHandle();
48855
+ if (!this.calcRowHandlePosition(cell, clientY)) {
48856
+ this.hideResizeHandle();
48857
+ }
47123
48858
  return;
47124
48859
  }
48860
+ this.workRow = null;
48861
+ this.resizeHandler.classList.remove('jodit-table-resizer_row');
47125
48862
  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);
47126
48863
  (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');
47127
48864
  Object.assign(this.resizeHandler.style, {
48865
+ width: '',
47128
48866
  height: parentBox.height + 'px',
47129
48867
  top: parentBox.top - workplacePosition.top + 'px'
47130
48868
  });
@@ -47137,6 +48875,36 @@ const key = 'table_processor_observer-resize';
47137
48875
  this.setWorkCell(cell, !nextTD ? false : null);
47138
48876
  }
47139
48877
  }
48878
+ /**
48879
+ * Shows the handle across the table on the border below a row, near the
48880
+ * cell's bottom or near its top, which is the bottom of the row above.
48881
+ * The table's top edge has no row above it
48882
+ */ calcRowHandlePosition(cell, clientY) {
48883
+ const { top, bottom } = cell.getBoundingClientRect();
48884
+ 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);
48885
+ const index = cell.parentNode.rowIndex;
48886
+ 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;
48887
+ if (!row) {
48888
+ return false;
48889
+ }
48890
+ this.workRow = row;
48891
+ this.workTable = table;
48892
+ this.resizeHandler.classList.add('jodit-table-resizer_row');
48893
+ this.placeRowHandle(row);
48894
+ this.showResizeHandle();
48895
+ return true;
48896
+ }
48897
+ /**
48898
+ * Lays the handle across the table on the border below the row
48899
+ */ placeRowHandle(row) {
48900
+ 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);
48901
+ Object.assign(this.resizeHandler.style, {
48902
+ left: tableBox.left - workplacePosition.left + 'px',
48903
+ width: tableBox.width + 'px',
48904
+ height: '',
48905
+ top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
48906
+ });
48907
+ }
47140
48908
  /** @override */ afterInit(editor) {
47141
48909
  if (!editor.o.tableAllowCellResize) {
47142
48910
  return;
@@ -47144,7 +48912,7 @@ const key = 'table_processor_observer-resize';
47144
48912
  editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
47145
48913
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
47146
48914
  }).on(this.j.ow, 'scroll.resize-cells', ()=>{
47147
- if (!this.drag) {
48915
+ if (!this.drag || this.workRow) {
47148
48916
  return;
47149
48917
  }
47150
48918
  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);
@@ -47168,7 +48936,7 @@ const key = 'table_processor_observer-resize';
47168
48936
  }
47169
48937
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
47170
48938
  this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
47171
- if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
48939
+ if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
47172
48940
  this.hideResizeHandle();
47173
48941
  }
47174
48942
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
@@ -47179,7 +48947,7 @@ const key = 'table_processor_observer-resize';
47179
48947
  if (!cell) {
47180
48948
  return;
47181
48949
  }
47182
- this.calcHandlePosition(table, cell, event.offsetX);
48950
+ this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
47183
48951
  }, {
47184
48952
  timeout: this.j.defaultTimeout
47185
48953
  }));
@@ -47200,6 +48968,10 @@ const key = 'table_processor_observer-resize';
47200
48968
  this.resizeHandler = this.j.c.div('jodit-table-resizer');
47201
48969
  this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
47202
48970
  this.j.async.clearTimeout(this.hideTimeout);
48971
+ }).on(this.resizeHandler, 'mouseleave.table', ()=>{
48972
+ if (!this.drag) {
48973
+ this.hideResizeHandle();
48974
+ }
47203
48975
  });
47204
48976
  }
47205
48977
  };
@@ -47208,6 +48980,25 @@ const key = 'table_processor_observer-resize';
47208
48980
  this.minX = 0;
47209
48981
  this.maxX = 0;
47210
48982
  this.startX = 0;
48983
+ /**
48984
+ * The table's and its cells' styles as a column drag started, put back
48985
+ * before each new width
48986
+ */ this.startStyles = [];
48987
+ this.startLeft = 0;
48988
+ this.startEdge = 0;
48989
+ /**
48990
+ * The row whose height the handle sets, or null while it sets a width
48991
+ */ this.workRow = null;
48992
+ this.startY = 0;
48993
+ this.startHeight = 0;
48994
+ this.rowStyle = null;
48995
+ /**
48996
+ * The boxes that scroll the row, with their styles, as a row drag turns
48997
+ * off their scroll anchoring, which would move the border off the pointer
48998
+ */ this.anchored = [];
48999
+ this.scrolled = 0;
49000
+ this.scrollFrame = 0;
49001
+ this.pointerY = 0;
47211
49002
  }
47212
49003
  }
47213
49004
  __decorate([
@@ -47222,6 +49013,45 @@ __decorate([
47222
49013
  __decorate([
47223
49014
  _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
47224
49015
  ], resizeCells.prototype, "observe", null);
49016
+ /**
49017
+ * The boxes around the row that can scroll it, nearest first, and its
49018
+ * document's
49019
+ */ function scrollersOf(row) {
49020
+ const doc = row.ownerDocument;
49021
+ const root = doc.scrollingElement || doc.documentElement;
49022
+ const scrollers = [];
49023
+ for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
49024
+ if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
49025
+ scrollers.push(elm);
49026
+ }
49027
+ }
49028
+ return [
49029
+ ...scrollers,
49030
+ root
49031
+ ];
49032
+ }
49033
+ /**
49034
+ * What scrolls the row up and down, the nearest box around it with more
49035
+ * than it shows or else its document, and the part of it in the window's view
49036
+ */ function scrollViewOf(row) {
49037
+ var _a, _b, _c;
49038
+ const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
49039
+ const scrollers = scrollersOf(row);
49040
+ const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
49041
+ if (scroller === scrollers[scrollers.length - 1]) {
49042
+ return {
49043
+ scroller,
49044
+ top: 0,
49045
+ bottom: height
49046
+ };
49047
+ }
49048
+ const top = scroller.getBoundingClientRect().top + scroller.clientTop;
49049
+ return {
49050
+ scroller,
49051
+ top: Math.max(top, 0),
49052
+ bottom: Math.min(top + scroller.clientHeight, height)
49053
+ };
49054
+ }
47225
49055
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
47226
49056
 
47227
49057
 
@@ -47697,6 +49527,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47697
49527
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
47698
49528
  }
47699
49529
  applySize(element, key, value) {
49530
+ // A captioned image fills the element holding it and its caption,
49531
+ // which takes the width
49532
+ 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;
49533
+ if (wrapper) {
49534
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
49535
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
49536
+ return;
49537
+ }
47700
49538
  const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
47701
49539
  if (changeAttrs) {
47702
49540
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
@@ -47711,6 +49549,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47711
49549
  return Boolean(this.element && this.j.editor.contains(this.element));
47712
49550
  }
47713
49551
  onDelete(e) {
49552
+ var _a;
47714
49553
  if (!this.element) {
47715
49554
  return;
47716
49555
  }
@@ -47719,7 +49558,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47719
49558
  return;
47720
49559
  }
47721
49560
  if (this.element.tagName !== 'JODIT') {
47722
- this.j.s.select(this.element);
49561
+ 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);
47723
49562
  } else {
47724
49563
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
47725
49564
  this.hide();
@@ -48948,8 +50787,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48948
50787
  'touchstartTd',
48949
50788
  'touchstartTh'
48950
50789
  ].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
48951
- // and mouseup on another cell call `click` only for `TR` element.
48952
- .on('clickTr clickTbody', ()=>{
50790
+ // and mouseup on another cell call `click` only for their common
50791
+ // ancestor: the row, the section, or the table across sections
50792
+ .on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
48953
50793
  var _a;
48954
50794
  const cellsCount = this.__tableModule.getAllSelectedCells().length;
48955
50795
  if (cellsCount) {
@@ -49113,14 +50953,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49113
50953
  }
49114
50954
  this.j.e.fire('hidePopup');
49115
50955
  e.stopPropagation();
49116
- // Hack for FireFox for force redraw selection
49117
- (()=>{
49118
- const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>');
49119
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, n);
49120
- this.j.async.setTimeout(()=>{
49121
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(n);
49122
- }, this.j.defaultTimeout / 5);
49123
- })();
49124
50956
  }
49125
50957
  /**
49126
50958
  * On click in outside - remove selection
@@ -49219,7 +51051,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49219
51051
  this.j.synchronizeValues();
49220
51052
  return false;
49221
51053
  }
49222
- if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
51054
+ if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
49223
51055
  command = command.replace('table', '');
49224
51056
  const cells = this.__tableModule.getAllSelectedCells();
49225
51057
  if (cells.length) {
@@ -49286,6 +51118,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49286
51118
  case 'addrowbefore':
49287
51119
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
49288
51120
  break;
51121
+ case 'headerrow':
51122
+ this.__toggleHeaderRow(table, cells);
51123
+ break;
49289
51124
  }
49290
51125
  if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
49291
51126
  this.__removeTable(table);
@@ -49294,6 +51129,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49294
51129
  return false;
49295
51130
  }
49296
51131
  }
51132
+ /**
51133
+ * Turns the table's header row on or off. The caret and the marked cells
51134
+ * move to the cells that replace them
51135
+ */ __toggleHeaderRow(table, cells) {
51136
+ var _a, _b;
51137
+ const module = this.__tableModule;
51138
+ this.j.s.save();
51139
+ const replaced = module.toggleHeaderRow(table);
51140
+ this.j.s.restore();
51141
+ cells.forEach((cell)=>{
51142
+ const next = replaced.get(cell);
51143
+ if (next) {
51144
+ module.removeSelection(cell);
51145
+ module.addSelection(next);
51146
+ }
51147
+ });
51148
+ // As after the click that marked it, the command's own change keeps
51149
+ // the marks, so the popup can stay open for another toggle
51150
+ const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
51151
+ this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
51152
+ }
49297
51153
  /**
49298
51154
  * The cell that takes the caret when rows or columns are deleted: the next
49299
51155
  * one in the same column (or row) that is not deleted, else the previous one
@@ -52245,9 +54101,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52245
54101
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
52246
54102
 
52247
54103
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52248
- /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; }
54104
+ /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
54105
+ /* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
54106
+ /* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
54107
+ /* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
52249
54108
  /* harmony export */ });
52250
54109
  /* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
54110
+ /* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
52251
54111
  /*!
52252
54112
  * Jodit Editor (https://xdsoft.net/jodit/)
52253
54113
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52257,6 +54117,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52257
54117
  */
52258
54118
 
52259
54119
 
54120
+
52260
54121
  /***/ }),
52261
54122
 
52262
54123
  /***/ 26658:
@@ -52278,7 +54139,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52278
54139
  * If so then add an internal list
52279
54140
  * @private
52280
54141
  */ function onTabInsideLi(jodit, shift = false) {
52281
- if (!jodit.o.tab.tabInsideLiInsertNewList) {
54142
+ // Focused with no range, as WebKit can leave it, there's no caret to
54143
+ // mark
54144
+ if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
52282
54145
  return false;
52283
54146
  }
52284
54147
  const [fake, fake2] = fakeCursors(jodit);
@@ -52375,6 +54238,279 @@ function removeNestedList(jodit, list, li) {
52375
54238
  }
52376
54239
 
52377
54240
 
54241
+ /***/ }),
54242
+
54243
+ /***/ 39481:
54244
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
54245
+
54246
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54247
+ /* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
54248
+ /* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
54249
+ /* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
54250
+ /* harmony export */ });
54251
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
54252
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
54253
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
54254
+ /* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
54255
+ /* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
54256
+ /*!
54257
+ * Jodit Editor (https://xdsoft.net/jodit/)
54258
+ * Released under MIT see LICENSE.txt in the project root for license information.
54259
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
54260
+ */
54261
+
54262
+
54263
+
54264
+
54265
+ const KEEPS_TABS = new Set([
54266
+ 'pre',
54267
+ 'pre-wrap',
54268
+ 'break-spaces'
54269
+ ]);
54270
+ const KEEPS_TABS_TAGS = new Set([
54271
+ 'pre',
54272
+ 'textarea',
54273
+ 'style',
54274
+ 'script'
54275
+ ]);
54276
+ /**
54277
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
54278
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
54279
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
54280
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
54281
+ * on: Escape and then Tab does that
54282
+ * @private
54283
+ */ function onTabSpaces(jodit, shift) {
54284
+ const { spaces } = jodit.o.tab;
54285
+ const current = jodit.s.current();
54286
+ if (!spaces || jodit.o.readonly || jodit.isLocked) {
54287
+ return false;
54288
+ }
54289
+ // The editor has the focus but no caret, so there's nowhere to put
54290
+ // anything, but the focus stays
54291
+ if (!current) {
54292
+ return true;
54293
+ }
54294
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
54295
+ return false;
54296
+ }
54297
+ if (!jodit.s.isCollapsed()) {
54298
+ jodit.execCommand(shift ? 'outdent' : 'indent');
54299
+ return true;
54300
+ }
54301
+ const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
54302
+ const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
54303
+ if (list && (!shift || isIndented(jodit, list))) {
54304
+ (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
54305
+ jodit.synchronizeValues();
54306
+ return true;
54307
+ }
54308
+ if (shift) {
54309
+ unindent(jodit, current, spaces);
54310
+ return true;
54311
+ }
54312
+ const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
54313
+ const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
54314
+ jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
54315
+ return true;
54316
+ }
54317
+ /**
54318
+ * Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
54319
+ * it, then a tab or up to `spaces` spaces at the start of its line, then the
54320
+ * indent of its block
54321
+ */ function unindent(jodit, current, spaces) {
54322
+ 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);
54323
+ const caret = jodit.createInside.fake();
54324
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
54325
+ let removed;
54326
+ try {
54327
+ removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
54328
+ if (removed) {
54329
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54330
+ }
54331
+ } finally{
54332
+ jodit.s.setCursorBefore(caret);
54333
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
54334
+ }
54335
+ if (removed) {
54336
+ jodit.synchronizeValues();
54337
+ } else if (block && isIndented(jodit, block)) {
54338
+ jodit.execCommand('outdent');
54339
+ }
54340
+ }
54341
+ function removeTabBefore(caret) {
54342
+ const before = caret.previousSibling;
54343
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
54344
+ before.deleteData(before.length - 1, 1);
54345
+ return true;
54346
+ }
54347
+ return false;
54348
+ }
54349
+ function removeLineIndent(jodit, block, caret, spaces) {
54350
+ const { whiteSpace } = jodit.ew.getComputedStyle(block);
54351
+ const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
54352
+ acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
54353
+ });
54354
+ const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
54355
+ return removeIndentAt(walker, start, offset, caret, spaces);
54356
+ }
54357
+ /**
54358
+ * Where the caret's line starts: after a `<br>`, after a newline where white
54359
+ * space keeps it, or at the caret
54360
+ */ function lineStart(walker, caret, keepsBreaks) {
54361
+ let start = null;
54362
+ let offset = 0;
54363
+ for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
54364
+ const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
54365
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
54366
+ start = null;
54367
+ } else if (lineBreak >= 0) {
54368
+ start = node;
54369
+ offset = lineBreak + 1;
54370
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
54371
+ start = node;
54372
+ offset = 0;
54373
+ }
54374
+ }
54375
+ return start ? [
54376
+ start,
54377
+ offset
54378
+ ] : [
54379
+ caret,
54380
+ 0
54381
+ ];
54382
+ }
54383
+ function removeIndentAt(walker, start, startOffset, caret, spaces) {
54384
+ let removed = 0;
54385
+ let offset = startOffset;
54386
+ walker.currentNode = start;
54387
+ for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
54388
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
54389
+ const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
54390
+ node.deleteData(offset, end - offset);
54391
+ removed += count;
54392
+ if (offset < node.length) {
54393
+ break;
54394
+ }
54395
+ }
54396
+ offset = 0;
54397
+ }
54398
+ return removed > 0;
54399
+ }
54400
+ /**
54401
+ * Where up to `count` spaces from `offset` end, and how many there were. A
54402
+ * tab at the start of a line is a whole indent
54403
+ */ function scanIndent(text, offset, count, atLineStart) {
54404
+ if (atLineStart && text[offset] === '\t') {
54405
+ return [
54406
+ offset + 1,
54407
+ count
54408
+ ];
54409
+ }
54410
+ let end = offset;
54411
+ let found = 0;
54412
+ for(; end < text.length && found < count; end += 1){
54413
+ const char = text[end];
54414
+ if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54415
+ break;
54416
+ }
54417
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54418
+ found += 1;
54419
+ }
54420
+ }
54421
+ return [
54422
+ end,
54423
+ found
54424
+ ];
54425
+ }
54426
+ function isIndented(jodit, box) {
54427
+ 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;
54428
+ }
54429
+ /**
54430
+ * With `tab.spaces`, Backspace just after that many spaces removes them
54431
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
54432
+ * if one of them is non-breaking, so a space between words stays
54433
+ * @private
54434
+ */ function removeTabSpaces(jodit, caret, upTo = false) {
54435
+ const { spaces } = jodit.o.tab;
54436
+ if (!spaces) {
54437
+ return false;
54438
+ }
54439
+ const range = jodit.s.createRange();
54440
+ range.setEndBefore(caret);
54441
+ let count = 0;
54442
+ let nonBreaking = false;
54443
+ for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
54444
+ let offset = node.length;
54445
+ for(; offset > 0 && count < spaces; offset -= 1){
54446
+ const char = node.data[offset - 1];
54447
+ if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
54448
+ nonBreaking = true;
54449
+ } else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54450
+ break;
54451
+ }
54452
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54453
+ count += 1;
54454
+ }
54455
+ }
54456
+ range.setStart(node, offset);
54457
+ if (offset && count < spaces) {
54458
+ break;
54459
+ }
54460
+ }
54461
+ if (upTo ? !nonBreaking : count < spaces) {
54462
+ return false;
54463
+ }
54464
+ range.deleteContents();
54465
+ // An emptied line keeps a <br>, as after any Backspace, or it has no
54466
+ // height to hold the caret
54467
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54468
+ return true;
54469
+ }
54470
+ /**
54471
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
54472
+ * show it as one space. Tabs in white space that's kept, and those that only
54473
+ * lay out the HTML, stay as they are
54474
+ * @private
54475
+ */ function tabsToSpaces(jodit, html) {
54476
+ var _a;
54477
+ const { spaces } = jodit.o.tab;
54478
+ const current = jodit.s.current();
54479
+ const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
54480
+ if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
54481
+ return;
54482
+ }
54483
+ // A template parses without loading images or running scripts
54484
+ const template = jodit.ed.createElement('template');
54485
+ template.innerHTML = html;
54486
+ const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
54487
+ let changed = false;
54488
+ for(let node = walker.nextNode(); node; node = walker.nextNode()){
54489
+ const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
54490
+ if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
54491
+ node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
54492
+ changed = true;
54493
+ }
54494
+ }
54495
+ return changed ? template.innerHTML : undefined;
54496
+ }
54497
+ /**
54498
+ * The fragment isn't rendered, so this reads the white space its own styles
54499
+ * and tags set. The text of `<style>` and `<script>` isn't shown at all
54500
+ */ function keepsTabs(node) {
54501
+ for(let el = node.parentElement; el; el = el.parentElement){
54502
+ const { whiteSpace } = el.style;
54503
+ if (whiteSpace) {
54504
+ return KEEPS_TABS.has(whiteSpace);
54505
+ }
54506
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
54507
+ return true;
54508
+ }
54509
+ }
54510
+ return false;
54511
+ }
54512
+
54513
+
52378
54514
  /***/ }),
52379
54515
 
52380
54516
  /***/ 66288:
@@ -52389,7 +54525,8 @@ function removeNestedList(jodit, list, li) {
52389
54525
  * @module plugins/tab
52390
54526
  */
52391
54527
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52392
- tabInsideLiInsertNewList: true
54528
+ tabInsideLiInsertNewList: true,
54529
+ spaces: 0
52393
54530
  };
52394
54531
 
52395
54532
 
@@ -52401,9 +54538,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52401
54538
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
52402
54539
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
52403
54540
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
52404
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50911);
52405
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66288);
52406
- /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47686);
54541
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
54542
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
54543
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
54544
+ /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
52407
54545
  /*!
52408
54546
  * Jodit Editor (https://xdsoft.net/jodit/)
52409
54547
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52420,30 +54558,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52420
54558
 
52421
54559
 
52422
54560
 
52423
- class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.Plugin {
52424
- afterInit(jodit) {}
54561
+
54562
+ const MODIFIER_KEYS = new Set([
54563
+ 'Shift',
54564
+ 'Control',
54565
+ 'Alt',
54566
+ 'Meta',
54567
+ 'CapsLock'
54568
+ ]);
54569
+ class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
54570
+ afterInit(jodit) {
54571
+ // Without a namespace it runs ahead of table navigation, which would
54572
+ // take a released Tab
54573
+ jodit.e.on('keydown', this.__onKeyDownFirst, {
54574
+ top: true
54575
+ });
54576
+ }
54577
+ // An Escape that closes a popup has done its job
54578
+ __endRelease() {
54579
+ this.__released = false;
54580
+ }
54581
+ __onKeyDownFirst(event) {
54582
+ const released = this.__released;
54583
+ if (!MODIFIER_KEYS.has(event.key)) {
54584
+ this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
54585
+ }
54586
+ // The browser moves the focus
54587
+ if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
54588
+ this.j.e.stopPropagation('keydown');
54589
+ }
54590
+ }
52425
54591
  __onTab(event) {
52426
- if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
54592
+ 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))) {
52427
54593
  return false;
52428
54594
  }
52429
54595
  }
54596
+ __onBackspace(backspace, fakeNode) {
54597
+ if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
54598
+ return true;
54599
+ }
54600
+ }
54601
+ __onPasteInsert(html) {
54602
+ if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
54603
+ return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
54604
+ }
54605
+ }
52430
54606
  __onCommand(command) {
52431
54607
  if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
52432
54608
  return false;
52433
54609
  }
52434
54610
  }
52435
54611
  __onShift(shift) {
52436
- const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_5__.onTabInsideLi)(this.j, shift);
54612
+ const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
52437
54613
  if (res) {
52438
54614
  this.j.e.fire('afterTab', shift);
52439
54615
  }
52440
54616
  return res;
52441
54617
  }
52442
- beforeDestruct(jodit) {}
54618
+ beforeDestruct(jodit) {
54619
+ jodit.e.off('keydown', this.__onKeyDownFirst);
54620
+ }
54621
+ constructor(){
54622
+ super(...arguments);
54623
+ /**
54624
+ * With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
54625
+ * Tab move the focus on, as in code editors. A modifier key keeps it, and
54626
+ * any other key or a click ends it
54627
+ */ this.__released = false;
54628
+ }
52443
54629
  }
54630
+ __decorate([
54631
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
54632
+ ':mousedown.tab',
54633
+ ':beforePopupClose.tab'
54634
+ ])
54635
+ ], tab.prototype, "__endRelease", null);
54636
+ __decorate([
54637
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
54638
+ ], tab.prototype, "__onKeyDownFirst", null);
52444
54639
  __decorate([
52445
54640
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
52446
54641
  ], tab.prototype, "__onTab", null);
54642
+ __decorate([
54643
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
54644
+ ], tab.prototype, "__onBackspace", null);
54645
+ __decorate([
54646
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
54647
+ ], tab.prototype, "__onPasteInsert", null);
52447
54648
  __decorate([
52448
54649
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
52449
54650
  ], tab.prototype, "__onCommand", null);