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
@@ -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
  };
@@ -33590,6 +33663,10 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
33590
33663
  if (!sel.isFocused()) {
33591
33664
  sel.focus();
33592
33665
  }
33666
+ // Focused with no range, as WebKit leaves it after a click on an embed
33667
+ if (!sel.isInsideArea) {
33668
+ return;
33669
+ }
33593
33670
  if ((0,_cases_check_not_collapsed_js__WEBPACK_IMPORTED_MODULE_7__.checkNotCollapsed)(jodit)) {
33594
33671
  jodit.e.fire('backSpaceAfterDelete', backspace);
33595
33672
  return false;
@@ -34784,7 +34861,8 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34784
34861
  /* harmony import */ var _core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86518);
34785
34862
  /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20356);
34786
34863
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46776);
34787
- /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59498);
34864
+ /* harmony import */ var _helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80973);
34865
+ /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59498);
34788
34866
  /*!
34789
34867
  * Jodit Editor (https://xdsoft.net/jodit/)
34790
34868
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34803,11 +34881,16 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34803
34881
 
34804
34882
 
34805
34883
 
34884
+
34806
34885
  /**
34807
34886
  * Clean HTML after removeFormat and insertHorizontalRule command
34808
34887
  */ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
34809
34888
  class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
34810
- /** @override */ afterInit(jodit) {}
34889
+ /** @override */ afterInit() {
34890
+ // The walker's own `:afterInit` watcher is bound on that very event,
34891
+ // so without this the first pass waited for the first key or click
34892
+ this.onChangeCleanHTML();
34893
+ }
34811
34894
  get isEditMode() {
34812
34895
  return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
34813
34896
  }
@@ -34823,18 +34906,18 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34823
34906
  }
34824
34907
  startWalker() {
34825
34908
  const { jodit } = this;
34826
- const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.allowTags);
34827
- const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.denyTags);
34828
- this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34909
+ const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.allowTags);
34910
+ const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.denyTags);
34911
+ this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34829
34912
  this.j.e.fire(affected ? 'internalChange finishedCleanHTMLWorker' : 'finishedCleanHTMLWorker');
34830
34913
  });
34831
34914
  }
34832
34915
  beforeCommand(command) {
34833
34916
  if (command.toLowerCase() === 'removeformat') {
34834
34917
  if (this.j.s.isCollapsed()) {
34835
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForCollapsedSelection)(this.j);
34918
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
34836
34919
  } else {
34837
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForSelection)(this.j);
34920
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
34838
34921
  }
34839
34922
  return false;
34840
34923
  }
@@ -34860,6 +34943,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34860
34943
  ];
34861
34944
  sandBox.innerHTML = data.value;
34862
34945
  this.j.e.fire('safeHTML', sandBox);
34946
+ this.__replaceOldTags(sandBox);
34863
34947
  data.value = sandBox.innerHTML;
