jodit-pro 4.18.17 → 4.19.3

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 +2836 -550
  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 +2500 -262
  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 +2500 -262
  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 +3319 -408
  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.3
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.3";
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.
@@ -39357,11 +39793,35 @@ function brBefore(start) {
39357
39793
 
39358
39794
 
39359
39795
 
39796
+ /**
39797
+ * Selected text becomes the link's text, as the Link button does, instead
39798
+ * of being replaced by the file's name. Returns false with nothing selected
39799
+ */ function wrapSelectionInLink(editor, href, title = '') {
39800
+ if (editor.s.isCollapsed()) {
39801
+ return false;
39802
+ }
39803
+ const links = editor.s.wrapInTag('a');
39804
+ if (!links.length) {
39805
+ return false;
39806
+ }
39807
+ links.forEach((link)=>{
39808
+ ;(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
39809
+ if (title) {
39810
+ (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'title', title);
39811
+ }
39812
+ });
39813
+ editor.s.setCursorAfter(links[links.length - 1]);
39814
+ return true;
39815
+ }
39360
39816
  function insertLinks(data) {
39361
39817
  var _a;
39362
39818
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
39819
+ const href = data.baseurl + file;
39820
+ if (wrapSelectionInLink(this, href)) {
39821
+ return;
39822
+ }
39363
39823
  const link = this.createInside.element('a', {
39364
- href: data.baseurl + file
39824
+ href
39365
39825
  });
39366
39826
  link.textContent = this.o.uploader.getDisplayName.call(this.uploader, data.baseurl, file);
39367
39827
  this.s.insertNode(link);
@@ -39372,7 +39832,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.file = {
39372
39832
  };
39373
39833
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
39374
39834
  popup: (editor, current, close)=>{
39835
+ // The popup's first field takes the focus, so the selection the
39836
+ // popup was opened for is kept and put back before the link goes in
39837
+ const selected = editor.s.isCollapsed() ? null : editor.s.range;
39838
+ const restoreSelection = ()=>{
39839
+ if (selected) {
39840
+ editor.s.selectRange(selected);
39841
+ }
39842
+ };
39375
39843
  const insert = (url, title = '')=>{
39844
+ restoreSelection();
39845
+ if (wrapSelectionInLink(editor, url, title)) {
39846
+ return;
39847
+ }
39376
39848
  editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
39377
39849
  };
39378
39850
  let sourceAnchor = null;
@@ -39386,6 +39858,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
39386
39858
  },
39387
39859
  upload: (data)=>{
39388
39860
  var _a, _b;
39861
+ restoreSelection();
39389
39862
  ((_b = (_a = editor.o.file) === null || _a === void 0 ? void 0 : _a.defaultHandlerSuccess) !== null && _b !== void 0 ? _b : insertLinks).call(editor, data);
39390
39863
  },
39391
39864
  url: (url, text)=>{
@@ -40199,7 +40672,8 @@ const libraries = new Map();
40199
40672
  /* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
40200
40673
  /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
40201
40674
  /* 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);
40675
+ /* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
40676
+ /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
40203
40677
  /*!
40204
40678
  * Jodit Editor (https://xdsoft.net/jodit/)
40205
40679
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -40209,7 +40683,39 @@ const libraries = new Map();
40209
40683
 
40210
40684
 
40211
40685
 
40212
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
40686
+
40687
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
40688
+ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
40689
+ // Opt in: previews keep the toolbar's styles unless the integrator lists
40690
+ // the properties to copy, e.g. ['font-family', 'font-weight', 'color']
40691
+ previewProperties: []
40692
+ };
40693
+ /**
40694
+ * The list is outside the editing area, and in iframe mode outside its
40695
+ * document, so a preview would take the toolbar's styles. This reads how the
40696
+ * content shows a tag from a probe in the editing area
40697
+ */ function previewStyle(editor, tag) {
40698
+ const { previewProperties } = editor.o.formatBlock;
40699
+ if (!previewProperties.length) {
40700
+ return '';
40701
+ }
40702
+ const probe = editor.createInside.element(tag, {
40703
+ style: 'display: none'
40704
+ });
40705
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
40706
+ const style = editor.ew.getComputedStyle(probe);
40707
+ const size = parseFloat(style.fontSize) || 16;
40708
+ const css = previewProperties.map((prop)=>{
40709
+ let value = style.getPropertyValue(prop);
40710
+ if (value && prop === 'font-family') {
40711
+ value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
40712
+ }
40713
+ // Each browser knows only one of the smoothing properties
40714
+ return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
40715
+ }).join('');
40716
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
40717
+ return css;
40718
+ }
40213
40719
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40214
40720
  command: 'formatBlock',
40215
40721
  value (editor, button) {
@@ -40250,11 +40756,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40250
40756
  isActive: (editor, button)=>{
40251
40757
  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
40758
  },
40253
- childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
40759
+ childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
40254
40760
  tooltip: 'Insert format block'
40255
40761
  };
40256
40762
 
40257
40763
 
40764
+ /***/ }),
40765
+
40766
+ /***/ 4932:
40767
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
40768
+
40769
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40770
+ /* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
40771
+ /* harmony export */ });
40772
+ /*!
40773
+ * Jodit Editor (https://xdsoft.net/jodit/)
40774
+ * Released under MIT see LICENSE.txt in the project root for license information.
40775
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
40776
+ */ const carried = new WeakMap();
40777
+ const fetched = new Map();
40778
+ let editors = 0;
40779
+ /**
40780
+ * In iframe mode the content's web fonts load only in the iframe, but the
40781
+ * Paragraph list is in the page, so its previews would fall back to the
40782
+ * page's fonts. This adds the content's web fonts to the page under names
40783
+ * only this editor uses, so nothing else on the page can pick them up, and
40784
+ * puts those names first in a preview's `font-family`
40785
+ */ function withContentFonts(editor, fontFamily) {
40786
+ const { ed, od } = editor;
40787
+ if (ed === od) {
40788
+ return fontFamily;
40789
+ }
40790
+ const state = carriedFor(editor);
40791
+ carry(editor, state);
40792
+ const webFonts = new Set();
40793
+ ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
40794
+ return fontFamily.split(',').map((family)=>{
40795
+ const name = familyName(family);
40796
+ return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
40797
+ }).join(', ');
40798
+ }
40799
+ function carriedFor(editor) {
40800
+ let state = carried.get(editor);
40801
+ if (!state) {
40802
+ const { od } = editor;
40803
+ const created = {
40804
+ prefix: `jodit-preview-${++editors}-`,
40805
+ faces: new Map(),
40806
+ pending: false
40807
+ };
40808
+ carried.set(editor, created);
40809
+ editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
40810
+ state = created;
40811
+ }
40812
+ return state;
40813
+ }
40814
+ /**
40815
+ * It looks each time the list opens, since the content's stylesheets may
40816
+ * still have been loading the time before
40817
+ */ function carry(editor, state) {
40818
+ // Every preview in the list asks, but one look is enough
40819
+ if (state.pending) {
40820
+ return;
40821
+ }
40822
+ state.pending = true;
40823
+ const { ed, od } = editor;
40824
+ Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
40825
+ state.pending = false;
40826
+ if (editor.isInDestruct) {
40827
+ return;
40828
+ }
40829
+ lists.flat().forEach((font)=>{
40830
+ const key = JSON.stringify(font);
40831
+ if (!state.faces.has(key)) {
40832
+ const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
40833
+ od.fonts.add(face);
40834
+ state.faces.set(key, face);
40835
+ }
40836
+ });
40837
+ });
40838
+ }
40839
+ /**
40840
+ * The web fonts a stylesheet and those it imports declare
40841
+ */ function fontsOf(sheet, base) {
40842
+ var _a;
40843
+ let rules;
40844
+ try {
40845
+ rules = sheet.cssRules;
40846
+ } catch (_b) {
40847
+ // Another site's stylesheet can't be read, but it can be fetched if
40848
+ // the site allows it, as Google Fonts does
40849
+ const { href } = sheet;
40850
+ if (!href) {
40851
+ return Promise.resolve([]);
40852
+ }
40853
+ let fonts = fetched.get(href);
40854
+ if (!fonts) {
40855
+ fonts = fetchFonts(href);
40856
+ fetched.set(href, fonts);
40857
+ }
40858
+ return fonts;
40859
+ }
40860
+ return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
40861
+ }
40862
+ function fontsIn(rules, base) {
40863
+ return Promise.all(Array.from(rules, (rule)=>{
40864
+ if ('styleSheet' in rule) {
40865
+ const { styleSheet } = rule;
40866
+ return styleSheet ? fontsOf(styleSheet, base) : [];
40867
+ }
40868
+ if ('cssRules' in rule) {
40869
+ return fontsIn(rule.cssRules, base);
40870
+ }
40871
+ return rule.cssText.startsWith('@font-face') ? [
40872
+ fontOf(rule, base)
40873
+ ] : [];
40874
+ })).then((lists)=>lists.flat());
40875
+ }
40876
+ function fontOf(rule, base) {
40877
+ const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
40878
+ return {
40879
+ family: familyName(rule.style.getPropertyValue('font-family')),
40880
+ source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
40881
+ descriptors: {
40882
+ style: value('font-style'),
40883
+ weight: value('font-weight'),
40884
+ stretch: value('font-stretch'),
40885
+ unicodeRange: value('unicode-range')
40886
+ }
40887
+ };
40888
+ }
40889
+ function fetchFonts(href) {
40890
+ return fetch(href).then((response)=>response.text()).then((text)=>{
40891
+ const doc = document.implementation.createHTMLDocument('');
40892
+ const style = doc.createElement('style');
40893
+ style.textContent = text;
40894
+ doc.head.appendChild(style);
40895
+ return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
40896
+ }).catch(()=>[]);
40897
+ }
40898
+ function familyName(family) {
40899
+ return family.replace(/["']/g, '').trim().toLowerCase();
40900
+ }
40901
+ /**
40902
+ * The fonts are added to the page, so a relative URL would point somewhere
40903
+ * else
40904
+ */ function withAbsoluteUrls(css, base) {
40905
+ return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
40906
+ try {
40907
+ return `url("${new URL(url, base).href}")`;
40908
+ } catch (_a) {
40909
+ return match;
40910
+ }
40911
+ });
40912
+ }
40913
+
40914
+
40258
40915
  /***/ }),
40259
40916
 
40260
40917
  /***/ 96111:
@@ -40935,6 +41592,810 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
40935
41592
  _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
40936
41593
 
40937
41594
 
