jodit-pro 4.18.1 → 4.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +16 -16
  3. package/es2015/jodit.js +482 -137
  4. package/es2015/jodit.min.js +11 -11
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/color-picker/color-picker.css +1 -1
  20. package/es2015/plugins/color-picker/color-picker.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  22. package/es2015/plugins/emoji/emoji.css +1 -1
  23. package/es2015/plugins/emoji/emoji.js +1 -1
  24. package/es2015/plugins/emoji/emoji.min.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.js +1 -1
  26. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  27. package/es2015/plugins/finder/finder.css +1 -1
  28. package/es2015/plugins/finder/finder.js +1 -1
  29. package/es2015/plugins/finder/finder.min.js +1 -1
  30. package/es2015/plugins/google-maps/google-maps.css +1 -1
  31. package/es2015/plugins/google-maps/google-maps.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  33. package/es2015/plugins/google-search/google-search.js +1 -1
  34. package/es2015/plugins/google-search/google-search.min.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  36. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  40. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  41. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  43. package/es2015/plugins/keyboard/keyboard.css +1 -1
  44. package/es2015/plugins/keyboard/keyboard.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  47. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  48. package/es2015/plugins/page-break/page-break.js +1 -1
  49. package/es2015/plugins/page-break/page-break.min.js +1 -1
  50. package/es2015/plugins/paste-code/paste-code.css +1 -1
  51. package/es2015/plugins/paste-code/paste-code.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  53. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  54. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  55. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  56. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  57. package/es2015/plugins/style/style.css +1 -1
  58. package/es2015/plugins/style/style.js +1 -1
  59. package/es2015/plugins/style/style.min.js +1 -1
  60. package/es2015/plugins/templates/templates.css +1 -1
  61. package/es2015/plugins/templates/templates.js +1 -1
  62. package/es2015/plugins/templates/templates.min.js +1 -1
  63. package/es2015/plugins/todo-list/todo-list.css +1 -1
  64. package/es2015/plugins/todo-list/todo-list.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  66. package/es2015/plugins/translate/translate.css +1 -1
  67. package/es2015/plugins/translate/translate.js +1 -1
  68. package/es2015/plugins/translate/translate.min.js +1 -1
  69. package/es2015/plugins/tune-block/tune-block.css +1 -1
  70. package/es2015/plugins/tune-block/tune-block.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  72. package/es2018/jodit.fat.min.js +9 -9
  73. package/es2018/jodit.min.js +9 -9
  74. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  75. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  76. package/es2018/plugins/backup/backup.min.js +1 -1
  77. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  78. package/es2018/plugins/change-case/change-case.min.js +1 -1
  79. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  80. package/es2018/plugins/emoji/emoji.min.js +1 -1
  81. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  82. package/es2018/plugins/finder/finder.min.js +1 -1
  83. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  84. package/es2018/plugins/google-search/google-search.min.js +1 -1
  85. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  86. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  87. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  88. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  89. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  90. package/es2018/plugins/page-break/page-break.min.js +1 -1
  91. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  92. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  93. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  94. package/es2018/plugins/style/style.min.js +1 -1
  95. package/es2018/plugins/templates/templates.min.js +1 -1
  96. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  97. package/es2018/plugins/translate/translate.min.js +1 -1
  98. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  99. package/es2021/jodit.css +1 -1
  100. package/es2021/jodit.fat.min.js +16 -16
  101. package/es2021/jodit.js +434 -137
  102. package/es2021/jodit.min.js +16 -16
  103. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  104. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  105. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  106. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  107. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  108. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  109. package/es2021/plugins/backup/backup.css +1 -1
  110. package/es2021/plugins/backup/backup.js +1 -1
  111. package/es2021/plugins/backup/backup.min.js +1 -1
  112. package/es2021/plugins/button-generator/button-generator.css +1 -1
  113. package/es2021/plugins/button-generator/button-generator.js +1 -1
  114. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  115. package/es2021/plugins/change-case/change-case.js +1 -1
  116. package/es2021/plugins/change-case/change-case.min.js +1 -1
  117. package/es2021/plugins/color-picker/color-picker.css +1 -1
  118. package/es2021/plugins/color-picker/color-picker.js +1 -1
  119. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  120. package/es2021/plugins/emoji/emoji.css +1 -1
  121. package/es2021/plugins/emoji/emoji.js +1 -1
  122. package/es2021/plugins/emoji/emoji.min.js +1 -1
  123. package/es2021/plugins/export-docs/export-docs.js +1 -1
  124. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  125. package/es2021/plugins/finder/finder.css +1 -1
  126. package/es2021/plugins/finder/finder.js +1 -1
  127. package/es2021/plugins/finder/finder.min.js +1 -1
  128. package/es2021/plugins/google-maps/google-maps.css +1 -1
  129. package/es2021/plugins/google-maps/google-maps.js +1 -1
  130. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  131. package/es2021/plugins/google-search/google-search.js +1 -1
  132. package/es2021/plugins/google-search/google-search.min.js +1 -1
  133. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  134. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  135. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  136. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  137. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  138. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  139. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  140. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  141. package/es2021/plugins/keyboard/keyboard.css +1 -1
  142. package/es2021/plugins/keyboard/keyboard.js +1 -1
  143. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  144. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  145. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  146. package/es2021/plugins/page-break/page-break.js +1 -1
  147. package/es2021/plugins/page-break/page-break.min.js +1 -1
  148. package/es2021/plugins/paste-code/paste-code.css +1 -1
  149. package/es2021/plugins/paste-code/paste-code.js +1 -1
  150. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  151. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  152. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  153. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  154. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  155. package/es2021/plugins/style/style.css +1 -1
  156. package/es2021/plugins/style/style.js +1 -1
  157. package/es2021/plugins/style/style.min.js +1 -1
  158. package/es2021/plugins/templates/templates.css +1 -1
  159. package/es2021/plugins/templates/templates.js +1 -1
  160. package/es2021/plugins/templates/templates.min.js +1 -1
  161. package/es2021/plugins/todo-list/todo-list.css +1 -1
  162. package/es2021/plugins/todo-list/todo-list.js +1 -1
  163. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  164. package/es2021/plugins/translate/translate.css +1 -1
  165. package/es2021/plugins/translate/translate.js +1 -1
  166. package/es2021/plugins/translate/translate.min.js +1 -1
  167. package/es2021/plugins/tune-block/tune-block.css +1 -1
  168. package/es2021/plugins/tune-block/tune-block.js +1 -1
  169. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  170. package/es2021.en/jodit.css +1 -1
  171. package/es2021.en/jodit.fat.min.js +19 -19
  172. package/es2021.en/jodit.js +434 -137
  173. package/es2021.en/jodit.min.js +16 -16
  174. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  175. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  176. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  177. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  178. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  179. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  180. package/es2021.en/plugins/backup/backup.css +1 -1
  181. package/es2021.en/plugins/backup/backup.js +1 -1
  182. package/es2021.en/plugins/backup/backup.min.js +1 -1
  183. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  184. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  185. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  186. package/es2021.en/plugins/change-case/change-case.js +1 -1
  187. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  188. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  189. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  190. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  191. package/es2021.en/plugins/emoji/emoji.css +1 -1
  192. package/es2021.en/plugins/emoji/emoji.js +1 -1
  193. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  194. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  195. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  196. package/es2021.en/plugins/finder/finder.css +1 -1
  197. package/es2021.en/plugins/finder/finder.js +1 -1
  198. package/es2021.en/plugins/finder/finder.min.js +1 -1
  199. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  200. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  201. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  202. package/es2021.en/plugins/google-search/google-search.js +1 -1
  203. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  204. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  205. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  206. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  207. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  208. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  209. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  210. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  211. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  212. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  213. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  214. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  215. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  216. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  217. package/es2021.en/plugins/page-break/page-break.js +1 -1
  218. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  219. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  220. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  221. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  222. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  223. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  224. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  225. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  226. package/es2021.en/plugins/style/style.css +1 -1
  227. package/es2021.en/plugins/style/style.js +1 -1
  228. package/es2021.en/plugins/style/style.min.js +1 -1
  229. package/es2021.en/plugins/templates/templates.css +1 -1
  230. package/es2021.en/plugins/templates/templates.js +1 -1
  231. package/es2021.en/plugins/templates/templates.min.js +1 -1
  232. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  233. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  234. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  235. package/es2021.en/plugins/translate/translate.css +1 -1
  236. package/es2021.en/plugins/translate/translate.js +1 -1
  237. package/es2021.en/plugins/translate/translate.min.js +1 -1
  238. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  239. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  240. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  241. package/es5/jodit.css +2 -2
  242. package/es5/jodit.fat.min.js +2 -2
  243. package/es5/jodit.js +548 -141
  244. package/es5/jodit.min.css +2 -2
  245. package/es5/jodit.min.js +2 -2
  246. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  247. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  248. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  249. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  250. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  251. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  252. package/es5/plugins/backup/backup.css +1 -1
  253. package/es5/plugins/backup/backup.js +1 -1
  254. package/es5/plugins/backup/backup.min.js +1 -1
  255. package/es5/plugins/button-generator/button-generator.css +1 -1
  256. package/es5/plugins/button-generator/button-generator.js +1 -1
  257. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  258. package/es5/plugins/change-case/change-case.js +1 -1
  259. package/es5/plugins/change-case/change-case.min.js +1 -1
  260. package/es5/plugins/color-picker/color-picker.css +1 -1
  261. package/es5/plugins/color-picker/color-picker.js +1 -1
  262. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  263. package/es5/plugins/emoji/emoji.css +1 -1
  264. package/es5/plugins/emoji/emoji.js +1 -1
  265. package/es5/plugins/emoji/emoji.min.js +1 -1
  266. package/es5/plugins/export-docs/export-docs.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  268. package/es5/plugins/finder/finder.css +1 -1
  269. package/es5/plugins/finder/finder.js +1 -1
  270. package/es5/plugins/finder/finder.min.js +1 -1
  271. package/es5/plugins/google-maps/google-maps.css +1 -1
  272. package/es5/plugins/google-maps/google-maps.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  274. package/es5/plugins/google-search/google-search.js +1 -1
  275. package/es5/plugins/google-search/google-search.min.js +1 -1
  276. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  277. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  278. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  279. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  281. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  282. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  283. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  284. package/es5/plugins/keyboard/keyboard.css +1 -1
  285. package/es5/plugins/keyboard/keyboard.js +1 -1
  286. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  287. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  288. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  289. package/es5/plugins/page-break/page-break.js +1 -1
  290. package/es5/plugins/page-break/page-break.min.js +1 -1
  291. package/es5/plugins/paste-code/paste-code.css +1 -1
  292. package/es5/plugins/paste-code/paste-code.js +1 -1
  293. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  294. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  295. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  296. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  297. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  298. package/es5/plugins/style/style.css +1 -1
  299. package/es5/plugins/style/style.js +1 -1
  300. package/es5/plugins/style/style.min.js +1 -1
  301. package/es5/plugins/templates/templates.css +1 -1
  302. package/es5/plugins/templates/templates.js +1 -1
  303. package/es5/plugins/templates/templates.min.js +1 -1
  304. package/es5/plugins/todo-list/todo-list.css +1 -1
  305. package/es5/plugins/todo-list/todo-list.js +1 -1
  306. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  307. package/es5/plugins/translate/translate.css +1 -1
  308. package/es5/plugins/translate/translate.js +1 -1
  309. package/es5/plugins/translate/translate.min.js +1 -1
  310. package/es5/plugins/tune-block/tune-block.css +1 -1
  311. package/es5/plugins/tune-block/tune-block.js +1 -1
  312. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  313. package/es5/polyfills.fat.min.js +1 -1
  314. package/es5/polyfills.js +1 -1
  315. package/es5/polyfills.min.js +1 -1
  316. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.1