34864
34948
  (0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, {
34865
34949
  safeJavaScriptLink: true,
@@ -34868,6 +34952,20 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34868
34952
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
34869
34953
  return false;
34870
34954
  }
34955
+ /**
34956
+ * Replace old tags (`<b>` with `<strong>`, `<i>` with `<em>`) in an
34957
+ * assigned value straight away. The walker would get to them only after
34958
+ * every node before them, seconds later on a long document, and until
34959
+ * then Bold does not treat `<b>` as bold, and the swap can move the caret.
34960
+ */ __replaceOldTags(box) {
34961
+ const { replaceOldTags: list, disableCleanFilter } = this.j.o.cleanHTML;
34962
+ if (!list || (disableCleanFilter === null || disableCleanFilter === void 0 ? void 0 : disableCleanFilter.has('replaceOldTags'))) {
34963
+ return;
34964
+ }
34965
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(box, (node)=>{
34966
+ ;(0,_helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__.replaceOldTags)(this.j, node, false);
34967
+ });
34968
+ }
34871
34969
  /**
34872
34970
  * Collapse a value that holds only a single empty block (e.g.
34873
34971
  * `<p><br></p>` left after deleting all content) to an empty string —
@@ -34946,10 +35044,11 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34946
35044
  ;(0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, this.j.o.cleanHTML);
34947
35045
  }
34948
35046
  /** @override */ beforeDestruct() {
35047
+ this.j.e.off('safeHTML', this.onSafeHTML).off('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).off('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
34949
35048
  this.walker.destruct();
34950
35049
  }
34951
- constructor(){
34952
- super(...arguments);
35050
+ constructor(jodit){
35051
+ super(jodit);
34953
35052
  /** @override */ this.buttons = [
34954
35053
  {
34955
35054
  name: 'eraser',
@@ -34960,6 +35059,12 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34960
35059
  this.walker = new _core_dom_lazy_walker_js__WEBPACK_IMPORTED_MODULE_2__.LazyWalker(this.j.async, {
34961
35060
  timeout: this.j.o.cleanHTML.timeout
34962
35061
  });
35062
+ // `@watch` binds once the plugin is ready, which is after the initial
35063
+ // value has already gone into the editor. The handlers that keep
35064
+ // markup out of the live tree have to be there from the start, or
35065
+ // event handlers in a textarea's content run before anything
35066
+ // sanitises them.
35067
+ jodit.e.on('safeHTML', this.onSafeHTML).on('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).on('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
34963
35068
  }
34964
35069
  }
34965
35070
  __decorate([
@@ -34978,16 +35083,16 @@ __decorate([
34978
35083
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':beforeCommand')
34979
35084
  ], cleanHtml.prototype, "beforeCommand", null);
34980
35085
  __decorate([
34981
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':afterSetNativeEditorValue')
35086
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
34982
35087
  ], cleanHtml.prototype, "onAfterSetNativeEditorValue", null);
34983
35088
  __decorate([
34984
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':beforeSetNativeEditorValue')
35089
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
34985
35090
  ], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
34986
35091
  __decorate([
34987
35092
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':afterGetValueFromEditor')
34988
35093
  ], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
34989
35094
  __decorate([
34990
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':safeHTML')
35095
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
34991
35096
  ], cleanHtml.prototype, "onSafeHTML", null);
34992
35097
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('cleanHtml', cleanHtml);
34993
35098
 
@@ -35564,10 +35669,33 @@ __webpack_require__.r(__webpack_exports__);
35564
35669
  }
35565
35670
  const tagName = list[oldParent.nodeName.toLowerCase()] || list[oldParent.nodeName];
35566
35671
  if (tagName) {
35567
- return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35672
+ const restoreSelection = keepSelection(jodit, oldParent);
35673
+ const newParent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35674
+ restoreSelection === null || restoreSelection === void 0 ? void 0 : restoreSelection(newParent);
35675
+ return newParent;
35568
35676
  }
35569
35677
  return oldParent;
35570
35678
  }
35679
+ /**
35680
+ * Moving the children out of an element collapses a selection inside them to
35681
+ * where the element was, so the caret jumps to the start of the text being
35682
+ * typed. Returns a callback that puts the selection back on the same nodes.
35683
+ *
35684
+ * Like `removeEmptyTextNode`, it leaves the selection alone once focus has
35685
+ * left the editor, because selecting would take focus back.
35686
+ */ function keepSelection(jodit, elm) {
35687
+ const { sel } = jodit.s;
35688
+ if (!(sel === null || sel === void 0 ? void 0 : sel.anchorNode) || !sel.focusNode || !jodit.s.isFocused()) {
35689
+ return null;
35690
+ }
35691
+ const { anchorNode, anchorOffset, focusNode, focusOffset } = sel;
35692
+ 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)) {
35693
+ return null;
35694
+ }
35695
+ return (newElm)=>{
35696
+ sel.setBaseAndExtent(anchorNode === elm ? newElm : anchorNode, anchorOffset, focusNode === elm ? newElm : focusNode, focusOffset);
35697
+ };
35698
+ }
35571
35699
 