41595
+ /***/ }),
41596
+
41597
+ /***/ 43687:
41598
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41599
+
41600
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
41601
+ /*!
41602
+ * Jodit Editor (https://xdsoft.net/jodit/)
41603
+ * Released under MIT see LICENSE.txt in the project root for license information.
41604
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41605
+ */
41606
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
41607
+ wrapper: {
41608
+ tag: 'figure',
41609
+ className: ''
41610
+ },
41611
+ inner: null,
41612
+ caption: {
41613
+ tag: 'figcaption',
41614
+ className: ''
41615
+ }
41616
+ };
41617
+
41618
+
41619
+ /***/ }),
41620
+
41621
+ /***/ 84571:
41622
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41623
+
41624
+ /* unused harmony export imageCaption */
41625
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
41626
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
41627
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
41628
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
41629
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
41630
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
41631
+ /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
41632
+ /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
41633
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
41634
+ /*!
41635
+ * Jodit Editor (https://xdsoft.net/jodit/)
41636
+ * Released under MIT see LICENSE.txt in the project root for license information.
41637
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41638
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
41639
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41640
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41641
+ 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;
41642
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
41643
+ };
41644
+
41645
+
41646
+
41647
+
41648
+
41649
+
41650
+
41651
+
41652
+
41653
+ const MARGINS = [
41654
+ 'margin-top',
41655
+ 'margin-right',
41656
+ 'margin-bottom',
41657
+ 'margin-left'
41658
+ ];
41659
+ const ARROWS = new Set([
41660
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
41661
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
41662
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
41663
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
41664
+ ]);
41665
+ // Blocks that only hold text, which a block wrapper can't go inside
41666
+ const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
41667
+ // They would replace the caption with a heading, quote or list
41668
+ const BLOCK_COMMANDS = new Set([
41669
+ 'formatblock',
41670
+ 'insertorderedlist',
41671
+ 'insertunorderedlist'
41672
+ ]);
41673
+ const PLACEHOLDER = 'data-jodit-placeholder';
41674
+ /**
41675
+ * Jodit's focus colour round a caption being typed in, in place of the
41676
+ * browser's, and a placeholder in a blank caption. `:where` leaves both for
41677
+ * the content's own styles to change
41678
+ */ 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}`;
41679
+ /**
41680
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
41681
+ * keeps the caret in the caption
41682
+ */ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
41683
+ /** @override */ afterInit(jodit) {
41684
+ // It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
41685
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
41686
+ jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
41687
+ top: true
41688
+ });
41689
+ this.onChangePlace();
41690
+ }
41691
+ /**
41692
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
41693
+ * other way round from how it is. Returns the caption it gave, or null
41694
+ * when it took one away
41695
+ */ onToggleImageCaption(image, on) {
41696
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
41697
+ if (wrapper && on !== true) {
41698
+ const fresh = this.__freshCaption(wrapper);
41699
+ if (fresh) {
41700
+ this.__unrecorded(()=>this.__restore(fresh));
41701
+ } else {
41702
+ this.__uncaption(wrapper, image);
41703
+ }
41704
+ return null;
41705
+ }
41706
+ if (!wrapper && on !== false) {
41707
+ return this.__caption(image);
41708
+ }
41709
+ }
41710
+ __freshCaption(wrapper) {
41711
+ const fresh = this.__fresh;
41712
+ 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)) {
41713
+ return null;
41714
+ }
41715
+ return fresh;
41716
+ }
41717
+ /**
41718
+ * Giving a caption isn't a step in the history of its own, as the first
41719
+ * thing typed in it is, so Undo never brings back a blank caption
41720
+ */ __caption(image) {
41721
+ const { j } = this;
41722
+ const { snapshot } = j.history;
41723
+ // The steps before it are recorded first
41724
+ j.setEditorValue();
41725
+ j.e.fire('internalUpdate');
41726
+ const before = snapshot.make();
41727
+ let fresh;
41728
+ snapshot.transaction(()=>{
41729
+ fresh = this.__fresh = {
41730
+ ...this.__wrap(image),
41731
+ before
41732
+ };
41733
+ j.setEditorValue();
41734
+ });
41735
+ // The value is as it was, so no `change` updates the toolbars
41736
+ j.e.fire('updateToolbar');
41737
+ return fresh.caption;
41738
+ }
41739
+ /**
41740
+ * Changes the content with no step in the history of its own, so Undo
41741
+ * never brings back a blank caption. A step still open takes it in
41742
+ */ __unrecorded(changes) {
41743
+ const { j } = this;
41744
+ j.setEditorValue();
41745
+ this.__fresh = null;
41746
+ j.history.snapshot.transaction(()=>{
41747
+ changes();
41748
+ j.setEditorValue();
41749
+ });
41750
+ j.e.fire('internalUpdate');
41751
+ j.e.fire('updateToolbar');
41752
+ }
41753
+ __wrap(image) {
41754
+ var _a;
41755
+ const { j } = this;
41756
+ const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
41757
+ const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
41758
+ const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
41759
+ const attributes = [
41760
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
41761
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
41762
+ ];
41763
+ const place = target.parentNode;
41764
+ 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` : '');
41765
+ const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
41766
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
41767
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
41768
+ const wrapper = this.__create(wrapperPart);
41769
+ const box = inner ? this.__create(inner) : wrapper;
41770
+ const caption = this.__create(captionPart);
41771
+ caption.appendChild(j.createInside.element('br'));
41772
+ const split = this.__insert(wrapper, target);
41773
+ if (box !== wrapper) {
41774
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
41775
+ }
41776
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
41777
+ target,
41778
+ caption
41779
+ ]);
41780
+ moveMargins(image, wrapper);
41781
+ // The wrapper takes the image's width, and the image fills it, so the
41782
+ // caption wraps under the image
41783
+ if (width) {
41784
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
41785
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
41786
+ }
41787
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
41788
+ this.__mark(wrapper);
41789
+ return {
41790
+ caption,
41791
+ wrapper,
41792
+ image,
41793
+ target,
41794
+ place,
41795
+ split,
41796
+ attributes,
41797
+ parent: wrapper.parentNode,
41798
+ previous: wrapper.previousSibling,
41799
+ next: wrapper.nextSibling,
41800
+ shape: shape(wrapper, image)
41801
+ };
41802
+ }
41803
+ /**
41804
+ * Puts the image back as it was before its caption: in the line the
41805
+ * caption split, and with its own alignment, margins and width. The image
41806
+ * goes into the part of the line holding the caret, so the caret stays
41807
+ */ __restore(fresh) {
41808
+ var _a, _b;
41809
+ const { wrapper, image, target, place, split, attributes } = fresh;
41810
+ if (!split) {
41811
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41812
+ } else if (!split.head && !split.tail) {
41813
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
41814
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
41815
+ } else {
41816
+ const { sel } = this.j.s;
41817
+ const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
41818
+ const { head, tail } = split;
41819
+ if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
41820
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
41821
+ target,
41822
+ ...(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 : [])
41823
+ ]);
41824
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
41825
+ } else if (tail) {
41826
+ const first = tail.firstChild;
41827
+ [
41828
+ ...(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 : []),
41829
+ target
41830
+ ].forEach((node)=>tail.insertBefore(node, first));
41831
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
41832
+ }
41833
+ }
41834
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41835
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
41836
+ style: attributes[0],
41837
+ class: attributes[1]
41838
+ });
41839
+ }
41840
+ __uncaption(wrapper, image) {
41841
+ var _a;
41842
+ const { j } = this;
41843
+ // Read while the wrapper is still one, with its caption
41844
+ 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));
41845
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
41846
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
41847
+ const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
41848
+ moveMargins(wrapper, image);
41849
+ if (width) {
41850
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
41851
+ }
41852
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
41853
+ // A block wrapper leaves the image in a paragraph of its own
41854
+ 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) {
41855
+ const line = j.createInside.element(j.o.enter);
41856
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
41857
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
41858
+ } else {
41859
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41860
+ }
41861
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41862
+ }
41863
+ __create({ tag, className }) {
41864
+ return this.j.createInside.element(tag, className ? {
41865
+ class: className
41866
+ } : {});
41867
+ }
41868
+ /**
41869
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
41870
+ * paragraph is split round it, and a part left empty goes
41871
+ */ __insert(wrapper, target) {
41872
+ const { j } = this;
41873
+ 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;
41874
+ if (!block || !TEXT_BLOCK.test(block.nodeName)) {
41875
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
41876
+ return null;
41877
+ }
41878
+ const range = j.ed.createRange();
41879
+ range.setStartBefore(block);
41880
+ range.setEndBefore(target);
41881
+ const start = range.extractContents();
41882
+ range.setStartAfter(target);
41883
+ range.setEndAfter(block);
41884
+ const end = range.extractContents();
41885
+ const [head, tail] = [
41886
+ start,
41887
+ end
41888
+ ].map((part, index)=>{
41889
+ const line = part.firstChild;
41890
+ if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
41891
+ return null;
41892
+ }
41893
+ ;(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);
41894
+ return line;
41895
+ });
41896
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
41897
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
41898
+ return {
41899
+ block,
41900
+ head,
41901
+ tail
41902
+ };
41903
+ }
41904
+ /**
41905
+ * The wrapper can't be edited, apart from its caption, so typing can't
41906
+ * land between the image and the caption
41907
+ */ __mark(wrapper) {
41908
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
41909
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
41910
+ if (caption) {
41911
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
41912
+ this.__placeholder(caption);
41913
+ }
41914
+ }
41915
+ __placeholder(caption) {
41916
+ const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
41917
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
41918
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
41919
+ }
41920
+ }
41921
+ onChange() {
41922
+ const { j } = this;
41923
+ if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
41924
+ return;
41925
+ }
41926
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
41927
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
41928
+ this.__mark(elm);
41929
+ }
41930
+ });
41931
+ }
41932
+ /**
41933
+ * The placeholder goes with the first letter typed or pasted, and comes
41934
+ * back when the last is deleted
41935
+ */ onInput() {
41936
+ const caption = this.__caretCaption();
41937
+ if (caption) {
41938
+ this.__placeholder(caption);
41939
+ }
41940
+ }
41941
+ /**
41942
+ * The editor's own attributes stay out of the value, as the caption would
41943
+ * be editable on the page. So does a caption given and left blank, as
41944
+ * leaving it takes it off, so saving at once keeps the image as it was
41945
+ */ onAfterGetValueFromEditor(data) {
41946
+ if (!data.value.includes('contenteditable')) {
41947
+ return;
41948
+ }
41949
+ const { j } = this;
41950
+ const template = j.c.element('template');
41951
+ template.innerHTML = data.value;
41952
+ 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));
41953
+ const copies = wrappers(template.content);
41954
+ const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
41955
+ const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
41956
+ const placed = fresh && copy && placedIn(j, fresh, copy);
41957
+ let changed = false;
41958
+ if (placed) {
41959
+ this.__restore(placed);
41960
+ changed = true;
41961
+ }
41962
+ copies.forEach((wrapper)=>{
41963
+ [
41964
+ wrapper,
41965
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
41966
+ ].forEach((elm)=>[
41967
+ 'contenteditable',
41968
+ PLACEHOLDER
41969
+ ].forEach((name)=>{
41970
+ if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
41971
+ elm.removeAttribute(name);
41972
+ changed = true;
41973
+ }
41974
+ }));
41975
+ });
41976
+ if (changed) {
41977
+ data.value = template.innerHTML;
41978
+ }
41979
+ }
41980
+ onChangePlace() {
41981
+ const { j } = this;
41982
+ // Captured, to come first: the editor's own `focusout` listener can stop
41983
+ // the event as it fires `blur`, and an image's `mousedown` listener
41984
+ // moves the focus before the press reaches the editor
41985
+ j.e.off([
41986
+ j.editor,
41987
+ j.ow,
41988
+ j.ew
41989
+ ], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
41990
+ capture: true
41991
+ }).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
41992
+ capture: true
41993
+ }).on([
41994
+ j.ow,
41995
+ j.ew
41996
+ ], 'mouseup.imageCaption', this.__onMouseUp);
41997
+ }
41998
+ __onMouseDown(event) {
41999
+ this.__press = event.target;
42000
+ }
42001
+ /**
42002
+ * A caption left blank goes when the focus leaves it. That's checked once
42003
+ * the focus has landed, as switching windows or opening the editor's own
42004
+ * popups keeps it, and once a press that took the focus is over, as the
42005
+ * browsers fire no click when its target moves
42006
+ */ __onFocusOut(event) {
42007
+ const caption = event.target;
42008
+ 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) {
42009
+ return;
42010
+ }
42011
+ if (this.__press) {
42012
+ this.__afterPress.push(caption);
42013
+ } else {
42014
+ this.__dropBlank(caption, null);
42015
+ }
42016
+ }
42017
+ __onMouseUp() {
42018
+ const press = this.__press;
42019
+ this.__press = null;
42020
+ this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
42021
+ }
42022
+ __dropBlank(caption, press) {
42023
+ // `async.setTimeout` runs a timeout of 0 at once
42024
+ this.j.async.setTimeout(()=>{
42025
+ const { j } = this;
42026
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
42027
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
42028
+ if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
42029
+ return;
42030
+ }
42031
+ const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
42032
+ const fresh = this.__freshCaption(wrapper);
42033
+ this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
42034
+ // The click opened the image's popup below the caption, so it
42035
+ // opens again below the image, as after the popup's Caption button
42036
+ if (clicked) {
42037
+ j.e.fire('recalcPositionPopup');
42038
+ j.e.fire('closeAllPopups');
42039
+ }
42040
+ }, 1);
42041
+ }
42042
+ /**
42043
+ * The caption has the focus, or had it when another window took it, or
42044
+ * the editor's own popups and dialogs have it, as the link form
42045
+ */ __keepsFocus(caption) {
42046
+ const { j } = this;
42047
+ const doc = caption.ownerDocument;
42048
+ if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
42049
+ return true;
42050
+ }
42051
+ const active = j.od.activeElement;
42052
+ 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)));
42053
+ }
42054
+ /**
42055
+ * The caption the caret is in
42056
+ */ __caretCaption() {
42057
+ const { s } = this.j;
42058
+ if (!s.isInsideArea) {
42059
+ return null;
42060
+ }
42061
+ const node = s.range.startContainer;
42062
+ 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));
42063
+ return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
42064
+ }
42065
+ /**
42066
+ * Enter in a caption starts a line after the image, and Shift+Enter
42067
+ * breaks the caption's line, as everywhere
42068
+ */ onBeforeEnter(event) {
42069
+ const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
42070
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
42071
+ if (!wrapper) {
42072
+ return;
42073
+ }
42074
+ const { j } = this;
42075
+ this.__focusEditor();
42076
+ // The Enter plugin breaks the line after an inline wrapper
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
+ j.synchronizeValues();
42085
+ return false;
42086
+ }
42087
+ /**
42088
+ * The caption keeps the focus, as an editable element of its own, and
42089
+ * would take the caret back, so the editor takes it before the caret
42090
+ * leaves the caption
42091
+ */ __focusEditor() {
42092
+ this.j.editor.focus({
42093
+ preventScroll: true
42094
+ });
42095
+ }
42096
+ __line() {
42097
+ const { j } = this;
42098
+ const line = j.createInside.element(j.o.enter);
42099
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
42100
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
42101
+ }
42102
+ return line;
42103
+ }
42104
+ /**
42105
+ * A caption holds text. An image, a table or a block put in it would end
42106
+ * the captioned image, so it goes after the image, as Enter would
42107
+ */ onBeforeInsertNode(node) {
42108
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
42109
+ if (!wrapper || !holdsMoreThanText(node)) {
42110
+ return;
42111
+ }
42112
+ const { j } = this;
42113
+ this.__focusEditor();
42114
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42115
+ j.s.setCursorAfter(wrapper);
42116
+ return;
42117
+ }
42118
+ const line = this.__line();
42119
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42120
+ j.s.setCursorIn(line);
42121
+ }
42122
+ /**
42123
+ * A selected captioned image goes as an image on a line of its own does,
42124
+ * leaving the line empty, rather than joining the lines either side
42125
+ */ onBeforeCommandDelete() {
42126
+ const wrapper = this.__selectedWrapper();
42127
+ if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42128
+ return;
42129
+ }
42130
+ const line = this.__line();
42131
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
42132
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42133
+ this.j.s.setCursorIn(line);
42134
+ return false;
42135
+ }
42136
+ /**
42137
+ * The captioned image the selection holds, as a click on the image selects
42138
+ */ __selectedWrapper() {
42139
+ const { s } = this.j;
42140
+ if (!s.isInsideArea || s.isCollapsed()) {
42141
+ return null;
42142
+ }
42143
+ const { startContainer, startOffset, endContainer, endOffset } = s.range;
42144
+ const node = startContainer.childNodes[startOffset];
42145
+ return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
42146
+ }
42147
+ onKeyDown(event) {
42148
+ var _a;
42149
+ this.__arrow = null;
42150
+ // Typing replaces a selected captioned image, on the line it leaves
42151
+ if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
42152
+ this.j.execCommand('Delete');
42153
+ return;
42154
+ }
42155
+ if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
42156
+ return;
42157
+ }
42158
+ const caption = this.__caretCaption();
42159
+ if (caption) {
42160
+ this.__arrow = {
42161
+ key: event.key,
42162
+ range: this.j.s.range.cloneRange(),
42163
+ caption
42164
+ };
42165
+ }
42166
+ }
42167
+ /**
42168
+ * An arrow key that couldn't move the caret in the caption takes it out,
42169
+ * past the image, as the caption is an editable element of its own
42170
+ */ onKeyUp(event) {
42171
+ const arrow = this.__arrow;
42172
+ this.__arrow = null;
42173
+ if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
42174
+ return;
42175
+ }
42176
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
42177
+ if (!wrapper) {
42178
+ return;
42179
+ }
42180
+ const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
42181
+ const { s } = this.j;
42182
+ this.__focusEditor();
42183
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42184
+ if (forward) {
42185
+ s.setCursorAfter(wrapper);
42186
+ } else {
42187
+ s.setCursorBefore(wrapper);
42188
+ }
42189
+ return;
42190
+ }
42191
+ const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
42192
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
42193
+ s.setCursorIn(sibling, forward);
42194
+ return;
42195
+ }
42196
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
42197
+ if (forward) {
42198
+ s.setCursorBefore(sibling);
42199
+ } else {
42200
+ s.setCursorAfter(sibling);
42201
+ }
42202
+ return;
42203
+ }
42204
+ const line = this.__line();
42205
+ (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);
42206
+ s.setCursorIn(line);
42207
+ this.j.synchronizeValues();
42208
+ }
42209
+ onBeforeCommand(command) {
42210
+ const name = command.toLowerCase();
42211
+ if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
42212
+ return false;
42213
+ }
42214
+ // A caption given and left blank was never a step, so Undo takes it off
42215
+ const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
42216
+ if (fresh) {
42217
+ this.__unrecorded(()=>{
42218
+ this.__restore(fresh);
42219
+ this.j.history.snapshot.restore(fresh.before);
42220
+ });
42221
+ return false;
42222
+ }
42223
+ }
42224
+ /**
42225
+ * Select all in a caption selects the caption, as the caption is an
42226
+ * editable element of its own
42227
+ */ __onSelectAll() {
42228
+ const caption = this.__caretCaption();
42229
+ if (caption) {
42230
+ this.j.e.stopPropagation('beforeCommandSelectall');
42231
+ this.j.s.select(caption, true);
42232
+ return false;
42233
+ }
42234
+ }
42235
+ /** @override */ beforeDestruct(jodit) {
42236
+ jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
42237
+ jodit.editor,
42238
+ jodit.ow,
42239
+ jodit.ew
42240
+ ], '.imageCaption');
42241
+ }
42242
+ constructor(){
42243
+ super(...arguments);
42244
+ /**
42245
+ * The caption given last, while nothing has changed round it and it's
42246
+ * still blank, so taking it off can put everything back as it was
42247
+ */ this.__fresh = null;
42248
+ this.__press = null;
42249
+ this.__afterPress = [];
42250
+ this.__arrow = null;
42251
+ }
42252
+ }
42253
+ __decorate([
42254
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
42255
+ ], imageCaption.prototype, "onToggleImageCaption", null);
42256
+ __decorate([
42257
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42258
+ ':change',
42259
+ ':afterInit',
42260
+ ':afterSetMode',
42261
+ ':changePlace'
42262
+ ]),
42263
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
42264
+ ], imageCaption.prototype, "onChange", null);
42265
+ __decorate([
42266
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42267
+ ':input',
42268
+ ':keyup',
42269
+ ':afterPaste'
42270
+ ])
42271
+ ], imageCaption.prototype, "onInput", null);
42272
+ __decorate([
42273
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
42274
+ ], imageCaption.prototype, "onAfterGetValueFromEditor", null);
42275
+ __decorate([
42276
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
42277
+ ], imageCaption.prototype, "onChangePlace", null);
42278
+ __decorate([
42279
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42280
+ ], imageCaption.prototype, "__onMouseDown", null);
42281
+ __decorate([
42282
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42283
+ ], imageCaption.prototype, "__onFocusOut", null);
42284
+ __decorate([
42285
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42286
+ ], imageCaption.prototype, "__onMouseUp", null);
42287
+ __decorate([
42288
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
42289
+ ], imageCaption.prototype, "onBeforeEnter", null);
42290
+ __decorate([
42291
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
42292
+ ], imageCaption.prototype, "onBeforeInsertNode", null);
42293
+ __decorate([
42294
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
42295
+ ], imageCaption.prototype, "onBeforeCommandDelete", null);
42296
+ __decorate([
42297
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
42298
+ ], imageCaption.prototype, "onKeyDown", null);
42299
+ __decorate([
42300
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
42301
+ ], imageCaption.prototype, "onKeyUp", null);
42302
+ __decorate([
42303
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
42304
+ ], imageCaption.prototype, "onBeforeCommand", null);
42305
+ __decorate([
42306
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42307
+ ], imageCaption.prototype, "__onSelectAll", null);
42308
+ /**
42309
+ * `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
42310
+ * from the editor's value
42311
+ */ function placedIn(jodit, fresh, wrapper) {
42312
+ var _a;
42313
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
42314
+ const { split } = fresh;
42315
+ if (!image) {
42316
+ return null;
42317
+ }
42318
+ const placed = {
42319
+ wrapper,
42320
+ image,
42321
+ target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
42322
+ place: fresh.place,
42323
+ split: null,
42324
+ attributes: fresh.attributes
42325
+ };
42326
+ if (split) {
42327
+ const head = split.head ? wrapper.previousSibling : null;
42328
+ const tail = split.tail ? wrapper.nextSibling : null;
42329
+ 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)) {
42330
+ return null;
42331
+ }
42332
+ const block = split.block.cloneNode(true);
42333
+ placed.split = {
42334
+ block,
42335
+ head: head,
42336
+ tail: tail
42337
+ };
42338
+ placed.place = counterpart(split.block, fresh.place, block);
42339
+ }
42340
+ return placed;
42341
+ }
42342
+ /**
42343
+ * The node in `copy`, a clone of `root`, where `node` is in `root`
42344
+ */ function counterpart(root, node, copy) {
42345
+ const path = [];
42346
+ for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
42347
+ path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
42348
+ }
42349
+ return path.reduce((elm, index)=>elm.childNodes[index], copy);
42350
+ }
42351
+ /**
42352
+ * The attributes of a caption's wrapper and image that the image's
42353
+ * alignment, margins and size are in
42354
+ */ function shape(wrapper, image) {
42355
+ return [
42356
+ wrapper,
42357
+ image
42358
+ ].flatMap((elm)=>[
42359
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
42360
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
42361
+ ]).join('|');
42362
+ }
42363
+ /**
42364
+ * The node is, or holds, more than text and inline formatting: an image, a
42365
+ * table, a rule or another block
42366
+ */ function holdsMoreThanText(node) {
42367
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
42368
+ return false;
42369
+ }
42370
+ return [
42371
+ node,
42372
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
42373
+ ].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())));
42374
+ }
42375
+ /**
42376
+ * A `width` attribute's value as a CSS width
42377
+ */ function pixels(value) {
42378
+ if (!value) {
42379
+ return '';
42380
+ }
42381
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
42382
+ }
42383
+ function moveMargins(from, to) {
42384
+ var _a;
42385
+ MARGINS.forEach((side)=>{
42386
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
42387
+ if (value) {
42388
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
42389
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
42390
+ }
42391
+ });
42392
+ if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
42393
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
42394
+ }
42395
+ }
42396
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
42397
+
42398
+
40938
42399
  /***/ }),
