jodit-pro 4.18.15 → 4.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/es2015/jodit.css +2 -2
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +19 -13
  4. package/es2015/jodit.js +2535 -266
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +46 -40
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  11. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/chart/chart.css +1 -1
  22. package/es2015/plugins/chart/chart.js +1 -1
  23. package/es2015/plugins/chart/chart.min.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.css +1 -1
  25. package/es2015/plugins/color-picker/color-picker.js +1 -1
  26. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  27. package/es2015/plugins/emoji/emoji.css +1 -1
  28. package/es2015/plugins/emoji/emoji.js +1 -1
  29. package/es2015/plugins/emoji/emoji.min.js +1 -1
  30. package/es2015/plugins/export-docs/export-docs.js +1 -1
  31. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  32. package/es2015/plugins/finder/finder.css +1 -1
  33. package/es2015/plugins/finder/finder.js +1 -1
  34. package/es2015/plugins/finder/finder.min.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.css +1 -1
  36. package/es2015/plugins/google-maps/google-maps.js +1 -1
  37. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  38. package/es2015/plugins/google-search/google-search.js +1 -1
  39. package/es2015/plugins/google-search/google-search.min.js +1 -1
  40. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  41. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  43. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  44. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  46. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  47. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.css +1 -1
  49. package/es2015/plugins/keyboard/keyboard.js +1 -1
  50. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  51. package/es2015/plugins/math/math.css +1 -1
  52. package/es2015/plugins/math/math.js +1 -1
  53. package/es2015/plugins/math/math.min.js +1 -1
  54. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  55. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  56. package/es2015/plugins/page-break/page-break.js +1 -1
  57. package/es2015/plugins/page-break/page-break.min.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.css +1 -1
  59. package/es2015/plugins/paste-code/paste-code.js +1 -1
  60. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  61. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  62. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  63. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  64. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  65. package/es2015/plugins/style/style.css +1 -1
  66. package/es2015/plugins/style/style.js +1 -1
  67. package/es2015/plugins/style/style.min.js +1 -1
  68. package/es2015/plugins/templates/templates.css +1 -1
  69. package/es2015/plugins/templates/templates.js +1 -1
  70. package/es2015/plugins/templates/templates.min.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.css +1 -1
  72. package/es2015/plugins/todo-list/todo-list.js +1 -1
  73. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  74. package/es2015/plugins/translate/translate.css +1 -1
  75. package/es2015/plugins/translate/translate.js +1 -1
  76. package/es2015/plugins/translate/translate.min.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.css +1 -1
  78. package/es2015/plugins/tune-block/tune-block.js +1 -1
  79. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  80. package/es2018/jodit.fat.min.css +1 -1
  81. package/es2018/jodit.fat.min.js +19 -13
  82. package/es2018/jodit.min.css +1 -1
  83. package/es2018/jodit.min.js +18 -12
  84. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  85. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  86. package/es2018/plugins/backup/backup.min.js +1 -1
  87. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  88. package/es2018/plugins/change-case/change-case.min.js +1 -1
  89. package/es2018/plugins/chart/chart.min.js +1 -1
  90. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  91. package/es2018/plugins/emoji/emoji.min.js +1 -1
  92. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  93. package/es2018/plugins/finder/finder.min.js +1 -1
  94. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  95. package/es2018/plugins/google-search/google-search.min.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  99. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  100. package/es2018/plugins/math/math.min.js +1 -1
  101. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  102. package/es2018/plugins/page-break/page-break.min.js +1 -1
  103. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  104. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  105. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  106. package/es2018/plugins/style/style.min.js +1 -1
  107. package/es2018/plugins/templates/templates.min.js +1 -1
  108. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  109. package/es2018/plugins/translate/translate.min.js +1 -1
  110. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  111. package/es2021/jodit.css +2 -2
  112. package/es2021/jodit.fat.min.css +1 -1
  113. package/es2021/jodit.fat.min.js +28 -21
  114. package/es2021/jodit.js +2487 -266
  115. package/es2021/jodit.min.css +1 -1
  116. package/es2021/jodit.min.js +26 -19
  117. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  118. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  119. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  120. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  121. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  122. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  123. package/es2021/plugins/backup/backup.css +1 -1
  124. package/es2021/plugins/backup/backup.js +1 -1
  125. package/es2021/plugins/backup/backup.min.js +1 -1
  126. package/es2021/plugins/button-generator/button-generator.css +1 -1
  127. package/es2021/plugins/button-generator/button-generator.js +1 -1
  128. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  129. package/es2021/plugins/change-case/change-case.js +1 -1
  130. package/es2021/plugins/change-case/change-case.min.js +1 -1
  131. package/es2021/plugins/chart/chart.css +1 -1
  132. package/es2021/plugins/chart/chart.js +1 -1
  133. package/es2021/plugins/chart/chart.min.js +1 -1
  134. package/es2021/plugins/color-picker/color-picker.css +1 -1
  135. package/es2021/plugins/color-picker/color-picker.js +1 -1
  136. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  137. package/es2021/plugins/emoji/emoji.css +1 -1
  138. package/es2021/plugins/emoji/emoji.js +1 -1
  139. package/es2021/plugins/emoji/emoji.min.js +1 -1
  140. package/es2021/plugins/export-docs/export-docs.js +1 -1
  141. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  142. package/es2021/plugins/finder/finder.css +1 -1
  143. package/es2021/plugins/finder/finder.js +1 -1
  144. package/es2021/plugins/finder/finder.min.js +1 -1
  145. package/es2021/plugins/google-maps/google-maps.css +1 -1
  146. package/es2021/plugins/google-maps/google-maps.js +1 -1
  147. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  148. package/es2021/plugins/google-search/google-search.js +1 -1
  149. package/es2021/plugins/google-search/google-search.min.js +1 -1
  150. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  151. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  152. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  153. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  154. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  155. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  156. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  157. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  158. package/es2021/plugins/keyboard/keyboard.css +1 -1
  159. package/es2021/plugins/keyboard/keyboard.js +1 -1
  160. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  161. package/es2021/plugins/math/math.css +1 -1
  162. package/es2021/plugins/math/math.js +1 -1
  163. package/es2021/plugins/math/math.min.js +1 -1
  164. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  165. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  166. package/es2021/plugins/page-break/page-break.js +1 -1
  167. package/es2021/plugins/page-break/page-break.min.js +1 -1
  168. package/es2021/plugins/paste-code/paste-code.css +1 -1
  169. package/es2021/plugins/paste-code/paste-code.js +1 -1
  170. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  171. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  172. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  173. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  174. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  175. package/es2021/plugins/style/style.css +1 -1
  176. package/es2021/plugins/style/style.js +1 -1
  177. package/es2021/plugins/style/style.min.js +1 -1
  178. package/es2021/plugins/templates/templates.css +1 -1
  179. package/es2021/plugins/templates/templates.js +1 -1
  180. package/es2021/plugins/templates/templates.min.js +1 -1
  181. package/es2021/plugins/todo-list/todo-list.css +1 -1
  182. package/es2021/plugins/todo-list/todo-list.js +1 -1
  183. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  184. package/es2021/plugins/translate/translate.css +1 -1
  185. package/es2021/plugins/translate/translate.js +1 -1
  186. package/es2021/plugins/translate/translate.min.js +1 -1
  187. package/es2021/plugins/tune-block/tune-block.css +1 -1
  188. package/es2021/plugins/tune-block/tune-block.js +1 -1
  189. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  190. package/es2021.en/jodit.css +2 -2
  191. package/es2021.en/jodit.fat.min.css +1 -1
  192. package/es2021.en/jodit.fat.min.js +27 -20
  193. package/es2021.en/jodit.js +2487 -266
  194. package/es2021.en/jodit.min.css +1 -1
  195. package/es2021.en/jodit.min.js +24 -17
  196. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  197. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  198. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  199. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  200. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  201. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  202. package/es2021.en/plugins/backup/backup.css +1 -1
  203. package/es2021.en/plugins/backup/backup.js +1 -1
  204. package/es2021.en/plugins/backup/backup.min.js +1 -1
  205. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  206. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  207. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  208. package/es2021.en/plugins/change-case/change-case.js +1 -1
  209. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  210. package/es2021.en/plugins/chart/chart.css +1 -1
  211. package/es2021.en/plugins/chart/chart.js +1 -1
  212. package/es2021.en/plugins/chart/chart.min.js +1 -1
  213. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  214. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  215. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  216. package/es2021.en/plugins/emoji/emoji.css +1 -1
  217. package/es2021.en/plugins/emoji/emoji.js +1 -1
  218. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  219. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  220. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  221. package/es2021.en/plugins/finder/finder.css +1 -1
  222. package/es2021.en/plugins/finder/finder.js +1 -1
  223. package/es2021.en/plugins/finder/finder.min.js +1 -1
  224. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  225. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  226. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  227. package/es2021.en/plugins/google-search/google-search.js +1 -1
  228. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  229. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  230. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  231. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  232. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  233. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  234. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  235. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  236. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  237. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  238. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  239. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  240. package/es2021.en/plugins/math/math.css +1 -1
  241. package/es2021.en/plugins/math/math.js +1 -1
  242. package/es2021.en/plugins/math/math.min.js +1 -1
  243. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  244. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  245. package/es2021.en/plugins/page-break/page-break.js +1 -1
  246. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  247. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  248. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  249. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  250. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  251. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  252. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  253. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  254. package/es2021.en/plugins/style/style.css +1 -1
  255. package/es2021.en/plugins/style/style.js +1 -1
  256. package/es2021.en/plugins/style/style.min.js +1 -1
  257. package/es2021.en/plugins/templates/templates.css +1 -1
  258. package/es2021.en/plugins/templates/templates.js +1 -1
  259. package/es2021.en/plugins/templates/templates.min.js +1 -1
  260. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  261. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  262. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  263. package/es2021.en/plugins/translate/translate.css +1 -1
  264. package/es2021.en/plugins/translate/translate.js +1 -1
  265. package/es2021.en/plugins/translate/translate.min.js +1 -1
  266. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  267. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  268. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  269. package/es5/jodit.css +3 -3
  270. package/es5/jodit.fat.min.css +1 -1
  271. package/es5/jodit.fat.min.js +2 -2
  272. package/es5/jodit.js +3330 -412
  273. package/es5/jodit.min.css +3 -3
  274. package/es5/jodit.min.js +2 -2
  275. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  276. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  277. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  278. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  279. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  280. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  281. package/es5/plugins/backup/backup.css +1 -1
  282. package/es5/plugins/backup/backup.js +1 -1
  283. package/es5/plugins/backup/backup.min.js +1 -1
  284. package/es5/plugins/button-generator/button-generator.css +1 -1
  285. package/es5/plugins/button-generator/button-generator.js +1 -1
  286. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  287. package/es5/plugins/change-case/change-case.js +1 -1
  288. package/es5/plugins/change-case/change-case.min.js +1 -1
  289. package/es5/plugins/chart/chart.css +1 -1
  290. package/es5/plugins/chart/chart.js +1 -1
  291. package/es5/plugins/chart/chart.min.js +1 -1
  292. package/es5/plugins/color-picker/color-picker.css +1 -1
  293. package/es5/plugins/color-picker/color-picker.js +1 -1
  294. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  295. package/es5/plugins/emoji/emoji.css +1 -1
  296. package/es5/plugins/emoji/emoji.js +1 -1
  297. package/es5/plugins/emoji/emoji.min.js +1 -1
  298. package/es5/plugins/export-docs/export-docs.js +1 -1
  299. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  300. package/es5/plugins/finder/finder.css +1 -1
  301. package/es5/plugins/finder/finder.js +1 -1
  302. package/es5/plugins/finder/finder.min.js +1 -1
  303. package/es5/plugins/google-maps/google-maps.css +1 -1
  304. package/es5/plugins/google-maps/google-maps.js +1 -1
  305. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  306. package/es5/plugins/google-search/google-search.js +1 -1
  307. package/es5/plugins/google-search/google-search.min.js +1 -1
  308. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  309. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  310. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  311. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  312. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  313. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  314. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  315. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  316. package/es5/plugins/keyboard/keyboard.css +1 -1
  317. package/es5/plugins/keyboard/keyboard.js +1 -1
  318. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  319. package/es5/plugins/math/math.css +1 -1
  320. package/es5/plugins/math/math.js +1 -1
  321. package/es5/plugins/math/math.min.js +1 -1
  322. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  323. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  324. package/es5/plugins/page-break/page-break.js +1 -1
  325. package/es5/plugins/page-break/page-break.min.js +1 -1
  326. package/es5/plugins/paste-code/paste-code.css +1 -1
  327. package/es5/plugins/paste-code/paste-code.js +1 -1
  328. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  329. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  330. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  331. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  332. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  333. package/es5/plugins/style/style.css +1 -1
  334. package/es5/plugins/style/style.js +1 -1
  335. package/es5/plugins/style/style.min.js +1 -1
  336. package/es5/plugins/templates/templates.css +1 -1
  337. package/es5/plugins/templates/templates.js +1 -1
  338. package/es5/plugins/templates/templates.min.js +1 -1
  339. package/es5/plugins/todo-list/todo-list.css +1 -1
  340. package/es5/plugins/todo-list/todo-list.js +1 -1
  341. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  342. package/es5/plugins/translate/translate.css +1 -1
  343. package/es5/plugins/translate/translate.js +1 -1
  344. package/es5/plugins/translate/translate.min.js +1 -1
  345. package/es5/plugins/tune-block/tune-block.css +1 -1
  346. package/es5/plugins/tune-block/tune-block.js +1 -1
  347. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  348. package/es5/polyfills.fat.min.js +1 -1
  349. package/es5/polyfills.js +1 -1
  350. package/es5/polyfills.min.js +1 -1
  351. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.15
4
+ * Version: v4.19.2
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -741,7 +741,8 @@ let ConfigPrototype = {};
741
741
  * spaces. An alignment can also list several such sets, to recognise each
742
742
  * of them; aligning writes the first. A media wrapper (see
743
743
  * `mediaWrappers`), and Jodit's own `jodit` and `jodit-media` wrappers,
744
- * are aligned with the classes for the media in them.
744
+ * are aligned with the classes for the media in them, and a captioned
745
+ * image's wrapper (see `imageCaption`) with those for `img`.
745
746
  *
746
747
  * ```javascript
747
748
  * const media = {
@@ -1767,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
1767
1768
  * ```
1768
1769
  * @packageDocumentation
1769
1770
  * @module constants
1770
- */ const APP_VERSION = "4.18.15";
1771
+ */ const APP_VERSION = "4.19.2";
1771
1772
  // prettier-ignore
1772
1773
  const ES = "es2021";
1773
1774
  const IS_ES_MODERN = true;
@@ -3167,7 +3168,10 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
3167
3168
  /**
3168
3169
  * The node is editable
3169
3170
  */ static isContentEditable(node, root) {
3170
- return Dom.isNode(node) && !Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false', root);
3171
+ // The nearest element that says decides, as an editable caption inside
3172
+ // a non-editable figure is editable
3173
+ const host = Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.hasAttribute('contenteditable'), root);
3174
+ return Dom.isNode(node) && (host === null || host === void 0 ? void 0 : host.getAttribute('contenteditable')) !== 'false';
3171
3175
  }
3172
3176
  static isEmpty(node, condNoEmptyElement = _constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS) {
3173
3177
  if (!node) {
@@ -3905,6 +3909,7 @@ __decorate([
3905
3909
  'screenY',
3906
3910
  'clientX',
3907
3911
  'clientY',
3912
+ 'view',
3908
3913
  'target',
3909
3914
  'srcElement',
3910
3915
  'currentTarget',
@@ -6537,6 +6542,7 @@ __webpack_require__.r(__webpack_exports__);
6537
6542
  /* harmony export */ cleanFromWord: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord; },
6538
6543
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearAlign; },
6539
6544
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearCenterAlign; },
6545
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearHAlign; },
6540
6546
  /* harmony export */ clearTimeout: function() { return /* reexport safe */ _async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout; },
6541
6547
  /* harmony export */ cns: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cns; },
6542
6548
  /* harmony export */ colorToHex: function() { return /* reexport safe */ _color_index_js__WEBPACK_IMPORTED_MODULE_3__.colorToHex; },
@@ -6555,11 +6561,14 @@ __webpack_require__.r(__webpack_exports__);
6555
6561
  /* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
6556
6562
  /* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
6557
6563
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
6564
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionWrapper; },
6565
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionedImage; },
6558
6566
  /* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
6559
6567
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
6560
6568
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
6561
6569
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
6562
6570
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
6571
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getImageCaption; },
6563
6572
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
6564
6573
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
6565
6574
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
@@ -7666,6 +7675,7 @@ function trimChars(value, chars) {
7666
7675
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7667
7676
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
7668
7677
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
7678
+ /* harmony export */ clearHAlign: function() { return /* binding */ clearHAlign; },
7669
7679
  /* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
7670
7680
  /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
7671
7681
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
@@ -7674,7 +7684,8 @@ function trimChars(value, chars) {
7674
7684
  /* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
7675
7685
  /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
7676
7686
  /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
7677
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
7687
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
7688
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
7678
7689
  /*!
7679
7690
  * Jodit Editor (https://xdsoft.net/jodit/)
7680
7691
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7684,6 +7695,7 @@ function trimChars(value, chars) {
7684
7695
 
7685
7696
 
7686
7697
 
7698
+
7687
7699
  // The sets of class names an alignment lists, the first being the one to write
7688
7700
  const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
7689
7701
  value !== null && value !== void 0 ? value : ''
@@ -7691,17 +7703,17 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7691
7703
  /**
7692
7704
  * The class names to align `elm` with: `alignClasses` for its tag, or for the
7693
7705
  * media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
7694
- * `jodit-media`)
7706
+ * `jodit-media`) or a captioned image (see `imageCaption`)
7695
7707
  */ function getAlignClasses(jodit, elm) {
7696
- var _a, _b;
7708
+ var _a, _b, _c;
7697
7709
  if (!elm) {
7698
7710
  return null;
7699
7711
  }
7700
7712
  const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
7701
7713
  'jodit',
7702
7714
  'jodit-media'
7703
- ])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
7704
- return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _b !== void 0 ? _b : null;
7715
+ ])) ? elm.firstElementChild : (_a = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm)) !== null && _a !== void 0 ? _a : (0,_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, elm);
7716
+ return (_c = (_b = jodit.o.alignClasses) === null || _b === void 0 ? void 0 : _b[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _c !== void 0 ? _c : null;
7705
7717
  }
7706
7718
  /**
7707
7719
  * Align image, with `classes` (see `alignClasses`) instead of inline styles
@@ -7709,18 +7721,8 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7709
7721
  */ function hAlignElement(image, align, classes) {
7710
7722
  var _a;
7711
7723
  if (classes) {
7712
- hAlignElement(image, 'normal');
7713
- Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
7724
+ clearHAlign(image, classes);
7714
7725
  image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
7715
- [
7716
- 'class',
7717
- 'style'
7718
- ].forEach((name)=>{
7719
- var _a;
7720
- if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7721
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
7722
- }
7723
- });
7724
7726
  return;
7725
7727
  }
7726
7728
  if (align && align !== 'normal') {
@@ -7745,6 +7747,24 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7745
7747
  ;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
7746
7748
  }
7747
7749
  }
7750
+ /**
7751
+ * Remove the alignment `hAlignElement` set on an element, with the classes of
7752
+ * every alignment in `classes`
7753
+ */ function clearHAlign(elm, classes) {
7754
+ hAlignElement(elm, 'normal');
7755
+ if (classes) {
7756
+ Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>elm.classList.remove(...set)));
7757
+ }
7758
+ [
7759
+ 'class',
7760
+ 'style'
7761
+ ].forEach((name)=>{
7762
+ var _a;
7763
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7764
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name, null);
7765
+ }
7766
+ });
7767
+ }
7748
7768
  /**
7749
7769
  * The alignment `hAlignElement` has set on an element
7750
7770
  */ function getHAlign(elm, classes) {
@@ -8876,21 +8896,70 @@ const getClassName = (obj)=>{
8876
8896
  /* harmony export */ ]);
8877
8897
 
8878
8898
 