35572
35700
 
35573
35701
  /***/ }),
@@ -37199,9 +37327,32 @@ const brBoxes = new Set([
37199
37327
  * Released under MIT see LICENSE.txt in the project root for license information.
37200
37328
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
37201
37329
  */
37330
+ /**
37331
+ * Moves the cursor out of a block that can't hold the inserted block: before
37332
+ * or after it when the cursor is at its edge, or between its two halves when
37333
+ * the cursor is inside its content. An empty block is removed
37334
+ */ function moveCursorOutOf(jodit, parent) {
37335
+ var _a;
37336
+ const { s } = jodit;
37337
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37338
+ s.setCursorAfter(parent);
37339
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37340
+ return;
37341
+ }
37342
+ if (s.cursorOnTheRight(parent)) {
37343
+ s.setCursorAfter(parent);
37344
+ return;
37345
+ }
37346
+ if (s.cursorOnTheLeft(parent)) {
37347
+ s.setCursorBefore(parent);
37348
+ return;
37349
+ }
37350
+ s.setCursorAfter((_a = s.splitSelection(parent)) !== null && _a !== void 0 ? _a : parent);
37351
+ }
37202
37352
  /**
37203
37353
  * Checks whether the insertion of an element at the current location is allowed,
37204
- * if it is not allowed, it deletes an empty block element or moves the cursor after it
37354
+ * if it is not allowed, it deletes an empty block element, moves the cursor
37355
+ * before or after it, or splits it at the cursor
37205
37356
  * @internal
37206
37357
  */ function checkBlockNesting(jodit, node) {
37207
37358
  var _a, _b;
@@ -37230,10 +37381,7 @@ const brBoxes = new Set([
37230
37381
  parent = current;
37231
37382
  }
37232
37383
  if (parent) {
37233
- jodit.s.setCursorAfter(parent);
37234
- if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37235
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37236
- }
37384
+ moveCursorOutOf(jodit, parent);
37237
37385
  }
37238
37386
  }
37239
37387
  }
@@ -37738,7 +37886,14 @@ function brBefore(start) {
37738
37886
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(link, fake);
37739
37887
  } else if (s.cursorOnTheLeft(link, fake)) {
37740
37888
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(link, fake);
37889
+ } else {
37890
+ return;
37741
37891
  }
37892
+ // The block is split at the caret, so the caret leaves the link too:
37893
+ // beside the fake, since Safari mislays a caret inside a removed node
37894
+ const range = s.createRange();
37895
+ range.setStartBefore(fake);
37896
+ s.selectRange(range);
37742
37897
  }
37743
37898
  }
37744
37899
 
@@ -37968,9 +38123,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
37968
38123
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
37969
38124
 
37970
38125
  /* unused harmony export focus */
37971
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
37972
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
37973
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
38126
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38127
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
38128
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38129
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
37974
38130
  /*!
37975
38131
  * Jodit Editor (https://xdsoft.net/jodit/)
37976
38132
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37978,15 +38134,16 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
37978
38134
  */
37979
38135
 
37980
38136
 