40939
42400
 
40940
42401
  /***/ 85745:
@@ -41040,7 +42501,8 @@ const SELECTED_TAGS = new Set([
41040
42501
  * paints the rest of a block image's line with its parent's highlight. See #1528.
41041
42502
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
41042
42503
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
41043
- * wrapper's whole line, and its resize frame shows it's selected
42504
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
42505
+ * a captioned image's caption
41044
42506
  */ onSelectionChange() {
41045
42507
  const { jodit } = this;
41046
42508
  jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
@@ -41063,9 +42525,12 @@ const SELECTED_TAGS = new Set([
41063
42525
  if (elm.src && /^data:/.test(elm.src)) {
41064
42526
  replaceDataURIToBlobUUID(editor, elm);
41065
42527
  }
42528
+ // A captioned image is selected with its caption, so Delete
42529
+ // removes both
41066
42530
  editor.e.on(elm, 'mousedown touchstart', ()=>{
42531
+ var _a;
41067
42532
  removeCaretText(elm);
41068
- editor.s.select(elm);
42533
+ editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
41069
42534
  });
41070
42535
  }
41071
42536
  });
@@ -41089,13 +42554,14 @@ __decorate([
41089
42554
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
41090
42555
  ], imageProcessor.prototype, "afterChange", null);
41091
42556
  function isImageSelected(jodit) {
42557
+ var _a;
41092
42558
  const { sel } = jodit.s;
41093
42559
  if (!sel || !sel.rangeCount) {
41094
42560
  return false;
41095
42561
  }
41096
42562
  const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
41097
42563
  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);
42564
+ 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
42565
  }
41100
42566
  /**
41101
42567
  * Remove the invisible-space text beside an image, which only held a caret.
@@ -41159,6 +42625,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41159
42625
  useImageEditor: true,
41160
42626
  editTitle: true,
41161
42627
  editAlt: true,
42628
+ showCaptionCheckbox: true,
41162
42629
  editLink: true,
41163
42630
  editSize: true,
41164
42631
  editBorderRadius: true,
@@ -41253,10 +42720,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41253
42720
  dialog.close();
41254
42721
  });
41255
42722
  buttons.remove.onAction(()=>{
42723
+ var _a;
42724
+ const { sourceImage } = this.state;
42725
+ const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
41256
42726
  const caret = j.s.createRange();
41257
- caret.setStartBefore(this.state.sourceImage);
42727
+ caret.setStartBefore(target);
41258
42728
  caret.collapse(true);
41259
- j.s.removeNode(this.state.sourceImage);
42729
+ j.s.removeNode(target);
41260
42730
  dialog.close();
41261
42731
  j.s.selectRange(caret);
41262
42732
  });
@@ -41278,12 +42748,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41278
42748
  if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
41279
42749
  return;
41280
42750
  }
42751
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
42752
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
42753
+ // A blank caption, as one the dialog has added, takes the caret, as
42754
+ // the image popup's Caption button does
42755
+ if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
42756
+ j.s.setCursorIn(caption);
42757
+ return;
42758
+ }
42759
+ // A captioned image is selected with its caption, as a click selects it
42760
+ const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
41281
42761
  if (j.o.image.selectImageAfterClose) {
41282
- j.s.select(sourceImage);
42762
+ j.s.select(target);
41283
42763
  return;
41284
42764
  }
41285
42765
  const caret = j.s.createRange();
41286
- caret.setStartAfter(sourceImage);
42766
+ caret.setStartAfter(target);
41287
42767
  caret.collapse(true);
41288
42768
  j.s.selectRange(caret);
41289
42769
  });
@@ -41419,6 +42899,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41419
42899
  borderRadius: 0,
41420
42900
  imageTitle: '',
41421
42901
  imageAlt: '',
42902
+ imageCaption: false,
41422
42903
  imageLink: '',
41423
42904
  imageLinkOpenInNewTab: false,
41424
42905
  imageWidth: 0,
@@ -41485,10 +42966,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41485
42966
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
41486
42967
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
41487
42968
  /* 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);
42969
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
42970
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
42971
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
42972
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
42973
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
41492
42974
  /*!
41493
42975
  * Jodit Editor (https://xdsoft.net/jodit/)
41494
42976
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41500,12 +42982,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41500
42982
 
41501
42983
 
41502
42984
 
42985
+
41503
42986
  /**
41504
42987
  * Read values from image and set it to state
41505
42988
  * @private
41506
42989
  */ async function readValuesFromImage(j, state) {
41507
42990
  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));