8899
+ /***/ }),
8900
+
8901
+ /***/ 68645:
8902
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8903
+
8904
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8905
+ /* harmony export */ getCaptionWrapper: function() { return /* binding */ getCaptionWrapper; },
8906
+ /* harmony export */ getCaptionedImage: function() { return /* binding */ getCaptionedImage; },
8907
+ /* harmony export */ getImageCaption: function() { return /* binding */ getImageCaption; }
8908
+ /* harmony export */ });
8909
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
8910
+ /* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
8911
+ /*!
8912
+ * Jodit Editor (https://xdsoft.net/jodit/)
8913
+ * Released under MIT see LICENSE.txt in the project root for license information.
8914
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8915
+ */
8916
+
8917
+ const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === part.tag.toLowerCase() && (!part.className || node.classList.contains(part.className));
8918
+ /**
8919
+ * The caption in `wrapper`, an element holding an image and its caption (see
8920
+ * `imageCaption`)
8921
+ */ function getImageCaption(jodit, wrapper) {
8922
+ var _a;
8923
+ const markup = jodit.o.imageCaption;
8924
+ if (!markup || !isPart(wrapper, markup.wrapper)) {
8925
+ return null;
8926
+ }
8927
+ return (_a = (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(wrapper.getElementsByTagName(markup.caption.tag)).find((elm)=>isPart(elm, markup.caption))) !== null && _a !== void 0 ? _a : null;
8928
+ }
8929
+ /**
8930
+ * The image in `wrapper` when it is an element holding one image and its
8931
+ * caption (see `imageCaption`)
8932
+ */ function getCaptionedImage(jodit, wrapper) {
8933
+ const caption = getImageCaption(jodit, wrapper);
8934
+ if (!caption) {
8935
+ return null;
8936
+ }
8937
+ const images = wrapper.getElementsByTagName('img');
8938
+ return images.length === 1 && !caption.contains(images[0]) ? images[0] : null;
8939
+ }
8940
+ /**
8941
+ * The element holding an image and its caption (see `imageCaption`) that is
8942
+ * or holds `node`
8943
+ */ function getCaptionWrapper(jodit, node) {
8944
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getCaptionedImage(jodit, elm)), jodit.editor);
8945
+ }
8946
+
8947
+
8879
8948
  /***/ }),
8880
8949
 
8881
8950
  /***/ 43555:
8882
8951
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8883
8952
 
8884
8953
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8885
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.$$; },
8954
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.$$; },
8886
8955
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8887
8956
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8888
8957
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8889
8958
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8890
8959
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8891
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8960
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_29__.LimitedStack; },
8892
8961
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8893
- /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8962
+ /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.UNSAFE_PROTO_KEYS; },
8894
8963
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
8895
8964
  /* harmony export */ alignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.alignElement; },
8896
8965
  /* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.alreadyLoadedList; },
@@ -8901,19 +8970,20 @@ const getClassName = (obj)=>{
8901
8970
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8902
8971
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8903
8972
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8904
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.call; },
8905
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8906
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8973
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.call; },
8974
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callPromise; },
8975
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callThis; },
8907
8976
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8908
8977
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8909
- /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
8978
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearHAlign; },
8979
+ /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.cns; },
8910
8980
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
8911
8981
  /* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
8912
8982
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
8913
- /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8983
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.createMediaWrapper; },
8914
8984
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8915
8985
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8916
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8986
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.cssPath; },
8917
8987
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8918
8988
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8919
8989
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8921,38 +8991,41 @@ const getClassName = (obj)=>{
8921
8991
  /* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
8922
8992
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8923
8993
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8994
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionWrapper; },
8995
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionedImage; },
8924
8996
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8925
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8997
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getDataTransfer; },
8926
8998
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8927
- /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8928
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8929
- /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8930
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8999
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getImageCaption; },
9000
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getMediaWrapper; },
9001
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getPropertyDescriptor; },
9002
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getWrappedMedia; },
9003
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.getXPathByElement; },
8931
9004
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8932
9005
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8933
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.inView; },
9006
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.inView; },
8934
9007
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8935
- /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
9008
+ /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.isUnsafeProtoKey; },
8936
9009
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8937
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.keys; },
8938
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
9010
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.keys; },
9011
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.loadImage; },
8939
9012
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8940
9013
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8941
9014
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8942
- /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8943
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8944
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
9015
+ /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.markDeprecated; },
9016
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.markOwner; },
9017
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.memorizeExec; },
8945
9018
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
8946
- /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8947
- /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8948
- /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8949
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8950
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.refs; },
8951
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_24__.reset; },
8952
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8953
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8954
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_27__.set; },
8955
- /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
9019
+ /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_22__.parseQuery; },
9020
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareEmbedCode; },
9021
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareMedia; },
9022
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_24__.previewBox; },
9023
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.refs; },
9024
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_25__.reset; },
9025
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.resolveElement; },
9026
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.scrollIntoViewIfNeeded; },
9027
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_28__.set; },
9028
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.wrapMedia; }
8956
9029
  /* harmony export */ });
8957
9030
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
8958
9031
  /* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
@@ -8972,18 +9045,19 @@ const getClassName = (obj)=>{
8972
9045
  /* harmony import */ var _get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(94643);
8973
9046
  /* harmony import */ var _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(80568);
8974
9047
  /* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
8975
- /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
8976
- /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
8977
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
8978
- /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
8979
- /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(96437);
8980
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(11628);
8981
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(58844);
8982
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26395);
8983
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76078);
8984
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(3703);
8985
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(50535);
8986
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(37790);
9048
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(68645);
9049
+ /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(69175);
9050
+ /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(95942);
9051
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(61477);
9052
+ /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82501);
9053
+ /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(96437);
9054
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(11628);
9055
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58844);
9056
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(26395);
9057
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76078);
9058
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(3703);
9059
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(50535);
9060
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(37790);
8987
9061
  /*!
8988
9062
  * Jodit Editor (https://xdsoft.net/jodit/)
8989
9063
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9020,6 +9094,7 @@ const getClassName = (obj)=>{
9020
9094
 
9021
9095
 
9022
9096
 
9097
+
9023
9098
 
9024
9099
 
9025
9100
  /***/ }),
@@ -11537,7 +11612,10 @@ class Selection {
11537
11612
  /**
11538
11613
  * Checks whether the editor currently in focus
11539
11614
  */ isFocused() {
11540
- return this.doc.hasFocus && this.doc.hasFocus() && this.area === this.doc.activeElement;
11615
+ const active = this.doc.activeElement;
11616
+ // An editable element inside the editor, as an image's caption, has the
11617
+ // focus while the caret is in it
11618
+ return Boolean(this.doc.hasFocus && this.doc.hasFocus() && active && (this.area === active || _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(active) && active.isContentEditable && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, active)));
11541
11619
  }
11542
11620
  /**
11543
11621
  * Returns the current element under the cursor inside editor
@@ -12005,12 +12083,21 @@ class Selection {
12005
12083
  * there: the arrow keys then have nothing to move from and the selection
12006
12084
  * cannot be escaped. Selecting the island itself keeps the range in editable
12007
12085
  * content, so the caret can step over it. See #1184
12086
+ *
12087
+ * An editable element inside an island, as an image's caption, is editable
12088
+ * content of its own, so the search stops there.
12008
12089
  */ __closestNotEditable(node) {
12009
12090
  const { area } = this;
12010
12091
  let result = null, elm = node.parentNode;
12011
12092
  while(elm && elm !== area && area.contains(elm)){
12012
- if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false') {
12013
- result = elm;
12093
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm)) {
12094
+ const editable = elm.getAttribute('contenteditable');
12095
+ if (editable === 'true') {
12096
+ break;
12097
+ }
12098
+ if (editable === 'false') {
12099
+ result = elm;
12100
+ }
12014
12101
  }
12015
12102
  elm = elm.parentNode;
12016
12103
  }
@@ -12946,7 +13033,7 @@ function elementsEqualAttributes(elm1, elm2) {
12946
13033
  /**
12947
13034
  * Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
12948
13035
  * @private
12949
- */ function toggleOrderedList(commitStyle, li, jodit, mode) {
13036
+ */ function toggleOrderedList(commitStyle, li, jodit, mode, collapsed = false) {
12950
13037
  if (!li) {
12951
13038
  return mode;
12952
13039
  }
@@ -12975,16 +13062,36 @@ function elementsEqualAttributes(elm1, elm2) {
12975
13062
  }
12976
13063
  // ul => ol, ol => ul or ul => ul.class1
12977
13064
  if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
12978
- const wrapper = unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, list, li, jodit, commitStyle);
12979
- const newList = (0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, wrapper, jodit);
13065
+ // With just a caret, Word converts the whole list
13066
+ const items = collapsed && !isSameList ? Array.from(list.children).filter((item)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(item)) : [
13067
+ li
13068
+ ];
13069
+ let newList;
13070
+ for (const item of items){
13071
+ newList = keepNumbering(item, (itemList)=>(0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, itemList, item, jodit, commitStyle), jodit));
13072
+ }
12980
13073
  hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
12981
13074
  return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
12982
13075
  }
12983
13076
  }
12984
- const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"), list, li, jodit, commitStyle);
13077
+ const wrapper = keepNumbering(li, (itemList)=>unwrapList((/* inlined export .UNWRAP */"unwrap"), itemList, li, jodit, commitStyle));
12985
13078
  hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
12986
13079
  return (/* inlined export .UNWRAP */"unwrap");
12987
13080
  }
13081
+ /**
13082
+ * Takes `item` out of its list with `takeOut`, and carries a numbered list's
13083
+ * count on past it, as Word does: 1, a bullet, then 2
13084
+ */ function keepNumbering(item, takeOut) {
13085
+ const list = item.parentElement;
13086
+ const rest = item.nextElementSibling;
13087
+ const next = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol') ? (parseInt(list.getAttribute('start') || '1', 10) || 1) + Array.from(list.children).indexOf(item) : 0;
13088
+ const result = takeOut(list);
13089
+ const restList = rest === null || rest === void 0 ? void 0 : rest.parentElement;
13090
+ if (next && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(restList, 'ol')) {
13091
+ next > 1 ? restList.setAttribute('start', String(next)) : restList.removeAttribute('start');
13092
+ }
13093
+ return result;
13094
+ }
12988
13095
  /**
12989
13096
  * Other attributes, such as a class, still move the items into a new list,
12990
13097
  * where the `beforeWrapList` hook can add markup to each of them
@@ -13745,7 +13852,7 @@ const transactions = {
13745
13852
  exec (value) {
13746
13853
  return {
13747
13854
  ...value,
13748
- mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode),
13855
+ mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode, value.collapsed),
13749
13856
  next: states.END
13750
13857
  };
13751
13858
  }
@@ -16672,6 +16779,35 @@ UISpacer = __decorate([
16672
16779
  /* harmony export */ ]);
16673
16780
 
16674
16781
 
16782
+ /***/ }),
16783
+
16784
+ /***/ 20014:
16785
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
16786
+
16787
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16788
+ /* harmony export */ focusFormField: function() { return /* binding */ focusFormField; }
16789
+ /* harmony export */ });
16790
+ /* harmony import */ var _helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4510);
16791
+ /*!
16792
+ * Jodit Editor (https://xdsoft.net/jodit/)
16793
+ * Released under MIT see LICENSE.txt in the project root for license information.
16794
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
16795
+ */ /**
16796
+ * @module ui
16797
+ */
16798
+ /**
16799
+ * Focuses the first text field shown in a form inside `box`, so that typing
16800
+ * fills it in rather than replacing the selected content, as in a dialog. A
16801
+ * form round `box`, as the image properties dialog's round its tabs, doesn't
16802
+ * count, and neither do fields outside a form, as the color picker's
16803
+ */ function focusFormField(box) {
16804
+ var _a;
16805
+ (_a = (0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(box.getElementsByTagName('form')).flatMap((form)=>(0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(form.querySelectorAll('input:not([type]), input[type="text"], input[type="url"], textarea'))).find((field)=>field.offsetParent)) === null || _a === void 0 ? void 0 : _a.focus({
16806
+ preventScroll: true
16807
+ });
16808
+ }
16809
+
16810
+
16675
16811
  /***/ }),
16676
16812
 
16677
16813
  /***/ 72157:
@@ -17999,6 +18135,12 @@ var Jodit_1;
17999
18135
 
18000
18136
 
18001
18137
 
18138
+ const FOCUS_EVENTS = new Set([
18139
+ 'focus',
18140
+ 'blur',
18141
+ 'focusin',
18142
+ 'focusout'
18143
+ ]);
18002
18144
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18003
18145
  const __defaultClassesKey = 'data-jodit-default-classes';
18004
18146
  const NOEDIT = {
@@ -19038,16 +19180,30 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19038
19180
  if (place) {
19039
19181
  this.setCurrentPlace(place);
19040
19182
  }
19041
- }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur', (event)=>{
19183
+ }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur focusin focusout', (event)=>{
19042
19184
  if (this.o.readonly || this.__isSilentChange) {
19043
19185
  return;
19044
19186
  }
19187
+ let type = event.type;
19188
+ // `focus` and `blur` don't bubble from an editable element inside
19189
+ // the editor, as an image's caption, so `focusin` and `focusout`
19190
+ // stand in for them there. The focus moving between the editor
19191
+ // and such an element stays in the editor
19192
+ if (FOCUS_EVENTS.has(type)) {
19193
+ const inner = type === 'focusin' || type === 'focusout';
19194
+ if (inner === (event.target === editor) || _modules_index_js__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(editor, event.relatedTarget)) {
19195
+ return;
19196
+ }
19197
+ if (inner) {
19198
+ type = type === 'focusin' ? 'focus' : 'blur';
19199
+ }
19200
+ }
19045
19201
  const w = this.ew;
19046
19202
  if (event instanceof w.KeyboardEvent && event.isComposing) {
19047
19203
  return;
19048
19204
  }