38137
+
37981
38138
  /**
37982
38139
  * After loading the page into the editor once the focus is set
37983
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.autofocus = false;
38140
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.autofocus = false;
37984
38141
  /**
37985
38142
  * Cursor position after autofocus
37986
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.cursorAfterAutofocus = 'end';
38143
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.cursorAfterAutofocus = 'end';
37987
38144
  /**
37988
38145
  * Save current selection on blur event
37989
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
38146
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.saveSelectionOnBlur = true;
37990
38147
  function focus(editor) {
37991
38148
  if (editor.o.saveSelectionOnBlur) {
37992
38149
  // A click that brings focus back places the caret itself, and Chrome
@@ -38018,10 +38175,10 @@ function focus(editor) {
38018
38175
  let textNode = null;
38019
38176
  switch(editor.o.cursorAfterAutofocus){
38020
38177
  case 'start':
38021
- 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));
38178
+ 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));
38022
38179
  break;
38023
38180
  case 'end':
38024
- 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));
38181
+ 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));
38025
38182
  break;
38026
38183
  }
38027
38184
  if (textNode) {
@@ -38039,7 +38196,8 @@ function focus(editor) {
38039
38196
  });
38040
38197
  editor.e.on('afterInit afterAddPlace', ()=>{
38041
38198
  editor.e.off(editor.editor, 'mousedown.autofocus').on(editor.editor, 'mousedown.autofocus', (e)=>{
38042
- if (editor.isEditorMode() && e.target && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(e.target) && !e.target.childNodes.length) {
38199
+ // An empty block takes the caret, but a video, say, can't hold one
38200
+ 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) {
38043
38201
  if (editor.editor === e.target) {
38044
38202
  editor.s.focus();
38045
38203
  } else {
@@ -38049,7 +38207,7 @@ function focus(editor) {
38049
38207
  });
38050
38208
  });
38051
38209
  }
38052
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
38210
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('focus', focus);
38053
38211
 
38054
38212
 
38055
38213
  /***/ }),
@@ -39222,18 +39380,29 @@ function hr(editor) {
39222
39380
  group: 'insert'
39223
39381
  });
39224
39382
  editor.registerCommand('insertHorizontalRule', ()=>{
39383
+ var _a;
39225
39384
  const elm = editor.createInside.element('hr');
39226
39385
  editor.s.insertNode(elm, false, false);
39227
39386
  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);
39228
- if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor) {
39387
+ // A block that holds other blocks, such as a list item or a table
39388
+ // cell, keeps the line
39389
+ 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()])) {
39229
39390
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(block, elm);
39230
39391
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(block);
39231
39392
  }
39232
- 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);
39233
- if (!p) {
39234
- p = editor.createInside.element(editor.o.enter);
39235
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39393
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, false);
39394
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(next)) {
39395
+ editor.s.setCursorIn(next, true);
39396
+ return false;
39397
+ }
39398
+ // In a list item or a table cell the text goes on after the line, as
39399
+ // it does with the browsers' own command
39400
+ 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))) {
39401
+ editor.s.setCursorAfter(elm);
39402
+ return false;
39236
39403
  }
39404
+ const p = editor.createInside.element(editor.o.enter);
39405
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39237
39406
  editor.s.setCursorIn(p);
39238
39407
  return false;
39239
39408
  });
@@ -39266,7 +39435,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
39266
39435
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
39267
39436
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
39268
39437
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
39269
- _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' + '}';
39438
+ _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' + '}';
39270
39439
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
39271
39440
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
39272
39441
 
@@ -42026,10 +42195,30 @@ const align = {
42026
42195
  // A media wrapper kept in the content gets the media popup
42027
42196
  const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
42028
42197
  if (target && type && this.canShowPopupForType(type)) {
42029
- this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
42198
+ const isMedia = type === 'jodit-media';
42199
+ // Beside the media in a wrapper kept in the content, which can fill
42200
+ // the line
42201
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
42202
+ this.showPopup(()=>this.__bound(bound, isMedia), type, target);
42030
42203
  return false;
42031
42204
  }
42032
42205
  }