42991
+ // A captioned image's caption element holds its place on the page and
42992
+ // its width
42993
+ const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
42994
+ const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
42995
+ values.imageCaption = Boolean(wrapper);
42996
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
41509
42997
  // Border radius
41510
42998
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
41511
42999
  // Id
@@ -41519,13 +43007,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41519
43007
  // Classes
41520
43008
  values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
41521
43009
  // Margins
41522
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
43010
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
41523
43011
  // Link
41524
- (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
43012
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
41525
43013
  // Src
41526
43014
  values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
41527
43015
  // Image size
41528
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
43016
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
41529
43017
  }
41530
43018
 
41531
43019
 
@@ -41616,19 +43104,17 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41616
43104
  * Jodit Editor (https://xdsoft.net/jodit/)
41617
43105
  * Released under MIT see LICENSE.txt in the project root for license information.
41618
43106
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41619
- */ /**
41620
- * @module plugins/image-properties
41621
43107
  */
41622
43108
 
41623
43109
 
41624
43110
 
41625
- /** @private */ async function readSizes(image, values, state) {
43111
+ /** @private */ async function readSizes(image, values, state, captionWrapper) {
41626
43112
  try {
41627
43113
  await image.decode();
41628
43114
  } catch (e) {
41629
43115
  console.error(e);
41630
43116
  }
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;
43117
+ 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
43118
  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
43119
  values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
41634
43120
  if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
@@ -41903,6 +43389,12 @@ UIImagePropertiesForm = __decorate([
41903
43389
  <label>~Alternative~</label>
41904
43390
  <input type="text" class="jodit-input &__imageAlt"/>
41905
43391
  </div>
43392
+ <div class="jodit-form__group &__captionCheckbox">
43393
+ <label class="jodit_vertical_middle">
43394
+ <input type="checkbox" class="jodit-checkbox &__imageCaption"/>
43395
+ <span>~Caption~</span>
43396
+ </label>
43397
+ </div>
41906
43398
  <div class="jodit-form__group &__editLink">
41907
43399
  <label>~Link~</label>
41908
43400
  <input type="text" class="jodit-input &__imageLink"/>
@@ -41947,6 +43439,13 @@ UIImagePropertiesForm = __decorate([
41947
43439
  onAltChange() {
41948
43440
  this.state.values.imageAlt = this.getElm('imageAlt').value;
41949
43441
  }
43442
+ onStateCaptionChange() {
43443
+ const caption = this.getElm('imageCaption');
43444
+ caption.checked = this.state.values.imageCaption;
43445
+ }
43446
+ onCaptionChange() {
43447
+ this.state.values.imageCaption = this.getElm('imageCaption').checked;
43448
+ }
41950
43449
  onStateImageLinkChange() {
41951
43450
  const imageLink = this.getElm('imageLink');
41952
43451
  imageLink.value = this.state.values.imageLink;
@@ -41977,6 +43476,10 @@ UIImagePropertiesForm = __decorate([
41977
43476
  'editAlt',
41978
43477
  'editAlt'
41979
43478
  ],
43479
+ [
43480
+ 'showCaptionCheckbox',
43481
+ 'captionCheckbox'
43482
+ ],
41980
43483
  [
41981
43484
  'editLink',
41982
43485
  'editLink'
@@ -42032,6 +43535,12 @@ __decorate([
42032
43535
  __decorate([
42033
43536
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
42034
43537
  ], UIImageMainTab.prototype, "onAltChange", null);
43538
+ __decorate([
43539
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
43540
+ ], UIImageMainTab.prototype, "onStateCaptionChange", null);
43541
+ __decorate([
43542
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
43543
+ ], UIImageMainTab.prototype, "onCaptionChange", null);
42035
43544
  __decorate([
42036
43545
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
42037
43546
  ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
@@ -42476,6 +43985,33 @@ UIImagePositionTab = __decorate([
42476
43985
  /* harmony export */ ]);
42477
43986
 
42478
43987
 
43988
+ /***/ }),
43989
+
43990
+ /***/ 29509:
43991
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43992
+
43993
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43994
+ /* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
43995
+ /* harmony export */ });
43996
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
43997
+ /*!
43998
+ * Jodit Editor (https://xdsoft.net/jodit/)
43999
+ * Released under MIT see LICENSE.txt in the project root for license information.
44000
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44001
+ */
44002
+ /**
44003
+ * Gives the image a caption or takes it away, and returns the element that
44004
+ * holds the image's place on the page: the caption's, or the image
44005
+ * @private
44006
+ */ function applyCaption(j, image, imageCaption) {
44007
+ var _a;
44008
+ if (j.o.image.showCaptionCheckbox) {
44009
+ j.e.fire('toggleImageCaption', image, imageCaption);
44010
+ }
44011
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
44012
+ }
44013
+
44014
+
42479
44015
  /***/ }),
42480
44016
 
42481
44017
  /***/ 34755:
@@ -42487,9 +44023,10 @@ UIImagePositionTab = __decorate([
42487
44023
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42488
44024
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
42489
44025
  /* 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);
44026
+ /* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
44027
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
44028
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
44029
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
42493
44030
  /*!
42494
44031
  * Jodit Editor (https://xdsoft.net/jodit/)
42495
44032
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42500,11 +44037,13 @@ UIImagePositionTab = __decorate([
42500
44037
 
42501
44038
 
42502
44039
 
44040
+
42503
44041
  /**
42504
44042
  * Apply form's values to image
42505
44043
  * @private
42506
44044
  */ 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;
44045
+ var _a;
44046
+ const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
42508
44047
  const opt = j.o;
42509
44048
  // styles
42510
44049
  if (opt.image.editStyle) {
@@ -42514,7 +44053,7 @@ UIImagePositionTab = __decorate([
42514
44053
  if (imageSrc) {
42515
44054
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
42516
44055
  } else {
42517
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
44056
+ _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
44057
  return;
42519
44058
  }
42520
44059
  // Border radius
@@ -42524,21 +44063,24 @@ UIImagePositionTab = __decorate([
42524
44063
  // Alt
42525
44064
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
42526
44065
  // 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
- }
44066
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42534
44067
  if (opt.image.editClass) {
42535
44068
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
42536
44069
  }
42537
44070
  if (opt.image.editId) {
42538
44071
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
42539
44072
  }
44073
+ // The caption's element takes the image's place on the page and its width,
44074
+ // so it's added or taken away after the image's own style and classes
44075
+ const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
44076
+ // Size
44077
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
44078
+ // Margin
44079
+ if (j.o.image.editMargins) {
44080
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
44081
+ }
42540
44082
  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));
44083
+ (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
44084
  }
42543
44085
  }
42544
44086
 
@@ -42553,12 +44095,14 @@ UIImagePositionTab = __decorate([
42553
44095
  /* harmony export */ });
42554
44096
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42555
44097
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
44098
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
42556
44099
  /*!
42557
44100
  * Jodit Editor (https://xdsoft.net/jodit/)
42558
44101
  * Released under MIT see LICENSE.txt in the project root for license information.
42559
44102
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42560
44103
  */
42561
44104
 
44105
+
42562
44106
  /** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
42563
44107
  // Link
42564
44108
  let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
@@ -42572,8 +44116,11 @@ UIImagePositionTab = __decorate([
42572
44116
  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
44117
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
42574
44118
  }
42575
- } else {
42576
- if (link && link.parentNode) {
44119
+ } else if (link && link.parentNode) {
44120
+ // Froala keeps a linked image's caption inside the link
44121
+ if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
44122
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
44123
+ } else {
42577
44124
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
42578
44125
  }
42579
44126
  }
@@ -42651,7 +44198,19 @@ UIImagePositionTab = __decorate([
42651
44198
 
42652
44199
 
42653
44200
 
42654
- /** @private */ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
44201
+ /**
44202
+ * A captioned image fills its caption's element, `box`, which takes the width
44203
+ * @private
44204
+ */ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
44205
+ if (box !== image) {
44206
+ const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
44207
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
44208
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
44209
+ width: width && '100%',
44210
+ height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
44211
+ });
44212
+ return;
44213
+ }
42655
44214
  // Size
42656
44215
  if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
42657
44216
  const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
@@ -42815,19 +44374,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42815
44374
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
42816
44375
 
42817
44376
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44377
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
44378
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42818
44379
  /*!
42819
44380
  * Jodit Editor (https://xdsoft.net/jodit/)
42820
44381
  * Released under MIT see LICENSE.txt in the project root for license information.
42821
44382
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42822
- */ /**
42823
- * @module plugins/indent
42824
44383
  */
44384
+
44385
+
42825
44386
  /**
42826
44387
  * Get style rule key for current direction
42827
44388
  * @internal
42828
44389
  */ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
44390
+ /**
44391
+ * Indents or outdents a box by `indentMargin`
44392
+ * @internal
44393
+ */ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44394
+ if (!currentBox) {
44395
+ return;
44396
+ }
44397
+ if (processedElements.has(currentBox)) {
44398
+ return;
44399
+ }
44400
+ const key = getKey(editor.o.direction, currentBox);
44401
+ processedElements.add(currentBox);
44402
+ const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
44403
+ let value = current ? parseInt(current, 10) : 0;
44404
+ value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
44405
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
44406
+ if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
44407
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
44408
+ }
44409
+ };
42829
44410
 
42830
44411
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
44412
+ /* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
42831
44413
  /* harmony export */ "getKey", 0, /* binding */ getKey
42832
44414
  /* harmony export */ ]);
42833
44415
 
@@ -42858,9 +44440,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42858
44440
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
42859
44441
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
42860
44442
  /* 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);
44443
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
44444
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
42864
44445
  /*!
42865
44446
  * Jodit Editor (https://xdsoft.net/jodit/)
42866
44447
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42871,24 +44452,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42871
44452
 
42872
44453
 
42873
44454
 
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
44455
  /**
42893
44456
  * Indents the line containing the selection or insertion point.
42894
44457
  */ function indent(editor) {
@@ -42907,7 +44470,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42907
44470
  if (isBrMode && editor.s.isCollapsed()) {
42908
44471
  if (current) {
42909
44472
  const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
42910
- applyIndentToBox(processedElements, box, editor, command);
44473
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
42911
44474
  return false;
42912
44475
  }
42913
44476
  }
@@ -42921,7 +44484,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42921
44484
  editor.s.restore();
42922
44485
  return false;
42923
44486
  }
42924
- applyIndentToBox(processedElements, currentBox, editor, command);
44487
+ ;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
42925
44488
  editor.s.restore();
42926
44489
  });
42927
44490
  editor.synchronizeValues();
@@ -43022,11 +44585,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43022
44585
  /* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
43023
44586
  /* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
43024
44587
  /* 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);
44588
+ /* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
44589
+ /* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
44590
+ /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
44591
+ /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
44592
+ /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
44593
+ /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
44594
+ /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
43030
44595
  /*!
43031
44596
  * Jodit Editor (https://xdsoft.net/jodit/)
43032
44597
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43046,13 +44611,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43046
44611
 
43047
44612
 
43048
44613
 
44614
+
44615
+
43049
44616
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
43050
44617
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
43051
44618
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
43052
44619
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
43053
44620
  'source'
43054
44621
  ];
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"]);
44622
+ _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
44623
  // Register cell popup buttons as global controls so they can be
43057
44624
  // referenced by name in custom popup configurations.
43058
44625
  // Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
@@ -43129,15 +44696,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
43129
44696
  /***/ 62000:
43130
44697
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43131
44698
 
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);
44699
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44700
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
44701
+ /* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
44702
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43134
44703
  /*!
43135
44704
  * Jodit Editor (https://xdsoft.net/jodit/)
43136
44705
  * Released under MIT see LICENSE.txt in the project root for license information.
43137
44706
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43138
44707
  */
43139
44708
 
43140
- const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
44709
+
44710
+
44711
+ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43141
44712
  /* harmony default export */ __webpack_exports__["default"] = ([
43142
44713
  'brushCell',
43143
44714
  {
@@ -43152,7 +44723,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43152
44723
  exec: (editor, table, { control })=>{
43153
44724
  const command = cmd(control);
43154
44725
  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);
44726
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
43156
44727
  });
43157
44728
  },
43158
44729
  tooltip: 'Vertical align'
@@ -43182,7 +44753,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43182
44753
  tableaddcolumnafter: 'Insert column after'
43183
44754
  },
43184
44755
  exec: (editor, table, { control })=>{
43185
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44756
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43186
44757
  return;
43187
44758
  }
43188
44759
  if (!control.args) {
@@ -43200,7 +44771,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43200
44771
  tableaddrowafter: 'Insert row below'
43201
44772
  },
43202
44773
  exec: (editor, table, { control })=>{
43203
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44774
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43204
44775
  return;
43205
44776
  }
43206
44777
  if (!control.args) {
@@ -43211,6 +44782,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43211
44782
  },
43212
44783
  tooltip: 'Add row'
43213
44784
  },