4
+ * Version: v4.18.3
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1768,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
1768
1768
  * ```
1769
1769
  * @packageDocumentation
1770
1770
  * @module constants
1771
- */ const APP_VERSION = "4.18.1";
1771
+ */ const APP_VERSION = "4.18.3";
1772
1772
  // prettier-ignore
1773
1773
  const ES = "es2021";
1774
1774
  const IS_ES_MODERN = true;
@@ -6418,6 +6418,8 @@ __webpack_require__.r(__webpack_exports__);
6418
6418
  /* harmony export */ options: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.options; },
6419
6419
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.parseQuery; },
6420
6420
  /* harmony export */ position: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.position; },
6421
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.prepareEmbedCode; },
6422
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.prepareMedia; },
6421
6423
  /* harmony export */ previewBox: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.previewBox; },
6422
6424
  /* harmony export */ refs: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.refs; },
6423
6425
  /* harmony export */ reset: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.reset; },
@@ -8662,13 +8664,13 @@ const getClassName = (obj)=>{
8662
8664
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8663
8665
 
8664
8666
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8665
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
8667
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.$$; },
8666
8668
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8667
8669
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8668
8670
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8669
8671
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8670
8672
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8671
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
8673
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8672
8674
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8673
8675
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8674
8676
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -8681,9 +8683,9 @@ const getClassName = (obj)=>{
8681
8683
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8682
8684
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8683
8685
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8684
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
8685
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
8686
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
8686
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.call; },
8687
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8688
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8687
8689
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8688
8690
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8689
8691
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
@@ -8693,7 +8695,7 @@ const getClassName = (obj)=>{
8693
8695
  /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8694
8696
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8695
8697
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8696
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
8698
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8697
8699
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8698
8700
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8699
8701
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8702,34 +8704,36 @@ const getClassName = (obj)=>{
8702
8704
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8703
8705
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8704
8706
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8705
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
8707
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8706
8708
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8707
8709
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8708
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
8710
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8709
8711
  /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8710
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
8712
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8711
8713
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8712
8714
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8713
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
8715
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.inView; },
8714
8716
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8715
8717
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
8716
8718
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8717
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
8718
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
8719
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.keys; },
8720
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
8719
8721
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8720
8722
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8721
8723
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8722
8724
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8723
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
8724
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
8725
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8726
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
8725
8727
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
8726
8728
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8727
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
8728
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
8729
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
8730
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
8731
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
8732
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
8729
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8730
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8731
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8732
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.refs; },
8733
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_24__.reset; },
8734
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8735
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8736
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_27__.set; },
8733
8737
  /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
8734
8738
  /* harmony export */ });
8735
8739
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
@@ -8754,13 +8758,14 @@ const getClassName = (obj)=>{
8754
8758
  /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
8755
8759
  /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
8756
8760
  /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
8757
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
8758
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
8759
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
8760
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
8761
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
8762
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
8763
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
8761
+ /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(96437);
8762
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(11628);
8763
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(58844);
8764
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26395);
8765
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76078);
8766
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(3703);
8767
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(50535);
8768
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(37790);
8764
8769
  /*!
8765
8770
  * Jodit Editor (https://xdsoft.net/jodit/)
8766
8771
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8796,6 +8801,7 @@ const getClassName = (obj)=>{
8796
8801
 
8797
8802
 
8798
8803
 
8804
+
8799
8805
 
8800
8806
 
8801
8807
  /***/ }),
@@ -8961,6 +8967,45 @@ const isWrapper = (node, wrapper)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.
8961
8967
  /* harmony export */ ]);
8962
8968
 
8963
8969
 
8970
+ /***/ }),
8971
+
8972
+ /***/ 96437:
8973
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8974
+
8975
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8976
+ /* harmony export */ prepareEmbedCode: function() { return /* binding */ prepareEmbedCode; },
8977
+ /* harmony export */ prepareMedia: function() { return /* binding */ prepareMedia; }
8978
+ /* harmony export */ });
8979
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
8980
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61477);
8981
+ /*!
8982
+ * Jodit Editor (https://xdsoft.net/jodit/)
8983
+ * Released under MIT see LICENSE.txt in the project root for license information.
8984
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8985
+ */
8986
+
8987
+ /**
8988
+ * Puts new media in its wrapper (see `mediaWrappers`) and aligns it with
8989
+ * `mediaDefaultAlign`. Returns the wrapper, or `element` when there is none
8990
+ */ function prepareMedia(jodit, element) {
8991
+ const media = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_1__.wrapMedia)(jodit, element);
8992
+ const { mediaDefaultAlign } = jodit.o;
8993
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
8994
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
8995
+ }
8996
+ return media;
8997
+ }
8998
+ /**
8999
+ * Embed code that is one element is prepared as media (see `prepareMedia`);
9000
+ * other code is returned as it is
9001
+ */ function prepareEmbedCode(jodit, code) {
9002
+ const box = jodit.createInside.div();
9003
+ box.innerHTML = code.trim();
9004
+ const element = box.firstElementChild;
9005
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
9006
+ }
9007
+
9008
+
8964
9009
  /***/ }),
8965
9010
 
8966
9011
  /***/ 11628:
@@ -13061,7 +13106,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
13061
13106
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, fragment);
13062
13107
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeInsertNode(range, wrapper);
13063
13108
  if (style.elementIsBlock) {
13064
- if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(wrapper.firstElementChild, 'br')) {
13109
+ // The wrapped content can bring its own `<br>` (an empty table
13110
+ // cell's), after or inside the temporary `<font>` around the selection
13111
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !wrapper.querySelector('br')) {
13065
13112
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, ci.element('br'));
13066
13113
  }
13067
13114
  }
@@ -28071,28 +28118,20 @@ class FileBrowserTree extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_0__.UIG
28071
28118
  /* harmony export */ History: function() { return /* binding */ History; }
28072
28119
  /* harmony export */ });
28073
28120
  /* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
28074
- /* harmony import */ var _core_decorators_debounce_debounce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81577);
28075
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
28076
- /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92643);
28077
- /* harmony import */ var _snapshot_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52604);
28078
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57034);
28121
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6441);
28122
+ /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92643);
28123
+ /* harmony import */ var _snapshot_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52604);
28124
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57034);
28079
28125
  /*!
28080
28126
  * Jodit Editor (https://xdsoft.net/jodit/)
28081
28127
  * Released under MIT see LICENSE.txt in the project root for license information.
28082
28128
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
28083
- */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
28084
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28085
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28086
- 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;
28087
- return c > 3 && r && Object.defineProperty(target, key, r), r;
28088
- };
28089
-
28090
-
28129
+ */
28091
28130
 
28092
28131
 
28093
28132
 
28094
28133
 
28095
- _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28134
+ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.history = {
28096
28135
  enable: true,
28097
28136
  maxHistoryLength: Infinity,
28098
28137
  timeout: 1000
@@ -28106,27 +28145,31 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28106
28145
  /**
28107
28146
  * Return state of the WYSIWYG editor to step back
28108
28147
  */ redo() {
28148
+ this.__processPendingChanges();
28109
28149
  if (this.__stack.redo()) {
28110
28150
  this.startValue = this.snapshot.make();
28111
28151
  this.fireChangeStack();
28112
28152
  }
28113
28153
  }
28114
28154
  canRedo() {
28115
- return this.__stack.canRedo();
28155
+ return !this.__hasPendingChanges && this.__stack.canRedo();
28116
28156
  }
28117
28157
  /**
28118
28158
  * Return the state of the WYSIWYG editor to step forward
28119
28159
  */ undo() {
28160
+ this.__processPendingChanges();
28120
28161
  if (this.__stack.undo()) {
28121
28162
  this.startValue = this.snapshot.make();
28122
28163
  this.fireChangeStack();
28123
28164
  }
28124
28165
  }
28125
28166
  canUndo() {
28126
- return this.__stack.canUndo();
28167
+ return this.__hasPendingChanges || this.__stack.canUndo();
28127
28168
  }
28128
28169
  clear() {
28129
28170
  this.startValue = this.snapshot.make();
28171
+ this.async.clearTimeout(this.__timer);
28172
+ this.__hasPendingChanges = false;
28130
28173
  this.__stack.clear();
28131
28174
  this.fireChangeStack();
28132
28175
  }
@@ -28146,9 +28189,29 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28146
28189
  this.updateTick += 1;
28147
28190
  }
28148
28191
  /**
28149
- * Push new command in stack on some changes
28192
+ * Push new command in stack on some changes. The first change opens a
28193
+ * step, and later ones join it until `history.timeout` has passed,
28194
+ * however close together they come.
28150
28195
  */ onChange() {
28151
- this.__processChanges();
28196
+ // A transaction is over by the time the step is recorded, so it is
28197
+ // checked now
28198
+ if (this.snapshot.isBlocked || this.__hasPendingChanges) {
28199
+ return;
28200
+ }
28201
+ this.__hasPendingChanges = true;
28202
+ this.__timer = this.async.setTimeout(()=>this.__processPendingChanges(), this.j.o.history.timeout);
28203
+ // With a timeout of 0 the step is already recorded. Otherwise
28204
+ // canUndo and canRedo count it from now
28205
+ if (this.__hasPendingChanges) {
28206
+ this.fireChangeStack();
28207
+ }
28208
+ }
28209
+ /**
28210
+ * Push the open step's changes now
28211
+ */ __processPendingChanges() {
28212
+ if (this.__hasPendingChanges) {
28213
+ this.__processChanges();
28214
+ }
28152
28215
  }
28153
28216
  /**
28154
28217
  * @internal
@@ -28156,13 +28219,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28156
28219
  if (this.snapshot.isBlocked || !this.j.o.history.enable) {
28157
28220
  return;
28158
28221
  }
28222
+ this.async.clearTimeout(this.__timer);
28223
+ this.__hasPendingChanges = false;
28159
28224
  this.updateStack();
28160
28225
  }
28161
28226
  /**
28162
28227
  * Update history stack
28163
28228
  */ updateStack(replace = false) {
28164
28229
  const newValue = this.snapshot.make();
28165
- if (_snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
28230
+ if (_snapshot_js__WEBPACK_IMPORTED_MODULE_3__.Snapshot.equal(newValue, this.startValue)) {
28166
28231
  return;
28167
28232
  }
28168
28233
  // Only the selection moved, for example when the selection markers
@@ -28172,7 +28237,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28172
28237
  this.startValue = newValue;
28173
28238
  return;
28174
28239
  }
28175
- const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
28240
+ const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_2__.Command(this.startValue, newValue, this, this.updateTick);
28176
28241
  if (replace) {
28177
28242
  const command = this.__stack.current();
28178
28243
  if (command && this.updateTick === command.tick) {
@@ -28198,9 +28263,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28198
28263
  this.snapshot.destruct();
28199
28264
  super.destruct();
28200
28265
  }
28201
- constructor(editor, stack = new _stack_js__WEBPACK_IMPORTED_MODULE_5__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot(editor)){
28266
+ constructor(editor, stack = new _stack_js__WEBPACK_IMPORTED_MODULE_4__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot_js__WEBPACK_IMPORTED_MODULE_3__.Snapshot(editor)){
28202
28267
  super(editor);
28203
28268
  this.updateTick = 0;
28269
+ /**
28270
+ * A step is open: changes have come in that are not in the stack yet
28271
+ */ this.__hasPendingChanges = false;
28272
+ /**
28273
+ * Records the open step `history.timeout` after its first change
28274
+ */ this.__timer = 0;
28204
28275
  this.__stack = stack;
28205
28276
  this.snapshot = snapshot;
28206
28277
  if (editor.o.history.enable) {
@@ -28211,6 +28282,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28211
28282
  this.startValue = this.snapshot.make();
28212
28283
  editor.events// save selection
28213
28284
  .on('internalChange internalUpdate', ()=>{
28285
+ this.__processPendingChanges();
28214
28286
  this.startValue = this.snapshot.make();
28215
28287
  }).on(editor.editor, [
28216
28288
  'changeSelection',
@@ -28224,14 +28296,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28224
28296
  if (this.startValue.html === this.j.getNativeEditorValue()) {
28225
28297
  this.startValue = this.snapshot.make();
28226
28298
  }
28227
- }).on(this, 'change.history', this.onChange);
28299
+ }).on(this, 'change.history', ()=>this.onChange());
28228
28300
  });
28229
28301
  }
28230
28302
  }
28231
28303
  }
28232
- __decorate([
28233
- (0,_core_decorators_debounce_debounce_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
28234
- ], History.prototype, "onChange", null);
28235
28304
 
28236
28305
 
28237
28306
  /***/ }),
@@ -29853,7 +29922,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29853
29922
  const columnsCount = Table.__getColumnsCount(table);
29854
29923
  row = create.element('tr');
29855
29924
  for(let j = 0; j < columnsCount; j += 1){
29856
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(row, create.element('td'));
29925
+ const cell = create.element('td');
29926
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, create.element('br'));
29927
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(row, cell);
29857
29928
  }
29858
29929
  } else {
29859
29930
  row = line.cloneNode(true);
@@ -29870,6 +29941,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29870
29941
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.each(row, (cell)=>{
29871
29942
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isCell(cell)) {
29872
29943
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.detach(cell);
29944
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, create.element('br'));
29873
29945
  }
29874
29946
  });
29875
29947
  }
@@ -29958,6 +30030,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29958
30030
  const cells = box[i];
29959
30031
  if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
29960
30032
  const cell = this.j.createInside.element('td');
30033
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, this.j.createInside.element('br'));
29961
30034
  if (insertAfter) {
29962
30035
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.after(cells[columnIndex], cell);
29963
30036
  } else {
@@ -30181,7 +30254,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30181
30254
  Table.__setColumnWidthByDelta(table, first_j, 0, true, __marked);
30182
30255
  }
30183
30256
  }
30184
- first.innerHTML = html.join('<br/>');
30257
+ first.innerHTML = html.join('<br/>') || '<br/>';
30185
30258
  instance(jodit).addSelection(first);
30186
30259
  alreadyMerged.delete(first);
30187
30260
  Table.__unmark(__marked);
@@ -32403,8 +32476,8 @@ _core_ui_index_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', _palette_svg_
32403
32476
  const box = (0,_tabs_tabs_js__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
32404
32477
  // Marks this popup so its tabs auto-size to their labels (see
32405
32478
  // `.jodit-file-selector` in tabs.less) — long localized tab captions are no
32406
- // longer clipped — while leaving other tab popups (link, video …)
32407
- // untouched.
32479
+ // longer clipped — while leaving other tab popups (link …) untouched. The
32480
+ // video popup, which has an Upload tab too, uses it as well.
32408
32481
  box.classList.add('jodit-file-selector');
32409
32482
  return box;
32410
32483
  };
@@ -33641,6 +33714,10 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
33641
33714
  if (!sel.isFocused()) {
33642
33715
  sel.focus();
33643
33716
  }
33717
+ // Focused with no range, as WebKit leaves it after a click on an embed
33718
+ if (!sel.isInsideArea) {
33719
+ return;
33720
+ }
33644
33721
  if ((0,_cases_check_not_collapsed_js__WEBPACK_IMPORTED_MODULE_7__.checkNotCollapsed)(jodit)) {
33645
33722
  jodit.e.fire('backSpaceAfterDelete', backspace);
33646
33723
  return false;
@@ -34835,7 +34912,8 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34835
34912
  /* harmony import */ var _core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86518);
34836
34913
  /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20356);
34837
34914
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46776);
34838
- /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59498);
34915
+ /* harmony import */ var _helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80973);
34916
+ /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59498);
34839
34917
  /*!
34840
34918
  * Jodit Editor (https://xdsoft.net/jodit/)
34841
34919
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34854,11 +34932,16 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34854
34932
 
34855
34933
 
34856
34934
 
34935
+
34857
34936
  /**
34858
34937
  * Clean HTML after removeFormat and insertHorizontalRule command
34859
34938
  */ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
34860
34939
  class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
34861
- /** @override */ afterInit(jodit) {}
34940
+ /** @override */ afterInit() {
34941
+ // The walker's own `:afterInit` watcher is bound on that very event,
34942
+ // so without this the first pass waited for the first key or click
34943
+ this.onChangeCleanHTML();
34944
+ }
34862
34945
  get isEditMode() {
34863
34946
  return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
34864
34947
  }
@@ -34874,18 +34957,18 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34874
34957
  }
34875
34958
  startWalker() {
34876
34959
  const { jodit } = this;
34877
- const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.allowTags);
34878
- const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.denyTags);
34879
- this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34960
+ const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.allowTags);
34961
+ const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.denyTags);
34962
+ this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34880
34963
  this.j.e.fire(affected ? 'internalChange finishedCleanHTMLWorker' : 'finishedCleanHTMLWorker');
34881
34964
  });
34882
34965
  }
34883
34966
  beforeCommand(command) {
34884
34967
  if (command.toLowerCase() === 'removeformat') {
34885
34968
  if (this.j.s.isCollapsed()) {
34886
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForCollapsedSelection)(this.j);
34969
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
34887
34970
  } else {
34888
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForSelection)(this.j);
34971
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
34889
34972
  }
34890
34973
  return false;
34891
34974
  }
@@ -34911,6 +34994,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34911
34994
  ];
34912
34995
  sandBox.innerHTML = data.value;
34913
34996
  this.j.e.fire('safeHTML', sandBox);
34997
+ this.__replaceOldTags(sandBox);
34914
34998
  data.value = sandBox.innerHTML;
34915
34999
  (0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, {
34916
35000
  safeJavaScriptLink: true,
@@ -34919,6 +35003,20 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34919
35003
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
34920
35004
  return false;
34921
35005
  }
35006
+ /**
35007
+ * Replace old tags (`<b>` with `<strong>`, `<i>` with `<em>`) in an
35008
+ * assigned value straight away. The walker would get to them only after
35009
+ * every node before them, seconds later on a long document, and until
35010
+ * then Bold does not treat `<b>` as bold, and the swap can move the caret.
35011
+ */ __replaceOldTags(box) {
35012
+ const { replaceOldTags: list, disableCleanFilter } = this.j.o.cleanHTML;
35013
+ if (!list || (disableCleanFilter === null || disableCleanFilter === void 0 ? void 0 : disableCleanFilter.has('replaceOldTags'))) {
35014
+ return;
35015
+ }
35016
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(box, (node)=>{
35017
+ ;(0,_helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__.replaceOldTags)(this.j, node, false);
35018
+ });
35019
+ }
34922
35020
  /**
34923
35021
  * Collapse a value that holds only a single empty block (e.g.
34924
35022
  * `<p><br></p>` left after deleting all content) to an empty string —
@@ -34997,10 +35095,11 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34997
35095
  ;(0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, this.j.o.cleanHTML);
34998
35096
  }
34999
35097
  /** @override */ beforeDestruct() {
35098
+ this.j.e.off('safeHTML', this.onSafeHTML).off('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).off('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
35000
35099
  this.walker.destruct();
35001
35100
  }
35002
- constructor(){
35003
- super(...arguments);
35101
+ constructor(jodit){
35102
+ super(jodit);
35004
35103
  /** @override */ this.buttons = [
35005
35104
  {
35006
35105
  name: 'eraser',
@@ -35011,6 +35110,12 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
35011
35110
  this.walker = new _core_dom_lazy_walker_js__WEBPACK_IMPORTED_MODULE_2__.LazyWalker(this.j.async, {
35012
35111
  timeout: this.j.o.cleanHTML.timeout
35013
35112
  });
35113
+ // `@watch` binds once the plugin is ready, which is after the initial
35114
+ // value has already gone into the editor. The handlers that keep
35115
+ // markup out of the live tree have to be there from the start, or
35116
+ // event handlers in a textarea's content run before anything
35117
+ // sanitises them.
35118
+ jodit.e.on('safeHTML', this.onSafeHTML).on('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).on('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
35014
35119
  }
35015
35120
  }
35016
35121
  __decorate([
@@ -35029,16 +35134,16 @@ __decorate([
35029
35134
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':beforeCommand')
35030
35135
  ], cleanHtml.prototype, "beforeCommand", null);
35031
35136
  __decorate([
35032
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':afterSetNativeEditorValue')
35137
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
35033
35138
  ], cleanHtml.prototype, "onAfterSetNativeEditorValue", null);
35034
35139
  __decorate([
35035
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':beforeSetNativeEditorValue')
35140
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
35036
35141
  ], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
35037
35142
  __decorate([
35038
35143
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':afterGetValueFromEditor')
35039
35144
  ], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
35040
35145
  __decorate([
35041
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':safeHTML')
35146
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
35042
35147
  ], cleanHtml.prototype, "onSafeHTML", null);
35043
35148
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('cleanHtml', cleanHtml);
35044
35149
 
@@ -35615,10 +35720,33 @@ __webpack_require__.r(__webpack_exports__);
35615
35720
  }
35616
35721
  const tagName = list[oldParent.nodeName.toLowerCase()] || list[oldParent.nodeName];
35617
35722
  if (tagName) {
35618
- return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35723
+ const restoreSelection = keepSelection(jodit, oldParent);
35724
+ const newParent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35725
+ restoreSelection === null || restoreSelection === void 0 ? void 0 : restoreSelection(newParent);
35726
+ return newParent;
35619
35727
  }
35620
35728
  return oldParent;
35621
35729
  }
35730
+ /**
35731
+ * Moving the children out of an element collapses a selection inside them to
35732
+ * where the element was, so the caret jumps to the start of the text being
35733
+ * typed. Returns a callback that puts the selection back on the same nodes.
35734
+ *
35735
+ * Like `removeEmptyTextNode`, it leaves the selection alone once focus has
35736
+ * left the editor, because selecting would take focus back.
35737
+ */ function keepSelection(jodit, elm) {
35738
+ const { sel } = jodit.s;
35739
+ if (!(sel === null || sel === void 0 ? void 0 : sel.anchorNode) || !sel.focusNode || !jodit.s.isFocused()) {
35740
+ return null;
35741
+ }
35742
+ const { anchorNode, anchorOffset, focusNode, focusOffset } = sel;
35743
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, anchorNode) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, focusNode)) {
35744
+ return null;
35745
+ }
35746
+ return (newElm)=>{
35747
+ sel.setBaseAndExtent(anchorNode === elm ? newElm : anchorNode, anchorOffset, focusNode === elm ? newElm : focusNode, focusOffset);
35748
+ };
35749
+ }
35622
35750
 
35623
35751
 
35624
35752
  /***/ }),
@@ -37584,9 +37712,32 @@ const brBoxes = new Set([
37584
37712
  * Released under MIT see LICENSE.txt in the project root for license information.
37585
37713
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
37586
37714
  */
37715
+ /**
37716
+ * Moves the cursor out of a block that can't hold the inserted block: before
37717
+ * or after it when the cursor is at its edge, or between its two halves when
37718
+ * the cursor is inside its content. An empty block is removed
37719
+ */ function moveCursorOutOf(jodit, parent) {
37720
+ var _a;
37721
+ const { s } = jodit;
37722
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37723
+ s.setCursorAfter(parent);
37724
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37725
+ return;
37726
+ }
37727
+ if (s.cursorOnTheRight(parent)) {
37728
+ s.setCursorAfter(parent);
37729
+ return;
37730
+ }
37731
+ if (s.cursorOnTheLeft(parent)) {
37732
+ s.setCursorBefore(parent);
37733
+ return;
37734
+ }
37735
+ s.setCursorAfter((_a = s.splitSelection(parent)) !== null && _a !== void 0 ? _a : parent);
37736
+ }
37587
37737
  /**
37588
37738
  * Checks whether the insertion of an element at the current location is allowed,
37589
- * if it is not allowed, it deletes an empty block element or moves the cursor after it
37739
+ * if it is not allowed, it deletes an empty block element, moves the cursor
37740
+ * before or after it, or splits it at the cursor
37590
37741
  * @internal
37591
37742
  */ function checkBlockNesting(jodit, node) {
37592
37743
  var _a, _b;
@@ -37615,10 +37766,7 @@ const brBoxes = new Set([
37615
37766
  parent = current;
37616
37767
  }
37617
37768
  if (parent) {
37618
- jodit.s.setCursorAfter(parent);
37619
- if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37620
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37621
- }
37769
+ moveCursorOutOf(jodit, parent);
37622
37770
  }
37623
37771
  }
37624
37772
  }
@@ -38123,7 +38271,14 @@ function brBefore(start) {
38123
38271
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(link, fake);
38124
38272
  } else if (s.cursorOnTheLeft(link, fake)) {
38125
38273
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(link, fake);
38274
+ } else {
38275
+ return;
38126
38276
  }
38277
+ // The block is split at the caret, so the caret leaves the link too:
38278
+ // beside the fake, since Safari mislays a caret inside a removed node
38279
+ const range = s.createRange();
38280
+ range.setStartBefore(fake);
38281
+ s.selectRange(range);
38127
38282
  }
38128
38283
  }
38129
38284
 
@@ -38353,9 +38508,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
38353
38508
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
38354
38509
 
38355
38510
  /* unused harmony export focus */
38356
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
38357
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
38358
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
38511
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38512
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
38513
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38514
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
38359
38515
  /*!
38360
38516
  * Jodit Editor (https://xdsoft.net/jodit/)
38361
38517
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38363,15 +38519,16 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
38363
38519
  */
38364
38520
 
38365
38521
 
38522
+
38366
38523
  /**
38367
38524
  * After loading the page into the editor once the focus is set
38368
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.autofocus = false;
38525
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.autofocus = false;
38369
38526
  /**
38370
38527
  * Cursor position after autofocus
38371
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.cursorAfterAutofocus = 'end';
38528
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.cursorAfterAutofocus = 'end';
38372
38529
  /**
38373
38530
  * Save current selection on blur event
38374
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
38531
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.saveSelectionOnBlur = true;
38375
38532
  function focus(editor) {
38376
38533
  if (editor.o.saveSelectionOnBlur) {
38377
38534
  // A click that brings focus back places the caret itself, and Chrome
@@ -38403,10 +38560,10 @@ function focus(editor) {
38403
38560
  let textNode = null;
38404
38561
  switch(editor.o.cursorAfterAutofocus){
38405
38562
  case 'start':
38406
- textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.first(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
38563
+ textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
38407
38564
  break;
38408
38565
  case 'end':
38409
- textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.last(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
38566
+ textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.last(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
38410
38567
  break;
38411
38568
  }
38412
38569
  if (textNode) {
@@ -38424,7 +38581,8 @@ function focus(editor) {
38424
38581
  });
38425
38582
  editor.e.on('afterInit afterAddPlace', ()=>{
38426
38583
  editor.e.off(editor.editor, 'mousedown.autofocus').on(editor.editor, 'mousedown.autofocus', (e)=>{
38427
- if (editor.isEditorMode() && e.target && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(e.target) && !e.target.childNodes.length) {
38584
+ // An empty block takes the caret, but a video, say, can't hold one
38585
+ if (editor.isEditorMode() && e.target && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(e.target) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(e.target, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && !e.target.childNodes.length) {
38428
38586
  if (editor.editor === e.target) {
38429
38587
  editor.s.focus();
38430
38588
  } else {
@@ -38434,7 +38592,7 @@ function focus(editor) {
38434
38592
  });
38435
38593
  });
38436
38594
  }
38437
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
38595
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('focus', focus);
38438
38596
 
38439
38597
 
38440
38598
  /***/ }),
@@ -39607,18 +39765,29 @@ function hr(editor) {
39607
39765
  group: 'insert'
39608
39766
  });
39609
39767
  editor.registerCommand('insertHorizontalRule', ()=>{
39768
+ var _a;
39610
39769
  const elm = editor.createInside.element('hr');
39611
39770
  editor.s.insertNode(elm, false, false);
39612
39771
  const block = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
39613
- if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor) {
39772
+ // A block that holds other blocks, such as a list item or a table
39773
+ // cell, keeps the line
39774
+ if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor && !((_a = editor.o.dtd) === null || _a === void 0 ? void 0 : _a.blockLimits[block.nodeName.toLowerCase()])) {
39614
39775
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(block, elm);
39615
39776
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(block);
39616
39777
  }
39617
- let p = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.next(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor, false);
39618
- if (!p) {
39619
- p = editor.createInside.element(editor.o.enter);
39620
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39778
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, false);
39779
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(next)) {
39780
+ editor.s.setCursorIn(next, true);
39781
+ return false;
39782
+ }
39783
+ // In a list item or a table cell the text goes on after the line, as
39784
+ // it does with the browsers' own command
39785
+ if (next || elm.parentNode !== editor.editor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, true))) {
39786
+ editor.s.setCursorAfter(elm);
39787
+ return false;
39621
39788
  }
39789
+ const p = editor.createInside.element(editor.o.enter);
39790
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39622
39791
  editor.s.setCursorIn(p);
39623
39792
  return false;
39624
39793
  });
@@ -39651,7 +39820,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
39651
39820
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
39652
39821
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
39653
39822
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
39654
- _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_editor .jodit_iframe_wrapper{' + 'display: block;' + 'clear: both;' + 'user-select: none;' + 'position: relative;' + '}' + '.jodit_editor .jodit_iframe_wrapper:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
39823
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '[data-jodit_iframe_wrapper]{' + 'display: block;' + 'user-select: none;' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper] iframe{' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper]:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '[data-jodit_iframe_wrapper][data-jodit-wrapper_active=true] iframe{' + 'z-index: 2;' + '}' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
39655
39824
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
39656
39825
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
39657
39826
 
@@ -42411,10 +42580,30 @@ const align = {
42411
42580
  // A media wrapper kept in the content gets the media popup
42412
42581
  const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
42413
42582
  if (target && type && this.canShowPopupForType(type)) {
42414
- this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
42583
+ const isMedia = type === 'jodit-media';
42584
+ // Beside the media in a wrapper kept in the content, which can fill
42585
+ // the line
42586
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
42587
+ this.showPopup(()=>this.__bound(bound, isMedia), type, target);
42415
42588
  return false;
42416
42589
  }
42417
42590
  }
42591
+ /**
42592
+ * The box the popup opens beside: the target's, with room for the
42593
+ * resizer's handles when the target gets them, so it doesn't cover them
42594
+ */ __bound(target, isMedia) {
42595
+ const bound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j);
42596
+ const resizable = this.j.o.allowResizeTags;
42597
+ if (!isMedia && !(resizable && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(target, resizable))) {
42598
+ return bound;
42599
+ }
42600
+ const room = parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue('--jd-resizer-handle-size'), 10) / 2 || 0;
42601
+ return {
42602
+ ...bound,
42603
+ top: bound.top - room,
42604
+ height: bound.height + room * 2
42605
+ };
42606
+ }
42418
42607
  /**
42419
42608
  * Show inline popup with some toolbar
42420
42609
  *
@@ -43749,7 +43938,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
43749
43938
  height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
43750
43939
  });
43751
43940
  if (embed !== html) {
43752
- return jodit.createInside.fromHTML(embed);
43941
+ const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.prepareEmbedCode)(jodit, embed);
43942
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
43753
43943
  }
43754
43944
  }
43755
43945
  if (jodit.s.isCollapsed()) {
@@ -44227,10 +44417,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
44227
44417
  } else {
44228
44418
  return;
44229
44419
  }
44420
+ // Selected, as an image is, so Delete and Backspace remove it
44230
44421
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
44231
- editor.s.setCursorAfter(element);
44422
+ editor.s.select(element);
44232
44423
  });
44233
44424
  };
44425
+ // Media in a wrapper kept in the content let clicks through to it, as
44426
+ // jodit-media covers its media, so a click selects the media rather than
44427
+ // playing it. An inline wrapper holds it as an inline-block, unless its
44428
+ // classes or style give it a display of their own
44429
+ const wrappers = Object.values(mediaWrappers);
44430
+ if (wrappers.length) {
44431
+ editor.e.on('afterInit', ()=>{
44432
+ const selectors = (list)=>[
44433
+ ...new Set(list)
44434
+ ].join(',');
44435
+ const scoped = ({ tag, className })=>`.jodit-wysiwyg ${tag}.${className}`;
44436
+ const inline = selectors(wrappers.filter(({ tag })=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE.test(tag)).map(scoped));
44437
+ const media = selectors(wrappers.flatMap((wrapper)=>mediaBlocks.map((tag)=>`${scoped(wrapper)}>${tag}`)));
44438
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__.getContainer)(editor, 'media-wrappers', 'style', true).innerHTML = (inline ? `:where(${inline}){display:inline-block}` : '') + `${media}{pointer-events:none}`;
44439
+ });
44440
+ }
44234
44441
  if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
44235
44442
  editor.e.on('afterGetValueFromEditor', (data)=>{
44236
44443
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
@@ -45123,12 +45330,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45123
45330
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45124
45331
  /* harmony export */ askInsertTypeDialog: function() { return /* binding */ askInsertTypeDialog; },
45125
45332
  /* harmony export */ getAllTypes: function() { return /* binding */ getAllTypes; },
45126
- /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; }
45333
+ /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; },
45334
+ /* harmony export */ removeGoogleDocsWrapper: function() { return /* binding */ removeGoogleDocsWrapper; }
45127
45335
  /* harmony export */ });
45128
45336
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
45129
45337
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
45130
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27613);
45131
- /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10830);
45338
+ /* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
45339
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27613);
45340
+ /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10830);
45132
45341
  /*!
45133
45342
  * Jodit Editor (https://xdsoft.net/jodit/)
45134
45343
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -45137,6 +45346,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45137
45346
 
45138
45347
 
45139
45348
 
45349
+
45140
45350
  /**
45141
45351
  * Remove special HTML comments
45142
45352
  * @private
@@ -45152,6 +45362,21 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45152
45362
  }
45153
45363
  return html;
45154
45364
  }
45365
+ /**
45366
+ * Google Docs wraps the copied content in
45367
+ * `<b style="font-weight:normal;" id="docs-internal-guid-…">`. Kept, the
45368
+ * wrapper holds the pasted blocks, and without its style it makes the whole
45369
+ * paste bold
45370
+ * @private
45371
+ */ function removeGoogleDocsWrapper(html) {
45372
+ if (!/<b\s[^>]*docs-internal-guid-/i.test(html)) {
45373
+ return html;
45374
+ }
45375
+ // An inert document: images don't load and handlers don't run
45376
+ const { body } = new DOMParser().parseFromString(html, 'text/html');
45377
+ (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(body.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap);
45378
+ return body.innerHTML;
45379
+ }
45155
45380
  /**
45156
45381
  * @private
45157
45382
  */ function isDragEvent(e) {
@@ -45168,11 +45393,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45168
45393
  editor.s.insertCursorAtPoint(e.clientX, e.clientY);
45169
45394
  }
45170
45395
  const result = editor.e.fire('beforePasteInsert', html);
45171
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(result) && ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(result) || (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isNumber)(result) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
45396
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isVoid)(result) && ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(result) || (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(result) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
45172
45397
  html = result;
45173
45398
  }
45174
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
45175
- html = removeExtraFragments(html);
45399
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
45400
+ html = removeExtraFragments(removeGoogleDocsWrapper(html));
45176
45401
  }
45177
45402
  editor.s.insertHTML(html);
45178
45403
  }
@@ -45182,7 +45407,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45182
45407
  */ function getAllTypes(dt) {
45183
45408
  const types = dt.types;
45184
45409
  let types_str = '';
45185
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
45410
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
45186
45411
  for(let i = 0; i < types.length; i += 1){
45187
45412
  types_str += types[i] + ';';
45188
45413
  }
@@ -45199,7 +45424,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45199
45424
  return;
45200
45425
  }
45201
45426
  const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
45202
- const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
45427
+ const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
45203
45428
  text,
45204
45429
  name: text.toLowerCase(),
45205
45430
  tabIndex: 0
@@ -45215,7 +45440,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45215
45440
  }
45216
45441
  jodit.e.fire('afterClosePasteDialog', dialog);
45217
45442
  });
45218
- const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
45443
+ const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
45219
45444
  text: 'Cancel',
45220
45445
  tabIndex: 0
45221
45446
  }).onAction(()=>{
@@ -45364,7 +45589,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45364
45589
  this.j.buffer.set(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, html);
45365
45590
  switch(action){
45366
45591
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_CLEAR_HTML:
45367
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)(html);
45592
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)((0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__.removeGoogleDocsWrapper)(html));
45368
45593
  break;
45369
45594
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
45370
45595
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
@@ -46514,7 +46739,7 @@ const keyBInd = '__jodit-resizer_binded';
46514
46739
  addEventListeners() {
46515
46740
  const editor = this.j;
46516
46741
  editor.e.off(editor.editor, '.resizer').off(editor.ow, '.resizer').on(editor.editor, 'keydown.resizer', (e)=>{
46517
- if (this.isShown && e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE && this.element && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(this.element, 'table')) {
46742
+ if (this.isShown && (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE) && this.element && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(this.element, 'table')) {
46518
46743
  this.onDelete(e);
46519
46744
  }
46520
46745
  }).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize).on([
@@ -46721,8 +46946,12 @@ const keyBInd = '__jodit-resizer_binded';
46721
46946
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
46722
46947
  this.j.s.select(element);
46723
46948
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
46724
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth + 'px');
46725
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight + 'px');
46949
+ // Only a resize sets the embed's size, and as the plain numbers
46950
+ // the attributes take, so a click leaves `width="100%"` alone
46951
+ if (this.isResizeMode) {
46952
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth);
46953
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight);
46954
+ }
46726
46955
  });
46727
46956
  }
46728
46957
  this.j.e.on(element, 'dragstart', this.hide);
@@ -48096,15 +48325,23 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48096
48325
  this.__tableModule.mergeSelected(table);
48097
48326
  break;
48098
48327
  case 'empty':
48099
- cells.forEach((td)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td));
48328
+ cells.forEach((td)=>{
48329
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td);
48330
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, this.j.createInside.element('br'));
48331
+ });
48100
48332
  break;
48101
48333
  case 'bin':
48102
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
48334
+ this.__removeTable(table);
48103
48335
  break;
48104
48336
  case 'binrow':
48105
- new Set(cells.map((td)=>td.parentNode)).forEach((row)=>{
48106
- this.__tableModule.removeRow(table, row.rowIndex);
48107
- });
48337
+ {
48338
+ const rows = new Set(cells.map((td)=>td.parentNode));
48339
+ const next = this.__nearestCell(table, cell, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(rows).map((row)=>row.rowIndex), true);
48340
+ rows.forEach((row)=>{
48341
+ this.__tableModule.removeRow(table, row.rowIndex);
48342
+ });
48343
+ next && this.j.s.setCursorIn(next);
48344
+ }
48108
48345
  break;
48109
48346
  case 'bincolumn':
48110
48347
  {
@@ -48117,9 +48354,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48117
48354
  columnsSet.add(col);
48118
48355
  }
48119
48356
  });
48357
+ const next = this.__nearestCell(table, cell, columns, false);
48120
48358
  columns.sort((a, b)=>b - a).forEach((col)=>{
48121
48359
  this.__tableModule.removeColumn(table, col);
48122
48360
  });
48361
+ next && this.j.s.setCursorIn(next);
48123
48362
  }
48124
48363
  break;
48125
48364
  case 'addcolumnafter':
@@ -48131,10 +48370,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48131
48370
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
48132
48371
  break;
48133
48372
  }
48373
+ if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
48374
+ this.__removeTable(table);
48375
+ }
48134
48376
  }
48135
48377
  return false;
48136
48378
  }
48137
48379
  }
48380
+ /**
48381
+ * The cell that takes the caret when rows or columns are deleted: the next
48382
+ * one in the same column (or row) that is not deleted, else the previous one
48383
+ */ __nearestCell(table, cell, deleted, isRow) {
48384
+ const box = this.__tableModule.formalMatrix(table);
48385
+ const [row, column] = this.__tableModule.formalCoordinate(table, cell);
48386
+ const start = isRow ? row : column;
48387
+ const count = isRow ? box.length : box[row].length;
48388
+ const find = (i)=>!deleted.includes(i) && (isRow ? box[i][column] : box[row][i]) || null;
48389
+ for(let i = start + 1; i < count; i += 1){
48390
+ const next = find(i);
48391
+ if (next) {
48392
+ return next;
48393
+ }
48394
+ }
48395
+ for(let i = start - 1; i >= 0; i -= 1){
48396
+ const prev = find(i);
48397
+ if (prev) {
48398
+ return prev;
48399
+ }
48400
+ }
48401
+ return null;
48402
+ }
48138
48403
  /**
48139
48404
  * Add some align after native command
48140
48405
  */ onAfterCommand(command) {
@@ -48142,6 +48407,14 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48142
48407
  this.__tableModule.getAllSelectedCells().forEach((elm)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.alignElement)(command, elm));
48143
48408
  }
48144
48409
  }
48410
+ /**
48411
+ * Remove the table and put the caret where it stood: at the start of what
48412
+ * follows it, else at the end of what precedes it
48413
+ */ __removeTable(table) {
48414
+ const parent = table.parentNode, next = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(table, false), prev = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(table, true);
48415
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
48416
+ this.j.s.setCursorIn(next || prev || parent, Boolean(next));
48417
+ }
48145
48418
  /** @override */ beforeDestruct(jodit) {
48146
48419
  this.__onRemoveSelection();
48147
48420
  jodit.e.off('.select-cells');
@@ -52629,7 +52902,7 @@ const WORK_KEYS = new Set([
52629
52902
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
52630
52903
  editor.s.setCursorBefore(first);
52631
52904
  } else {
52632
- if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
52905
+ if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(next)) {
52633
52906
  editor.s.select(next, true);
52634
52907
  } else {
52635
52908
  editor.s.setCursorIn(next, key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN);
@@ -52693,6 +52966,37 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.table = {
52693
52966
  useExtraClassesOptions: false
52694
52967
  };
52695
52968
  _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('table', _table_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]);
52969
+ /**
52970
+ * Elements in `dtd.blockLimits` that hold only rows, cells or list items, so
52971
+ * a table can't go directly inside them
52972
+ */ const ROW_AND_ITEM_HOLDERS = new Set([
52973
+ 'table',
52974
+ 'thead',
52975
+ 'tbody',
52976
+ 'tfoot',
52977
+ 'tr',
52978
+ 'ul',
52979
+ 'ol',
52980
+ 'dl'
52981
+ ]);
52982
+ /**
52983
+ * The nearest block around the cursor that can hold the new table: an element
52984
+ * in `dtd.blockLimits`, such as a table cell, a list item or a `<div>`. The
52985
+ * cursor's own block of the `enter` tag is a line, not a container, as in the
52986
+ * dtd plugin's `checkBlockNesting`
52987
+ */ function findTableContainer(editor, current) {
52988
+ const line = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
52989
+ const container = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, (node)=>{
52990
+ var _a;
52991
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) || node === line && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, editor.o.enter)) {
52992
+ return false;
52993
+ }
52994
+ const tag = node.nodeName.toLowerCase();
52995
+ return Boolean((_a = editor.o.dtd) === null || _a === void 0 ? void 0 : _a.blockLimits[tag]) && !ROW_AND_ITEM_HOLDERS.has(tag);
52996
+ }, editor.editor);
52997
+ // With the cursor between two rows, `current` is the next row's text
52998
+ return container && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(container, editor.s.range.startContainer) ? container : null;
52999
+ }
52696
53000
  _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52697
53001
  data: {
52698
53002
  cols: 10,
@@ -52790,7 +53094,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52790
53094
  editor.s.removeMarkers();
52791
53095
  editor.editor.normalize();
52792
53096
  editor.history.snapshot.restore(snapshot);
52793
- const block = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(editor.s.current(), _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
53097
+ const current = editor.s.current();
53098
+ // The table goes into the cell, list item or box holding the
53099
+ // cursor, and only a block inside it is split
53100
+ const container = findTableContainer(editor, current);
53101
+ const block = container === current ? null : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, container !== null && container !== void 0 ? container : editor.editor);
52794
53102
  if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(block)) {
52795
53103
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.replace(block, table, undefined, false, true);
52796
53104
  } else {
@@ -52812,6 +53120,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52812
53120
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, table);
52813
53121
  }
52814
53122
  }
53123
+ } else if (container && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(container) && !editor.o.table.splitBlockOnInsertTable) {
53124
+ // With no block to go after, the table goes after the text
53125
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(container, table);
52815
53126
  } else {
52816
53127
  editor.s.insertNode(table, false);
52817
53128
  }
@@ -53070,33 +53381,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
53070
53381
 
53071
53382
 
53072
53383
 
53073
- // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
53074
- // with `mediaDefaultAlign`
53075
- function prepareMedia(jodit, element) {
53076
- const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
53077
- const { mediaDefaultAlign } = jodit.o;
53078
- if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
53079
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
53080
- }
53081
- return media;
53082
- }
53083
53384
  function insertVideos(data) {
53084
53385
  var _a;
53085
53386
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
53086
- this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
53387
+ this.s.insertNode((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareMedia)(this, this.createInside.element('video', {
53087
53388
  controls: '',
53088
53389
  src: data.baseurl + file
53089
53390
  })));
53090
53391
  });
53091
53392
  }
53092
- // Embed code that is one element is prepared as media; other code goes in as
53093
- // it is
53094
- function prepareEmbedCode(jodit, code) {
53095
- const box = jodit.createInside.div();
53096
- box.innerHTML = code.trim();
53097
- const element = box.firstElementChild;
53098
- return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
53099
- }
53100
53393
  _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
53101
53394
  parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
53102
53395
  defaultWidth: 400,
@@ -53134,7 +53427,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
53134
53427
  ])
53135
53428
  ]), tabs = [], insertCode = (code)=>{
53136
53429
  jodit.s.restore();
53137
- jodit.s.insertHTML(prepareEmbedCode(jodit, code));
53430
+ jodit.s.insertHTML((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code));
53138
53431
  close();
53139
53432
  };
53140
53433
  jodit.s.save();
@@ -53169,7 +53462,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
53169
53462
  formCode.onSubmit((data)=>{
53170
53463
  insertCode(data.code);
53171
53464
  });
53172
- return (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
53465
+ const box = (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
53466
+ // Its tabs are sized to their labels, as the file selector's are, since
53467
+ // "Upload" doesn't fit a third of the popup
53468
+ box.classList.add('jodit-file-selector');
53469
+ return box;
53173
53470
  },
53174
53471
  tags: [
53175
53472
  'iframe'