42206
+ /**
42207
+ * The box the popup opens beside: the target's, with room for the
42208
+ * resizer's handles when the target gets them, so it doesn't cover them
42209
+ */ __bound(target, isMedia) {
42210
+ const bound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j);
42211
+ const resizable = this.j.o.allowResizeTags;
42212
+ if (!isMedia && !(resizable && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(target, resizable))) {
42213
+ return bound;
42214
+ }
42215
+ const room = parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue('--jd-resizer-handle-size'), 10) / 2 || 0;
42216
+ return {
42217
+ ...bound,
42218
+ top: bound.top - room,
42219
+ height: bound.height + room * 2
42220
+ };
42221
+ }
42033
42222
  /**
42034
42223
  * Show inline popup with some toolbar
42035
42224
  *
@@ -42975,7 +43164,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
42975
43164
  height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
42976
43165
  });
42977
43166
  if (embed !== html) {
42978
- return jodit.createInside.fromHTML(embed);
43167
+ const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.prepareEmbedCode)(jodit, embed);
43168
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
42979
43169
  }
42980
43170
  }
42981
43171
  if (jodit.s.isCollapsed()) {
@@ -43453,10 +43643,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
43453
43643
  } else {
43454
43644
  return;
43455
43645
  }
43646
+ // Selected, as an image is, so Delete and Backspace remove it
43456
43647
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
43457
- editor.s.setCursorAfter(element);
43648
+ editor.s.select(element);
43458
43649
  });
43459
43650
  };
43651
+ // Media in a wrapper kept in the content let clicks through to it, as
43652
+ // jodit-media covers its media, so a click selects the media rather than
43653
+ // playing it. An inline wrapper holds it as an inline-block, unless its
43654
+ // classes or style give it a display of their own
43655
+ const wrappers = Object.values(mediaWrappers);
43656
+ if (wrappers.length) {
43657
+ editor.e.on('afterInit', ()=>{
43658
+ const selectors = (list)=>[
43659
+ ...new Set(list)
43660
+ ].join(',');
43661
+ const scoped = ({ tag, className })=>`.jodit-wysiwyg ${tag}.${className}`;
43662
+ const inline = selectors(wrappers.filter(({ tag })=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE.test(tag)).map(scoped));
43663
+ const media = selectors(wrappers.flatMap((wrapper)=>mediaBlocks.map((tag)=>`${scoped(wrapper)}>${tag}`)));
43664
+ (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}`;
43665
+ });
43666
+ }
43460
43667
  if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
43461
43668
  editor.e.on('afterGetValueFromEditor', (data)=>{
43462
43669
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
@@ -44349,12 +44556,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44349
44556
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44350
44557
  /* harmony export */ askInsertTypeDialog: function() { return /* binding */ askInsertTypeDialog; },
44351
44558
  /* harmony export */ getAllTypes: function() { return /* binding */ getAllTypes; },
44352
- /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; }
44559
+ /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; },
44560
+ /* harmony export */ removeGoogleDocsWrapper: function() { return /* binding */ removeGoogleDocsWrapper; }
44353
44561
  /* harmony export */ });
44354
44562
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
44355
44563
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
44356
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27613);
44357
- /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10830);
44564
+ /* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
44565
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27613);
44566
+ /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10830);
44358
44567
  /*!
44359
44568
  * Jodit Editor (https://xdsoft.net/jodit/)
44360
44569
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -44363,6 +44572,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44363
44572
 
44364
44573
 
44365
44574
 
44575
+
44366
44576
  /**
44367
44577
  * Remove special HTML comments
44368
44578
  * @private
@@ -44378,6 +44588,21 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44378
44588
  }
44379
44589
  return html;
44380
44590
  }
44591
+ /**
44592
+ * Google Docs wraps the copied content in
44593
+ * `<b style="font-weight:normal;" id="docs-internal-guid-…">`. Kept, the
44594
+ * wrapper holds the pasted blocks, and without its style it makes the whole
44595
+ * paste bold
44596
+ * @private
44597
+ */ function removeGoogleDocsWrapper(html) {
44598
+ if (!/<b\s[^>]*docs-internal-guid-/i.test(html)) {
44599
+ return html;
44600
+ }
44601
+ // An inert document: images don't load and handlers don't run
44602
+ const { body } = new DOMParser().parseFromString(html, 'text/html');
44603
+ (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);
44604
+ return body.innerHTML;
44605
+ }
44381
44606
  /**
44382
44607
  * @private
44383
44608
  */ function isDragEvent(e) {
@@ -44394,11 +44619,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44394
44619
  editor.s.insertCursorAtPoint(e.clientX, e.clientY);
44395
44620
  }