19049
19205
  if (this.e && this.e.fire) {
19050
- if (this.e.fire(event.type, event) === false) {
19206
+ if (this.e.fire(type, event) === false) {
19051
19207
  return false;
19052
19208
  }
19053
19209
  this.synchronizeValues();
@@ -19353,6 +19509,7 @@ function addClassNames(className, elm) {
19353
19509
  Src: 'Src',
19354
19510
  Title: 'العنوان',
19355
19511
  Alternative: 'العنوان البديل',
19512
+ Caption: 'تسمية توضيحية',
19356
19513
  Link: 'الرابط',
19357
19514
  'Open link in new tab': 'افتح الرابط في نافذة جديدة',
19358
19515
  Image: 'الصورة',
@@ -19384,6 +19541,7 @@ function addClassNames(className, elm) {
19384
19541
  'Insert column after': 'إدراج عمود بعد',
19385
19542
  'Insert row above': 'إدراج صف أعلى',
19386
19543
  'Insert row below': 'إدراج صف أسفل',
19544
+ 'Header row': 'صف الرأس',
19387
19545
  'Delete table': 'حذف الجدول',
19388
19546
  'Delete row': 'حذف الصف',
19389
19547
  'Delete column': 'حذف العمود',
@@ -19597,6 +19755,7 @@ function addClassNames(className, elm) {
19597
19755
  Src: 'Mənbə',
19598
19756
  Title: 'Başlıq',
19599
19757
  Alternative: 'Alternativ mətn',
19758
+ Caption: 'Şəkilaltı yazı',
19600
19759
  Link: 'Keçid',
19601
19760
  'Open link in new tab': 'Keçidi yeni vərəqdə aç',
19602
19761
  Image: 'Şəkil',
@@ -19635,6 +19794,7 @@ function addClassNames(className, elm) {
19635
19794
  'Insert column after': 'Sonrasına sütun əlavə et',
19636
19795
  'Insert row above': 'Yuxarıya sətir əlavə et',
19637
19796
  'Insert row below': 'Aşağıya sətir əlavə et',
19797
+ 'Header row': 'Başlıq sətri',
19638
19798
  'Delete table': 'Cədvəli sil',
19639
19799
  'Delete row': 'Sətri sil',
19640
19800
  'Delete column': 'Sütunu sil',
@@ -19838,6 +19998,7 @@ function addClassNames(className, elm) {
19838
19998
  Src: 'src',
19839
19999
  Title: 'Titulek',
19840
20000
  Alternative: 'Alternativní text (alt)',
20001
+ Caption: 'Titulek',
19841
20002
  Link: 'Link',
19842
20003
  'Open link in new tab': 'Otevřít link v nové záložce',
19843
20004
  Image: 'Obrázek',
@@ -19877,6 +20038,7 @@ function addClassNames(className, elm) {
19877
20038
  'Insert column after': 'Vložit sloupec za',
19878
20039
  'Insert row above': 'Vložit řádek nad',
19879
20040
  'Insert row below': 'Vložit řádek pod',
20041
+ 'Header row': 'Řádek záhlaví',
19880
20042
  'Delete table': 'Vymazat tabulku',
19881
20043
  'Delete row': 'Vymazat řádku',
19882
20044
  'Delete column': 'Vymazat sloupec',
@@ -20075,6 +20237,7 @@ function addClassNames(className, elm) {
20075
20237
  Src: 'Pfad',
20076
20238
  Title: 'Titel',
20077
20239
  Alternative: 'Alternativer Text',
20240
+ Caption: 'Beschriftung',
20078
20241
  Link: 'Link',
20079
20242
  'Open link in new tab': 'Link in neuem Tab öffnen',
20080
20243
  Image: 'Bild',
@@ -20113,6 +20276,7 @@ function addClassNames(className, elm) {
20113
20276
  'Insert column after': 'Spalte danach einfügen',
20114
20277
  'Insert row above': 'Zeile oberhalb einfügen',
20115
20278
  'Insert row below': 'Zeile unterhalb einfügen',
20279
+ 'Header row': 'Kopfzeile',
20116
20280
  'Delete table': 'Tabelle löschen',
20117
20281
  'Delete row': 'Zeile löschen',
20118
20282
  'Delete column': 'Spalte löschen',
@@ -20333,6 +20497,7 @@ function addClassNames(className, elm) {
20333
20497
  Src: 'Fuente',
20334
20498
  Title: 'Título',
20335
20499
  Alternative: 'Texto Alternativo',
20500
+ Caption: 'Leyenda',
20336
20501
  Filter: 'Filtrar',
20337
20502
  Link: 'Vínculo',
20338
20503
  'Open link in new tab': 'Abrir vínculo en nueva pestaña',
@@ -20372,6 +20537,7 @@ function addClassNames(className, elm) {
20372
20537
  'Insert column after': 'Interar columna después',
20373
20538
  'Insert row above': 'Insertar fila arriba',
20374
20539
  'Insert row below': 'Insertar fila debajo',
20540
+ 'Header row': 'Fila de encabezado',
20375
20541
  'Delete table': 'Borrar tabla',
20376
20542
  'Delete row': 'Borrar fila',
20377
20543
  'Delete column': 'Borrar columna',
@@ -20574,6 +20740,7 @@ function addClassNames(className, elm) {
20574
20740
  Src: 'سورس',
20575
20741
  Title: 'عنوان',
20576
20742
  Alternative: 'جایگزین',
20743
+ Caption: 'زیرنویس',
20577
20744
  Link: 'لینک',
20578
20745
  'Open link in new tab': 'باز کزدن لینک در تب جدید',
20579
20746
  Image: 'عکس',
@@ -20612,6 +20779,7 @@ function addClassNames(className, elm) {
20612
20779
  'Insert column after': 'افزودن ستون بعد از',
20613
20780
  'Insert row above': 'افزودن خط قبل از',
20614
20781
  'Insert row below': 'افزودن خط بعد از',
20782
+ 'Header row': 'خط سرآیند',
20615
20783
  'Delete table': 'حذف جدول',
20616
20784
  'Delete row': 'حذف خط',
20617
20785
  'Delete column': 'حذف ستون',
@@ -20810,6 +20978,7 @@ function addClassNames(className, elm) {
20810
20978
  Src: 'Fuente',
20811
20979
  Title: 'Otsikko',
20812
20980
  Alternative: 'Vaihtoehtoinen teksti',
20981
+ Caption: 'Kuvateksti',
20813
20982
  Filter: 'Suodatin',
20814
20983
  Link: 'Linkki',
20815
20984
  'Open link in new tab': 'Avaa uudessa välilehdessä',
@@ -20849,6 +21018,7 @@ function addClassNames(className, elm) {
20849
21018
  'Insert column after': 'Lisää sarake jälkeen',
20850
21019
  'Insert row above': 'Lisää rivi ylös',
20851
21020
  'Insert row below': 'Lisää rivi alle',
21021
+ 'Header row': 'Otsikkorivi',
20852
21022
  'Delete table': 'Poista taulukko',
20853
21023
  'Delete row': 'Poista rivi',
20854
21024
  'Delete column': 'Poista sarake',
@@ -21051,6 +21221,7 @@ function addClassNames(className, elm) {
21051
21221
  Src: 'Source',
21052
21222
  Title: 'Titre',
21053
21223
  Alternative: 'Alternative',
21224
+ Caption: 'Légende',
21054
21225
  Filter: 'Filtre',
21055
21226
  Link: 'Lien',
21056
21227
  'Open link in new tab': 'Ouvrir le lien dans un nouvel onglet',
@@ -21092,6 +21263,7 @@ function addClassNames(className, elm) {
21092
21263
  'Insert column after': 'Insérer une colonne après',
21093
21264
  'Insert row above': 'Insérer une ligne au dessus',
21094
21265
  'Insert row below': 'Insérer une ligne en dessous',
21266
+ 'Header row': 'Ligne d’en-tête',
21095
21267
  'Delete table': 'Supprimer le tableau',
21096
21268
  'Delete row': 'Supprimer la ligne',
21097
21269
  'Delete column': 'Supprimer la colonne',
@@ -21288,6 +21460,7 @@ function addClassNames(className, elm) {
21288
21460
  Src: 'מקור',
21289
21461
  Title: 'כותרת',
21290
21462
  Alternative: 'כיתוב חלופי',
21463
+ Caption: 'כיתוב',
21291
21464
  Link: 'קישור',
21292
21465
  'Open link in new tab': 'פתח בכרטיסיה חדשה',
21293
21466
  Image: 'תמונה',
@@ -21326,6 +21499,7 @@ function addClassNames(className, elm) {
21326
21499
  'Insert column after': 'הכנס עמודה אחרי',
21327
21500
  'Insert row above': 'הכנס שורה מעל',
21328
21501
  'Insert row below': 'הכנס שורה מתחת',
21502
+ 'Header row': 'שורת כותרת',
21329
21503
  'Delete table': 'מחק טבלה',
21330
21504
  'Delete row': 'מחק שורה',
21331
21505
  'Delete column': 'מחק עמודה',
@@ -21526,6 +21700,7 @@ function addClassNames(className, elm) {
21526
21700
  Src: 'Forrás',
21527
21701
  Title: 'Cím',
21528
21702
  Alternative: 'Helyettesítő szöveg',
21703
+ Caption: 'Képaláírás',
21529
21704
  Link: 'Link',
21530
21705
  'Open link in new tab': 'Link megnyitása új lapon',
21531
21706
  Image: 'Kép',
@@ -21564,6 +21739,7 @@ function addClassNames(className, elm) {
21564
21739
  'Insert column after': 'Oszlop beszúrás utána',
21565
21740
  'Insert row above': 'Sor beszúrás fölé',
21566
21741
  'Insert row below': 'Sor beszúrás alá',
21742
+ 'Header row': 'Fejlécsor',
21567
21743
  'Delete table': 'Táblázat törlése',
21568
21744
  'Delete row': 'Sor törlése',
21569
21745
  'Delete column': 'Oszlop törlése',
@@ -21762,6 +21938,7 @@ function addClassNames(className, elm) {
21762
21938
  Src: 'Src',
21763
21939
  Title: 'Judul',
21764
21940
  Alternative: 'Teks alternatif',
21941
+ Caption: 'Keterangan',
21765
21942
  Link: 'Tautan',
21766
21943
  'Open link in new tab': 'Buka tautan di tab baru',
21767
21944
  Image: 'Gambar',
@@ -21801,6 +21978,7 @@ function addClassNames(className, elm) {
21801
21978
  'Insert column after': 'Sisipkan kolom setelahnya',
21802
21979
  'Insert row above': 'Sisipkan baris di atasnya',
21803
21980
  'Insert row below': 'Sisipkan baris di bawahnya',
21981
+ 'Header row': 'Baris header',
21804
21982
  'Delete table': 'Hapus tabel',
21805
21983
  'Delete row': 'Hapus baris',
21806
21984
  'Delete column': 'Hapus kolom',
@@ -21999,6 +22177,7 @@ function addClassNames(className, elm) {
21999
22177
  Src: 'Fonte',
22000
22178
  Title: 'Titolo',
22001
22179
  Alternative: 'Testo Alternativo',
22180
+ Caption: 'Didascalia',
22002
22181
  Link: 'Link',
22003
22182
  'Open link in new tab': 'Apri il link in una nuova scheda',
22004
22183
  Image: 'Immagine',
@@ -22037,6 +22216,7 @@ function addClassNames(className, elm) {
22037
22216
  'Insert column after': 'Inserisci la colonna dopo',
22038
22217
  'Insert row above': 'Inserisci la riga sopra',
22039
22218
  'Insert row below': 'Inserisci la riga sotto',
22219
+ 'Header row': 'Riga di intestazione',
22040
22220
  'Delete table': 'Elimina tabella',
22041
22221
  'Delete row': 'Elimina riga',
22042
22222
  'Delete column': 'Elimina colonna',
@@ -22240,6 +22420,7 @@ function addClassNames(className, elm) {
22240
22420
  Src: 'ソース',
22241
22421
  Title: 'タイトル',
22242
22422
  Alternative: '代替テキスト',
22423
+ Caption: 'キャプション',
22243
22424
  Link: 'リンク',
22244
22425
  'Open link in new tab': '新しいタブで開く',
22245
22426
  Image: '画像',
@@ -22278,6 +22459,7 @@ function addClassNames(className, elm) {
22278
22459
  'Insert column after': '右に列を挿入',
22279
22460
  'Insert row above': '上に行を挿入',
22280
22461
  'Insert row below': '下に行を挿入',
22462
+ 'Header row': 'ヘッダー行',
22281
22463
  'Delete table': '表を削除',
22282
22464
  'Delete row': '行を削除',
22283
22465
  'Delete column': '列を削除',
@@ -22492,6 +22674,7 @@ function addClassNames(className, elm) {
22492
22674
  Src: '경로(src)',
22493
22675
  Title: '제목',
22494
22676
  Alternative: '대체 텍스트(alt)',
22677
+ Caption: '캡션',
22495
22678
  Link: '링크',
22496
22679
  'Open link in new tab': '새 탭에서 열기',
22497
22680
  file: '파일',
@@ -22530,6 +22713,7 @@ function addClassNames(className, elm) {
22530
22713
  'Insert column after': '다음 열에 삽입',
22531
22714
  'Insert row above': '위 행에 삽입',
22532
22715
  'Insert row below': '아래 행에 삽입',
22716
+ 'Header row': '머리글 행',
22533
22717
  'Delete table': '테이블 삭제',
22534
22718
  'Delete row': '행 삭제',
22535
22719
  'Delete column': '열 삭제',
@@ -22728,6 +22912,7 @@ function addClassNames(className, elm) {
22728
22912
  Src: 'Эх үүсвэр',
22729
22913
  Title: 'Гарчиг',
22730
22914
  Alternative: 'Алтернатив текст',
22915
+ Caption: 'Тайлбар',
22731
22916
  Link: 'Холбоос',
22732
22917
  'Open link in new tab': 'Холбоосыг шинэ хавтсанд нээх',
22733
22918
  Image: 'Зураг',
@@ -22766,6 +22951,7 @@ function addClassNames(className, elm) {
22766
22951
  'Insert column after': 'Ард нь багана нэмэх',
22767
22952
  'Insert row above': 'Дээр нь мөр нэмэх',
22768
22953
  'Insert row below': 'Доор нь мөр нэмэх',
22954
+ 'Header row': 'Толгой мөр',
22769
22955
  'Delete table': 'Хүснэгт устгах',
22770
22956
  'Delete row': 'Мөр устгах',
22771
22957
  'Delete column': 'Багана устгах',
@@ -22965,6 +23151,7 @@ function addClassNames(className, elm) {
22965
23151
  Src: 'Src',
22966
23152
  Title: 'Titel',
22967
23153
  Alternative: 'Alternatieve tekst',
23154
+ Caption: 'Bijschrift',
22968
23155
  Link: 'Link',
22969
23156
  'Open link in new tab': 'Link in nieuwe tab openen',
22970
23157
  Image: 'Afbeelding',
@@ -23003,6 +23190,7 @@ function addClassNames(className, elm) {
23003
23190
  'Insert column after': 'Kolom invoegen (na)',
23004
23191
  'Insert row above': 'Rij invoegen (boven)',
23005
23192
  'Insert row below': 'Rij invoegen (onder)',
23193
+ 'Header row': 'Koprij',
23006
23194
  'Delete table': 'Tabel verwijderen',
23007
23195
  'Delete row': 'Rij verwijderen',
23008
23196
  'Delete column': 'Kolom verwijderen',
@@ -23200,6 +23388,7 @@ function addClassNames(className, elm) {
23200
23388
  Src: 'Kilde',
23201
23389
  Title: 'Tittel',
23202
23390
  Alternative: 'Alternativ',
23391
+ Caption: 'Bildetekst',
23203
23392
  Filter: 'Filter',
23204
23393
  Link: 'Lenke',
23205
23394
  'Open link in new tab': 'Åpne lenke i ny fane',
@@ -23241,6 +23430,7 @@ function addClassNames(className, elm) {
23241
23430
  'Insert column after': 'Sett inn kolonne etter',
23242
23431
  'Insert row above': 'Sett inn rad over',
23243
23432
  'Insert row below': 'Sett inn rad under',
23433
+ 'Header row': 'Overskriftsrad',
23244
23434
  'Delete table': 'Slett tabell',
23245
23435
  'Delete row': 'Slett rad',
23246
23436
  'Delete column': 'Slett kolonne',
@@ -23446,6 +23636,7 @@ function addClassNames(className, elm) {
23446
23636
  Src: 'Źródło',
23447
23637
  Title: 'Tytuł',
23448
23638
  Alternative: 'Tekst alternatywny',
23639
+ Caption: 'Podpis',
23449
23640
  Link: 'Link',
23450
23641
  'Open link in new tab': 'Otwórz w nowej zakładce',
23451
23642
  Image: 'Grafika',
@@ -23484,6 +23675,7 @@ function addClassNames(className, elm) {
23484
23675
  'Insert column after': 'Wstaw kolumnę po',
23485
23676
  'Insert row above': 'Wstaw wiersz przed',
23486
23677
  'Insert row below': 'Wstaw wiersz po',
23678
+ 'Header row': 'Wiersz nagłówka',
23487
23679
  'Delete table': 'Usuń tabelę',
23488
23680
  'Delete row': 'Usuń wiersz',
23489
23681
  'Delete column': 'Usuń kolumnę',
@@ -23682,6 +23874,7 @@ function addClassNames(className, elm) {
23682
23874
  Src: 'Fonte',
23683
23875
  Title: 'Título',
23684
23876
  Alternative: 'Texto Alternativo',
23877
+ Caption: 'Legenda',
23685
23878
  Link: 'Link',
23686
23879
  'Open link in new tab': 'Abrir link em nova aba',
23687
23880
  Image: 'Imagem',
@@ -23720,6 +23913,7 @@ function addClassNames(className, elm) {
23720
23913
  'Insert column after': 'Inserir coluna depois',
23721
23914
  'Insert row above': 'Inserir linha acima',
23722
23915
  'Insert row below': 'Inserir linha abaixo',
23916
+ 'Header row': 'Linha de cabeçalho',
23723
23917
  'Delete table': 'Excluir tabela',
23724
23918
  'Delete row': 'Excluir linha',
23725
23919
  'Delete column': 'Excluir coluna',
@@ -23922,6 +24116,7 @@ function addClassNames(className, elm) {
23922
24116
  Src: 'src',
23923
24117
  Title: 'Заголовок',
23924
24118
  Alternative: 'Альтернативный текст (alt)',
24119
+ Caption: 'Подпись',
23925
24120
  Link: 'Ссылка',
23926
24121
  'Open link in new tab': 'Открывать ссылку в новом окне',
23927
24122
  file: 'Файл',
@@ -23960,6 +24155,7 @@ function addClassNames(className, elm) {
23960
24155
  'Insert column after': 'Вставить столбец после',
23961
24156
  'Insert row above': 'Вставить ряд выше',
23962
24157
  'Insert row below': 'Вставить ряд ниже',
24158
+ 'Header row': 'Строка заголовка',
23963
24159
  'Delete table': 'Удалить таблицу',
23964
24160
  'Delete row': 'Удалять ряд',
23965
24161
  'Delete column': 'Удалить столбец',
@@ -24158,6 +24354,7 @@ function addClassNames(className, elm) {
24158
24354
  Src: 'Zdroj',
24159
24355
  Title: 'Názov',
24160
24356
  Alternative: 'Alternatívny text (alt)',
24357
+ Caption: 'Popis',
24161
24358
  Link: 'Odkaz',
24162
24359
  'Open link in new tab': 'Otvoriť odkaz na novej karte',
24163
24360
  Image: 'Obrázok',
@@ -24196,6 +24393,7 @@ function addClassNames(className, elm) {
24196
24393
  'Insert column after': 'Vložiť stĺpec za',
24197
24394
  'Insert row above': 'Vložiť riadok nad',
24198
24395
  'Insert row below': 'Vložiť riadok pod',
24396
+ 'Header row': 'Riadok hlavičky',
24199
24397
  'Delete table': 'Odstrániť tabuľku',
24200
24398
  'Delete row': 'Odstrániť riadok',
24201
24399
  'Delete column': 'Odstrániť stĺpec',
@@ -24400,6 +24598,7 @@ function addClassNames(className, elm) {
24400
24598
  Src: 'Källa',
24401
24599
  Title: 'Titel',
24402
24600
  Alternative: 'Alternativ',
24601
+ Caption: 'Bildtext',
24403
24602
  Filter: 'Filter',
24404
24603
  Link: 'Länk',
24405
24604
  'Open link in new tab': 'Öppna länk i ny flik',
@@ -24441,6 +24640,7 @@ function addClassNames(className, elm) {
24441
24640
  'Insert column after': 'Infoga kolumn efter',
24442
24641
  'Insert row above': 'Infoga rad ovanför',
24443
24642
  'Insert row below': 'Infoga rad nedanför',
24643
+ 'Header row': 'Rubrikrad',
24444
24644
  'Delete table': 'Radera tabell',
24445
24645
  'Delete row': 'Radera rad',
24446
24646
  'Delete column': 'Radera kolumn',
@@ -24645,6 +24845,7 @@ function addClassNames(className, elm) {
24645
24845
  Src: 'Kaynak',
24646
24846
  Title: 'Başlık',
24647
24847
  Alternative: 'Alternatif Yazı',
24848
+ Caption: 'Resim yazısı',
24648
24849
  Link: 'Link',
24649
24850
  'Open link in new tab': 'Bağlantıyı yeni sekmede aç',
24650
24851
  Image: 'Resim',
@@ -24683,6 +24884,7 @@ function addClassNames(className, elm) {
24683
24884
  'Insert column after': 'Sonrasına kolon ekle',
24684
24885
  'Insert row above': 'Üstüne satır ekle',
24685
24886
  'Insert row below': 'Altına satır ekle',
24887
+ 'Header row': 'Başlık satırı',
24686
24888
  'Delete table': 'Tabloyu sil',
24687
24889
  'Delete row': 'Satırı sil',
24688
24890
  'Delete column': 'Kolonu sil',
@@ -24880,6 +25082,7 @@ function addClassNames(className, elm) {
24880
25082
  Src: 'src',
24881
25083
  Title: 'Заголовок',
24882
25084
  Alternative: 'Альтернативний текст (alt)',
25085
+ Caption: 'Підпис',
24883
25086
  Link: 'Посилання',
24884
25087
  'Open link in new tab': 'Відкрити посилання в новій вкладці',
24885
25088
  file: 'Файл',
@@ -24918,6 +25121,7 @@ function addClassNames(className, elm) {
24918
25121
  'Insert column after': 'Вставити стовпець після',
24919
25122
  'Insert row above': 'Вставити рядок вище',
24920
25123
  'Insert row below': 'Вставити рядок нижче',
25124
+ 'Header row': 'Рядок заголовка',
24921
25125
  'Delete table': 'Видалити таблицю',
24922
25126
  'Delete row': 'Видалити рядок',
24923
25127
  'Delete column': 'Видалити стовпчик',
@@ -25117,6 +25321,7 @@ function addClassNames(className, elm) {
25117
25321
  Src: 'Src',
25118
25322
  Title: 'Title',
25119
25323
  Alternative: 'Alternative',
25324
+ Caption: '题注',
25120
25325
  Link: 'Link',
25121
25326
  'Open link in new tab': '在新窗口打开链接',
25122
25327
  Image: '图片',
@@ -25155,6 +25360,7 @@ function addClassNames(className, elm) {
25155
25360
  'Insert column after': '在之后插入列',
25156
25361
  'Insert row above': '在之前插入行',
25157
25362
  'Insert row below': '在之后插入行',
25363
+ 'Header row': '标题行',
25158
25364
  'Delete table': '删除表格',
25159
25365
  'Delete row': '删除行',
25160
25366
  'Delete column': '删除列',
@@ -25353,6 +25559,7 @@ function addClassNames(className, elm) {
25353
25559
  Src: 'Src',
25354
25560
  Title: 'Title',
25355
25561
  Alternative: '替代',
25562
+ Caption: '標號',
25356
25563
  Link: 'Link',
25357
25564
  'Open link in new tab': '在新分頁開啟連結',
25358
25565
  Image: '圖片',
@@ -25391,6 +25598,7 @@ function addClassNames(className, elm) {
25391
25598
  'Insert column after': '插入右方欄',
25392
25599
  'Insert row above': '插入上方列',
25393
25600
  'Insert row below': '插入下方列',
25601
+ 'Header row': '標題列',
25394
25602
  'Delete table': '刪除表格',
25395
25603
  'Delete row': '刪除整列',
25396
25604
  'Delete column': '刪除整欄',
@@ -30420,6 +30628,11 @@ StatusBar = __decorate([
30420
30628
 
30421
30629
 
30422
30630
 
30631
+ const SECTIONS = new Set([
30632
+ 'thead',
30633
+ 'tbody',
30634
+ 'tfoot'
30635
+ ]);
30423
30636
  const markedValue = new WeakMap();
30424
30637
  class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
30425
30638
  /** @override */ className() {
@@ -30578,7 +30791,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30578
30791
  }
30579
30792
  });
30580
30793
  }
30581
- if (after && line && line.nextSibling) {
30794
+ const section = line && line.parentElement;
30795
+ // Below the header rows, a row is a body row
30796
+ if (after && line && !line.nextElementSibling && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, 'thead')) {
30797
+ const body = Table.__bodyOf(table, section, create);
30798
+ body.insertBefore(row, body.firstChild);
30799
+ Table.__setCellsTag(row, 'td', create);
30800
+ } else if (after && line && line.nextSibling) {
30582
30801
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
30583
30802
  } else if (!after && line) {
30584
30803
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
@@ -30586,6 +30805,79 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30586
30805
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.first(table, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'tbody')) || table, row);
30587
30806
  }
30588
30807
  }
30808
+ /**
30809
+ * The table's first `<tbody>`, made after `head` when there's none
30810
+ */ static __bodyOf(table, head, create) {
30811
+ let body = table.tBodies[0];
30812
+ if (!body) {
30813
+ body = create.element('tbody');
30814
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(head, body);
30815
+ }
30816
+ return body;
30817
+ }
30818
+ /**
30819
+ * Makes the row's cells `<td>`, or `<th>` with a column scope unless they
30820
+ * have one, keeping their content and attributes. The cells it replaces
30821
+ * go in `replaced`, with their replacements
30822
+ */ static __setCellsTag(row, tag, create, replaced) {
30823
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).forEach((cell)=>{
30824
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(cell, tag) ? cell : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.replace(cell, tag, create, true);
30825
+ if (next !== cell) {
30826
+ replaced === null || replaced === void 0 ? void 0 : replaced.set(cell, next);
30827
+ }
30828
+ if (tag === 'td') {
30829
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', null);
30830
+ } else if (!next.hasAttribute('scope')) {
30831
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', 'col');
30832
+ }
30833
+ });
30834
+ }
30835
+ /**
30836
+ * The table has a header row: a `<thead>` with a row in it
30837
+ */ hasHeaderRow(table) {
30838
+ var _a;
30839
+ return Boolean((_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows.length);
30840
+ }
30841
+ /**
30842
+ * Header rows can always go back into the body. The first row can become
30843
+ * one unless a cell in it spans into the next, as a span can't cross from
30844
+ * the `<thead>` into the `<tbody>`
30845
+ */ canToggleHeaderRow(table) {
30846
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
30847
+ return this.hasHeaderRow(table) || Boolean(row && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).every((cell)=>cell.rowSpan < 2));
30848
+ }
30849
+ /**
30850
+ * Moves the first row into a `<thead>`, its cells becoming
30851
+ * `<th scope="col">`, or the header rows back to the start of the
30852
+ * `<tbody>` as `<td>`. Their content, attributes and spans stay. Returns
30853
+ * the cells it replaced, with their replacements
30854
+ */ toggleHeaderRow(table) {
30855
+ const replaced = new Map();
30856
+ const create = this.j.createInside;
30857
+ const head = table.tHead;
30858
+ if (!this.canToggleHeaderRow(table)) {
30859
+ return replaced;
30860
+ }
30861
+ if (head && this.hasHeaderRow(table)) {
30862
+ const body = Table.__bodyOf(table, head, create);
30863
+ const first = body.firstChild;
30864
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(head.rows).forEach((row)=>{
30865
+ body.insertBefore(row, first);
30866
+ Table.__setCellsTag(row, 'td', create, replaced);
30867
+ });
30868
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
30869
+ } else {
30870
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
30871
+ const thead = head || create.element('thead');
30872
+ if (!head) {
30873
+ // Setting it puts it after a caption and column groups
30874
+ table.tHead = thead;
30875
+ }
30876
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(thead, row);
30877
+ Table.__setCellsTag(row, 'th', create, replaced);
30878
+ }
30879
+ return replaced;
30880
+ }
30589
30881
  /**
30590
30882
  * Inserts a new line after row what contains the selected cell
30591
30883
  *
@@ -30642,7 +30934,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30642
30934
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
30643
30935
  }
30644
30936
  });
30937
+ const section = row.parentElement;
30645
30938
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
30939
+ // A section left without rows goes too, so a table whose header row
30940
+ // was deleted has no `<thead>`
30941
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, SECTIONS) && !section.rows.length) {
30942
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(section);
30943
+ }
30646
30944
  }
30647
30945
  /**
30648
30946
  * Remove row
@@ -31066,7 +31364,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31066
31364
  const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
31067
31365
  selector && selectors.push(selector);
31068
31366
  });
31069
- style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
31367
+ // Across cells, the browser's own text selection, which a drag makes
31368
+ // as well, isn't shown
31369
+ const hidden = selectors.length > 1 ? selectors.map((selector)=>`${selector}::selection,${selector} ::selection`).join(',') + '{background:transparent}' : '';
31370
+ style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` + hidden : '';
31070
31371
  });
31071
31372
  }
31072
31373
  }
@@ -31100,10 +31401,11 @@ const instance = (j)=>j.getInstance('Table', j.o);
31100
31401
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
31101
31402
  /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37790);
31102
31403
  /* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62843);
31103
- /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(72157);
31104
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12153);
31105
- /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56917);
31106
- /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(21491);
31404
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20014);
31405
+ /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72157);
31406
+ /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12153);
31407
+ /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(56917);
31408
+ /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21491);
31107
31409
  /*!
31108
31410
  * Jodit Editor (https://xdsoft.net/jodit/)
31109
31411
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -31134,6 +31436,7 @@ const instance = (j)=>j.getInstance('Table', j.o);
31134
31436
 
31135
31437
 
31136
31438
 
31439
+
31137
31440
 
31138
31441
 
31139
31442
  const INPUT_TAGS = new Set([
@@ -31239,7 +31542,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31239
31542
  configurable: true
31240
31543
  });
31241
31544
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(container, button);
31242
- const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.get('chevron')}</span>`);
31545
+ const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.get('chevron')}</span>`);
31243
31546
  // For caching
31244
31547
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(button, trigger);
31245
31548
  return container;
@@ -31296,7 +31599,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31296
31599
  state.icon.iconURL = ctr.iconURL;
31297
31600
  } else {
31298
31601
  const name = ctr.icon || ctr.name;
31299
- state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
31602
+ state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
31300
31603
  }
31301
31604
  if (!ctr.iconURL && !state.icon.name) {
31302
31605
  state.text = ctr.text || ctr.name;
@@ -31327,6 +31630,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31327
31630
  const elm = ctr.popup(this.j, target, this.__closePopup, this);
31328
31631
  if (elm) {
31329
31632
  popup.setContent((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? this.j.c.fromHTML(elm) : elm).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
31633
+ // The focus stays in the content for a list, which
31634
+ // typing searches, but goes to a form, as in a dialog
31635
+ (0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__.focusFormField)(popup.container);
31330
31636
  } else {
31331
31637
  this.__closePopup();
31332
31638
  }
@@ -31469,7 +31775,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31469
31775
  * Create an open popup list
31470
31776
  */ __openControlList(control) {
31471
31777
  var _a, _b, _c, _d, _e;
31472
- const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
31778
+ const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__.findControlType)(key, controls);
31473
31779
  const list = control.list;
31474
31780
  const menu = this.openPopup();
31475
31781
  menu.parentElement = this;
@@ -31477,7 +31783,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31477
31783
  if (content) {
31478
31784
  return this.__openMenu(menu, content);
31479
31785
  }
31480
- const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
31786
+ const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_22__.makeCollection)(this.j);
31481
31787
  toolbar.parentElement = menu;
31482
31788
  toolbar.mode = 'vertical';
31483
31789
  const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
@@ -31544,7 +31850,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31544
31850
  }
31545
31851
  openPopup() {
31546
31852
  this.__closePopup();
31547
- this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
31853
+ this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__.Popup(this.j, false);
31548
31854
  this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
31549
31855
  return this.openedPopup;
31550
31856
  }
@@ -31562,15 +31868,18 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
31562
31868
  this.openedPopup = null;
31563
31869
  this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
31564
31870
  // The keyboard brought the focus into the dropdown: give it back to
31565
- // the button, otherwise it would fall out to the document
31566
- const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
31871
+ // the button, otherwise it would fall out to the document. A form
31872
+ // gives it back to the content, with the selection it was opened for
31873
+ const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement), inForm = hadFocus && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.closest(activeElement, 'form', popup.container);
31567
31874
  this.state.activated = false;
31568
31875
  popup.close();
31569
31876
  popup.destruct();
31570
31877
  if (this.trigger) {
31571
31878
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__.attr)(this.trigger, 'aria-expanded', false);
31572
31879
  }
31573
- if (hadFocus) {
31880
+ if (inForm && (0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_9__.isJoditObject)(this.j)) {
31881
+ this.j.s.focus();
31882
+ } else if (hadFocus) {
31574
31883
  this.focus();
31575
31884
  }
31576
31885
  }
@@ -32554,6 +32863,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32554
32863
  continue;
32555
32864
  }
32556
32865
  const reader = new FileReader();
32866
+ const { name } = file;
32557
32867
  const readerPromise = uploader.j.async.promise((resolve, reject)=>{
32558
32868
  reader.onerror = reject;
32559
32869
  reader.onloadend = ()=>{
@@ -32564,6 +32874,9 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32564
32874
  ],
32565
32875
  isImages: [
32566
32876
  true
32877
+ ],
32878
+ fileNames: [
32879
+ name
32567
32880
  ]
32568
32881
  };
32569
32882
  const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
@@ -33197,6 +33510,7 @@ function val(elm, name, value) {
33197
33510
  /* harmony import */ var _core_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23282);
33198
33511
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29960);
33199
33512
  /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67510);
33513
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20014);
33200
33514
  /*!
33201
33515
  * Jodit Editor (https://xdsoft.net/jodit/)
33202
33516
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33206,6 +33520,7 @@ function val(elm, name, value) {
33206
33520
 
33207
33521
 
33208
33522
 
33523
+
33209
33524
  /**
33210
33525
  * Build tabs system
33211
33526
  *
@@ -33286,6 +33601,7 @@ function val(elm, name, value) {
33286
33601
  if (state) {
33287
33602
  state.activeTab = name;
33288
33603
  }
33604
+ ;(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__.focusFormField)(tab);
33289
33605
  return false;
33290
33606
  });
33291
33607
  nameToTab[name] = {
@@ -34169,49 +34485,50 @@ UiAiAssistant = __decorate([
34169
34485
  /* harmony import */ var _hr_hr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16233);
34170
34486
  /* harmony import */ var _iframe_iframe_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(77469);
34171
34487
  /* harmony import */ var _image_image_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(23531);
34172
- /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(80763);
34173
- /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(3215);
34174
- /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(70045);
34175
- /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(93401);
34176
- /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76295);
34177
- /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(59483);
34178
- /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(91071);
34179
- /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(61019);
34180
- /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(65517);
34181
- /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(20071);
34182
- /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(32309);
34183
- /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(64837);
34184
- /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(79799);
34185
- /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31571);
34186
- /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(85407);
34187
- /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(59451);
34188
- /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(18363);
34189
- /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(8355);
34190
- /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(58519);
34191
- /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(6687);
34192
- /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(56113);
34193
- /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(9159);
34194
- /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(12019);
34195
- /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(36125);
34196
- /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(9881);
34197
- /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(28545);
34198
- /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(45927);
34199
- /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(52951);
34200
- /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(43809);
34201
- /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(7309);
34202
- /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(68687);
34203
- /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(59495);
34204
- /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(39627);
34205
- /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(767);
34206
- /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(43003);
34207
- /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(72439);
34208
- /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(94529);
34209
- /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(26551);
34210
- /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(96139);
34211
- /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(72253);
34212
- /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(65735);
34213
- /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(83671);
34214
- /* 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);
34215
34532
  /*!
34216
34533
  * Jodit Editor (https://xdsoft.net/jodit/)
34217
34534
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34283,6 +34600,7 @@ UiAiAssistant = __decorate([
34283
34600
 
34284
34601
 
34285
34602
 
34603
+
34286
34604
 
34287
34605
 
34288
34606
  // JODIT-START:FAT
@@ -34371,6 +34689,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34371
34689
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, fakeNode)) {
34372
34690
  return;
34373
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
+ }
34374
34698
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
34375
34699
  return false;
34376
34700
  }
@@ -34419,7 +34743,13 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34419
34743
  if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
34420
34744
  return;
34421
34745
  }
34422
- 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);
34423
34753
  const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
34424
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)) {
34425
34755
  return;
@@ -34995,7 +35325,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
34995
35325
  }
34996
35326
  if (charRemoved) {
34997
35327
  removeEmptyForParent(fakeNode, 'a');
34998
- addBRInsideEmptyBlock(jodit, fakeNode);
35328
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, fakeNode);
34999
35329
  jodit.s.setCursorBefore(fakeNode);
35000
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)) {
35001
35331
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fakeNode, jodit.createInside.element('br'));
@@ -35030,13 +35360,6 @@ function getNextInlineSibling(sibling, backspace, root) {
35030
35360
  parent = p;
35031
35361
  }
35032
35362
  }
35033
- /**
35034
- * Helper add BR element inside empty block element
35035
- */ function addBRInsideEmptyBlock(jodit, node) {
35036
- 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)) {
35037
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(node, jodit.createInside.element('br'));
35038
- }
35039
- }
35040
35363
  function tryRemoveChar(sibling, backspace, step, anotherSibling) {
35041
35364
  // For Unicode escapes
35042
35365
  let value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
@@ -35600,6 +35923,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35600
35923
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
35601
35924
 
35602
35925
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
35926
+ /* harmony export */ addBRInsideEmptyBlock: function() { return /* binding */ addBRInsideEmptyBlock; },
35603
35927
  /* harmony export */ findMostNestedNeighbor: function() { return /* binding */ findMostNestedNeighbor; },
35604
35928
  /* harmony export */ getMoveFilter: function() { return /* binding */ getMoveFilter; }
35605
35929
  /* harmony export */ });
@@ -35635,6 +35959,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
35635
35959
  */ function getMoveFilter(jodit) {
35636
35960
  return (node)=>jodit.e.fire('backSpaceIsMovedIgnore', node) !== true;
35637
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
+ }
35638
35970
 
35639
35971
 
35640
35972
  /***/ }),
@@ -36052,7 +36384,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
36052
36384
  beforeCommand(command) {
36053
36385
  if (command.toLowerCase() === 'removeformat') {
36054
36386
  if (this.j.s.isCollapsed()) {
36055
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
36387
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForWord)(this.j);
36056
36388
  } else {
36057
36389
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
36058
36390
  }
@@ -36348,16 +36680,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36348
36680
 
36349
36681
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36350
36682
  /* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
36351
- /* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
36352
36683
  /* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
36353
- /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
36354
- /* 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; }
36355
36687
  /* harmony export */ });
36356
36688
  /* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
36357
36689
  /* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
36358
36690
  /* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
36359
- /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
36360
- /* 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);
36361
36694
  /*!
36362
36695
  * Jodit Editor (https://xdsoft.net/jodit/)
36363
36696
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36372,6 +36705,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
36372
36705
 
36373
36706
 
36374
36707
 
36708
+
36375
36709
  /***/ }),
36376
36710
 
36377
36711
  /***/ 15908:
@@ -36524,6 +36858,126 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
36524
36858
  }
36525
36859
 
36526
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
+
36527
36981
  /***/ }),
36528
36982
 
36529
36983
  /***/ 56385:
@@ -38127,6 +38581,7 @@ var DragState;
38127
38581
  /**
38128
38582
  * Drag start handler
38129
38583
  */ onDragStart(event) {
38584
+ var _a;
38130
38585
  if (event.type === 'dragstart' && this.draggable) {
38131
38586
  return false;
38132
38587
  }
@@ -38145,7 +38600,8 @@ var DragState;
38145
38600
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(lastTarget.parentElement, 'a') && lastTarget.parentElement.firstChild === lastTarget && lastTarget.parentElement.lastChild === lastTarget) {
38146
38601
  lastTarget = lastTarget.parentElement;
38147
38602
  }
38148
- 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);
38149
38605
  }
38150
38606
  /**
38151
38607
  * Prepare the ghost element and switch to the waiting state.
@@ -40179,7 +40635,8 @@ const libraries = new Map();
40179
40635
  /* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
40180
40636
  /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
40181
40637
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
40182
- /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89816);
40638
+ /* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
40639
+ /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
40183
40640
  /*!
40184
40641
  * Jodit Editor (https://xdsoft.net/jodit/)
40185
40642
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -40189,7 +40646,39 @@ const libraries = new Map();
40189
40646
 
40190
40647
 
40191
40648
 
40192
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
40649
+
40650
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
40651
+ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
40652
+ // Opt in: previews keep the toolbar's styles unless the integrator lists
40653
+ // the properties to copy, e.g. ['font-family', 'font-weight', 'color']
40654
+ previewProperties: []
40655
+ };
40656
+ /**
40657
+ * The list is outside the editing area, and in iframe mode outside its
40658
+ * document, so a preview would take the toolbar's styles. This reads how the
40659
+ * content shows a tag from a probe in the editing area
40660
+ */ function previewStyle(editor, tag) {
40661
+ const { previewProperties } = editor.o.formatBlock;
40662
+ if (!previewProperties.length) {
40663
+ return '';
40664
+ }
40665
+ const probe = editor.createInside.element(tag, {
40666
+ style: 'display: none'
40667
+ });
40668
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
40669
+ const style = editor.ew.getComputedStyle(probe);
40670
+ const size = parseFloat(style.fontSize) || 16;
40671
+ const css = previewProperties.map((prop)=>{
40672
+ let value = style.getPropertyValue(prop);
40673
+ if (value && prop === 'font-family') {
40674
+ value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
40675
+ }
40676
+ // Each browser knows only one of the smoothing properties
40677
+ return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
40678
+ }).join('');
40679
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
40680
+ return css;
40681
+ }
40193
40682
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40194
40683
  command: 'formatBlock',
40195
40684
  value (editor, button) {
@@ -40230,11 +40719,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
40230
40719
  isActive: (editor, button)=>{
40231
40720
  return button.state.value !== editor.o.enter && (0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(button.control.list) && Boolean(button.control.list[button.state.value]);
40232
40721
  },
40233
- childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
40722
+ childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
40234
40723
  tooltip: 'Insert format block'
40235
40724
  };
40236
40725
 
40237
40726
 
40727
+ /***/ }),
40728
+
40729
+ /***/ 4932:
40730
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
40731
+
40732
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40733
+ /* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
40734
+ /* harmony export */ });
40735
+ /*!
40736
+ * Jodit Editor (https://xdsoft.net/jodit/)
40737
+ * Released under MIT see LICENSE.txt in the project root for license information.
40738
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
40739
+ */ const carried = new WeakMap();
40740
+ const fetched = new Map();
40741
+ let editors = 0;
40742
+ /**
40743
+ * In iframe mode the content's web fonts load only in the iframe, but the
40744
+ * Paragraph list is in the page, so its previews would fall back to the
40745
+ * page's fonts. This adds the content's web fonts to the page under names
40746
+ * only this editor uses, so nothing else on the page can pick them up, and
40747
+ * puts those names first in a preview's `font-family`
40748
+ */ function withContentFonts(editor, fontFamily) {
40749
+ const { ed, od } = editor;
40750
+ if (ed === od) {
40751
+ return fontFamily;
40752
+ }
40753
+ const state = carriedFor(editor);
40754
+ carry(editor, state);
40755
+ const webFonts = new Set();
40756
+ ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
40757
+ return fontFamily.split(',').map((family)=>{
40758
+ const name = familyName(family);
40759
+ return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
40760
+ }).join(', ');
40761
+ }
40762
+ function carriedFor(editor) {
40763
+ let state = carried.get(editor);
40764
+ if (!state) {
40765
+ const { od } = editor;
40766
+ const created = {
40767
+ prefix: `jodit-preview-${++editors}-`,
40768
+ faces: new Map(),
40769
+ pending: false
40770
+ };
40771
+ carried.set(editor, created);
40772
+ editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
40773
+ state = created;
40774
+ }
40775
+ return state;
40776
+ }
40777
+ /**
40778
+ * It looks each time the list opens, since the content's stylesheets may
40779
+ * still have been loading the time before
40780
+ */ function carry(editor, state) {
40781
+ // Every preview in the list asks, but one look is enough
40782
+ if (state.pending) {
40783
+ return;
40784
+ }
40785
+ state.pending = true;
40786
+ const { ed, od } = editor;
40787
+ Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
40788
+ state.pending = false;
40789
+ if (editor.isInDestruct) {
40790
+ return;
40791
+ }
40792
+ lists.flat().forEach((font)=>{
40793
+ const key = JSON.stringify(font);
40794
+ if (!state.faces.has(key)) {
40795
+ const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
40796
+ od.fonts.add(face);
40797
+ state.faces.set(key, face);
40798
+ }
40799
+ });
40800
+ });
40801
+ }
40802
+ /**
40803
+ * The web fonts a stylesheet and those it imports declare
40804
+ */ function fontsOf(sheet, base) {
40805
+ var _a;
40806
+ let rules;
40807
+ try {
40808
+ rules = sheet.cssRules;
40809
+ } catch (_b) {
40810
+ // Another site's stylesheet can't be read, but it can be fetched if
40811
+ // the site allows it, as Google Fonts does
40812
+ const { href } = sheet;
40813
+ if (!href) {
40814
+ return Promise.resolve([]);
40815
+ }
40816
+ let fonts = fetched.get(href);
40817
+ if (!fonts) {
40818
+ fonts = fetchFonts(href);
40819
+ fetched.set(href, fonts);
40820
+ }
40821
+ return fonts;
40822
+ }
40823
+ return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
40824
+ }
40825
+ function fontsIn(rules, base) {
40826
+ return Promise.all(Array.from(rules, (rule)=>{
40827
+ if ('styleSheet' in rule) {
40828
+ const { styleSheet } = rule;
40829
+ return styleSheet ? fontsOf(styleSheet, base) : [];
40830
+ }
40831
+ if ('cssRules' in rule) {
40832
+ return fontsIn(rule.cssRules, base);
40833
+ }
40834
+ return rule.cssText.startsWith('@font-face') ? [
40835
+ fontOf(rule, base)
40836
+ ] : [];
40837
+ })).then((lists)=>lists.flat());
40838
+ }
40839
+ function fontOf(rule, base) {
40840
+ const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
40841
+ return {
40842
+ family: familyName(rule.style.getPropertyValue('font-family')),
40843
+ source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
40844
+ descriptors: {
40845
+ style: value('font-style'),
40846
+ weight: value('font-weight'),
40847
+ stretch: value('font-stretch'),
40848
+ unicodeRange: value('unicode-range')
40849
+ }
40850
+ };
40851
+ }
40852
+ function fetchFonts(href) {
40853
+ return fetch(href).then((response)=>response.text()).then((text)=>{
40854
+ const doc = document.implementation.createHTMLDocument('');
40855
+ const style = doc.createElement('style');
40856
+ style.textContent = text;
40857
+ doc.head.appendChild(style);
40858
+ return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
40859
+ }).catch(()=>[]);
40860
+ }
40861
+ function familyName(family) {
40862
+ return family.replace(/["']/g, '').trim().toLowerCase();
40863
+ }
40864
+ /**
40865
+ * The fonts are added to the page, so a relative URL would point somewhere
40866
+ * else
40867
+ */ function withAbsoluteUrls(css, base) {
40868
+ return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
40869
+ try {
40870
+ return `url("${new URL(url, base).href}")`;
40871
+ } catch (_a) {
40872
+ return match;
40873
+ }
40874
+ });
40875
+ }
40876
+
40877
+
40238
40878
  /***/ }),
40239
40879
 
40240
40880
  /***/ 96111:
@@ -40915,6 +41555,810 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
40915
41555
  _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
40916
41556
 
40917
41557
 
41558
+ /***/ }),
41559
+
41560
+ /***/ 43687:
41561
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41562
+
41563
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
41564
+ /*!
41565
+ * Jodit Editor (https://xdsoft.net/jodit/)
41566
+ * Released under MIT see LICENSE.txt in the project root for license information.
41567
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41568
+ */
41569
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
41570
+ wrapper: {
41571
+ tag: 'figure',
41572
+ className: ''
41573
+ },
41574
+ inner: null,
41575
+ caption: {
41576
+ tag: 'figcaption',
41577
+ className: ''
41578
+ }
41579
+ };
41580
+
41581
+
41582
+ /***/ }),
41583
+
41584
+ /***/ 84571:
41585
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
41586
+
41587
+ /* unused harmony export imageCaption */
41588
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
41589
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
41590
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
41591
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
41592
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
41593
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
41594
+ /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
41595
+ /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
41596
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
41597
+ /*!
41598
+ * Jodit Editor (https://xdsoft.net/jodit/)
41599
+ * Released under MIT see LICENSE.txt in the project root for license information.
41600
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41601
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
41602
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41603
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41604
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
41605
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
41606
+ };
41607
+
41608
+
41609
+
41610
+
41611
+
41612
+
41613
+
41614
+
41615
+
41616
+ const MARGINS = [
41617
+ 'margin-top',
41618
+ 'margin-right',
41619
+ 'margin-bottom',
41620
+ 'margin-left'
41621
+ ];
41622
+ const ARROWS = new Set([
41623
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
41624
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
41625
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
41626
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
41627
+ ]);
41628
+ // Blocks that only hold text, which a block wrapper can't go inside
41629
+ const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
41630
+ // They would replace the caption with a heading, quote or list
41631
+ const BLOCK_COMMANDS = new Set([
41632
+ 'formatblock',
41633
+ 'insertorderedlist',
41634
+ 'insertunorderedlist'
41635
+ ]);
41636
+ const PLACEHOLDER = 'data-jodit-placeholder';
41637
+ /**
41638
+ * Jodit's focus colour round a caption being typed in, in place of the
41639
+ * browser's, and a placeholder in a blank caption. `:where` leaves both for
41640
+ * the content's own styles to change
41641
+ */ const CAPTION_STYLE = ':where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}' + `:where(.jodit-wysiwyg [${PLACEHOLDER}]){position:relative}` + `:where(.jodit-wysiwyg [${PLACEHOLDER}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${PLACEHOLDER});pointer-events:none}`;
41642
+ /**
41643
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
41644
+ * keeps the caret in the caption
41645
+ */ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
41646
+ /** @override */ afterInit(jodit) {
41647
+ // It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
41648
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
41649
+ jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
41650
+ top: true
41651
+ });
41652
+ this.onChangePlace();
41653
+ }
41654
+ /**
41655
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
41656
+ * other way round from how it is. Returns the caption it gave, or null
41657
+ * when it took one away
41658
+ */ onToggleImageCaption(image, on) {
41659
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
41660
+ if (wrapper && on !== true) {
41661
+ const fresh = this.__freshCaption(wrapper);
41662
+ if (fresh) {
41663
+ this.__unrecorded(()=>this.__restore(fresh));
41664
+ } else {
41665
+ this.__uncaption(wrapper, image);
41666
+ }
41667
+ return null;
41668
+ }
41669
+ if (!wrapper && on !== false) {
41670
+ return this.__caption(image);
41671
+ }
41672
+ }
41673
+ __freshCaption(wrapper) {
41674
+ const fresh = this.__fresh;
41675
+ if (!fresh || fresh.wrapper !== wrapper || wrapper.parentNode !== fresh.parent || wrapper.previousSibling !== fresh.previous || wrapper.nextSibling !== fresh.next || shape(wrapper, fresh.image) !== fresh.shape || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper) !== fresh.caption || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(fresh.caption)) {
41676
+ return null;
41677
+ }
41678
+ return fresh;
41679
+ }
41680
+ /**
41681
+ * Giving a caption isn't a step in the history of its own, as the first
41682
+ * thing typed in it is, so Undo never brings back a blank caption
41683
+ */ __caption(image) {
41684
+ const { j } = this;
41685
+ const { snapshot } = j.history;
41686
+ // The steps before it are recorded first
41687
+ j.setEditorValue();
41688
+ j.e.fire('internalUpdate');
41689
+ const before = snapshot.make();
41690
+ let fresh;
41691
+ snapshot.transaction(()=>{
41692
+ fresh = this.__fresh = {
41693
+ ...this.__wrap(image),
41694
+ before
41695
+ };
41696
+ j.setEditorValue();
41697
+ });
41698
+ // The value is as it was, so no `change` updates the toolbars
41699
+ j.e.fire('updateToolbar');
41700
+ return fresh.caption;
41701
+ }
41702
+ /**
41703
+ * Changes the content with no step in the history of its own, so Undo
41704
+ * never brings back a blank caption. A step still open takes it in
41705
+ */ __unrecorded(changes) {
41706
+ const { j } = this;
41707
+ j.setEditorValue();
41708
+ this.__fresh = null;
41709
+ j.history.snapshot.transaction(()=>{
41710
+ changes();
41711
+ j.setEditorValue();
41712
+ });
41713
+ j.e.fire('internalUpdate');
41714
+ j.e.fire('updateToolbar');
41715
+ }
41716
+ __wrap(image) {
41717
+ var _a;
41718
+ const { j } = this;
41719
+ const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
41720
+ const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
41721
+ const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
41722
+ const attributes = [
41723
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
41724
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
41725
+ ];
41726
+ const place = target.parentNode;
41727
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(image, 'width') || pixels((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width')) || (image.offsetWidth ? `${image.offsetWidth}px` : '');
41728
+ const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
41729
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
41730
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
41731
+ const wrapper = this.__create(wrapperPart);
41732
+ const box = inner ? this.__create(inner) : wrapper;
41733
+ const caption = this.__create(captionPart);
41734
+ caption.appendChild(j.createInside.element('br'));
41735
+ const split = this.__insert(wrapper, target);
41736
+ if (box !== wrapper) {
41737
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
41738
+ }
41739
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
41740
+ target,
41741
+ caption
41742
+ ]);
41743
+ moveMargins(image, wrapper);
41744
+ // The wrapper takes the image's width, and the image fills it, so the
41745
+ // caption wraps under the image
41746
+ if (width) {
41747
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
41748
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
41749
+ }
41750
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
41751
+ this.__mark(wrapper);
41752
+ return {
41753
+ caption,
41754
+ wrapper,
41755
+ image,
41756
+ target,
41757
+ place,
41758
+ split,
41759
+ attributes,
41760
+ parent: wrapper.parentNode,
41761
+ previous: wrapper.previousSibling,
41762
+ next: wrapper.nextSibling,
41763
+ shape: shape(wrapper, image)
41764
+ };
41765
+ }
41766
+ /**
41767
+ * Puts the image back as it was before its caption: in the line the
41768
+ * caption split, and with its own alignment, margins and width. The image
41769
+ * goes into the part of the line holding the caret, so the caret stays
41770
+ */ __restore(fresh) {
41771
+ var _a, _b;
41772
+ const { wrapper, image, target, place, split, attributes } = fresh;
41773
+ if (!split) {
41774
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41775
+ } else if (!split.head && !split.tail) {
41776
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
41777
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
41778
+ } else {
41779
+ const { sel } = this.j.s;
41780
+ const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
41781
+ const { head, tail } = split;
41782
+ if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
41783
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
41784
+ target,
41785
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_a = tail === null || tail === void 0 ? void 0 : tail.childNodes) !== null && _a !== void 0 ? _a : [])
41786
+ ]);
41787
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
41788
+ } else if (tail) {
41789
+ const first = tail.firstChild;
41790
+ [
41791
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_b = head === null || head === void 0 ? void 0 : head.childNodes) !== null && _b !== void 0 ? _b : []),
41792
+ target
41793
+ ].forEach((node)=>tail.insertBefore(node, first));
41794
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
41795
+ }
41796
+ }
41797
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41798
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
41799
+ style: attributes[0],
41800
+ class: attributes[1]
41801
+ });
41802
+ }
41803
+ __uncaption(wrapper, image) {
41804
+ var _a;
41805
+ const { j } = this;
41806
+ // Read while the wrapper is still one, with its caption
41807
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(wrapper, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
41808
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
41809
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
41810
+ const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
41811
+ moveMargins(wrapper, image);
41812
+ if (width) {
41813
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
41814
+ }
41815
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
41816
+ // A block wrapper leaves the image in a paragraph of its own
41817
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) && wrapper.parentNode === j.editor && j.o.enter.toLowerCase() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.BR) {
41818
+ const line = j.createInside.element(j.o.enter);
41819
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
41820
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
41821
+ } else {
41822
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
41823
+ }
41824
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
41825
+ }
41826
+ __create({ tag, className }) {
41827
+ return this.j.createInside.element(tag, className ? {
41828
+ class: className
41829
+ } : {});
41830
+ }
41831
+ /**
41832
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
41833
+ * paragraph is split round it, and a part left empty goes
41834
+ */ __insert(wrapper, target) {
41835
+ const { j } = this;
41836
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, j.editor) : null;
41837
+ if (!block || !TEXT_BLOCK.test(block.nodeName)) {
41838
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
41839
+ return null;
41840
+ }
41841
+ const range = j.ed.createRange();
41842
+ range.setStartBefore(block);
41843
+ range.setEndBefore(target);
41844
+ const start = range.extractContents();
41845
+ range.setStartAfter(target);
41846
+ range.setEndAfter(block);
41847
+ const end = range.extractContents();
41848
+ const [head, tail] = [
41849
+ start,
41850
+ end
41851
+ ].map((part, index)=>{
41852
+ const line = part.firstChild;
41853
+ if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
41854
+ return null;
41855
+ }
41856
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(index ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, block, line);
41857
+ return line;
41858
+ });
41859
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
41860
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
41861
+ return {
41862
+ block,
41863
+ head,
41864
+ tail
41865
+ };
41866
+ }
41867
+ /**
41868
+ * The wrapper can't be edited, apart from its caption, so typing can't
41869
+ * land between the image and the caption
41870
+ */ __mark(wrapper) {
41871
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
41872
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
41873
+ if (caption) {
41874
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
41875
+ this.__placeholder(caption);
41876
+ }
41877
+ }
41878
+ __placeholder(caption) {
41879
+ const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
41880
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
41881
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
41882
+ }
41883
+ }
41884
+ onChange() {
41885
+ const { j } = this;
41886
+ if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
41887
+ return;
41888
+ }
41889
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
41890
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
41891
+ this.__mark(elm);
41892
+ }
41893
+ });
41894
+ }
41895
+ /**
41896
+ * The placeholder goes with the first letter typed or pasted, and comes
41897
+ * back when the last is deleted
41898
+ */ onInput() {
41899
+ const caption = this.__caretCaption();
41900
+ if (caption) {
41901
+ this.__placeholder(caption);
41902
+ }
41903
+ }
41904
+ /**
41905
+ * The editor's own attributes stay out of the value, as the caption would
41906
+ * be editable on the page. So does a caption given and left blank, as
41907
+ * leaving it takes it off, so saving at once keeps the image as it was
41908
+ */ onAfterGetValueFromEditor(data) {
41909
+ if (!data.value.includes('contenteditable')) {
41910
+ return;
41911
+ }
41912
+ const { j } = this;
41913
+ const template = j.c.element('template');
41914
+ template.innerHTML = data.value;
41915
+ const wrappers = (root)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(root.querySelectorAll(j.o.imageCaption.wrapper.tag)).filter((wrapper)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper));
41916
+ const copies = wrappers(template.content);
41917
+ const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
41918
+ const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
41919
+ const placed = fresh && copy && placedIn(j, fresh, copy);
41920
+ let changed = false;
41921
+ if (placed) {
41922
+ this.__restore(placed);
41923
+ changed = true;
41924
+ }
41925
+ copies.forEach((wrapper)=>{
41926
+ [
41927
+ wrapper,
41928
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
41929
+ ].forEach((elm)=>[
41930
+ 'contenteditable',
41931
+ PLACEHOLDER
41932
+ ].forEach((name)=>{
41933
+ if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
41934
+ elm.removeAttribute(name);
41935
+ changed = true;
41936
+ }
41937
+ }));
41938
+ });
41939
+ if (changed) {
41940
+ data.value = template.innerHTML;
41941
+ }
41942
+ }
41943
+ onChangePlace() {
41944
+ const { j } = this;
41945
+ // Captured, to come first: the editor's own `focusout` listener can stop
41946
+ // the event as it fires `blur`, and an image's `mousedown` listener
41947
+ // moves the focus before the press reaches the editor
41948
+ j.e.off([
41949
+ j.editor,
41950
+ j.ow,
41951
+ j.ew
41952
+ ], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
41953
+ capture: true
41954
+ }).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
41955
+ capture: true
41956
+ }).on([
41957
+ j.ow,
41958
+ j.ew
41959
+ ], 'mouseup.imageCaption', this.__onMouseUp);
41960
+ }
41961
+ __onMouseDown(event) {
41962
+ this.__press = event.target;
41963
+ }
41964
+ /**
41965
+ * A caption left blank goes when the focus leaves it. That's checked once
41966
+ * the focus has landed, as switching windows or opening the editor's own
41967
+ * popups keeps it, and once a press that took the focus is over, as the
41968
+ * browsers fire no click when its target moves
41969
+ */ __onFocusOut(event) {
41970
+ const caption = event.target;
41971
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption)) !== caption) {
41972
+ return;
41973
+ }
41974
+ if (this.__press) {
41975
+ this.__afterPress.push(caption);
41976
+ } else {
41977
+ this.__dropBlank(caption, null);
41978
+ }
41979
+ }
41980
+ __onMouseUp() {
41981
+ const press = this.__press;
41982
+ this.__press = null;
41983
+ this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
41984
+ }
41985
+ __dropBlank(caption, press) {
41986
+ // `async.setTimeout` runs a timeout of 0 at once
41987
+ this.j.async.setTimeout(()=>{
41988
+ const { j } = this;
41989
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
41990
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
41991
+ if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
41992
+ return;
41993
+ }
41994
+ const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
41995
+ const fresh = this.__freshCaption(wrapper);
41996
+ this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
41997
+ // The click opened the image's popup below the caption, so it
41998
+ // opens again below the image, as after the popup's Caption button
41999
+ if (clicked) {
42000
+ j.e.fire('recalcPositionPopup');
42001
+ j.e.fire('closeAllPopups');
42002
+ }
42003
+ }, 1);
42004
+ }
42005
+ /**
42006
+ * The caption has the focus, or had it when another window took it, or
42007
+ * the editor's own popups and dialogs have it, as the link form
42008
+ */ __keepsFocus(caption) {
42009
+ const { j } = this;
42010
+ const doc = caption.ownerDocument;
42011
+ if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
42012
+ return true;
42013
+ }
42014
+ const active = j.od.activeElement;
42015
+ return Boolean(active && active !== j.iframe && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.editor, active) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.container, active) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(active, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'data-editor_id') === j.id, j.od.body)));
42016
+ }
42017
+ /**
42018
+ * The caption the caret is in
42019
+ */ __caretCaption() {
42020
+ const { s } = this.j;
42021
+ if (!s.isInsideArea) {
42022
+ return null;
42023
+ }
42024
+ const node = s.range.startContainer;
42025
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, node));
42026
+ return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
42027
+ }
42028
+ /**
42029
+ * Enter in a caption starts a line after the image, and Shift+Enter
42030
+ * breaks the caption's line, as everywhere
42031
+ */ onBeforeEnter(event) {
42032
+ const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
42033
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
42034
+ if (!wrapper) {
42035
+ return;
42036
+ }
42037
+ const { j } = this;
42038
+ this.__focusEditor();
42039
+ // The Enter plugin breaks the line after an inline wrapper
42040
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42041
+ j.s.setCursorAfter(wrapper);
42042
+ return;
42043
+ }
42044
+ const line = this.__line();
42045
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42046
+ j.s.setCursorIn(line);
42047
+ j.synchronizeValues();
42048
+ return false;
42049
+ }
42050
+ /**
42051
+ * The caption keeps the focus, as an editable element of its own, and
42052
+ * would take the caret back, so the editor takes it before the caret
42053
+ * leaves the caption
42054
+ */ __focusEditor() {
42055
+ this.j.editor.focus({
42056
+ preventScroll: true
42057
+ });
42058
+ }
42059
+ __line() {
42060
+ const { j } = this;
42061
+ const line = j.createInside.element(j.o.enter);
42062
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
42063
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
42064
+ }
42065
+ return line;
42066
+ }
42067
+ /**
42068
+ * A caption holds text. An image, a table or a block put in it would end
42069
+ * the captioned image, so it goes after the image, as Enter would
42070
+ */ onBeforeInsertNode(node) {
42071
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
42072
+ if (!wrapper || !holdsMoreThanText(node)) {
42073
+ return;
42074
+ }
42075
+ const { j } = this;
42076
+ this.__focusEditor();
42077
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42078
+ j.s.setCursorAfter(wrapper);
42079
+ return;
42080
+ }
42081
+ const line = this.__line();
42082
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
42083
+ j.s.setCursorIn(line);
42084
+ }
42085
+ /**
42086
+ * A selected captioned image goes as an image on a line of its own does,
42087
+ * leaving the line empty, rather than joining the lines either side
42088
+ */ onBeforeCommandDelete() {
42089
+ const wrapper = this.__selectedWrapper();
42090
+ if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42091
+ return;
42092
+ }
42093
+ const line = this.__line();
42094
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
42095
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
42096
+ this.j.s.setCursorIn(line);
42097
+ return false;
42098
+ }
42099
+ /**
42100
+ * The captioned image the selection holds, as a click on the image selects
42101
+ */ __selectedWrapper() {
42102
+ const { s } = this.j;
42103
+ if (!s.isInsideArea || s.isCollapsed()) {
42104
+ return null;
42105
+ }
42106
+ const { startContainer, startOffset, endContainer, endOffset } = s.range;
42107
+ const node = startContainer.childNodes[startOffset];
42108
+ return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
42109
+ }
42110
+ onKeyDown(event) {
42111
+ var _a;
42112
+ this.__arrow = null;
42113
+ // Typing replaces a selected captioned image, on the line it leaves
42114
+ if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
42115
+ this.j.execCommand('Delete');
42116
+ return;
42117
+ }
42118
+ if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
42119
+ return;
42120
+ }
42121
+ const caption = this.__caretCaption();
42122
+ if (caption) {
42123
+ this.__arrow = {
42124
+ key: event.key,
42125
+ range: this.j.s.range.cloneRange(),
42126
+ caption
42127
+ };
42128
+ }
42129
+ }
42130
+ /**
42131
+ * An arrow key that couldn't move the caret in the caption takes it out,
42132
+ * past the image, as the caption is an editable element of its own
42133
+ */ onKeyUp(event) {
42134
+ const arrow = this.__arrow;
42135
+ this.__arrow = null;
42136
+ if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
42137
+ return;
42138
+ }
42139
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
42140
+ if (!wrapper) {
42141
+ return;
42142
+ }
42143
+ const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
42144
+ const { s } = this.j;
42145
+ this.__focusEditor();
42146
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
42147
+ if (forward) {
42148
+ s.setCursorAfter(wrapper);
42149
+ } else {
42150
+ s.setCursorBefore(wrapper);
42151
+ }
42152
+ return;
42153
+ }
42154
+ const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
42155
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
42156
+ s.setCursorIn(sibling, forward);
42157
+ return;
42158
+ }
42159
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
42160
+ if (forward) {
42161
+ s.setCursorBefore(sibling);
42162
+ } else {
42163
+ s.setCursorAfter(sibling);
42164
+ }
42165
+ return;
42166
+ }
42167
+ const line = this.__line();
42168
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(forward ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, wrapper, line);
42169
+ s.setCursorIn(line);
42170
+ this.j.synchronizeValues();
42171
+ }
42172
+ onBeforeCommand(command) {
42173
+ const name = command.toLowerCase();
42174
+ if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
42175
+ return false;
42176
+ }
42177
+ // A caption given and left blank was never a step, so Undo takes it off
42178
+ const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
42179
+ if (fresh) {
42180
+ this.__unrecorded(()=>{
42181
+ this.__restore(fresh);
42182
+ this.j.history.snapshot.restore(fresh.before);
42183
+ });
42184
+ return false;
42185
+ }
42186
+ }
42187
+ /**
42188
+ * Select all in a caption selects the caption, as the caption is an
42189
+ * editable element of its own
42190
+ */ __onSelectAll() {
42191
+ const caption = this.__caretCaption();
42192
+ if (caption) {
42193
+ this.j.e.stopPropagation('beforeCommandSelectall');
42194
+ this.j.s.select(caption, true);
42195
+ return false;
42196
+ }
42197
+ }
42198
+ /** @override */ beforeDestruct(jodit) {
42199
+ jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
42200
+ jodit.editor,
42201
+ jodit.ow,
42202
+ jodit.ew
42203
+ ], '.imageCaption');
42204
+ }
42205
+ constructor(){
42206
+ super(...arguments);
42207
+ /**
42208
+ * The caption given last, while nothing has changed round it and it's
42209
+ * still blank, so taking it off can put everything back as it was
42210
+ */ this.__fresh = null;
42211
+ this.__press = null;
42212
+ this.__afterPress = [];
42213
+ this.__arrow = null;
42214
+ }
42215
+ }
42216
+ __decorate([
42217
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
42218
+ ], imageCaption.prototype, "onToggleImageCaption", null);
42219
+ __decorate([
42220
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42221
+ ':change',
42222
+ ':afterInit',
42223
+ ':afterSetMode',
42224
+ ':changePlace'
42225
+ ]),
42226
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
42227
+ ], imageCaption.prototype, "onChange", null);
42228
+ __decorate([
42229
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
42230
+ ':input',
42231
+ ':keyup',
42232
+ ':afterPaste'
42233
+ ])
42234
+ ], imageCaption.prototype, "onInput", null);
42235
+ __decorate([
42236
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
42237
+ ], imageCaption.prototype, "onAfterGetValueFromEditor", null);
42238
+ __decorate([
42239
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
42240
+ ], imageCaption.prototype, "onChangePlace", null);
42241
+ __decorate([
42242
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42243
+ ], imageCaption.prototype, "__onMouseDown", null);
42244
+ __decorate([
42245
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42246
+ ], imageCaption.prototype, "__onFocusOut", null);
42247
+ __decorate([
42248
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42249
+ ], imageCaption.prototype, "__onMouseUp", null);
42250
+ __decorate([
42251
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
42252
+ ], imageCaption.prototype, "onBeforeEnter", null);
42253
+ __decorate([
42254
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
42255
+ ], imageCaption.prototype, "onBeforeInsertNode", null);
42256
+ __decorate([
42257
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
42258
+ ], imageCaption.prototype, "onBeforeCommandDelete", null);
42259
+ __decorate([
42260
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
42261
+ ], imageCaption.prototype, "onKeyDown", null);
42262
+ __decorate([
42263
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
42264
+ ], imageCaption.prototype, "onKeyUp", null);
42265
+ __decorate([
42266
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
42267
+ ], imageCaption.prototype, "onBeforeCommand", null);
42268
+ __decorate([
42269
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
42270
+ ], imageCaption.prototype, "__onSelectAll", null);
42271
+ /**
42272
+ * `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
42273
+ * from the editor's value
42274
+ */ function placedIn(jodit, fresh, wrapper) {
42275
+ var _a;
42276
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
42277
+ const { split } = fresh;
42278
+ if (!image) {
42279
+ return null;
42280
+ }
42281
+ const placed = {
42282
+ wrapper,
42283
+ image,
42284
+ target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
42285
+ place: fresh.place,
42286
+ split: null,
42287
+ attributes: fresh.attributes
42288
+ };
42289
+ if (split) {
42290
+ const head = split.head ? wrapper.previousSibling : null;
42291
+ const tail = split.tail ? wrapper.nextSibling : null;
42292
+ if (split.head && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(head) || split.tail && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(tail)) {
42293
+ return null;
42294
+ }
42295
+ const block = split.block.cloneNode(true);
42296
+ placed.split = {
42297
+ block,
42298
+ head: head,
42299
+ tail: tail
42300
+ };
42301
+ placed.place = counterpart(split.block, fresh.place, block);
42302
+ }
42303
+ return placed;
42304
+ }
42305
+ /**
42306
+ * The node in `copy`, a clone of `root`, where `node` is in `root`
42307
+ */ function counterpart(root, node, copy) {
42308
+ const path = [];
42309
+ for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
42310
+ path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
42311
+ }
42312
+ return path.reduce((elm, index)=>elm.childNodes[index], copy);
42313
+ }
42314
+ /**
42315
+ * The attributes of a caption's wrapper and image that the image's
42316
+ * alignment, margins and size are in
42317
+ */ function shape(wrapper, image) {
42318
+ return [
42319
+ wrapper,
42320
+ image
42321
+ ].flatMap((elm)=>[
42322
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
42323
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
42324
+ ]).join('|');
42325
+ }
42326
+ /**
42327
+ * The node is, or holds, more than text and inline formatting: an image, a
42328
+ * table, a rule or another block
42329
+ */ function holdsMoreThanText(node) {
42330
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
42331
+ return false;
42332
+ }
42333
+ return [
42334
+ node,
42335
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
42336
+ ].some((elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(elm) || _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS.has(elm.nodeName.toLowerCase())));
42337
+ }
42338
+ /**
42339
+ * A `width` attribute's value as a CSS width
42340
+ */ function pixels(value) {
42341
+ if (!value) {
42342
+ return '';
42343
+ }
42344
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
42345
+ }
42346
+ function moveMargins(from, to) {
42347
+ var _a;
42348
+ MARGINS.forEach((side)=>{
42349
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
42350
+ if (value) {
42351
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
42352
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
42353
+ }
42354
+ });
42355
+ if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
42356
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
42357
+ }
42358
+ }
42359
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
42360
+
42361
+
40918
42362
  /***/ }),