44785
+ {
44786
+ name: 'headerrow',
44787
+ exec: (editor, table)=>{
44788
+ 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')) {
44789
+ return;
44790
+ }
44791
+ editor.execCommand('tableheaderrow', false, table);
44792
+ const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
44793
+ // Beside the cell that replaced the one it opened for
44794
+ if (cell) {
44795
+ editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
44796
+ }
44797
+ // The popup stays open, so the button shows the new state
44798
+ return true;
44799
+ },
44800
+ isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
44801
+ isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
44802
+ tooltip: 'Header row'
44803
+ },
43214
44804
  {
43215
44805
  name: 'deleteTable',
43216
44806
  icon: 'bin',
@@ -43221,7 +44811,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43221
44811
  tableempty: 'Empty cell'
43222
44812
  },
43223
44813
  exec: (editor, table, { control })=>{
43224
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44814
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43225
44815
  return;
43226
44816
  }
43227
44817
  if (!control.args) {
@@ -43281,7 +44871,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43281
44871
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
43282
44872
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
43283
44873
  /* 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);
44874
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
44875
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
43285
44876
  /*!
43286
44877
  * Jodit Editor (https://xdsoft.net/jodit/)
43287
44878
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43291,6 +44882,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43291
44882
 
43292
44883
 
43293
44884
 
44885
+
43294
44886
  // A Normal image sits where the text of its line is aligned (#1531)
43295
44887
  const lineAlign = (editor, elm)=>{
43296
44888
  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 +44903,15 @@ const lineAlign = (editor, elm)=>{
43311
44903
  return 'left';
43312
44904
  }
43313
44905
  };
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';
44906
+ // A captioned image is aligned by the element holding it and its caption
44907
+ const alignedBox = (editor, elm)=>{
44908
+ var _a;
44909
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
44910
+ };
44911
+ const currentAlign = (editor, elm)=>{
44912
+ const box = alignedBox(editor, elm);
44913
+ 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';
44914
+ };
43315
44915
  const align = {
43316
44916
  name: 'left',
43317
44917
  childTemplate: (_, __, value)=>value,
@@ -43337,14 +44937,15 @@ const align = {
43337
44937
  'img',
43338
44938
  'jodit',
43339
44939
  'jodit-media'
43340
- ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
44940
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
43341
44941
  return;
43342
44942
  }
43343
44943
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43344
44944
  if (!command) {
43345
44945
  return false;
43346
44946
  }
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));
44947
+ const box = alignedBox(editor, elm);
44948
+ (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
44949
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
43349
44950
  'jodit',
43350
44951
  'jodit-media'
@@ -43363,7 +44964,8 @@ const align = {
43363
44964
  icon: 'bin',
43364
44965
  tooltip: 'Delete',
43365
44966
  exec: (editor, image)=>{
43366
- image && editor.s.removeNode(image);
44967
+ var _a;
44968
+ 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
44969
  }
43368
44970
  },
43369
44971
  {
@@ -43376,6 +44978,24 @@ const align = {
43376
44978
  },
43377
44979
  tooltip: 'Edit'
43378
44980
  },
44981
+ {
44982
+ name: 'caption',
44983
+ exec: (editor, image)=>{
44984
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
44985
+ return;
44986
+ }
44987
+ const caption = editor.e.fire('toggleImageCaption', image);
44988
+ editor.synchronizeValues();
44989
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
44990
+ editor.e.fire('hideResizer');
44991
+ editor.s.setCursorIn(caption);
44992
+ } else {
44993
+ editor.e.fire('recalcPositionPopup');
44994
+ }
44995
+ },
44996
+ isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
44997
+ tooltip: 'Caption'
44998
+ },
43379
44999
  {
43380
45000
  name: 'valign',
43381
45001
  list: [
@@ -43385,13 +45005,14 @@ const align = {
43385
45005
  'Normal'
43386
45006
  ],
43387
45007
  tooltip: 'Vertical align',
43388
- // `vertical-align` only moves an image in the line, not a floated or block one
45008
+ // `vertical-align` only moves an image in the line, not a floated or block
45009
+ // one, nor a captioned one, which is placed by its caption's element
43389
45010
  isDisabled: (editor, button)=>{
43390
45011
  const image = button.target;
43391
45012
  return Boolean(image && ([
43392
45013
  'left',
43393
45014
  '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'));
45015
+ ].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
45016
  },
43396
45017
  exec: (editor, image, { control })=>{
43397
45018
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
@@ -43469,6 +45090,22 @@ const align = {
43469
45090
  /* 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
45091
 
43471
45092
 
45093
+ /***/ }),
45094
+
45095
+ /***/ 72972:
45096
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45097
+
45098
+ /* 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> ");
45099
+
45100
+
45101
+ /***/ }),
45102
+
45103
+ /***/ 44597:
45104
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45105
+
45106
+ /* 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> ");
45107
+
45108
+
43472
45109
  /***/ }),