44396
44621
  const result = editor.e.fire('beforePasteInsert', html);
44397
- 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))) {
44622
+ 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))) {
44398
44623
  html = result;
44399
44624
  }
44400
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
44401
- html = removeExtraFragments(html);
44625
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
44626
+ html = removeExtraFragments(removeGoogleDocsWrapper(html));
44402
44627
  }
44403
44628
  editor.s.insertHTML(html);
44404
44629
  }
@@ -44408,7 +44633,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44408
44633
  */ function getAllTypes(dt) {
44409
44634
  const types = dt.types;
44410
44635
  let types_str = '';
44411
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
44636
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
44412
44637
  for(let i = 0; i < types.length; i += 1){
44413
44638
  types_str += types[i] + ';';
44414
44639
  }
@@ -44425,7 +44650,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44425
44650
  return;
44426
44651
  }
44427
44652
  const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
44428
- const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
44653
+ const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
44429
44654
  text,
44430
44655
  name: text.toLowerCase(),
44431
44656
  tabIndex: 0
@@ -44441,7 +44666,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44441
44666
  }
44442
44667
  jodit.e.fire('afterClosePasteDialog', dialog);
44443
44668
  });
44444
- const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
44669
+ const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
44445
44670
  text: 'Cancel',
44446
44671
  tabIndex: 0
44447
44672
  }).onAction(()=>{
@@ -44590,7 +44815,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
44590
44815
  this.j.buffer.set(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, html);
44591
44816
  switch(action){
44592
44817
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_CLEAR_HTML:
44593
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)(html);
44818
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)((0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__.removeGoogleDocsWrapper)(html));
44594
44819
  break;
44595
44820
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
44596
44821
  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);
@@ -45740,7 +45965,7 @@ const keyBInd = '__jodit-resizer_binded';
45740
45965
  addEventListeners() {
45741
45966
  const editor = this.j;
45742
45967
  editor.e.off(editor.editor, '.resizer').off(editor.ow, '.resizer').on(editor.editor, 'keydown.resizer', (e)=>{
45743
- 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')) {
45968
+ 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')) {
45744
45969
  this.onDelete(e);
45745
45970
  }
45746
45971
  }).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize).on([
@@ -45947,8 +46172,12 @@ const keyBInd = '__jodit-resizer_binded';
45947
46172
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
45948
46173
  this.j.s.select(element);
45949
46174
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
45950
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth + 'px');
45951
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight + 'px');
46175
+ // Only a resize sets the embed's size, and as the plain numbers
46176
+ // the attributes take, so a click leaves `width="100%"` alone
46177
+ if (this.isResizeMode) {
46178
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth);
46179
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight);
46180
+ }
45952
46181
  });
45953
46182
  }
45954
46183
  this.j.e.on(element, 'dragstart', this.hide);
@@ -47322,15 +47551,23 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
47322
47551
  this.__tableModule.mergeSelected(table);
47323
47552
  break;
47324
47553
  case 'empty':
47325
- cells.forEach((td)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td));
47554
+ cells.forEach((td)=>{
47555
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td);
47556
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, this.j.createInside.element('br'));
47557
+ });
47326
47558
  break;
47327
47559
  case 'bin':
47328
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
47560
+ this.__removeTable(table);
47329
47561
  break;
47330
47562
  case 'binrow':
47331
- new Set(cells.map((td)=>td.parentNode)).forEach((row)=>{
47332
- this.__tableModule.removeRow(table, row.rowIndex);
47333
- });
47563
+ {
47564
+ const rows = new Set(cells.map((td)=>td.parentNode));
47565
+ const next = this.__nearestCell(table, cell, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(rows).map((row)=>row.rowIndex), true);
47566
+ rows.forEach((row)=>{
47567
+ this.__tableModule.removeRow(table, row.rowIndex);
47568
+ });
47569
+ next && this.j.s.setCursorIn(next);
47570
+ }
47334
47571
  break;