40919
42363
 
40920
42364
  /***/ 85745:
@@ -41020,7 +42464,8 @@ const SELECTED_TAGS = new Set([
41020
42464
  * paints the rest of a block image's line with its parent's highlight. See #1528.
41021
42465
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
41022
42466
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
41023
- * wrapper's whole line, and its resize frame shows it's selected
42467
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
42468
+ * a captioned image's caption
41024
42469
  */ onSelectionChange() {
41025
42470
  const { jodit } = this;
41026
42471
  jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
@@ -41043,9 +42488,12 @@ const SELECTED_TAGS = new Set([
41043
42488
  if (elm.src && /^data:/.test(elm.src)) {
41044
42489
  replaceDataURIToBlobUUID(editor, elm);
41045
42490
  }
42491
+ // A captioned image is selected with its caption, so Delete
42492
+ // removes both
41046
42493
  editor.e.on(elm, 'mousedown touchstart', ()=>{
42494
+ var _a;
41047
42495
  removeCaretText(elm);
41048
- editor.s.select(elm);
42496
+ editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
41049
42497
  });
41050
42498
  }
41051
42499
  });
@@ -41069,13 +42517,14 @@ __decorate([
41069
42517
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
41070
42518
  ], imageProcessor.prototype, "afterChange", null);
41071
42519
  function isImageSelected(jodit) {
42520
+ var _a;
41072
42521
  const { sel } = jodit.s;
41073
42522
  if (!sel || !sel.rangeCount) {
41074
42523
  return false;
41075
42524
  }
41076
42525
  const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
41077
42526
  const node = startContainer.childNodes[startOffset];
41078
- return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
42527
+ return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node)) !== null && _a !== void 0 ? _a : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
41079
42528
  }