43473
45110
 
43474
45111
  /***/ 14862:
@@ -43561,8 +45198,8 @@ const align = {
43561
45198
  if (target && type && this.canShowPopupForType(type)) {
43562
45199
  const isMedia = type === 'jodit-media';
43563
45200
  // 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;
45201
+ // the line, and below a captioned image's caption, so it stays in view
45202
+ 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
45203
  this.showPopup(()=>this.__bound(bound, isMedia), type, target);
43567
45204
  return false;
43568
45205
  }
@@ -46451,6 +48088,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
46451
48088
  * Check if root node is empty
46452
48089
  * @private
46453
48090
  */ function isEditorEmpty(root) {
48091
+ var _a;
48092
+ // A non-breaking space is typed, where other white space can just lay out
48093
+ // the HTML
48094
+ return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
48095
+ }
48096
+ function isBlank(root) {
46454
48097
  var _a;
46455
48098
  if (!root.firstChild) {
46456
48099
  return true;
@@ -46971,6 +48614,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
46971
48614
 
46972
48615
 
46973
48616
  const key = 'table_processor_observer-resize';
48617
+ /**
48618
+ * How near the top or bottom of what a row scrolls in the pointer starts
48619
+ * scrolling it, as the editor's iframe passes on no moves outside it
48620
+ */ const SCROLL_EDGE = 20;
46974
48621
  /**
46975
48622
  * Process tables in editor
46976
48623
  */ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
@@ -46990,7 +48637,11 @@ const key = 'table_processor_observer-resize';
46990
48637
  }
46991
48638
  hideResizeHandle() {
46992
48639
  this.hideTimeout = this.j.async.setTimeout(()=>{
46993
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48640
+ // A late move from inside the cell can come once the pointer
48641
+ // is on the handle, which covers the border
48642
+ if (!this.resizeHandler.matches(':hover')) {
48643
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48644
+ }
46994
48645
  }, {
46995
48646
  timeout: this.j.defaultTimeout,
46996
48647
  label: 'hideResizer'
@@ -47007,6 +48658,30 @@ const key = 'table_processor_observer-resize';
47007
48658
  this.startX = event.clientX;
47008
48659
  this.j.lock(key);
47009
48660
  this.resizeHandler.classList.add('jodit-table-resizer_moved');
48661
+ if (this.workRow) {
48662
+ this.startY = event.clientY;
48663
+ this.startHeight = this.workRow.offsetHeight;
48664
+ this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
48665
+ this.scrolled = 0;
48666
+ this.anchored = scrollersOf(this.workRow).map((elm)=>{
48667
+ const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
48668
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
48669
+ return [
48670
+ elm,
48671
+ style
48672
+ ];
48673
+ });
48674
+ return false;
48675
+ }
48676
+ this.startStyles = [
48677
+ this.workTable,
48678
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
48679
+ ].map((elm)=>[
48680
+ elm,
48681
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
48682
+ ]);
48683
+ this.startLeft = parseFloat(this.resizeHandler.style.left);
48684
+ this.startEdge = this.columnEdge();
47010
48685
  let box;
47011
48686
  this.minX = 0;
47012
48687
  this.maxX = 1000000;
@@ -47033,12 +48708,21 @@ const key = 'table_processor_observer-resize';
47033
48708
  /**
47034
48709
  * Mouse move after click on resize handle
47035
48710
  */ onMouseMove(event) {
48711
+ var _a;
47036
48712
  if (!this.drag) {
47037
48713
  return;
47038
48714
  }
47039
48715
  this.j.e.fire('closeAllPopups');
47040
48716
  let x = event.clientX;
47041
48717
  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);
48718
+ if (this.workRow) {
48719
+ const view = scrollViewOf(this.workRow);
48720
+ this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
48721
+ this.resizeRow(this.workRow);
48722
+ this.scrollAlong(view, event.clientY);
48723
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
48724
+ return;
48725
+ }
47042
48726
  if (x < this.minX) {
47043
48727
  x = this.minX;
47044
48728
  }
@@ -47046,7 +48730,14 @@ const key = 'table_processor_observer-resize';
47046
48730
  x = this.maxX;
47047
48731
  }
47048
48732
  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');
48733
+ this.restoreStyles();
48734
+ this.resizeColumnsOrTable();
48735
+ const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
48736
+ Object.assign(this.resizeHandler.style, {
48737
+ left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
48738
+ top: tableBox.top - workplacePosition.top + 'px',
48739
+ height: tableBox.height + 'px'
48740
+ });
47050
48741
  const sel = this.j.s.sel;
47051
48742
  sel && sel.removeAllRanges();
47052
48743
  }
@@ -47063,17 +48754,96 @@ const key = 'table_processor_observer-resize';
47063
48754
  this.drag = false;
47064
48755
  this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
47065
48756
  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();
48757
+ if (this.workRow) {
48758
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48759
+ this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48760
+ this.anchored = [];
48761
+ const height = this.workRow.offsetHeight;
48762
+ if (height !== this.startHeight) {
48763
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
47070
48764
  } else {
47071
- this.resizeTable();
48765
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
48766
+ }
48767
+ } else {
48768
+ this.restoreStyles();
48769
+ if (this.startX !== e.clientX) {
48770
+ this.resizeColumnsOrTable();
47072
48771
  }
47073
48772
  }
47074
48773
  this.j.synchronizeValues();
47075
48774
  this.j.s.focus();
47076
48775
  }
48776
+ resizeColumnsOrTable() {
48777
+ if (this.wholeTable == null) {
48778
+ this.resizeColumns();
48779
+ } else {
48780
+ this.resizeTable();
48781
+ }
48782
+ }
48783
+ restoreStyles() {
48784
+ this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48785
+ }
48786
+ /**
48787
+ * Where the border the handle is on lies: the work cell's left side
48788
+ * for the table's left edge, otherwise its right side
48789
+ */ columnEdge() {
48790
+ const { left, right } = this.workCell.getBoundingClientRect();
48791
+ return this.wholeTable === true ? left : right;
48792
+ }
48793
+ /**
48794
+ * Sets the row's height from where the pointer is, and how far the drag
48795
+ * has scrolled. The browser keeps the row as tall as its content
48796
+ */ resizeRow(row) {
48797
+ const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
48798
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
48799
+ this.placeRowHandle(row);
48800
+ return row.offsetHeight === height;
48801
+ }
48802
+ /**
48803
+ * While the pointer is near or past the top or bottom of the part of the
48804
+ * row's scroller in view, scrolls it on, and the row's border with it
48805
+ */ scrollAlong(view, clientY) {
48806
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48807
+ const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
48808
+ if (!past) {
48809
+ return;
48810
+ }
48811
+ const { scroller } = view;
48812
+ const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
48813
+ const scroll = ()=>{
48814
+ const { workRow } = this;
48815
+ if (!workRow) {
48816
+ return;
48817
+ }
48818
+ const scrollTop = scroller.scrollTop;
48819
+ if (step > 0) {
48820
+ // Growing the row first makes the room to scroll down into
48821
+ this.scrolled += step;
48822
+ this.resizeRow(workRow);
48823
+ scroller.scrollTop = scrollTop + step;
48824
+ const missed = step - (scroller.scrollTop - scrollTop);
48825
+ if (missed > 0.5) {
48826
+ this.scrolled -= missed;
48827
+ this.resizeRow(workRow);
48828
+ return;
48829
+ }
48830
+ this.placeRowHandle(workRow);
48831
+ } else {
48832
+ scroller.scrollTop = scrollTop + step;
48833
+ const moved = scroller.scrollTop - scrollTop;
48834
+ this.scrolled += moved;
48835
+ // A row at its content's height can't follow the pointer up
48836
+ if (!moved || !this.resizeRow(workRow)) {
48837
+ scroller.scrollTop = scrollTop;
48838
+ this.scrolled -= moved;
48839
+ this.resizeRow(workRow);
48840
+ return;
48841
+ }
48842
+ }
48843
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48844
+ };
48845
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48846
+ }
47077
48847
  /**
47078
48848
  * Resize only one column
47079
48849
  */ resizeColumns() {
@@ -47116,15 +48886,20 @@ const key = 'table_processor_observer-resize';
47116
48886
  }
47117
48887
  /**
47118
48888
  * Calc helper resize handle position
47119
- */ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
48889
+ */ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
47120
48890
  const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
47121
48891
  if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
47122
- this.hideResizeHandle();
48892
+ if (!this.calcRowHandlePosition(cell, clientY)) {
48893
+ this.hideResizeHandle();
48894
+ }
47123
48895
  return;
47124
48896
  }
48897
+ this.workRow = null;
48898
+ this.resizeHandler.classList.remove('jodit-table-resizer_row');
47125
48899
  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
48900
  (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
48901
  Object.assign(this.resizeHandler.style, {
48902
+ width: '',
47128
48903
  height: parentBox.height + 'px',
47129
48904
  top: parentBox.top - workplacePosition.top + 'px'
47130
48905
  });
@@ -47137,6 +48912,36 @@ const key = 'table_processor_observer-resize';
47137
48912
  this.setWorkCell(cell, !nextTD ? false : null);
47138
48913
  }
47139
48914
  }