47335
47572
  case 'bincolumn':
47336
47573
  {
@@ -47343,9 +47580,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
47343
47580
  columnsSet.add(col);
47344
47581
  }
47345
47582
  });
47583
+ const next = this.__nearestCell(table, cell, columns, false);
47346
47584
  columns.sort((a, b)=>b - a).forEach((col)=>{
47347
47585
  this.__tableModule.removeColumn(table, col);
47348
47586
  });
47587
+ next && this.j.s.setCursorIn(next);
47349
47588
  }
47350
47589
  break;
47351
47590
  case 'addcolumnafter':
@@ -47357,10 +47596,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
47357
47596
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
47358
47597
  break;
47359
47598
  }
47599
+ if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
47600
+ this.__removeTable(table);
47601
+ }
47360
47602
  }
47361
47603
  return false;
47362
47604
  }
47363
47605
  }
47606
+ /**
47607
+ * The cell that takes the caret when rows or columns are deleted: the next
47608
+ * one in the same column (or row) that is not deleted, else the previous one
47609
+ */ __nearestCell(table, cell, deleted, isRow) {
47610
+ const box = this.__tableModule.formalMatrix(table);
47611
+ const [row, column] = this.__tableModule.formalCoordinate(table, cell);
47612
+ const start = isRow ? row : column;
47613
+ const count = isRow ? box.length : box[row].length;
47614
+ const find = (i)=>!deleted.includes(i) && (isRow ? box[i][column] : box[row][i]) || null;
47615
+ for(let i = start + 1; i < count; i += 1){
47616
+ const next = find(i);
47617
+ if (next) {
47618
+ return next;
47619
+ }
47620
+ }
47621
+ for(let i = start - 1; i >= 0; i -= 1){
47622
+ const prev = find(i);
47623
+ if (prev) {
47624
+ return prev;
47625
+ }
47626
+ }
47627
+ return null;
47628
+ }
47364
47629
  /**
47365
47630
  * Add some align after native command
47366
47631
  */ onAfterCommand(command) {
@@ -47368,6 +47633,14 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
47368
47633
  this.__tableModule.getAllSelectedCells().forEach((elm)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.alignElement)(command, elm));
47369
47634
  }
47370
47635
  }
47636
+ /**
47637
+ * Remove the table and put the caret where it stood: at the start of what
47638
+ * follows it, else at the end of what precedes it
47639
+ */ __removeTable(table) {
47640
+ 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);
47641
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
47642
+ this.j.s.setCursorIn(next || prev || parent, Boolean(next));
47643
+ }
47371
47644
  /** @override */ beforeDestruct(jodit) {
47372
47645
  this.__onRemoveSelection();
47373
47646
  jodit.e.off('.select-cells');
@@ -50551,7 +50824,7 @@ const WORK_KEYS = new Set([
50551
50824
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
50552
50825
  editor.s.setCursorBefore(first);
50553
50826
  } else {
50554
- if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
50827
+ if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(next)) {
50555
50828
  editor.s.select(next, true);
50556
50829
  } else {
50557
50830
  editor.s.setCursorIn(next, key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN);
@@ -50615,6 +50888,37 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.table = {
50615
50888
  useExtraClassesOptions: false
50616
50889
  };
50617
50890
  _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('table', _table_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]);
50891
+ /**
50892
+ * Elements in `dtd.blockLimits` that hold only rows, cells or list items, so
50893
+ * a table can't go directly inside them
50894
+ */ const ROW_AND_ITEM_HOLDERS = new Set([
50895
+ 'table',
50896
+ 'thead',
50897
+ 'tbody',
50898
+ 'tfoot',
50899
+ 'tr',
50900
+ 'ul',
50901
+ 'ol',
50902
+ 'dl'
50903
+ ]);
50904
+ /**
50905
+ * The nearest block around the cursor that can hold the new table: an element
50906
+ * in `dtd.blockLimits`, such as a table cell, a list item or a `<div>`. The
50907
+ * cursor's own block of the `enter` tag is a line, not a container, as in the
50908
+ * dtd plugin's `checkBlockNesting`
50909
+ */ function findTableContainer(editor, current) {
50910
+ 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);
50911
+ const container = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, (node)=>{
50912
+ var _a;
50913
+ 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)) {
50914
+ return false;
50915
+ }
50916
+ const tag = node.nodeName.toLowerCase();
50917
+ return Boolean((_a = editor.o.dtd) === null || _a === void 0 ? void 0 : _a.blockLimits[tag]) && !ROW_AND_ITEM_HOLDERS.has(tag);
50918
+ }, editor.editor);
50919
+ // With the cursor between two rows, `current` is the next row's text
50920
+ return container && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(container, editor.s.range.startContainer) ? container : null;
50921
+ }
50618
50922
  _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