41080
42529
  /**
41081
42530
  * Remove the invisible-space text beside an image, which only held a caret.
@@ -41139,6 +42588,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41139
42588
  useImageEditor: true,
41140
42589
  editTitle: true,
41141
42590
  editAlt: true,
42591
+ showCaptionCheckbox: true,
41142
42592
  editLink: true,
41143
42593
  editSize: true,
41144
42594
  editBorderRadius: true,
@@ -41233,10 +42683,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41233
42683
  dialog.close();
41234
42684
  });
41235
42685
  buttons.remove.onAction(()=>{
42686
+ var _a;
42687
+ const { sourceImage } = this.state;
42688
+ const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
41236
42689
  const caret = j.s.createRange();
41237
- caret.setStartBefore(this.state.sourceImage);
42690
+ caret.setStartBefore(target);
41238
42691
  caret.collapse(true);
41239
- j.s.removeNode(this.state.sourceImage);
42692
+ j.s.removeNode(target);
41240
42693
  dialog.close();
41241
42694
  j.s.selectRange(caret);
41242
42695
  });
@@ -41258,12 +42711,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41258
42711
  if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
41259
42712
  return;
41260
42713
  }
42714
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
42715
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
42716
+ // A blank caption, as one the dialog has added, takes the caret, as
42717
+ // the image popup's Caption button does
42718
+ if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
42719
+ j.s.setCursorIn(caption);
42720
+ return;
42721
+ }
42722
+ // A captioned image is selected with its caption, as a click selects it
42723
+ const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
41261
42724
  if (j.o.image.selectImageAfterClose) {
41262
- j.s.select(sourceImage);
42725
+ j.s.select(target);
41263
42726
  return;
41264
42727
  }
41265
42728
  const caret = j.s.createRange();
41266
- caret.setStartAfter(sourceImage);
42729
+ caret.setStartAfter(target);
41267
42730
  caret.collapse(true);
41268
42731
  j.s.selectRange(caret);
41269
42732
  });
@@ -41399,6 +42862,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
41399
42862
  borderRadius: 0,
41400
42863
  imageTitle: '',
41401
42864
  imageAlt: '',
42865
+ imageCaption: false,
41402
42866
  imageLink: '',
41403
42867
  imageLinkOpenInNewTab: false,
41404
42868
  imageWidth: 0,
@@ -41465,10 +42929,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41465
42929
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
41466
42930
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
41467
42931
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
41468
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
41469
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
41470
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
41471
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
42932
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
42933
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
42934
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
42935
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
42936
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
41472
42937
  /*!
41473
42938
  * Jodit Editor (https://xdsoft.net/jodit/)
41474
42939
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41480,12 +42945,18 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41480
42945
 
41481
42946
 
41482
42947
 
42948
+
41483
42949
  /**
41484
42950
  * Read values from image and set it to state
41485
42951
  * @private
41486
42952
  */ async function readValuesFromImage(j, state) {
41487
42953
  const { sourceImage: image, values } = state;
41488
- (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
42954
+ // A captioned image's caption element holds its place on the page and
42955
+ // its width
42956
+ const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
42957
+ const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
42958
+ values.imageCaption = Boolean(wrapper);
42959
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
41489
42960
  // Border radius
41490
42961
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
41491
42962
  // Id
@@ -41499,13 +42970,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41499
42970
  // Classes
41500
42971
  values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
41501
42972
  // Margins
41502
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
42973
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
41503
42974
  // Link
41504
- (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
42975
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
41505
42976
  // Src
41506
42977
  values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
41507
42978
  // Image size
41508
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
42979
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
41509
42980
  }
41510
42981
 
41511
42982
 
@@ -41596,19 +43067,17 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
41596
43067
  * Jodit Editor (https://xdsoft.net/jodit/)
41597
43068
  * Released under MIT see LICENSE.txt in the project root for license information.
41598
43069
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
41599
- */ /**
41600
- * @module plugins/image-properties
41601
43070
  */
41602
43071
 
41603
43072
 
41604
43073
 
41605
- /** @private */ async function readSizes(image, values, state) {
43074
+ /** @private */ async function readSizes(image, values, state, captionWrapper) {
41606
43075
  try {
41607
43076
  await image.decode();
41608
43077
  } catch (e) {
41609
43078
  console.error(e);
41610
43079
  }
41611
- const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
43080
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(captionWrapper !== null && captionWrapper !== void 0 ? captionWrapper : image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
41612
43081
  const height = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'height') || false;
41613
43082
  values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
41614
43083
  if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
@@ -41883,6 +43352,12 @@ UIImagePropertiesForm = __decorate([
41883
43352
  <label>~Alternative~</label>
41884
43353
  <input type="text" class="jodit-input &__imageAlt"/>
41885
43354
  </div>
43355
+ <div class="jodit-form__group &__captionCheckbox">
43356
+ <label class="jodit_vertical_middle">
43357
+ <input type="checkbox" class="jodit-checkbox &__imageCaption"/>
43358
+ <span>~Caption~</span>
43359
+ </label>
43360
+ </div>
41886
43361
  <div class="jodit-form__group &__editLink">
41887
43362
  <label>~Link~</label>
41888
43363
  <input type="text" class="jodit-input &__imageLink"/>
@@ -41927,6 +43402,13 @@ UIImagePropertiesForm = __decorate([
41927
43402
  onAltChange() {
41928
43403
  this.state.values.imageAlt = this.getElm('imageAlt').value;
41929
43404
  }
43405
+ onStateCaptionChange() {
43406
+ const caption = this.getElm('imageCaption');
43407
+ caption.checked = this.state.values.imageCaption;
43408
+ }
43409
+ onCaptionChange() {
43410
+ this.state.values.imageCaption = this.getElm('imageCaption').checked;
43411
+ }
41930
43412
  onStateImageLinkChange() {
41931
43413
  const imageLink = this.getElm('imageLink');
41932
43414
  imageLink.value = this.state.values.imageLink;
@@ -41957,6 +43439,10 @@ UIImagePropertiesForm = __decorate([
41957
43439
  'editAlt',
41958
43440
  'editAlt'
41959
43441
  ],
43442
+ [
43443
+ 'showCaptionCheckbox',
43444
+ 'captionCheckbox'
43445
+ ],
41960
43446
  [
41961
43447
  'editLink',
41962
43448
  'editLink'
@@ -42012,6 +43498,12 @@ __decorate([
42012
43498
  __decorate([
42013
43499
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
42014
43500
  ], UIImageMainTab.prototype, "onAltChange", null);
43501
+ __decorate([
43502
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
43503
+ ], UIImageMainTab.prototype, "onStateCaptionChange", null);
43504
+ __decorate([
43505
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
43506
+ ], UIImageMainTab.prototype, "onCaptionChange", null);
42015
43507
  __decorate([
42016
43508
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
42017
43509
  ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
@@ -42456,6 +43948,33 @@ UIImagePositionTab = __decorate([
42456
43948
  /* harmony export */ ]);
42457
43949
 
42458
43950
 
43951
+ /***/ }),
43952
+
43953
+ /***/ 29509:
43954
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43955
+
43956
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43957
+ /* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
43958
+ /* harmony export */ });
43959
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
43960
+ /*!
43961
+ * Jodit Editor (https://xdsoft.net/jodit/)
43962
+ * Released under MIT see LICENSE.txt in the project root for license information.
43963
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43964
+ */
43965
+ /**
43966
+ * Gives the image a caption or takes it away, and returns the element that
43967
+ * holds the image's place on the page: the caption's, or the image
43968
+ * @private
43969
+ */ function applyCaption(j, image, imageCaption) {
43970
+ var _a;
43971
+ if (j.o.image.showCaptionCheckbox) {
43972
+ j.e.fire('toggleImageCaption', image, imageCaption);
43973
+ }
43974
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
43975
+ }
43976
+
43977
+
42459
43978
  /***/ }),
42460
43979
 
42461
43980
  /***/ 34755:
@@ -42467,9 +43986,10 @@ UIImagePositionTab = __decorate([
42467
43986
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42468
43987
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
42469
43988
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42470
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29615);
42471
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14721);
42472
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87602);
43989
+ /* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
43990
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
43991
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
43992
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
42473
43993
  /*!
42474
43994
  * Jodit Editor (https://xdsoft.net/jodit/)
42475
43995
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42480,11 +44000,13 @@ UIImagePositionTab = __decorate([
42480
44000
 
42481
44001
 
42482
44002
 
44003
+
42483
44004
  /**
42484
44005
  * Apply form's values to image
42485
44006
  * @private
42486
44007
  */ function applyValuesToImage(j, state, image) {
42487
- const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
44008
+ var _a;
44009
+ const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
42488
44010
  const opt = j.o;
42489
44011
  // styles
42490
44012
  if (opt.image.editStyle) {
@@ -42494,7 +44016,7 @@ UIImagePositionTab = __decorate([
42494
44016
  if (imageSrc) {
42495
44017
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
42496
44018
  } else {
42497
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
44019
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove((_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image);
42498
44020
  return;
42499
44021
  }
42500
44022
  // Border radius
@@ -42504,21 +44026,24 @@ UIImagePositionTab = __decorate([
42504
44026
  // Alt
42505
44027
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
42506
44028
  // Link
42507
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42508
- // Size
42509
- (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked);
42510
- // Margin
42511
- if (j.o.image.editMargins) {
42512
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
42513
- }
44029
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
42514
44030
  if (opt.image.editClass) {
42515
44031
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
42516
44032
  }
42517
44033
  if (opt.image.editId) {
42518
44034
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
42519
44035
  }
44036
+ // The caption's element takes the image's place on the page and its width,
44037
+ // so it's added or taken away after the image's own style and classes
44038
+ const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
44039
+ // Size
44040
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
44041
+ // Margin
44042
+ if (j.o.image.editMargins) {
44043
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
44044
+ }
42520
44045
  if (opt.image.editAlign) {
42521
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
44046
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(box, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, box));
42522
44047
  }
42523
44048
  }
42524
44049
 
@@ -42533,12 +44058,14 @@ UIImagePositionTab = __decorate([
42533
44058
  /* harmony export */ });
42534
44059
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
42535
44060
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
44061
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
42536
44062
  /*!
42537
44063
  * Jodit Editor (https://xdsoft.net/jodit/)
42538
44064
  * Released under MIT see LICENSE.txt in the project root for license information.
42539
44065
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42540
44066
  */
42541
44067
 
44068
+
42542
44069
  /** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
42543
44070
  // Link
42544
44071
  let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
@@ -42552,8 +44079,11 @@ UIImagePositionTab = __decorate([
42552
44079
  const relParts = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
42553
44080
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
42554
44081
  }
42555
- } else {
42556
- if (link && link.parentNode) {
44082
+ } else if (link && link.parentNode) {
44083
+ // Froala keeps a linked image's caption inside the link
44084
+ if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
44085
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
44086
+ } else {
42557
44087
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
42558
44088
  }
42559
44089
  }
@@ -42631,7 +44161,19 @@ UIImagePositionTab = __decorate([
42631
44161
 
42632
44162
 
42633
44163
 
42634
- /** @private */ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
44164
+ /**
44165
+ * A captioned image fills its caption's element, `box`, which takes the width
44166
+ * @private
44167
+ */ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
44168
+ if (box !== image) {
44169
+ const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
44170
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
44171
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
44172
+ width: width && '100%',
44173
+ height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
44174
+ });
44175
+ return;
44176
+ }
42635
44177
  // Size
42636
44178
  if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
42637
44179
  const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
@@ -42795,19 +44337,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42795
44337
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
42796
44338
 
42797
44339
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44340
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
44341
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
42798
44342
  /*!
42799
44343
  * Jodit Editor (https://xdsoft.net/jodit/)
42800
44344
  * Released under MIT see LICENSE.txt in the project root for license information.
42801
44345
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42802
- */ /**
42803
- * @module plugins/indent
42804
44346
  */
44347
+
44348
+
42805
44349
  /**
42806
44350
  * Get style rule key for current direction
42807
44351
  * @internal
42808
44352
  */ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
44353
+ /**
44354
+ * Indents or outdents a box by `indentMargin`
44355
+ * @internal
44356
+ */ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44357
+ if (!currentBox) {
44358
+ return;
44359
+ }
44360
+ if (processedElements.has(currentBox)) {
44361
+ return;
44362
+ }
44363
+ const key = getKey(editor.o.direction, currentBox);
44364
+ processedElements.add(currentBox);
44365
+ const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
44366
+ let value = current ? parseInt(current, 10) : 0;
44367
+ value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
44368
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
44369
+ if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
44370
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
44371
+ }
44372
+ };
42809
44373
 
42810
44374
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
44375
+ /* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
42811
44376
  /* harmony export */ "getKey", 0, /* binding */ getKey
42812
44377
  /* harmony export */ ]);
42813
44378
 
@@ -42838,9 +44403,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42838
44403
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
42839
44404
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
42840
44405
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43555);
42841
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
42842
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54389);
42843
- /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(302);
44406
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
44407
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
42844
44408
  /*!
42845
44409
  * Jodit Editor (https://xdsoft.net/jodit/)
42846
44410
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42851,24 +44415,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
42851
44415
 
42852
44416
 
42853
44417
 
42854
-
42855
- const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42856
- if (!currentBox) {
42857
- return;
42858
- }
42859
- if (processedElements.has(currentBox)) {
42860
- return;
42861
- }
42862
- const key = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_6__.getKey)(editor.o.direction, currentBox);
42863
- processedElements.add(currentBox);
42864
- const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.cssInline)(currentBox, key);
42865
- let value = current ? parseInt(current, 10) : 0;
42866
- value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
42867
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(currentBox, key, value > 0 ? value : '');
42868
- if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style')) {
42869
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style', null);
42870
- }
42871
- };
42872
44418
  /**
42873
44419
  * Indents the line containing the selection or insertion point.
42874
44420
  */ function indent(editor) {
@@ -42887,7 +44433,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42887
44433
  if (isBrMode && editor.s.isCollapsed()) {
42888
44434
  if (current) {
42889
44435
  const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
42890
- applyIndentToBox(processedElements, box, editor, command);
44436
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
42891
44437
  return false;
42892
44438
  }
42893
44439
  }
@@ -42901,7 +44447,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
42901
44447
  editor.s.restore();
42902
44448
  return false;
42903
44449
  }
42904
- applyIndentToBox(processedElements, currentBox, editor, command);
44450
+ ;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
42905
44451
  editor.s.restore();
42906
44452
  });
42907
44453
  editor.synchronizeValues();
@@ -43002,11 +44548,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43002
44548
  /* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
43003
44549
  /* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
43004
44550
  /* harmony import */ var _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75393);
43005
- /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14862);
43006
- /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96257);
43007
- /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9914);
43008
- /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53696);
43009
- /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(33489);
44551
+ /* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
44552
+ /* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
44553
+ /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
44554
+ /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
44555
+ /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
44556
+ /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
44557
+ /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
43010
44558
  /*!
43011
44559
  * Jodit Editor (https://xdsoft.net/jodit/)
43012
44560
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43026,13 +44574,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
43026
44574
 
43027
44575
 
43028
44576
 
44577
+
44578
+
43029
44579
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
43030
44580
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
43031
44581
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
43032
44582
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
43033
44583
  'source'
43034
44584
  ];
43035
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]);
44585
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('caption', _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('headerrow', _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__["default"]);
43036
44586
  // Register cell popup buttons as global controls so they can be
43037
44587
  // referenced by name in custom popup configurations.
43038
44588
  // Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
@@ -43109,15 +44659,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
43109
44659
  /***/ 62000:
43110
44660
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43111
44661
 
43112
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27613);
43113
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
44662
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44663
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
44664
+ /* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
44665
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43114
44666
  /*!
43115
44667
  * Jodit Editor (https://xdsoft.net/jodit/)
43116
44668
  * Released under MIT see LICENSE.txt in the project root for license information.
43117
44669
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43118
44670
  */
43119
44671
 
43120
- const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
44672
+
44673
+
44674
+ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43121
44675
  /* harmony default export */ __webpack_exports__["default"] = ([
43122
44676
  'brushCell',
43123
44677
  {
@@ -43132,7 +44686,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43132
44686
  exec: (editor, table, { control })=>{
43133
44687
  const command = cmd(control);
43134
44688
  editor.getInstance('Table', editor.o).getAllSelectedCells().forEach((cell)=>{
43135
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
44689
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
43136
44690
  });
43137
44691
  },
43138
44692
  tooltip: 'Vertical align'
@@ -43162,7 +44716,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43162
44716
  tableaddcolumnafter: 'Insert column after'
43163
44717
  },
43164
44718
  exec: (editor, table, { control })=>{
43165
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44719
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43166
44720
  return;
43167
44721
  }
43168
44722
  if (!control.args) {
@@ -43180,7 +44734,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43180
44734
  tableaddrowafter: 'Insert row below'
43181
44735
  },
43182
44736
  exec: (editor, table, { control })=>{
43183
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44737
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43184
44738
  return;
43185
44739
  }
43186
44740
  if (!control.args) {
@@ -43191,6 +44745,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43191
44745
  },
43192
44746
  tooltip: 'Add row'
43193
44747
  },
44748
+ {
44749
+ name: 'headerrow',
44750
+ exec: (editor, table)=>{
44751
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(table, 'table')) {
44752
+ return;
44753
+ }
44754
+ editor.execCommand('tableheaderrow', false, table);
44755
+ const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
44756
+ // Beside the cell that replaced the one it opened for
44757
+ if (cell) {
44758
+ editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
44759
+ }
44760
+ // The popup stays open, so the button shows the new state
44761
+ return true;
44762
+ },
44763
+ isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
44764
+ isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
44765
+ tooltip: 'Header row'
44766
+ },
43194
44767
  {
43195
44768
  name: 'deleteTable',
43196
44769
  icon: 'bin',
@@ -43201,7 +44774,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43201
44774
  tableempty: 'Empty cell'
43202
44775
  },