48915
+ /**
48916
+ * Shows the handle across the table on the border below a row, near the
48917
+ * cell's bottom or near its top, which is the bottom of the row above.
48918
+ * The table's top edge has no row above it
48919
+ */ calcRowHandlePosition(cell, clientY) {
48920
+ const { top, bottom } = cell.getBoundingClientRect();
48921
+ 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);
48922
+ const index = cell.parentNode.rowIndex;
48923
+ 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;
48924
+ if (!row) {
48925
+ return false;
48926
+ }
48927
+ this.workRow = row;
48928
+ this.workTable = table;
48929
+ this.resizeHandler.classList.add('jodit-table-resizer_row');
48930
+ this.placeRowHandle(row);
48931
+ this.showResizeHandle();
48932
+ return true;
48933
+ }
48934
+ /**
48935
+ * Lays the handle across the table on the border below the row
48936
+ */ placeRowHandle(row) {
48937
+ 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);
48938
+ Object.assign(this.resizeHandler.style, {
48939
+ left: tableBox.left - workplacePosition.left + 'px',
48940
+ width: tableBox.width + 'px',
48941
+ height: '',
48942
+ top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
48943
+ });
48944
+ }
47140
48945
  /** @override */ afterInit(editor) {
47141
48946
  if (!editor.o.tableAllowCellResize) {
47142
48947
  return;
@@ -47144,7 +48949,7 @@ const key = 'table_processor_observer-resize';
47144
48949
  editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
47145
48950
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
47146
48951
  }).on(this.j.ow, 'scroll.resize-cells', ()=>{
47147
- if (!this.drag) {
48952
+ if (!this.drag || this.workRow) {
47148
48953
  return;
47149
48954
  }
47150
48955
  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 +48973,7 @@ const key = 'table_processor_observer-resize';
47168
48973
  }
47169
48974
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
47170
48975
  this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
47171
- if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
48976
+ if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
47172
48977
  this.hideResizeHandle();
47173
48978
  }
47174
48979
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
@@ -47179,7 +48984,7 @@ const key = 'table_processor_observer-resize';
47179
48984
  if (!cell) {
47180
48985
  return;
47181
48986
  }
47182
- this.calcHandlePosition(table, cell, event.offsetX);
48987
+ this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
47183
48988
  }, {
47184
48989
  timeout: this.j.defaultTimeout
47185
48990
  }));
@@ -47200,6 +49005,10 @@ const key = 'table_processor_observer-resize';
47200
49005
  this.resizeHandler = this.j.c.div('jodit-table-resizer');
47201
49006
  this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
47202
49007
  this.j.async.clearTimeout(this.hideTimeout);
49008
+ }).on(this.resizeHandler, 'mouseleave.table', ()=>{
49009
+ if (!this.drag) {
49010
+ this.hideResizeHandle();
49011
+ }
47203
49012
  });
47204
49013
  }
47205
49014
  };
@@ -47208,6 +49017,25 @@ const key = 'table_processor_observer-resize';
47208
49017
  this.minX = 0;
47209
49018
  this.maxX = 0;
47210
49019
  this.startX = 0;
49020
+ /**
49021
+ * The table's and its cells' styles as a column drag started, put back
49022
+ * before each new width
49023
+ */ this.startStyles = [];
49024
+ this.startLeft = 0;
49025
+ this.startEdge = 0;
49026
+ /**
49027
+ * The row whose height the handle sets, or null while it sets a width
49028
+ */ this.workRow = null;
49029
+ this.startY = 0;
49030
+ this.startHeight = 0;
49031
+ this.rowStyle = null;
49032
+ /**
49033
+ * The boxes that scroll the row, with their styles, as a row drag turns
49034
+ * off their scroll anchoring, which would move the border off the pointer
49035
+ */ this.anchored = [];
49036
+ this.scrolled = 0;
49037
+ this.scrollFrame = 0;
49038
+ this.pointerY = 0;
47211
49039
  }
47212
49040
  }
47213
49041
  __decorate([
@@ -47222,6 +49050,45 @@ __decorate([
47222
49050
  __decorate([
47223
49051
  _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
47224
49052
  ], resizeCells.prototype, "observe", null);
49053
+ /**
49054
+ * The boxes around the row that can scroll it, nearest first, and its
49055
+ * document's
49056
+ */ function scrollersOf(row) {
49057
+ const doc = row.ownerDocument;
49058
+ const root = doc.scrollingElement || doc.documentElement;
49059
+ const scrollers = [];
49060
+ for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
49061
+ if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
49062
+ scrollers.push(elm);
49063
+ }
49064
+ }
49065
+ return [
49066
+ ...scrollers,
49067
+ root
49068
+ ];
49069
+ }
49070
+ /**
49071
+ * What scrolls the row up and down, the nearest box around it with more
49072
+ * than it shows or else its document, and the part of it in the window's view
49073
+ */ function scrollViewOf(row) {
49074
+ var _a, _b, _c;
49075
+ const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
49076
+ const scrollers = scrollersOf(row);
49077
+ const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
49078
+ if (scroller === scrollers[scrollers.length - 1]) {
49079
+ return {
49080
+ scroller,
49081
+ top: 0,
49082
+ bottom: height
49083
+ };
49084
+ }
49085
+ const top = scroller.getBoundingClientRect().top + scroller.clientTop;
49086
+ return {
49087
+ scroller,
49088
+ top: Math.max(top, 0),
49089
+ bottom: Math.min(top + scroller.clientHeight, height)
49090
+ };
49091
+ }
47225
49092
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
47226
49093
 
47227
49094
 
@@ -47697,6 +49564,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47697
49564
  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
49565
  }
47699
49566
  applySize(element, key, value) {
49567
+ // A captioned image fills the element holding it and its caption,
49568
+ // which takes the width
49569
+ 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;
49570
+ if (wrapper) {
49571
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
49572
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
49573
+ return;
49574
+ }
47700
49575
  const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
47701
49576
  if (changeAttrs) {
47702
49577
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
@@ -47711,6 +49586,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47711
49586
  return Boolean(this.element && this.j.editor.contains(this.element));
47712
49587
  }
47713
49588
  onDelete(e) {
49589
+ var _a;
47714
49590
  if (!this.element) {
47715
49591
  return;
47716
49592
  }
@@ -47719,7 +49595,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47719
49595
  return;
47720
49596
  }
47721
49597
  if (this.element.tagName !== 'JODIT') {
47722
- this.j.s.select(this.element);
49598
+ 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
49599
  } else {
47724
49600
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
47725
49601
  this.hide();
@@ -48948,8 +50824,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48948
50824
  'touchstartTd',
48949
50825
  'touchstartTh'
48950
50826
  ].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', ()=>{
50827
+ // and mouseup on another cell call `click` only for their common
50828
+ // ancestor: the row, the section, or the table across sections
50829
+ .on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
48953
50830
  var _a;
48954
50831
  const cellsCount = this.__tableModule.getAllSelectedCells().length;
48955
50832
  if (cellsCount) {
@@ -49113,14 +50990,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49113
50990
  }
49114
50991
  this.j.e.fire('hidePopup');
49115
50992
  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
50993
  }
49125
50994
  /**
49126
50995
  * On click in outside - remove selection
@@ -49219,7 +51088,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49219
51088
  this.j.synchronizeValues();
49220
51089
  return false;
49221
51090
  }
49222
- if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
51091
+ if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
49223
51092
  command = command.replace('table', '');
49224
51093
  const cells = this.__tableModule.getAllSelectedCells();
49225
51094
  if (cells.length) {
@@ -49286,6 +51155,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49286
51155
  case 'addrowbefore':
49287
51156
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
49288
51157
  break;
51158
+ case 'headerrow':
51159
+ this.__toggleHeaderRow(table, cells);
51160
+ break;
49289
51161
  }
49290
51162
  if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
49291
51163
  this.__removeTable(table);
@@ -49294,6 +51166,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49294
51166
  return false;
49295
51167
  }
49296
51168
  }
51169
+ /**
51170
+ * Turns the table's header row on or off. The caret and the marked cells
51171
+ * move to the cells that replace them
51172
+ */ __toggleHeaderRow(table, cells) {
51173
+ var _a, _b;
51174
+ const module = this.__tableModule;
51175
+ this.j.s.save();
51176
+ const replaced = module.toggleHeaderRow(table);
51177
+ this.j.s.restore();
51178
+ cells.forEach((cell)=>{
51179
+ const next = replaced.get(cell);
51180
+ if (next) {
51181
+ module.removeSelection(cell);
51182
+ module.addSelection(next);
51183
+ }
51184
+ });
51185
+ // As after the click that marked it, the command's own change keeps
51186
+ // the marks, so the popup can stay open for another toggle
51187
+ const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
51188
+ this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
51189
+ }
49297
51190
  /**
49298
51191
  * The cell that takes the caret when rows or columns are deleted: the next
49299
51192
  * one in the same column (or row) that is not deleted, else the previous one
@@ -52245,9 +54138,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52245
54138
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
52246
54139
 
52247
54140
  /* 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; }
54141
+ /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
54142
+ /* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
54143
+ /* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
54144
+ /* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
52249
54145
  /* harmony export */ });
52250
54146
  /* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
54147
+ /* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
52251
54148
  /*!
52252
54149
  * Jodit Editor (https://xdsoft.net/jodit/)
52253
54150
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52257,6 +54154,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52257
54154
  */
52258
54155
 
52259
54156
 
54157
+
52260
54158
  /***/ }),
52261
54159
 
52262
54160
  /***/ 26658:
@@ -52278,7 +54176,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52278
54176
  * If so then add an internal list
52279
54177
  * @private