50619
50923
  data: {
50620
50924
  cols: 10,
@@ -50712,7 +51016,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
50712
51016
  editor.s.removeMarkers();
50713
51017
  editor.editor.normalize();
50714
51018
  editor.history.snapshot.restore(snapshot);
50715
- 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);
51019
+ const current = editor.s.current();
51020
+ // The table goes into the cell, list item or box holding the
51021
+ // cursor, and only a block inside it is split
51022
+ const container = findTableContainer(editor, current);
51023
+ 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);
50716
51024
  if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(block)) {
50717
51025
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.replace(block, table, undefined, false, true);
50718
51026
  } else {
@@ -50734,6 +51042,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
50734
51042
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, table);
50735
51043
  }
50736
51044
  }
51045
+ } else if (container && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(container) && !editor.o.table.splitBlockOnInsertTable) {
51046
+ // With no block to go after, the table goes after the text
51047
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(container, table);
50737
51048
  } else {
50738
51049
  editor.s.insertNode(table, false);
50739
51050
  }
@@ -50992,33 +51303,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
50992
51303
 
50993
51304
 
50994
51305
 
50995
- // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
50996
- // with `mediaDefaultAlign`
50997
- function prepareMedia(jodit, element) {
50998
- const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
50999
- const { mediaDefaultAlign } = jodit.o;
51000
- if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
51001
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
51002
- }
51003
- return media;
51004
- }
51005
51306
  function insertVideos(data) {
51006
51307
  var _a;
51007
51308
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
51008
- this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
51309
+ this.s.insertNode((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareMedia)(this, this.createInside.element('video', {
51009
51310
  controls: '',
51010
51311
  src: data.baseurl + file
51011
51312
  })));
51012
51313
  });
51013
51314
  }
51014
- // Embed code that is one element is prepared as media; other code goes in as
51015
- // it is
51016
- function prepareEmbedCode(jodit, code) {
51017
- const box = jodit.createInside.div();
51018
- box.innerHTML = code.trim();
51019
- const element = box.firstElementChild;
51020
- return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
51021
- }
51022
51315
  _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
51023
51316
  parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
51024
51317
  defaultWidth: 400,
@@ -51056,7 +51349,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
51056
51349
  ])
51057
51350
  ]), tabs = [], insertCode = (code)=>{
51058
51351
  jodit.s.restore();
51059
- jodit.s.insertHTML(prepareEmbedCode(jodit, code));
51352
+ jodit.s.insertHTML((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code));
51060
51353
  close();
51061
51354
  };
51062
51355
  jodit.s.save();
@@ -51091,7 +51384,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
51091
51384
  formCode.onSubmit((data)=>{
51092
51385
  insertCode(data.code);
51093
51386
  });
51094
- return (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
51387
+ const box = (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
51388
+ // Its tabs are sized to their labels, as the file selector's are, since
51389
+ // "Upload" doesn't fit a third of the popup
51390
+ box.classList.add('jodit-file-selector');
51391
+ return box;
51095
51392
  },
51096
51393
  tags: [
51097
51394
  'iframe'