43203
44776
  exec: (editor, table, { control })=>{
43204
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
44777
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
43205
44778
  return;
43206
44779
  }
43207
44780
  if (!control.args) {
@@ -43261,7 +44834,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43261
44834
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
43262
44835
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
43263
44836
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
43264
- /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
44837
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
44838
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
43265
44839
  /*!
43266
44840
  * Jodit Editor (https://xdsoft.net/jodit/)
43267
44841
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -43271,6 +44845,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
43271
44845
 
43272
44846
 
43273
44847
 
44848
+
43274
44849
  // A Normal image sits where the text of its line is aligned (#1531)
43275
44850
  const lineAlign = (editor, elm)=>{
43276
44851
  const block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
@@ -43291,7 +44866,15 @@ const lineAlign = (editor, elm)=>{
43291
44866
  return 'left';
43292
44867
  }
43293
44868
  };
43294
- const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm)) : 'normal';
44869
+ // A captioned image is aligned by the element holding it and its caption
44870
+ const alignedBox = (editor, elm)=>{
44871
+ var _a;
44872
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
44873
+ };
44874
+ const currentAlign = (editor, elm)=>{
44875
+ const box = alignedBox(editor, elm);
44876
+ return box ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(box, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box)) : 'normal';
44877
+ };
43295
44878
  const align = {
43296
44879
  name: 'left',
43297
44880
  childTemplate: (_, __, value)=>value,
@@ -43317,14 +44900,15 @@ const align = {
43317
44900
  'img',
43318
44901
  'jodit',
43319
44902
  'jodit-media'
43320
- ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
44903
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
43321
44904
  return;
43322
44905
  }
43323
44906
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
43324
44907
  if (!command) {
43325
44908
  return false;
43326
44909
  }
43327
- ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm));
44910
+ const box = alignedBox(editor, elm);
44911
+ (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(box, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box));
43328
44912
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
43329
44913
  'jodit',
43330
44914
  'jodit-media'
@@ -43343,7 +44927,8 @@ const align = {
43343
44927
  icon: 'bin',
43344
44928
  tooltip: 'Delete',
43345
44929
  exec: (editor, image)=>{
43346
- image && editor.s.removeNode(image);
44930
+ var _a;
44931
+ image && editor.s.removeNode((_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)) !== null && _a !== void 0 ? _a : image);
43347
44932
  }
43348
44933
  },
43349
44934
  {
@@ -43356,6 +44941,24 @@ const align = {
43356
44941
  },
43357
44942
  tooltip: 'Edit'
43358
44943
  },
44944
+ {
44945
+ name: 'caption',
44946
+ exec: (editor, image)=>{
44947
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
44948
+ return;
44949
+ }
44950
+ const caption = editor.e.fire('toggleImageCaption', image);
44951
+ editor.synchronizeValues();
44952
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
44953
+ editor.e.fire('hideResizer');
44954
+ editor.s.setCursorIn(caption);
44955
+ } else {
44956
+ editor.e.fire('recalcPositionPopup');
44957
+ }
44958
+ },
44959
+ isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
44960
+ tooltip: 'Caption'
44961
+ },
43359
44962
  {
43360
44963
  name: 'valign',
43361
44964
  list: [
@@ -43365,13 +44968,14 @@ const align = {
43365
44968
  'Normal'
43366
44969
  ],
43367
44970
  tooltip: 'Vertical align',
43368
- // `vertical-align` only moves an image in the line, not a floated or block one
44971
+ // `vertical-align` only moves an image in the line, not a floated or block
44972
+ // one, nor a captioned one, which is placed by its caption's element
43369
44973
  isDisabled: (editor, button)=>{
43370
44974
  const image = button.target;
43371
44975
  return Boolean(image && ([
43372
44976
  'left',
43373
44977
  'right'
43374
- ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
44978
+ ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block' || (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)));
43375
44979
  },
43376
44980
  exec: (editor, image, { control })=>{
43377
44981
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
@@ -43449,6 +45053,22 @@ const align = {
43449
45053
  /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"7\" rx=\"1\"/><path d=\"M12 3v7M12 14v7m-3.5-3.5h7\"/> </g> </svg> ");
43450
45054
 
43451
45055
 
45056
+ /***/ }),
45057
+
45058
+ /***/ 72972:
45059
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45060
+
45061
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3 13 5-4 4 3 3-3 6 5\"/><path d=\"M7 21h10\"/> </g> </svg> ");
45062
+
45063
+
45064
+ /***/ }),
45065
+
45066
+ /***/ 44597:
45067
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
45068
+
45069
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2.5\"/><path d=\"M3 9V5.5A2.5 2.5 0 0 1 5.5 3h13A2.5 2.5 0 0 1 21 5.5V9z\" fill=\"currentColor\"/><path d=\"M3 15h18M9 9v12M15 9v12\"/> </g> </svg> ");
45070
+
45071
+
43452
45072
  /***/ }),
43453
45073
 
43454
45074
  /***/ 14862:
@@ -43541,8 +45161,8 @@ const align = {
43541
45161
  if (target && type && this.canShowPopupForType(type)) {
43542
45162
  const isMedia = type === 'jodit-media';
43543
45163
  // Beside the media in a wrapper kept in the content, which can fill
43544
- // the line
43545
- const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
45164
+ // the line, and below a captioned image's caption, so it stays in view
45165
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, target) || target;
43546
45166
  this.showPopup(()=>this.__bound(bound, isMedia), type, target);
43547
45167
  return false;
43548
45168
  }
@@ -46431,6 +48051,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
46431
48051
  * Check if root node is empty
46432
48052
  * @private
46433
48053
  */ function isEditorEmpty(root) {
48054
+ var _a;
48055
+ // A non-breaking space is typed, where other white space can just lay out
48056
+ // the HTML
48057
+ return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
48058
+ }
48059
+ function isBlank(root) {
46434
48060
  var _a;
46435
48061
  if (!root.firstChild) {
46436
48062
  return true;
@@ -46951,6 +48577,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
46951
48577
 
46952
48578
 
46953
48579
  const key = 'table_processor_observer-resize';
48580
+ /**
48581
+ * How near the top or bottom of what a row scrolls in the pointer starts
48582
+ * scrolling it, as the editor's iframe passes on no moves outside it
48583
+ */ const SCROLL_EDGE = 20;
46954
48584
  /**
46955
48585
  * Process tables in editor
46956
48586
  */ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
@@ -46970,7 +48600,11 @@ const key = 'table_processor_observer-resize';
46970
48600
  }
46971
48601
  hideResizeHandle() {
46972
48602
  this.hideTimeout = this.j.async.setTimeout(()=>{
46973
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48603
+ // A late move from inside the cell can come once the pointer
48604
+ // is on the handle, which covers the border
48605
+ if (!this.resizeHandler.matches(':hover')) {
48606
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
48607
+ }
46974
48608
  }, {
46975
48609
  timeout: this.j.defaultTimeout,
46976
48610
  label: 'hideResizer'
@@ -46987,6 +48621,30 @@ const key = 'table_processor_observer-resize';
46987
48621
  this.startX = event.clientX;
46988
48622
  this.j.lock(key);
46989
48623
  this.resizeHandler.classList.add('jodit-table-resizer_moved');
48624
+ if (this.workRow) {
48625
+ this.startY = event.clientY;
48626
+ this.startHeight = this.workRow.offsetHeight;
48627
+ this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
48628
+ this.scrolled = 0;
48629
+ this.anchored = scrollersOf(this.workRow).map((elm)=>{
48630
+ const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
48631
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
48632
+ return [
48633
+ elm,
48634
+ style
48635
+ ];
48636
+ });
48637
+ return false;
48638
+ }
48639
+ this.startStyles = [
48640
+ this.workTable,
48641
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
48642
+ ].map((elm)=>[
48643
+ elm,
48644
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
48645
+ ]);
48646
+ this.startLeft = parseFloat(this.resizeHandler.style.left);
48647
+ this.startEdge = this.columnEdge();
46990
48648
  let box;
46991
48649
  this.minX = 0;
46992
48650
  this.maxX = 1000000;
@@ -47013,12 +48671,21 @@ const key = 'table_processor_observer-resize';
47013
48671
  /**
47014
48672
  * Mouse move after click on resize handle
47015
48673
  */ onMouseMove(event) {
48674
+ var _a;
47016
48675
  if (!this.drag) {
47017
48676
  return;
47018
48677
  }
47019
48678
  this.j.e.fire('closeAllPopups');
47020
48679
  let x = event.clientX;
47021
48680
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.resizeHandler.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
48681
+ if (this.workRow) {
48682
+ const view = scrollViewOf(this.workRow);
48683
+ this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
48684
+ this.resizeRow(this.workRow);
48685
+ this.scrollAlong(view, event.clientY);
48686
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
48687
+ return;
48688
+ }
47022
48689
  if (x < this.minX) {
47023
48690
  x = this.minX;
47024
48691
  }
@@ -47026,7 +48693,14 @@ const key = 'table_processor_observer-resize';
47026
48693
  x = this.maxX;
47027
48694
  }
47028
48695
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
47029
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', x - (this.j.o.iframe ? 0 : workplacePosition.left) + 'px');
48696
+ this.restoreStyles();
48697
+ this.resizeColumnsOrTable();
48698
+ const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
48699
+ Object.assign(this.resizeHandler.style, {
48700
+ left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
48701
+ top: tableBox.top - workplacePosition.top + 'px',
48702
+ height: tableBox.height + 'px'
48703
+ });
47030
48704
  const sel = this.j.s.sel;
47031
48705
  sel && sel.removeAllRanges();
47032
48706
  }
@@ -47043,17 +48717,96 @@ const key = 'table_processor_observer-resize';
47043
48717
  this.drag = false;
47044
48718
  this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
47045
48719
  this.resizeHandler.classList.remove('jodit-table-resizer_moved');
47046
- if (this.startX !== e.clientX) {
47047
- // resize column
47048
- if (this.wholeTable == null) {
47049
- this.resizeColumns();
48720
+ if (this.workRow) {
48721
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48722
+ this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48723
+ this.anchored = [];
48724
+ const height = this.workRow.offsetHeight;
48725
+ if (height !== this.startHeight) {
48726
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
47050
48727
  } else {
47051
- this.resizeTable();
48728
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
48729
+ }
48730
+ } else {
48731
+ this.restoreStyles();
48732
+ if (this.startX !== e.clientX) {
48733
+ this.resizeColumnsOrTable();
47052
48734
  }
47053
48735
  }
47054
48736
  this.j.synchronizeValues();
47055
48737
  this.j.s.focus();
47056
48738
  }
48739
+ resizeColumnsOrTable() {
48740
+ if (this.wholeTable == null) {
48741
+ this.resizeColumns();
48742
+ } else {
48743
+ this.resizeTable();
48744
+ }
48745
+ }
48746
+ restoreStyles() {
48747
+ this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
48748
+ }
48749
+ /**
48750
+ * Where the border the handle is on lies: the work cell's left side
48751
+ * for the table's left edge, otherwise its right side
48752
+ */ columnEdge() {
48753
+ const { left, right } = this.workCell.getBoundingClientRect();
48754
+ return this.wholeTable === true ? left : right;
48755
+ }
48756
+ /**
48757
+ * Sets the row's height from where the pointer is, and how far the drag
48758
+ * has scrolled. The browser keeps the row as tall as its content
48759
+ */ resizeRow(row) {
48760
+ const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
48761
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
48762
+ this.placeRowHandle(row);
48763
+ return row.offsetHeight === height;
48764
+ }
48765
+ /**
48766
+ * While the pointer is near or past the top or bottom of the part of the
48767
+ * row's scroller in view, scrolls it on, and the row's border with it
48768
+ */ scrollAlong(view, clientY) {
48769
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
48770
+ const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
48771
+ if (!past) {
48772
+ return;
48773
+ }
48774
+ const { scroller } = view;
48775
+ const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
48776
+ const scroll = ()=>{
48777
+ const { workRow } = this;
48778
+ if (!workRow) {
48779
+ return;
48780
+ }
48781
+ const scrollTop = scroller.scrollTop;
48782
+ if (step > 0) {
48783
+ // Growing the row first makes the room to scroll down into
48784
+ this.scrolled += step;
48785
+ this.resizeRow(workRow);
48786
+ scroller.scrollTop = scrollTop + step;
48787
+ const missed = step - (scroller.scrollTop - scrollTop);
48788
+ if (missed > 0.5) {
48789
+ this.scrolled -= missed;
48790
+ this.resizeRow(workRow);
48791
+ return;
48792
+ }
48793
+ this.placeRowHandle(workRow);
48794
+ } else {
48795
+ scroller.scrollTop = scrollTop + step;
48796
+ const moved = scroller.scrollTop - scrollTop;
48797
+ this.scrolled += moved;
48798
+ // A row at its content's height can't follow the pointer up
48799
+ if (!moved || !this.resizeRow(workRow)) {
48800
+ scroller.scrollTop = scrollTop;
48801
+ this.scrolled -= moved;
48802
+ this.resizeRow(workRow);
48803
+ return;
48804
+ }
48805
+ }
48806
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48807
+ };
48808
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48809
+ }
47057
48810
  /**
47058
48811
  * Resize only one column
47059
48812
  */ resizeColumns() {
@@ -47096,15 +48849,20 @@ const key = 'table_processor_observer-resize';
47096
48849
  }
47097
48850
  /**
47098
48851
  * Calc helper resize handle position
47099
- */ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
48852
+ */ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
47100
48853
  const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
47101
48854
  if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
47102
- this.hideResizeHandle();
48855
+ if (!this.calcRowHandlePosition(cell, clientY)) {
48856
+ this.hideResizeHandle();
48857
+ }
47103
48858
  return;
47104
48859
  }
48860
+ this.workRow = null;
48861
+ this.resizeHandler.classList.remove('jodit-table-resizer_row');
47105
48862
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), parentBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(table, this.j, this.j.ed);
47106
48863
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', (offsetX <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + 'px');
47107
48864
  Object.assign(this.resizeHandler.style, {
48865
+ width: '',
47108
48866
  height: parentBox.height + 'px',
47109
48867
  top: parentBox.top - workplacePosition.top + 'px'
47110
48868
  });
@@ -47117,6 +48875,36 @@ const key = 'table_processor_observer-resize';
47117
48875
  this.setWorkCell(cell, !nextTD ? false : null);
47118
48876
  }
47119
48877
  }
48878
+ /**
48879
+ * Shows the handle across the table on the border below a row, near the
48880
+ * cell's bottom or near its top, which is the bottom of the row above.
48881
+ * The table's top edge has no row above it
48882
+ */ calcRowHandlePosition(cell, clientY) {
48883
+ const { top, bottom } = cell.getBoundingClientRect();
48884
+ const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(cell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), this.j.editor);
48885
+ const index = cell.parentNode.rowIndex;
48886
+ const row = Math.abs(bottom - clientY) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index + cell.rowSpan - 1] : Math.abs(clientY - top) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index - 1] : null;
48887
+ if (!row) {
48888
+ return false;
48889
+ }
48890
+ this.workRow = row;
48891
+ this.workTable = table;
48892
+ this.resizeHandler.classList.add('jodit-table-resizer_row');
48893
+ this.placeRowHandle(row);
48894
+ this.showResizeHandle();
48895
+ return true;
48896
+ }
48897
+ /**
48898
+ * Lays the handle across the table on the border below the row
48899
+ */ placeRowHandle(row) {
48900
+ const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed), rowBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(row, this.j, this.j.ed);
48901
+ Object.assign(this.resizeHandler.style, {
48902
+ left: tableBox.left - workplacePosition.left + 'px',
48903
+ width: tableBox.width + 'px',
48904
+ height: '',
48905
+ top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
48906
+ });
48907
+ }
47120
48908
  /** @override */ afterInit(editor) {
47121
48909
  if (!editor.o.tableAllowCellResize) {
47122
48910
  return;
@@ -47124,7 +48912,7 @@ const key = 'table_processor_observer-resize';
47124
48912
  editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
47125
48913
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
47126
48914
  }).on(this.j.ow, 'scroll.resize-cells', ()=>{
47127
- if (!this.drag) {
48915
+ if (!this.drag || this.workRow) {
47128
48916
  return;
47129
48917
  }
47130
48918
  const parent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.workCell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), editor.editor);
@@ -47148,7 +48936,7 @@ const key = 'table_processor_observer-resize';
47148
48936
  }
47149
48937
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
47150
48938
  this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
47151
- if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
48939
+ if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
47152
48940
  this.hideResizeHandle();
47153
48941
  }
47154
48942
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
@@ -47159,7 +48947,7 @@ const key = 'table_processor_observer-resize';
47159
48947
  if (!cell) {
47160
48948
  return;
47161
48949
  }
47162
- this.calcHandlePosition(table, cell, event.offsetX);
48950
+ this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
47163
48951
  }, {
47164
48952
  timeout: this.j.defaultTimeout
47165
48953
  }));