52280
54178
  */ function onTabInsideLi(jodit, shift = false) {
52281
- if (!jodit.o.tab.tabInsideLiInsertNewList) {
54179
+ // Focused with no range, as WebKit can leave it, there's no caret to
54180
+ // mark
54181
+ if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
52282
54182
  return false;
52283
54183
  }
52284
54184
  const [fake, fake2] = fakeCursors(jodit);
@@ -52375,6 +54275,279 @@ function removeNestedList(jodit, list, li) {
52375
54275
  }
52376
54276
 
52377
54277
 
54278
+ /***/ }),
54279
+
54280
+ /***/ 39481:
54281
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
54282
+
54283
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54284
+ /* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
54285
+ /* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
54286
+ /* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
54287
+ /* harmony export */ });
54288
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
54289
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
54290
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
54291
+ /* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
54292
+ /* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
54293
+ /*!
54294
+ * Jodit Editor (https://xdsoft.net/jodit/)
54295
+ * Released under MIT see LICENSE.txt in the project root for license information.
54296
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
54297
+ */
54298
+
54299
+
54300
+
54301
+
54302
+ const KEEPS_TABS = new Set([
54303
+ 'pre',
54304
+ 'pre-wrap',
54305
+ 'break-spaces'
54306
+ ]);
54307
+ const KEEPS_TABS_TAGS = new Set([
54308
+ 'pre',
54309
+ 'textarea',
54310
+ 'style',
54311
+ 'script'
54312
+ ]);
54313
+ /**
54314
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
54315
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
54316
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
54317
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
54318
+ * on: Escape and then Tab does that
54319
+ * @private
54320
+ */ function onTabSpaces(jodit, shift) {
54321
+ const { spaces } = jodit.o.tab;
54322
+ const current = jodit.s.current();
54323
+ if (!spaces || jodit.o.readonly || jodit.isLocked) {
54324
+ return false;
54325
+ }
54326
+ // The editor has the focus but no caret, so there's nowhere to put
54327
+ // anything, but the focus stays
54328
+ if (!current) {
54329
+ return true;
54330
+ }
54331
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
54332
+ return false;
54333
+ }
54334
+ if (!jodit.s.isCollapsed()) {
54335
+ jodit.execCommand(shift ? 'outdent' : 'indent');
54336
+ return true;
54337
+ }
54338
+ const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
54339
+ const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
54340
+ if (list && (!shift || isIndented(jodit, list))) {
54341
+ (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
54342
+ jodit.synchronizeValues();
54343
+ return true;
54344
+ }
54345
+ if (shift) {
54346
+ unindent(jodit, current, spaces);
54347
+ return true;
54348
+ }
54349
+ const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
54350
+ const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
54351
+ jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
54352
+ return true;
54353
+ }
54354
+ /**
54355
+ * Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
54356
+ * it, then a tab or up to `spaces` spaces at the start of its line, then the
54357
+ * indent of its block
54358
+ */ function unindent(jodit, current, spaces) {
54359
+ 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);
54360
+ const caret = jodit.createInside.fake();
54361
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
54362
+ let removed;
54363
+ try {
54364
+ removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
54365
+ if (removed) {
54366
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54367
+ }
54368
+ } finally{
54369
+ jodit.s.setCursorBefore(caret);
54370
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
54371
+ }
54372
+ if (removed) {
54373
+ jodit.synchronizeValues();
54374
+ } else if (block && isIndented(jodit, block)) {
54375
+ jodit.execCommand('outdent');
54376
+ }
54377
+ }
54378
+ function removeTabBefore(caret) {
54379
+ const before = caret.previousSibling;
54380
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
54381
+ before.deleteData(before.length - 1, 1);
54382
+ return true;
54383
+ }
54384
+ return false;
54385
+ }
54386
+ function removeLineIndent(jodit, block, caret, spaces) {
54387
+ const { whiteSpace } = jodit.ew.getComputedStyle(block);
54388
+ const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
54389
+ acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
54390
+ });
54391
+ const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
54392
+ return removeIndentAt(walker, start, offset, caret, spaces);
54393
+ }
54394
+ /**
54395
+ * Where the caret's line starts: after a `<br>`, after a newline where white
54396
+ * space keeps it, or at the caret
54397
+ */ function lineStart(walker, caret, keepsBreaks) {
54398
+ let start = null;
54399
+ let offset = 0;
54400
+ for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
54401
+ const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
54402
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
54403
+ start = null;
54404
+ } else if (lineBreak >= 0) {
54405
+ start = node;
54406
+ offset = lineBreak + 1;
54407
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
54408
+ start = node;
54409
+ offset = 0;
54410
+ }
54411
+ }
54412
+ return start ? [
54413
+ start,
54414
+ offset
54415
+ ] : [
54416
+ caret,
54417
+ 0
54418
+ ];
54419
+ }
54420
+ function removeIndentAt(walker, start, startOffset, caret, spaces) {
54421
+ let removed = 0;
54422
+ let offset = startOffset;
54423
+ walker.currentNode = start;
54424
+ for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
54425
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
54426
+ const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
54427
+ node.deleteData(offset, end - offset);
54428
+ removed += count;
54429
+ if (offset < node.length) {
54430
+ break;
54431
+ }
54432
+ }
54433
+ offset = 0;
54434
+ }
54435
+ return removed > 0;
54436
+ }
54437
+ /**
54438
+ * Where up to `count` spaces from `offset` end, and how many there were. A
54439
+ * tab at the start of a line is a whole indent
54440
+ */ function scanIndent(text, offset, count, atLineStart) {
54441
+ if (atLineStart && text[offset] === '\t') {
54442
+ return [
54443
+ offset + 1,
54444
+ count
54445
+ ];
54446
+ }
54447
+ let end = offset;
54448
+ let found = 0;
54449
+ for(; end < text.length && found < count; end += 1){
54450
+ const char = text[end];
54451
+ if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54452
+ break;
54453
+ }
54454
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54455
+ found += 1;
54456
+ }
54457
+ }
54458
+ return [
54459
+ end,
54460
+ found
54461
+ ];
54462
+ }
54463
+ function isIndented(jodit, box) {
54464
+ 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;
54465
+ }
54466
+ /**
54467
+ * With `tab.spaces`, Backspace just after that many spaces removes them
54468
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
54469
+ * if one of them is non-breaking, so a space between words stays
54470
+ * @private
54471
+ */ function removeTabSpaces(jodit, caret, upTo = false) {
54472
+ const { spaces } = jodit.o.tab;
54473
+ if (!spaces) {
54474
+ return false;
54475
+ }
54476
+ const range = jodit.s.createRange();
54477
+ range.setEndBefore(caret);
54478
+ let count = 0;
54479
+ let nonBreaking = false;
54480
+ for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
54481
+ let offset = node.length;
54482
+ for(; offset > 0 && count < spaces; offset -= 1){
54483
+ const char = node.data[offset - 1];
54484
+ if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
54485
+ nonBreaking = true;
54486
+ } else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54487
+ break;
54488
+ }
54489
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54490
+ count += 1;
54491
+ }
54492
+ }
54493
+ range.setStart(node, offset);
54494
+ if (offset && count < spaces) {
54495
+ break;
54496
+ }
54497
+ }
54498
+ if (upTo ? !nonBreaking : count < spaces) {
54499
+ return false;
54500
+ }
54501
+ range.deleteContents();
54502
+ // An emptied line keeps a <br>, as after any Backspace, or it has no
54503
+ // height to hold the caret
54504
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54505
+ return true;
54506
+ }
54507
+ /**
54508
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
54509
+ * show it as one space. Tabs in white space that's kept, and those that only
54510
+ * lay out the HTML, stay as they are
54511
+ * @private
54512
+ */ function tabsToSpaces(jodit, html) {
54513
+ var _a;
54514
+ const { spaces } = jodit.o.tab;
54515
+ const current = jodit.s.current();
54516
+ const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
54517
+ if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
54518
+ return;
54519
+ }
54520
+ // A template parses without loading images or running scripts
54521
+ const template = jodit.ed.createElement('template');
54522
+ template.innerHTML = html;
54523
+ const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
54524
+ let changed = false;
54525
+ for(let node = walker.nextNode(); node; node = walker.nextNode()){
54526
+ const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
54527
+ if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
54528
+ node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
54529
+ changed = true;
54530
+ }
54531
+ }
54532
+ return changed ? template.innerHTML : undefined;
54533
+ }
54534
+ /**
54535
+ * The fragment isn't rendered, so this reads the white space its own styles
54536
+ * and tags set. The text of `<style>` and `<script>` isn't shown at all
54537
+ */ function keepsTabs(node) {
54538
+ for(let el = node.parentElement; el; el = el.parentElement){
54539
+ const { whiteSpace } = el.style;
54540
+ if (whiteSpace) {
54541
+ return KEEPS_TABS.has(whiteSpace);
54542
+ }
54543
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
54544
+ return true;
54545
+ }
54546
+ }
54547
+ return false;
54548
+ }
54549
+
54550
+
52378
54551
  /***/ }),
52379
54552
 
52380
54553
  /***/ 66288:
@@ -52389,7 +54562,8 @@ function removeNestedList(jodit, list, li) {
52389
54562
  * @module plugins/tab
52390
54563
  */
52391
54564
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52392
- tabInsideLiInsertNewList: true
54565
+ tabInsideLiInsertNewList: true,
54566
+ spaces: 0
52393
54567
  };
52394
54568
 
52395
54569
 
@@ -52401,9 +54575,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52401
54575
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
52402
54576
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
52403
54577
  /* 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);
54578
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
54579
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
54580
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
54581
+ /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
52407
54582
  /*!
52408
54583
  * Jodit Editor (https://xdsoft.net/jodit/)
52409
54584
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52420,30 +54595,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52420
54595
 
52421
54596
 
52422
54597
 
52423
- class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.Plugin {
52424
- afterInit(jodit) {}
54598
+
54599
+ const MODIFIER_KEYS = new Set([
54600
+ 'Shift',
54601
+ 'Control',
54602
+ 'Alt',
54603
+ 'Meta',
54604
+ 'CapsLock'
54605
+ ]);
54606
+ class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
54607
+ afterInit(jodit) {
54608
+ // Without a namespace it runs ahead of table navigation, which would
54609
+ // take a released Tab
54610
+ jodit.e.on('keydown', this.__onKeyDownFirst, {
54611
+ top: true
54612
+ });
54613
+ }
54614
+ // An Escape that closes a popup has done its job
54615
+ __endRelease() {
54616
+ this.__released = false;
54617
+ }
54618
+ __onKeyDownFirst(event) {
54619
+ const released = this.__released;
54620
+ if (!MODIFIER_KEYS.has(event.key)) {
54621
+ this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
54622
+ }
54623
+ // The browser moves the focus
54624
+ if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
54625
+ this.j.e.stopPropagation('keydown');
54626
+ }
54627
+ }
52425
54628
  __onTab(event) {
52426
- if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
54629
+ 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
54630
  return false;
52428
54631
  }
52429
54632
  }
54633
+ __onBackspace(backspace, fakeNode) {
54634
+ if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
54635
+ return true;
54636
+ }
54637
+ }
54638
+ __onPasteInsert(html) {
54639
+ if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
54640
+ return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
54641
+ }
54642
+ }
52430
54643
  __onCommand(command) {
52431
54644
  if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
52432
54645
  return false;
52433
54646
  }
52434
54647
  }
52435
54648
  __onShift(shift) {
52436
- const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_5__.onTabInsideLi)(this.j, shift);
54649
+ const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
52437
54650
  if (res) {
52438
54651
  this.j.e.fire('afterTab', shift);
52439
54652
  }
52440
54653
  return res;
52441
54654
  }
52442
- beforeDestruct(jodit) {}
54655
+ beforeDestruct(jodit) {
54656
+ jodit.e.off('keydown', this.__onKeyDownFirst);
54657
+ }
54658
+ constructor(){
54659
+ super(...arguments);
54660
+ /**
54661
+ * With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
54662
+ * Tab move the focus on, as in code editors. A modifier key keeps it, and
54663
+ * any other key or a click ends it
54664
+ */ this.__released = false;
54665
+ }
52443
54666
  }
54667
+ __decorate([
54668
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
54669
+ ':mousedown.tab',
54670
+ ':beforePopupClose.tab'
54671
+ ])
54672
+ ], tab.prototype, "__endRelease", null);
54673
+ __decorate([
54674
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
54675
+ ], tab.prototype, "__onKeyDownFirst", null);
52444
54676
  __decorate([
52445
54677
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
52446
54678
  ], tab.prototype, "__onTab", null);
54679
+ __decorate([
54680
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
54681
+ ], tab.prototype, "__onBackspace", null);
54682
+ __decorate([
54683
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
54684
+ ], tab.prototype, "__onPasteInsert", null);
52447
54685
  __decorate([
52448
54686
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
52449
54687
  ], tab.prototype, "__onCommand", null);