@@ -47180,6 +48968,10 @@ const key = 'table_processor_observer-resize';
47180
48968
  this.resizeHandler = this.j.c.div('jodit-table-resizer');
47181
48969
  this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
47182
48970
  this.j.async.clearTimeout(this.hideTimeout);
48971
+ }).on(this.resizeHandler, 'mouseleave.table', ()=>{
48972
+ if (!this.drag) {
48973
+ this.hideResizeHandle();
48974
+ }
47183
48975
  });
47184
48976
  }
47185
48977
  };
@@ -47188,6 +48980,25 @@ const key = 'table_processor_observer-resize';
47188
48980
  this.minX = 0;
47189
48981
  this.maxX = 0;
47190
48982
  this.startX = 0;
48983
+ /**
48984
+ * The table's and its cells' styles as a column drag started, put back
48985
+ * before each new width
48986
+ */ this.startStyles = [];
48987
+ this.startLeft = 0;
48988
+ this.startEdge = 0;
48989
+ /**
48990
+ * The row whose height the handle sets, or null while it sets a width
48991
+ */ this.workRow = null;
48992
+ this.startY = 0;
48993
+ this.startHeight = 0;
48994
+ this.rowStyle = null;
48995
+ /**
48996
+ * The boxes that scroll the row, with their styles, as a row drag turns
48997
+ * off their scroll anchoring, which would move the border off the pointer
48998
+ */ this.anchored = [];
48999
+ this.scrolled = 0;
49000
+ this.scrollFrame = 0;
49001
+ this.pointerY = 0;
47191
49002
  }
47192
49003
  }
47193
49004
  __decorate([
@@ -47202,6 +49013,45 @@ __decorate([
47202
49013
  __decorate([
47203
49014
  _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
47204
49015
  ], resizeCells.prototype, "observe", null);
49016
+ /**
49017
+ * The boxes around the row that can scroll it, nearest first, and its
49018
+ * document's
49019
+ */ function scrollersOf(row) {
49020
+ const doc = row.ownerDocument;
49021
+ const root = doc.scrollingElement || doc.documentElement;
49022
+ const scrollers = [];
49023
+ for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
49024
+ if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
49025
+ scrollers.push(elm);
49026
+ }
49027
+ }
49028
+ return [
49029
+ ...scrollers,
49030
+ root
49031
+ ];
49032
+ }
49033
+ /**
49034
+ * What scrolls the row up and down, the nearest box around it with more
49035
+ * than it shows or else its document, and the part of it in the window's view
49036
+ */ function scrollViewOf(row) {
49037
+ var _a, _b, _c;
49038
+ const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
49039
+ const scrollers = scrollersOf(row);
49040
+ const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
49041
+ if (scroller === scrollers[scrollers.length - 1]) {
49042
+ return {
49043
+ scroller,
49044
+ top: 0,
49045
+ bottom: height
49046
+ };
49047
+ }
49048
+ const top = scroller.getBoundingClientRect().top + scroller.clientTop;
49049
+ return {
49050
+ scroller,
49051
+ top: Math.max(top, 0),
49052
+ bottom: Math.min(top + scroller.clientHeight, height)
49053
+ };
49054
+ }
47205
49055
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
47206
49056
 
47207
49057
 
@@ -47677,6 +49527,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47677
49527
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
47678
49528
  }
47679
49529
  applySize(element, key, value) {
49530
+ // A captioned image fills the element holding it and its caption,
49531
+ // which takes the width
49532
+ const wrapper = key === 'width' && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'img') ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, element) : null;
49533
+ if (wrapper) {
49534
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
49535
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
49536
+ return;
49537
+ }
47680
49538
  const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
47681
49539
  if (changeAttrs) {
47682
49540
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
@@ -47691,6 +49549,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47691
49549
  return Boolean(this.element && this.j.editor.contains(this.element));
47692
49550
  }
47693
49551
  onDelete(e) {
49552
+ var _a;
47694
49553
  if (!this.element) {
47695
49554
  return;
47696
49555
  }
@@ -47699,7 +49558,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
47699
49558
  return;
47700
49559
  }
47701
49560
  if (this.element.tagName !== 'JODIT') {
47702
- this.j.s.select(this.element);
49561
+ this.j.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.element)) !== null && _a !== void 0 ? _a : this.element);
47703
49562
  } else {
47704
49563
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
47705
49564
  this.hide();
@@ -48928,8 +50787,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48928
50787
  'touchstartTd',
48929
50788
  'touchstartTh'
48930
50789
  ].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
48931
- // and mouseup on another cell call `click` only for `TR` element.
48932
- .on('clickTr clickTbody', ()=>{
50790
+ // and mouseup on another cell call `click` only for their common
50791
+ // ancestor: the row, the section, or the table across sections
50792
+ .on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
48933
50793
  var _a;
48934
50794
  const cellsCount = this.__tableModule.getAllSelectedCells().length;
48935
50795
  if (cellsCount) {
@@ -49093,14 +50953,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49093
50953
  }
49094
50954
  this.j.e.fire('hidePopup');
49095
50955
  e.stopPropagation();
49096
- // Hack for FireFox for force redraw selection
49097
- (()=>{
49098
- const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>');
49099
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, n);
49100
- this.j.async.setTimeout(()=>{
49101
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(n);
49102
- }, this.j.defaultTimeout / 5);
49103
- })();
49104
50956
  }
49105
50957
  /**
49106
50958
  * On click in outside - remove selection
@@ -49199,7 +51051,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49199
51051
  this.j.synchronizeValues();
49200
51052
  return false;
49201
51053
  }
49202
- if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
51054
+ if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
49203
51055
  command = command.replace('table', '');
49204
51056
  const cells = this.__tableModule.getAllSelectedCells();
49205
51057
  if (cells.length) {
@@ -49266,6 +51118,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49266
51118
  case 'addrowbefore':
49267
51119
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
49268
51120
  break;
51121
+ case 'headerrow':
51122
+ this.__toggleHeaderRow(table, cells);
51123
+ break;
49269
51124
  }
49270
51125
  if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
49271
51126
  this.__removeTable(table);
@@ -49274,6 +51129,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
49274
51129
  return false;
49275
51130
  }
49276
51131
  }
51132
+ /**
51133
+ * Turns the table's header row on or off. The caret and the marked cells
51134
+ * move to the cells that replace them
51135
+ */ __toggleHeaderRow(table, cells) {
51136
+ var _a, _b;
51137
+ const module = this.__tableModule;
51138
+ this.j.s.save();
51139
+ const replaced = module.toggleHeaderRow(table);
51140
+ this.j.s.restore();
51141
+ cells.forEach((cell)=>{
51142
+ const next = replaced.get(cell);
51143
+ if (next) {
51144
+ module.removeSelection(cell);
51145
+ module.addSelection(next);
51146
+ }
51147
+ });
51148
+ // As after the click that marked it, the command's own change keeps
51149
+ // the marks, so the popup can stay open for another toggle
51150
+ const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
51151
+ this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
51152
+ }
49277
51153
  /**
49278
51154
  * The cell that takes the caret when rows or columns are deleted: the next
49279
51155
  * one in the same column (or row) that is not deleted, else the previous one
@@ -52225,9 +54101,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52225
54101
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
52226
54102
 
52227
54103
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52228
- /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; }
54104
+ /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
54105
+ /* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
54106
+ /* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
54107
+ /* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
52229
54108
  /* harmony export */ });
52230
54109
  /* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
54110
+ /* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
52231
54111
  /*!
52232
54112
  * Jodit Editor (https://xdsoft.net/jodit/)
52233
54113
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52237,6 +54117,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52237
54117
  */
52238
54118
 
52239
54119
 
54120
+
52240
54121
  /***/ }),
52241
54122
 
52242
54123
  /***/ 26658:
@@ -52258,7 +54139,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
52258
54139
  * If so then add an internal list
52259
54140
  * @private
52260
54141
  */ function onTabInsideLi(jodit, shift = false) {
52261
- if (!jodit.o.tab.tabInsideLiInsertNewList) {
54142
+ // Focused with no range, as WebKit can leave it, there's no caret to
54143
+ // mark
54144
+ if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
52262
54145
  return false;
52263
54146
  }
52264
54147
  const [fake, fake2] = fakeCursors(jodit);
@@ -52355,6 +54238,279 @@ function removeNestedList(jodit, list, li) {
52355
54238
  }
52356
54239
 
52357
54240
 
54241
+ /***/ }),
54242
+
54243
+ /***/ 39481:
54244
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
54245
+
54246
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54247
+ /* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
54248
+ /* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
54249
+ /* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
54250
+ /* harmony export */ });
54251
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
54252
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
54253
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
54254
+ /* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
54255
+ /* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
54256
+ /*!
54257
+ * Jodit Editor (https://xdsoft.net/jodit/)
54258
+ * Released under MIT see LICENSE.txt in the project root for license information.
54259
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
54260
+ */
54261
+
54262
+
54263
+
54264
+
54265
+ const KEEPS_TABS = new Set([
54266
+ 'pre',
54267
+ 'pre-wrap',
54268
+ 'break-spaces'
54269
+ ]);
54270
+ const KEEPS_TABS_TAGS = new Set([
54271
+ 'pre',
54272
+ 'textarea',
54273
+ 'style',
54274
+ 'script'
54275
+ ]);
54276
+ /**
54277
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
54278
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
54279
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
54280
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
54281
+ * on: Escape and then Tab does that
54282
+ * @private
54283
+ */ function onTabSpaces(jodit, shift) {
54284
+ const { spaces } = jodit.o.tab;
54285
+ const current = jodit.s.current();
54286
+ if (!spaces || jodit.o.readonly || jodit.isLocked) {
54287
+ return false;
54288
+ }
54289
+ // The editor has the focus but no caret, so there's nowhere to put
54290
+ // anything, but the focus stays
54291
+ if (!current) {
54292
+ return true;
54293
+ }
54294
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
54295
+ return false;
54296
+ }
54297
+ if (!jodit.s.isCollapsed()) {
54298
+ jodit.execCommand(shift ? 'outdent' : 'indent');
54299
+ return true;
54300
+ }
54301
+ const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
54302
+ const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
54303
+ if (list && (!shift || isIndented(jodit, list))) {
54304
+ (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
54305
+ jodit.synchronizeValues();
54306
+ return true;
54307
+ }
54308
+ if (shift) {
54309
+ unindent(jodit, current, spaces);
54310
+ return true;
54311
+ }
54312
+ const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
54313
+ const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
54314
+ jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
54315
+ return true;
54316
+ }
54317
+ /**
54318
+ * Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
54319
+ * it, then a tab or up to `spaces` spaces at the start of its line, then the
54320
+ * indent of its block
54321
+ */ function unindent(jodit, current, spaces) {
54322
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
54323
+ const caret = jodit.createInside.fake();
54324
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
54325
+ let removed;
54326
+ try {
54327
+ removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
54328
+ if (removed) {
54329
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54330
+ }
54331
+ } finally{
54332
+ jodit.s.setCursorBefore(caret);
54333
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
54334
+ }
54335
+ if (removed) {
54336
+ jodit.synchronizeValues();
54337
+ } else if (block && isIndented(jodit, block)) {
54338
+ jodit.execCommand('outdent');
54339
+ }
54340
+ }
54341
+ function removeTabBefore(caret) {
54342
+ const before = caret.previousSibling;
54343
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
54344
+ before.deleteData(before.length - 1, 1);
54345
+ return true;
54346
+ }
54347
+ return false;
54348
+ }
54349
+ function removeLineIndent(jodit, block, caret, spaces) {
54350
+ const { whiteSpace } = jodit.ew.getComputedStyle(block);
54351
+ const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
54352
+ acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
54353
+ });
54354
+ const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
54355
+ return removeIndentAt(walker, start, offset, caret, spaces);
54356
+ }
54357
+ /**
54358
+ * Where the caret's line starts: after a `<br>`, after a newline where white
54359
+ * space keeps it, or at the caret
54360
+ */ function lineStart(walker, caret, keepsBreaks) {
54361
+ let start = null;
54362
+ let offset = 0;
54363
+ for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
54364
+ const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
54365
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
54366
+ start = null;
54367
+ } else if (lineBreak >= 0) {
54368
+ start = node;
54369
+ offset = lineBreak + 1;
54370
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
54371
+ start = node;
54372
+ offset = 0;
54373
+ }
54374
+ }
54375
+ return start ? [
54376
+ start,
54377
+ offset
54378
+ ] : [
54379
+ caret,
54380
+ 0
54381
+ ];
54382
+ }
54383
+ function removeIndentAt(walker, start, startOffset, caret, spaces) {
54384
+ let removed = 0;
54385
+ let offset = startOffset;
54386
+ walker.currentNode = start;
54387
+ for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
54388
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
54389
+ const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
54390
+ node.deleteData(offset, end - offset);
54391
+ removed += count;
54392
+ if (offset < node.length) {
54393
+ break;
54394
+ }
54395
+ }
54396
+ offset = 0;
54397
+ }
54398
+ return removed > 0;
54399
+ }
54400
+ /**
54401
+ * Where up to `count` spaces from `offset` end, and how many there were. A
54402
+ * tab at the start of a line is a whole indent
54403
+ */ function scanIndent(text, offset, count, atLineStart) {
54404
+ if (atLineStart && text[offset] === '\t') {
54405
+ return [
54406
+ offset + 1,
54407
+ count
54408
+ ];
54409
+ }
54410
+ let end = offset;
54411
+ let found = 0;
54412
+ for(; end < text.length && found < count; end += 1){
54413
+ const char = text[end];
54414
+ if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54415
+ break;
54416
+ }
54417
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54418
+ found += 1;
54419
+ }
54420
+ }
54421
+ return [
54422
+ end,
54423
+ found
54424
+ ];
54425
+ }
54426
+ function isIndented(jodit, box) {
54427
+ return parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(box, (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.getKey)(jodit.o.direction, box)) || '0', 10) > 0;
54428
+ }
54429
+ /**
54430
+ * With `tab.spaces`, Backspace just after that many spaces removes them
54431
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
54432
+ * if one of them is non-breaking, so a space between words stays
54433
+ * @private
54434
+ */ function removeTabSpaces(jodit, caret, upTo = false) {
54435
+ const { spaces } = jodit.o.tab;
54436
+ if (!spaces) {
54437
+ return false;
54438
+ }
54439
+ const range = jodit.s.createRange();
54440
+ range.setEndBefore(caret);
54441
+ let count = 0;
54442
+ let nonBreaking = false;
54443
+ for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
54444
+ let offset = node.length;
54445
+ for(; offset > 0 && count < spaces; offset -= 1){
54446
+ const char = node.data[offset - 1];
54447
+ if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
54448
+ nonBreaking = true;
54449
+ } else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54450
+ break;
54451
+ }
54452
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
54453
+ count += 1;
54454
+ }
54455
+ }
54456
+ range.setStart(node, offset);
54457
+ if (offset && count < spaces) {
54458
+ break;
54459
+ }
54460
+ }
54461
+ if (upTo ? !nonBreaking : count < spaces) {
54462
+ return false;
54463
+ }
54464
+ range.deleteContents();
54465
+ // An emptied line keeps a <br>, as after any Backspace, or it has no
54466
+ // height to hold the caret
54467
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
54468
+ return true;
54469
+ }
54470
+ /**
54471
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
54472
+ * show it as one space. Tabs in white space that's kept, and those that only
54473
+ * lay out the HTML, stay as they are
54474
+ * @private
54475
+ */ function tabsToSpaces(jodit, html) {
54476
+ var _a;
54477
+ const { spaces } = jodit.o.tab;
54478
+ const current = jodit.s.current();
54479
+ const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
54480
+ if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
54481
+ return;
54482
+ }
54483
+ // A template parses without loading images or running scripts
54484
+ const template = jodit.ed.createElement('template');
54485
+ template.innerHTML = html;
54486
+ const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
54487
+ let changed = false;
54488
+ for(let node = walker.nextNode(); node; node = walker.nextNode()){
54489
+ const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
54490
+ if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
54491
+ node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
54492
+ changed = true;
54493
+ }
54494
+ }
54495
+ return changed ? template.innerHTML : undefined;
54496
+ }
54497
+ /**
54498
+ * The fragment isn't rendered, so this reads the white space its own styles
54499
+ * and tags set. The text of `<style>` and `<script>` isn't shown at all
54500
+ */ function keepsTabs(node) {
54501
+ for(let el = node.parentElement; el; el = el.parentElement){
54502
+ const { whiteSpace } = el.style;
54503
+ if (whiteSpace) {
54504
+ return KEEPS_TABS.has(whiteSpace);
54505
+ }
54506
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
54507
+ return true;
54508
+ }
54509
+ }
54510
+ return false;
54511
+ }
54512
+
54513
+
52358
54514
  /***/ }),
52359
54515
 
52360
54516
  /***/ 66288:
@@ -52369,7 +54525,8 @@ function removeNestedList(jodit, list, li) {
52369
54525
  * @module plugins/tab
52370
54526
  */
52371
54527
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52372
- tabInsideLiInsertNewList: true
54528
+ tabInsideLiInsertNewList: true,
54529
+ spaces: 0
52373
54530
  };
52374
54531
 
52375
54532
 
@@ -52381,9 +54538,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52381
54538
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
52382
54539
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
52383
54540
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
52384
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50911);
52385
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66288);
52386
- /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47686);
54541
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
54542
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
54543
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
54544
+ /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
52387
54545
  /*!
52388
54546
  * Jodit Editor (https://xdsoft.net/jodit/)
52389
54547
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52400,30 +54558,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
52400
54558
 
52401
54559
 
52402
54560
 
52403
- class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.Plugin {
52404
- afterInit(jodit) {}
54561
+
54562
+ const MODIFIER_KEYS = new Set([
54563
+ 'Shift',
54564
+ 'Control',
54565
+ 'Alt',
54566
+ 'Meta',
54567
+ 'CapsLock'
54568
+ ]);
54569
+ class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
54570
+ afterInit(jodit) {
54571
+ // Without a namespace it runs ahead of table navigation, which would
54572
+ // take a released Tab
54573
+ jodit.e.on('keydown', this.__onKeyDownFirst, {
54574
+ top: true
54575
+ });
54576
+ }
54577
+ // An Escape that closes a popup has done its job
54578
+ __endRelease() {
54579
+ this.__released = false;
54580
+ }
54581
+ __onKeyDownFirst(event) {
54582
+ const released = this.__released;
54583
+ if (!MODIFIER_KEYS.has(event.key)) {
54584
+ this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
54585
+ }
54586
+ // The browser moves the focus
54587
+ if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
54588
+ this.j.e.stopPropagation('keydown');
54589
+ }
54590
+ }
52405
54591
  __onTab(event) {
52406
- if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
54592
+ if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && (this.__onShift(event.shiftKey) || (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabSpaces)(this.j, event.shiftKey))) {
52407
54593
  return false;
52408
54594
  }
52409
54595
  }
54596
+ __onBackspace(backspace, fakeNode) {
54597
+ if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
54598
+ return true;
54599
+ }
54600
+ }
54601
+ __onPasteInsert(html) {
54602
+ if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
54603
+ return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
54604
+ }
54605
+ }
52410
54606
  __onCommand(command) {
52411
54607
  if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
52412
54608
  return false;
52413
54609
  }
52414
54610
  }
52415
54611
  __onShift(shift) {
52416
- const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_5__.onTabInsideLi)(this.j, shift);
54612
+ const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
52417
54613
  if (res) {
52418
54614
  this.j.e.fire('afterTab', shift);
52419
54615
  }
52420
54616
  return res;
52421
54617
  }
52422
- beforeDestruct(jodit) {}
54618
+ beforeDestruct(jodit) {
54619
+ jodit.e.off('keydown', this.__onKeyDownFirst);
54620
+ }
54621
+ constructor(){
54622
+ super(...arguments);
54623
+ /**
54624
+ * With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
54625
+ * Tab move the focus on, as in code editors. A modifier key keeps it, and
54626
+ * any other key or a click ends it
54627
+ */ this.__released = false;
54628
+ }
52423
54629
  }
54630
+ __decorate([
54631
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
54632
+ ':mousedown.tab',
54633
+ ':beforePopupClose.tab'
54634
+ ])
54635
+ ], tab.prototype, "__endRelease", null);
54636
+ __decorate([
54637
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
54638
+ ], tab.prototype, "__onKeyDownFirst", null);
52424
54639
  __decorate([
52425
54640
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
52426
54641
  ], tab.prototype, "__onTab", null);
54642
+ __decorate([
54643
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
54644
+ ], tab.prototype, "__onBackspace", null);
54645
+ __decorate([
54646
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
54647
+ ], tab.prototype, "__onPasteInsert", null);
52427
54648
  __decorate([
52428
54649
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
52429
54650
  ], tab.prototype, "__onCommand", null);