jodit-pro 4.18.2 → 4.18.6

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 (380) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +2 -0
  3. package/config.js +1 -0
  4. package/es2015/jodit.css +1 -1
  5. package/es2015/jodit.fat.min.css +1 -1
  6. package/es2015/jodit.fat.min.js +30 -18
  7. package/es2015/jodit.js +465 -131
  8. package/es2015/jodit.min.js +11 -11
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  10. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  11. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  13. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  14. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  15. package/es2015/plugins/backup/backup.css +1 -1
  16. package/es2015/plugins/backup/backup.js +1 -1
  17. package/es2015/plugins/backup/backup.min.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.css +1 -1
  19. package/es2015/plugins/button-generator/button-generator.js +1 -1
  20. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  21. package/es2015/plugins/change-case/change-case.js +1 -1
  22. package/es2015/plugins/change-case/change-case.min.js +1 -1
  23. package/es2015/plugins/chart/chart.css +173 -0
  24. package/es2015/plugins/chart/chart.js +1479 -0
  25. package/es2015/plugins/chart/chart.min.css +1 -0
  26. package/es2015/plugins/chart/chart.min.js +20 -0
  27. package/es2015/plugins/color-picker/color-picker.css +1 -1
  28. package/es2015/plugins/color-picker/color-picker.js +1 -1
  29. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  30. package/es2015/plugins/emoji/emoji.css +1 -1
  31. package/es2015/plugins/emoji/emoji.js +1 -1
  32. package/es2015/plugins/emoji/emoji.min.js +1 -1
  33. package/es2015/plugins/export-docs/export-docs.js +1 -1
  34. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  35. package/es2015/plugins/finder/finder.css +1 -1
  36. package/es2015/plugins/finder/finder.js +1 -1
  37. package/es2015/plugins/finder/finder.min.js +1 -1
  38. package/es2015/plugins/google-maps/google-maps.css +1 -1
  39. package/es2015/plugins/google-maps/google-maps.js +1 -1
  40. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  41. package/es2015/plugins/google-search/google-search.js +1 -1
  42. package/es2015/plugins/google-search/google-search.min.js +1 -1
  43. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  44. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  45. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  46. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  47. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  48. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  49. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  50. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  51. package/es2015/plugins/keyboard/keyboard.css +1 -1
  52. package/es2015/plugins/keyboard/keyboard.js +1 -1
  53. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  54. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  55. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  56. package/es2015/plugins/page-break/page-break.js +1 -1
  57. package/es2015/plugins/page-break/page-break.min.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.css +1 -1
  59. package/es2015/plugins/paste-code/paste-code.js +1 -1
  60. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  61. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  62. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  63. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  64. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  65. package/es2015/plugins/style/style.css +1 -1
  66. package/es2015/plugins/style/style.js +1 -1
  67. package/es2015/plugins/style/style.min.js +1 -1
  68. package/es2015/plugins/templates/templates.css +1 -1
  69. package/es2015/plugins/templates/templates.js +1 -1
  70. package/es2015/plugins/templates/templates.min.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.css +1 -1
  72. package/es2015/plugins/todo-list/todo-list.js +1 -1
  73. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  74. package/es2015/plugins/translate/translate.css +1 -1
  75. package/es2015/plugins/translate/translate.js +1 -1
  76. package/es2015/plugins/translate/translate.min.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.css +1 -1
  78. package/es2015/plugins/tune-block/tune-block.js +2 -1
  79. package/es2015/plugins/tune-block/tune-block.min.js +2 -2
  80. package/es2018/jodit.fat.min.css +1 -1
  81. package/es2018/jodit.fat.min.js +75 -63
  82. package/es2018/jodit.min.js +9 -9
  83. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  84. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  85. package/es2018/plugins/backup/backup.min.js +1 -1
  86. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  87. package/es2018/plugins/change-case/change-case.min.js +1 -1
  88. package/es2018/plugins/chart/chart.min.css +1 -0
  89. package/es2018/plugins/chart/chart.min.js +20 -0
  90. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  91. package/es2018/plugins/emoji/emoji.min.js +1 -1
  92. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  93. package/es2018/plugins/finder/finder.min.js +1 -1
  94. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  95. package/es2018/plugins/google-search/google-search.min.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  99. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  100. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  101. package/es2018/plugins/page-break/page-break.min.js +1 -1
  102. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  103. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  104. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  105. package/es2018/plugins/style/style.min.js +1 -1
  106. package/es2018/plugins/templates/templates.min.js +1 -1
  107. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  108. package/es2018/plugins/translate/translate.min.js +1 -1
  109. package/es2018/plugins/tune-block/tune-block.min.js +2 -2
  110. package/es2021/jodit.css +1 -1
  111. package/es2021/jodit.fat.min.css +1 -1
  112. package/es2021/jodit.fat.min.js +32 -20
  113. package/es2021/jodit.js +417 -131
  114. package/es2021/jodit.min.js +16 -16
  115. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  116. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  117. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  118. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  119. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  120. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  121. package/es2021/plugins/backup/backup.css +1 -1
  122. package/es2021/plugins/backup/backup.js +1 -1
  123. package/es2021/plugins/backup/backup.min.js +1 -1
  124. package/es2021/plugins/button-generator/button-generator.css +1 -1
  125. package/es2021/plugins/button-generator/button-generator.js +1 -1
  126. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  127. package/es2021/plugins/change-case/change-case.js +1 -1
  128. package/es2021/plugins/change-case/change-case.min.js +1 -1
  129. package/es2021/plugins/chart/chart.css +173 -0
  130. package/es2021/plugins/chart/chart.js +1424 -0
  131. package/es2021/plugins/chart/chart.min.css +1 -0
  132. package/es2021/plugins/chart/chart.min.js +20 -0
  133. package/es2021/plugins/color-picker/color-picker.css +1 -1
  134. package/es2021/plugins/color-picker/color-picker.js +1 -1
  135. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  136. package/es2021/plugins/emoji/emoji.css +1 -1
  137. package/es2021/plugins/emoji/emoji.js +1 -1
  138. package/es2021/plugins/emoji/emoji.min.js +1 -1
  139. package/es2021/plugins/export-docs/export-docs.js +1 -1
  140. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  141. package/es2021/plugins/finder/finder.css +1 -1
  142. package/es2021/plugins/finder/finder.js +1 -1
  143. package/es2021/plugins/finder/finder.min.js +1 -1
  144. package/es2021/plugins/google-maps/google-maps.css +1 -1
  145. package/es2021/plugins/google-maps/google-maps.js +1 -1
  146. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  147. package/es2021/plugins/google-search/google-search.js +1 -1
  148. package/es2021/plugins/google-search/google-search.min.js +1 -1
  149. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  150. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  151. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  152. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  153. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  154. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  155. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  156. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  157. package/es2021/plugins/keyboard/keyboard.css +1 -1
  158. package/es2021/plugins/keyboard/keyboard.js +1 -1
  159. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  160. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  161. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  162. package/es2021/plugins/page-break/page-break.js +1 -1
  163. package/es2021/plugins/page-break/page-break.min.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.css +1 -1
  165. package/es2021/plugins/paste-code/paste-code.js +1 -1
  166. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  167. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  168. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  169. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  170. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  171. package/es2021/plugins/style/style.css +1 -1
  172. package/es2021/plugins/style/style.js +1 -1
  173. package/es2021/plugins/style/style.min.js +1 -1
  174. package/es2021/plugins/templates/templates.css +1 -1
  175. package/es2021/plugins/templates/templates.js +1 -1
  176. package/es2021/plugins/templates/templates.min.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.css +1 -1
  178. package/es2021/plugins/todo-list/todo-list.js +1 -1
  179. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  180. package/es2021/plugins/translate/translate.css +1 -1
  181. package/es2021/plugins/translate/translate.js +1 -1
  182. package/es2021/plugins/translate/translate.min.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.css +1 -1
  184. package/es2021/plugins/tune-block/tune-block.js +2 -1
  185. package/es2021/plugins/tune-block/tune-block.min.js +2 -2
  186. package/es2021.en/jodit.css +1 -1
  187. package/es2021.en/jodit.fat.min.css +1 -1
  188. package/es2021.en/jodit.fat.min.js +32 -20
  189. package/es2021.en/jodit.js +417 -131
  190. package/es2021.en/jodit.min.js +16 -16
  191. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  192. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  193. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  194. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  195. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  196. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  197. package/es2021.en/plugins/backup/backup.css +1 -1
  198. package/es2021.en/plugins/backup/backup.js +1 -1
  199. package/es2021.en/plugins/backup/backup.min.js +1 -1
  200. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  201. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  202. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  203. package/es2021.en/plugins/change-case/change-case.js +1 -1
  204. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  205. package/es2021.en/plugins/chart/chart.css +173 -0
  206. package/es2021.en/plugins/chart/chart.js +1424 -0
  207. package/es2021.en/plugins/chart/chart.min.css +1 -0
  208. package/es2021.en/plugins/chart/chart.min.js +20 -0
  209. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  210. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  211. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  212. package/es2021.en/plugins/emoji/emoji.css +1 -1
  213. package/es2021.en/plugins/emoji/emoji.js +1 -1
  214. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  215. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  216. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  217. package/es2021.en/plugins/finder/finder.css +1 -1
  218. package/es2021.en/plugins/finder/finder.js +1 -1
  219. package/es2021.en/plugins/finder/finder.min.js +1 -1
  220. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  221. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  222. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  223. package/es2021.en/plugins/google-search/google-search.js +1 -1
  224. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  225. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  226. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  227. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  228. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  229. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  230. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  231. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  232. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  233. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  234. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  235. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  237. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.js +1 -1
  239. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  242. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  244. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  246. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  247. package/es2021.en/plugins/style/style.css +1 -1
  248. package/es2021.en/plugins/style/style.js +1 -1
  249. package/es2021.en/plugins/style/style.min.js +1 -1
  250. package/es2021.en/plugins/templates/templates.css +1 -1
  251. package/es2021.en/plugins/templates/templates.js +1 -1
  252. package/es2021.en/plugins/templates/templates.min.js +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  255. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  256. package/es2021.en/plugins/translate/translate.css +1 -1
  257. package/es2021.en/plugins/translate/translate.js +1 -1
  258. package/es2021.en/plugins/translate/translate.min.js +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.js +2 -1
  261. package/es2021.en/plugins/tune-block/tune-block.min.js +2 -2
  262. package/es5/jodit.css +2 -2
  263. package/es5/jodit.fat.min.css +1 -1
  264. package/es5/jodit.fat.min.js +2 -2
  265. package/es5/jodit.js +529 -135
  266. package/es5/jodit.min.css +2 -2
  267. package/es5/jodit.min.js +2 -2
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  269. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  270. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  272. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  273. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  274. package/es5/plugins/backup/backup.css +1 -1
  275. package/es5/plugins/backup/backup.js +1 -1
  276. package/es5/plugins/backup/backup.min.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.css +1 -1
  278. package/es5/plugins/button-generator/button-generator.js +1 -1
  279. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  280. package/es5/plugins/change-case/change-case.js +1 -1
  281. package/es5/plugins/change-case/change-case.min.js +1 -1
  282. package/es5/plugins/chart/chart.css +173 -0
  283. package/es5/plugins/chart/chart.js +1661 -0
  284. package/es5/plugins/chart/chart.min.css +1 -0
  285. package/es5/plugins/chart/chart.min.js +8 -0
  286. package/es5/plugins/color-picker/color-picker.css +1 -1
  287. package/es5/plugins/color-picker/color-picker.js +1 -1
  288. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  289. package/es5/plugins/emoji/emoji.css +1 -1
  290. package/es5/plugins/emoji/emoji.js +1 -1
  291. package/es5/plugins/emoji/emoji.min.js +1 -1
  292. package/es5/plugins/export-docs/export-docs.js +1 -1
  293. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  294. package/es5/plugins/finder/finder.css +1 -1
  295. package/es5/plugins/finder/finder.js +1 -1
  296. package/es5/plugins/finder/finder.min.js +1 -1
  297. package/es5/plugins/google-maps/google-maps.css +1 -1
  298. package/es5/plugins/google-maps/google-maps.js +1 -1
  299. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  300. package/es5/plugins/google-search/google-search.js +1 -1
  301. package/es5/plugins/google-search/google-search.min.js +1 -1
  302. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  303. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  304. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  305. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  306. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  307. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  308. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  309. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  310. package/es5/plugins/keyboard/keyboard.css +1 -1
  311. package/es5/plugins/keyboard/keyboard.js +1 -1
  312. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  313. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  314. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  315. package/es5/plugins/page-break/page-break.js +1 -1
  316. package/es5/plugins/page-break/page-break.min.js +1 -1
  317. package/es5/plugins/paste-code/paste-code.css +1 -1
  318. package/es5/plugins/paste-code/paste-code.js +1 -1
  319. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  320. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  321. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  322. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  323. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  324. package/es5/plugins/style/style.css +1 -1
  325. package/es5/plugins/style/style.js +1 -1
  326. package/es5/plugins/style/style.min.js +1 -1
  327. package/es5/plugins/templates/templates.css +1 -1
  328. package/es5/plugins/templates/templates.js +1 -1
  329. package/es5/plugins/templates/templates.min.js +1 -1
  330. package/es5/plugins/todo-list/todo-list.css +1 -1
  331. package/es5/plugins/todo-list/todo-list.js +1 -1
  332. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  333. package/es5/plugins/translate/translate.css +1 -1
  334. package/es5/plugins/translate/translate.js +1 -1
  335. package/es5/plugins/translate/translate.min.js +1 -1
  336. package/es5/plugins/tune-block/tune-block.css +1 -1
  337. package/es5/plugins/tune-block/tune-block.js +2 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +2 -2
  339. package/es5/polyfills.fat.min.js +1 -1
  340. package/es5/polyfills.js +1 -1
  341. package/es5/polyfills.min.js +1 -1
  342. package/esm/config.d.ts +27 -1
  343. package/esm/plugins/all.js +1 -1
  344. package/esm/plugins/chart/assets/chart.svg.js +1 -0
  345. package/esm/plugins/chart/chart.d.ts +56 -0
  346. package/esm/plugins/chart/chart.js +1 -0
  347. package/esm/plugins/chart/config.d.ts +33 -0
  348. package/esm/plugins/chart/config.js +1 -0
  349. package/esm/plugins/chart/helpers.d.ts +22 -0
  350. package/esm/plugins/chart/helpers.js +1 -0
  351. package/esm/plugins/chart/interface.d.ts +34 -0
  352. package/esm/plugins/chart/interface.js +0 -0
  353. package/esm/plugins/chart/render/bar.d.ts +8 -0
  354. package/esm/plugins/chart/render/bar.js +1 -0
  355. package/esm/plugins/chart/render/common.d.ts +40 -0
  356. package/esm/plugins/chart/render/common.js +1 -0
  357. package/esm/plugins/chart/render/index.d.ts +7 -0
  358. package/esm/plugins/chart/render/index.js +1 -0
  359. package/esm/plugins/chart/render/line.d.ts +7 -0
  360. package/esm/plugins/chart/render/line.js +1 -0
  361. package/esm/plugins/chart/render/pie.d.ts +7 -0
  362. package/esm/plugins/chart/render/pie.js +1 -0
  363. package/esm/plugins/chart/render/radar.d.ts +7 -0
  364. package/esm/plugins/chart/render/radar.js +1 -0
  365. package/esm/plugins/chart/ui/editor/editor.d.ts +52 -0
  366. package/esm/plugins/chart/ui/editor/editor.js +13 -0
  367. package/esm/plugins/tune-block/config.js +1 -1
  368. package/package.json +1 -1
  369. package/types/config.d.ts +27 -1
  370. package/types/plugins/chart/chart.d.ts +56 -0
  371. package/types/plugins/chart/config.d.ts +33 -0
  372. package/types/plugins/chart/helpers.d.ts +22 -0
  373. package/types/plugins/chart/interface.d.ts +34 -0
  374. package/types/plugins/chart/render/bar.d.ts +8 -0
  375. package/types/plugins/chart/render/common.d.ts +40 -0
  376. package/types/plugins/chart/render/index.d.ts +7 -0
  377. package/types/plugins/chart/render/line.d.ts +7 -0
  378. package/types/plugins/chart/render/pie.d.ts +7 -0
  379. package/types/plugins/chart/render/radar.d.ts +7 -0
  380. package/types/plugins/chart/ui/editor/editor.d.ts +52 -0
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.2
4
+ * Version: v4.18.6
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.2";
1771
+ */ const APP_VERSION = "4.18.6";
1772
1772
  // prettier-ignore
1773
1773
  const ES = "es2021";
1774
1774
  const IS_ES_MODERN = true;
@@ -6418,6 +6418,8 @@ __webpack_require__.r(__webpack_exports__);
6418
6418
  /* harmony export */ options: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.options; },
6419
6419
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.parseQuery; },
6420
6420
  /* harmony export */ position: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.position; },
6421
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.prepareEmbedCode; },
6422
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.prepareMedia; },
6421
6423
  /* harmony export */ previewBox: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.previewBox; },
6422
6424
  /* harmony export */ refs: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.refs; },
6423
6425
  /* harmony export */ reset: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.reset; },
@@ -8662,13 +8664,13 @@ const getClassName = (obj)=>{
8662
8664
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8663
8665
 
8664
8666
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8665
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
8667
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.$$; },
8666
8668
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8667
8669
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8668
8670
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8669
8671
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8670
8672
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8671
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
8673
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
8672
8674
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8673
8675
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
8674
8676
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -8681,9 +8683,9 @@ const getClassName = (obj)=>{
8681
8683
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8682
8684
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8683
8685
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8684
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
8685
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
8686
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
8686
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.call; },
8687
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8688
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callThis; },
8687
8689
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8688
8690
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8689
8691
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
@@ -8693,7 +8695,7 @@ const getClassName = (obj)=>{
8693
8695
  /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
8694
8696
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8695
8697
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8696
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
8698
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
8697
8699
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8698
8700
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8699
8701
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8702,34 +8704,36 @@ const getClassName = (obj)=>{
8702
8704
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8703
8705
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
8704
8706
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8705
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
8707
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
8706
8708
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8707
8709
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
8708
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
8710
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
8709
8711
  /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
8710
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
8712
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
8711
8713
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
8712
8714
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
8713
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
8715
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.inView; },
8714
8716
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
8715
8717
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
8716
8718
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
8717
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
8718
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
8719
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.keys; },
8720
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
8719
8721
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
8720
8722
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
8721
8723
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
8722
8724
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
8723
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
8724
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
8725
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
8726
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
8725
8727
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
8726
8728
  /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
8727
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
8728
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
8729
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
8730
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
8731
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
8732
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
8729
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
8730
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
8731
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
8732
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.refs; },
8733
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_24__.reset; },
8734
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
8735
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
8736
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_27__.set; },
8733
8737
  /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
8734
8738
  /* harmony export */ });
8735
8739
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
@@ -8754,13 +8758,14 @@ const getClassName = (obj)=>{
8754
8758
  /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
8755
8759
  /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
8756
8760
  /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
8757
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
8758
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
8759
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
8760
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
8761
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
8762
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
8763
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
8761
+ /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(96437);
8762
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(11628);
8763
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(58844);
8764
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26395);
8765
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76078);
8766
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(3703);
8767
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(50535);
8768
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(37790);
8764
8769
  /*!
8765
8770
  * Jodit Editor (https://xdsoft.net/jodit/)
8766
8771
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8796,6 +8801,7 @@ const getClassName = (obj)=>{
8796
8801
 
8797
8802
 
8798
8803
 
8804
+
8799
8805
 
8800
8806
 
8801
8807
  /***/ }),
@@ -8961,6 +8967,45 @@ const isWrapper = (node, wrapper)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.
8961
8967
  /* harmony export */ ]);
8962
8968
 
8963
8969
 
8970
+ /***/ }),
8971
+
8972
+ /***/ 96437:
8973
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8974
+
8975
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8976
+ /* harmony export */ prepareEmbedCode: function() { return /* binding */ prepareEmbedCode; },
8977
+ /* harmony export */ prepareMedia: function() { return /* binding */ prepareMedia; }
8978
+ /* harmony export */ });
8979
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
8980
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61477);
8981
+ /*!
8982
+ * Jodit Editor (https://xdsoft.net/jodit/)
8983
+ * Released under MIT see LICENSE.txt in the project root for license information.
8984
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8985
+ */
8986
+
8987
+ /**
8988
+ * Puts new media in its wrapper (see `mediaWrappers`) and aligns it with
8989
+ * `mediaDefaultAlign`. Returns the wrapper, or `element` when there is none
8990
+ */ function prepareMedia(jodit, element) {
8991
+ const media = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_1__.wrapMedia)(jodit, element);
8992
+ const { mediaDefaultAlign } = jodit.o;
8993
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
8994
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
8995
+ }
8996
+ return media;
8997
+ }
8998
+ /**
8999
+ * Embed code that is one element is prepared as media (see `prepareMedia`);
9000
+ * other code is returned as it is
9001
+ */ function prepareEmbedCode(jodit, code) {
9002
+ const box = jodit.createInside.div();
9003
+ box.innerHTML = code.trim();
9004
+ const element = box.firstElementChild;
9005
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
9006
+ }
9007
+
9008
+
8964
9009
  /***/ }),
8965
9010
 
8966
9011
  /***/ 11628:
@@ -13061,7 +13106,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
13061
13106
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, fragment);
13062
13107
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeInsertNode(range, wrapper);
13063
13108
  if (style.elementIsBlock) {
13064
- if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(wrapper.firstElementChild, 'br')) {
13109
+ // The wrapped content can bring its own `<br>` (an empty table
13110
+ // cell's), after or inside the temporary `<font>` around the selection
13111
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(wrapper) && !wrapper.querySelector('br')) {
13065
13112
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, ci.element('br'));
13066
13113
  }
13067
13114
  }
@@ -28071,28 +28118,20 @@ class FileBrowserTree extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE_0__.UIG
28071
28118
  /* harmony export */ History: function() { return /* binding */ History; }
28072
28119
  /* harmony export */ });
28073
28120
  /* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
28074
- /* harmony import */ var _core_decorators_debounce_debounce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81577);
28075
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
28076
- /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92643);
28077
- /* harmony import */ var _snapshot_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52604);
28078
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57034);
28121
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6441);
28122
+ /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92643);
28123
+ /* harmony import */ var _snapshot_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52604);
28124
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57034);
28079
28125
  /*!
28080
28126
  * Jodit Editor (https://xdsoft.net/jodit/)
28081
28127
  * Released under MIT see LICENSE.txt in the project root for license information.
28082
28128
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
28083
- */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
28084
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28085
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28086
- else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
28087
- return c > 3 && r && Object.defineProperty(target, key, r), r;
28088
- };
28089
-
28090
-
28129
+ */
28091
28130
 
28092
28131
 
28093
28132
 
28094
28133
 
28095
- _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28134
+ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.history = {
28096
28135
  enable: true,
28097
28136
  maxHistoryLength: Infinity,
28098
28137
  timeout: 1000
@@ -28106,27 +28145,31 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28106
28145
  /**
28107
28146
  * Return state of the WYSIWYG editor to step back
28108
28147
  */ redo() {
28148
+ this.__processPendingChanges();
28109
28149
  if (this.__stack.redo()) {
28110
28150
  this.startValue = this.snapshot.make();
28111
28151
  this.fireChangeStack();
28112
28152
  }
28113
28153
  }
28114
28154
  canRedo() {
28115
- return this.__stack.canRedo();
28155
+ return !this.__hasPendingChanges && this.__stack.canRedo();
28116
28156
  }
28117
28157
  /**
28118
28158
  * Return the state of the WYSIWYG editor to step forward
28119
28159
  */ undo() {
28160
+ this.__processPendingChanges();
28120
28161
  if (this.__stack.undo()) {
28121
28162
  this.startValue = this.snapshot.make();
28122
28163
  this.fireChangeStack();
28123
28164
  }
28124
28165
  }
28125
28166
  canUndo() {
28126
- return this.__stack.canUndo();
28167
+ return this.__hasPendingChanges || this.__stack.canUndo();
28127
28168
  }
28128
28169
  clear() {
28129
28170
  this.startValue = this.snapshot.make();
28171
+ this.async.clearTimeout(this.__timer);
28172
+ this.__hasPendingChanges = false;
28130
28173
  this.__stack.clear();
28131
28174
  this.fireChangeStack();
28132
28175
  }
@@ -28146,9 +28189,29 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28146
28189
  this.updateTick += 1;
28147
28190
  }
28148
28191
  /**
28149
- * Push new command in stack on some changes
28192
+ * Push new command in stack on some changes. The first change opens a
28193
+ * step, and later ones join it until `history.timeout` has passed,
28194
+ * however close together they come.
28150
28195
  */ onChange() {
28151
- this.__processChanges();
28196
+ // A transaction is over by the time the step is recorded, so it is
28197
+ // checked now
28198
+ if (this.snapshot.isBlocked || this.__hasPendingChanges) {
28199
+ return;
28200
+ }
28201
+ this.__hasPendingChanges = true;
28202
+ this.__timer = this.async.setTimeout(()=>this.__processPendingChanges(), this.j.o.history.timeout);
28203
+ // With a timeout of 0 the step is already recorded. Otherwise
28204
+ // canUndo and canRedo count it from now
28205
+ if (this.__hasPendingChanges) {
28206
+ this.fireChangeStack();
28207
+ }
28208
+ }
28209
+ /**
28210
+ * Push the open step's changes now
28211
+ */ __processPendingChanges() {
28212
+ if (this.__hasPendingChanges) {
28213
+ this.__processChanges();
28214
+ }
28152
28215
  }
28153
28216
  /**
28154
28217
  * @internal
@@ -28156,13 +28219,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28156
28219
  if (this.snapshot.isBlocked || !this.j.o.history.enable) {
28157
28220
  return;
28158
28221
  }
28222
+ this.async.clearTimeout(this.__timer);
28223
+ this.__hasPendingChanges = false;
28159
28224
  this.updateStack();
28160
28225
  }
28161
28226
  /**
28162
28227
  * Update history stack
28163
28228
  */ updateStack(replace = false) {
28164
28229
  const newValue = this.snapshot.make();
28165
- if (_snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot.equal(newValue, this.startValue)) {
28230
+ if (_snapshot_js__WEBPACK_IMPORTED_MODULE_3__.Snapshot.equal(newValue, this.startValue)) {
28166
28231
  return;
28167
28232
  }
28168
28233
  // Only the selection moved, for example when the selection markers
@@ -28172,7 +28237,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28172
28237
  this.startValue = newValue;
28173
28238
  return;
28174
28239
  }
28175
- const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_3__.Command(this.startValue, newValue, this, this.updateTick);
28240
+ const newCommand = new _command_js__WEBPACK_IMPORTED_MODULE_2__.Command(this.startValue, newValue, this, this.updateTick);
28176
28241
  if (replace) {
28177
28242
  const command = this.__stack.current();
28178
28243
  if (command && this.updateTick === command.tick) {
@@ -28198,9 +28263,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28198
28263
  this.snapshot.destruct();
28199
28264
  super.destruct();
28200
28265
  }
28201
- constructor(editor, stack = new _stack_js__WEBPACK_IMPORTED_MODULE_5__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot_js__WEBPACK_IMPORTED_MODULE_4__.Snapshot(editor)){
28266
+ constructor(editor, stack = new _stack_js__WEBPACK_IMPORTED_MODULE_4__.Stack(editor.o.history.maxHistoryLength), snapshot = new _snapshot_js__WEBPACK_IMPORTED_MODULE_3__.Snapshot(editor)){
28202
28267
  super(editor);
28203
28268
  this.updateTick = 0;
28269
+ /**
28270
+ * A step is open: changes have come in that are not in the stack yet
28271
+ */ this.__hasPendingChanges = false;
28272
+ /**
28273
+ * Records the open step `history.timeout` after its first change
28274
+ */ this.__timer = 0;
28204
28275
  this.__stack = stack;
28205
28276
  this.snapshot = snapshot;
28206
28277
  if (editor.o.history.enable) {
@@ -28211,6 +28282,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28211
28282
  this.startValue = this.snapshot.make();
28212
28283
  editor.events// save selection
28213
28284
  .on('internalChange internalUpdate', ()=>{
28285
+ this.__processPendingChanges();
28214
28286
  this.startValue = this.snapshot.make();
28215
28287
  }).on(editor.editor, [
28216
28288
  'changeSelection',
@@ -28224,14 +28296,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.history = {
28224
28296
  if (this.startValue.html === this.j.getNativeEditorValue()) {
28225
28297
  this.startValue = this.snapshot.make();
28226
28298
  }
28227
- }).on(this, 'change.history', this.onChange);
28299
+ }).on(this, 'change.history', ()=>this.onChange());
28228
28300
  });
28229
28301
  }
28230
28302
  }
28231
28303
  }
28232
- __decorate([
28233
- (0,_core_decorators_debounce_debounce_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
28234
- ], History.prototype, "onChange", null);
28235
28304
 
28236
28305
 
28237
28306
  /***/ }),
@@ -29853,7 +29922,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29853
29922
  const columnsCount = Table.__getColumnsCount(table);
29854
29923
  row = create.element('tr');
29855
29924
  for(let j = 0; j < columnsCount; j += 1){
29856
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(row, create.element('td'));
29925
+ const cell = create.element('td');
29926
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, create.element('br'));
29927
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(row, cell);
29857
29928
  }
29858
29929
  } else {
29859
29930
  row = line.cloneNode(true);
@@ -29870,6 +29941,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29870
29941
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.each(row, (cell)=>{
29871
29942
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isCell(cell)) {
29872
29943
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.detach(cell);
29944
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, create.element('br'));
29873
29945
  }
29874
29946
  });
29875
29947
  }
@@ -29958,6 +30030,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
29958
30030
  const cells = box[i];
29959
30031
  if (cells[columnIndex] !== cells[newColumnIndex] || columnIndex === newColumnIndex) {
29960
30032
  const cell = this.j.createInside.element('td');
30033
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.append(cell, this.j.createInside.element('br'));
29961
30034
  if (insertAfter) {
29962
30035
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.after(cells[columnIndex], cell);
29963
30036
  } else {
@@ -30181,7 +30254,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
30181
30254
  Table.__setColumnWidthByDelta(table, first_j, 0, true, __marked);
30182
30255
  }
30183
30256
  }
30184
- first.innerHTML = html.join('<br/>');
30257
+ first.innerHTML = html.join('<br/>') || '<br/>';
30185
30258
  instance(jodit).addSelection(first);
30186
30259
  alreadyMerged.delete(first);
30187
30260
  Table.__unmark(__marked);
@@ -32403,8 +32476,8 @@ _core_ui_index_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('palette', _palette_svg_
32403
32476
  const box = (0,_tabs_tabs_js__WEBPACK_IMPORTED_MODULE_3__.TabsWidget)(editor, tabs);
32404
32477
  // Marks this popup so its tabs auto-size to their labels (see
32405
32478
  // `.jodit-file-selector` in tabs.less) — long localized tab captions are no
32406
- // longer clipped — while leaving other tab popups (link, video …)
32407
- // untouched.
32479
+ // longer clipped — while leaving other tab popups (link …) untouched. The
32480
+ // video popup, which has an Upload tab too, uses it as well.
32408
32481
  box.classList.add('jodit-file-selector');
32409
32482
  return box;
32410
32483
  };
@@ -33641,6 +33714,10 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
33641
33714
  if (!sel.isFocused()) {
33642
33715
  sel.focus();
33643
33716
  }
33717
+ // Focused with no range, as WebKit leaves it after a click on an embed
33718
+ if (!sel.isInsideArea) {
33719
+ return;
33720
+ }
33644
33721
  if ((0,_cases_check_not_collapsed_js__WEBPACK_IMPORTED_MODULE_7__.checkNotCollapsed)(jodit)) {
33645
33722
  jodit.e.fire('backSpaceAfterDelete', backspace);
33646
33723
  return false;
@@ -34835,7 +34912,8 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34835
34912
  /* harmony import */ var _core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86518);
34836
34913
  /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20356);
34837
34914
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46776);
34838
- /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59498);
34915
+ /* harmony import */ var _helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80973);
34916
+ /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59498);
34839
34917
  /*!
34840
34918
  * Jodit Editor (https://xdsoft.net/jodit/)
34841
34919
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34854,6 +34932,7 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('class-span', _class_span
34854
34932
 
34855
34933
 
34856
34934
 
34935
+
34857
34936
  /**
34858
34937
  * Clean HTML after removeFormat and insertHorizontalRule command
34859
34938
  */ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
@@ -34878,18 +34957,18 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34878
34957
  }
34879
34958
  startWalker() {
34880
34959
  const { jodit } = this;
34881
- const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.allowTags);
34882
- const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.getHash)(this.j.o.cleanHTML.denyTags);
34883
- this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34960
+ const allow = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.allowTags);
34961
+ const deny = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.getHash)(this.j.o.cleanHTML.denyTags);
34962
+ this.walker.on('visit', (node)=>(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.visitNodeWalker)(jodit, node, allow, deny, this.currentSelectionNode)).on('end', (affected)=>{
34884
34963
  this.j.e.fire(affected ? 'internalChange finishedCleanHTMLWorker' : 'finishedCleanHTMLWorker');
34885
34964
  });
34886
34965
  }
34887
34966
  beforeCommand(command) {
34888
34967
  if (command.toLowerCase() === 'removeformat') {
34889
34968
  if (this.j.s.isCollapsed()) {
34890
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForCollapsedSelection)(this.j);
34969
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
34891
34970
  } else {
34892
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.removeFormatForSelection)(this.j);
34971
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
34893
34972
  }
34894
34973
  return false;
34895
34974
  }
@@ -34915,6 +34994,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34915
34994
  ];
34916
34995
  sandBox.innerHTML = data.value;
34917
34996
  this.j.e.fire('safeHTML', sandBox);
34997
+ this.__replaceOldTags(sandBox);
34918
34998
  data.value = sandBox.innerHTML;
34919
34999
  (0,_core_helpers_html_safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML)(sandBox, {
34920
35000
  safeJavaScriptLink: true,
@@ -34923,6 +35003,20 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34923
35003
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
34924
35004
  return false;
34925
35005
  }
35006
+ /**
35007
+ * Replace old tags (`<b>` with `<strong>`, `<i>` with `<em>`) in an
35008
+ * assigned value straight away. The walker would get to them only after
35009
+ * every node before them, seconds later on a long document, and until
35010
+ * then Bold does not treat `<b>` as bold, and the swap can move the caret.
35011
+ */ __replaceOldTags(box) {
35012
+ const { replaceOldTags: list, disableCleanFilter } = this.j.o.cleanHTML;
35013
+ if (!list || (disableCleanFilter === null || disableCleanFilter === void 0 ? void 0 : disableCleanFilter.has('replaceOldTags'))) {
35014
+ return;
35015
+ }
35016
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(box, (node)=>{
35017
+ ;(0,_helpers_visitor_filters_replace_old_tags_js__WEBPACK_IMPORTED_MODULE_7__.replaceOldTags)(this.j, node, false);
35018
+ });
35019
+ }
34926
35020
  /**
34927
35021
  * Collapse a value that holds only a single empty block (e.g.
34928
35022
  * `<p><br></p>` left after deleting all content) to an empty string —
@@ -35626,10 +35720,33 @@ __webpack_require__.r(__webpack_exports__);
35626
35720
  }
35627
35721
  const tagName = list[oldParent.nodeName.toLowerCase()] || list[oldParent.nodeName];
35628
35722
  if (tagName) {
35629
- return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35723
+ const restoreSelection = keepSelection(jodit, oldParent);
35724
+ const newParent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(oldParent, tagName, jodit.createInside, true, false);
35725
+ restoreSelection === null || restoreSelection === void 0 ? void 0 : restoreSelection(newParent);
35726
+ return newParent;
35630
35727
  }
35631
35728
  return oldParent;
35632
35729
  }
35730
+ /**
35731
+ * Moving the children out of an element collapses a selection inside them to
35732
+ * where the element was, so the caret jumps to the start of the text being
35733
+ * typed. Returns a callback that puts the selection back on the same nodes.
35734
+ *
35735
+ * Like `removeEmptyTextNode`, it leaves the selection alone once focus has
35736
+ * left the editor, because selecting would take focus back.
35737
+ */ function keepSelection(jodit, elm) {
35738
+ const { sel } = jodit.s;
35739
+ if (!(sel === null || sel === void 0 ? void 0 : sel.anchorNode) || !sel.focusNode || !jodit.s.isFocused()) {
35740
+ return null;
35741
+ }
35742
+ const { anchorNode, anchorOffset, focusNode, focusOffset } = sel;
35743
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, anchorNode) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(elm, focusNode)) {
35744
+ return null;
35745
+ }
35746
+ return (newElm)=>{
35747
+ sel.setBaseAndExtent(anchorNode === elm ? newElm : anchorNode, anchorOffset, focusNode === elm ? newElm : focusNode, focusOffset);
35748
+ };
35749
+ }
35633
35750
 
35634
35751
 
35635
35752
  /***/ }),
@@ -37595,9 +37712,32 @@ const brBoxes = new Set([
37595
37712
  * Released under MIT see LICENSE.txt in the project root for license information.
37596
37713
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
37597
37714
  */
37715
+ /**
37716
+ * Moves the cursor out of a block that can't hold the inserted block: before
37717
+ * or after it when the cursor is at its edge, or between its two halves when
37718
+ * the cursor is inside its content. An empty block is removed
37719
+ */ function moveCursorOutOf(jodit, parent) {
37720
+ var _a;
37721
+ const { s } = jodit;
37722
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37723
+ s.setCursorAfter(parent);
37724
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37725
+ return;
37726
+ }
37727
+ if (s.cursorOnTheRight(parent)) {
37728
+ s.setCursorAfter(parent);
37729
+ return;
37730
+ }
37731
+ if (s.cursorOnTheLeft(parent)) {
37732
+ s.setCursorBefore(parent);
37733
+ return;
37734
+ }
37735
+ s.setCursorAfter((_a = s.splitSelection(parent)) !== null && _a !== void 0 ? _a : parent);
37736
+ }
37598
37737
  /**
37599
37738
  * Checks whether the insertion of an element at the current location is allowed,
37600
- * if it is not allowed, it deletes an empty block element or moves the cursor after it
37739
+ * if it is not allowed, it deletes an empty block element, moves the cursor
37740
+ * before or after it, or splits it at the cursor
37601
37741
  * @internal
37602
37742
  */ function checkBlockNesting(jodit, node) {
37603
37743
  var _a, _b;
@@ -37626,10 +37766,7 @@ const brBoxes = new Set([
37626
37766
  parent = current;
37627
37767
  }
37628
37768
  if (parent) {
37629
- jodit.s.setCursorAfter(parent);
37630
- if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(parent)) {
37631
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(parent);
37632
- }
37769
+ moveCursorOutOf(jodit, parent);
37633
37770
  }
37634
37771
  }
37635
37772
  }
@@ -38134,7 +38271,14 @@ function brBefore(start) {
38134
38271
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(link, fake);
38135
38272
  } else if (s.cursorOnTheLeft(link, fake)) {
38136
38273
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(link, fake);
38274
+ } else {
38275
+ return;
38137
38276
  }
38277
+ // The block is split at the caret, so the caret leaves the link too:
38278
+ // beside the fake, since Safari mislays a caret inside a removed node
38279
+ const range = s.createRange();
38280
+ range.setStartBefore(fake);
38281
+ s.selectRange(range);
38138
38282
  }
38139
38283
  }
38140
38284
 
@@ -38364,9 +38508,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
38364
38508
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
38365
38509
 
38366
38510
  /* unused harmony export focus */
38367
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
38368
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
38369
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
38511
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38512
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
38513
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38514
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
38370
38515
  /*!
38371
38516
  * Jodit Editor (https://xdsoft.net/jodit/)
38372
38517
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38374,15 +38519,16 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
38374
38519
  */
38375
38520
 
38376
38521
 
38522
+
38377
38523
  /**
38378
38524
  * After loading the page into the editor once the focus is set
38379
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.autofocus = false;
38525
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.autofocus = false;
38380
38526
  /**
38381
38527
  * Cursor position after autofocus
38382
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.cursorAfterAutofocus = 'end';
38528
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.cursorAfterAutofocus = 'end';
38383
38529
  /**
38384
38530
  * Save current selection on blur event
38385
- */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
38531
+ */ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.saveSelectionOnBlur = true;
38386
38532
  function focus(editor) {
38387
38533
  if (editor.o.saveSelectionOnBlur) {
38388
38534
  // A click that brings focus back places the caret itself, and Chrome
@@ -38414,10 +38560,10 @@ function focus(editor) {
38414
38560
  let textNode = null;
38415
38561
  switch(editor.o.cursorAfterAutofocus){
38416
38562
  case 'start':
38417
- textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.first(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
38563
+ textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
38418
38564
  break;
38419
38565
  case 'end':
38420
- textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.last(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(node));
38566
+ textNode = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.last(editor.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node));
38421
38567
  break;
38422
38568
  }
38423
38569
  if (textNode) {
@@ -38435,7 +38581,8 @@ function focus(editor) {
38435
38581
  });
38436
38582
  editor.e.on('afterInit afterAddPlace', ()=>{
38437
38583
  editor.e.off(editor.editor, 'mousedown.autofocus').on(editor.editor, 'mousedown.autofocus', (e)=>{
38438
- if (editor.isEditorMode() && e.target && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(e.target) && !e.target.childNodes.length) {
38584
+ // An empty block takes the caret, but a video, say, can't hold one
38585
+ if (editor.isEditorMode() && e.target && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(e.target) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(e.target, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && !e.target.childNodes.length) {
38439
38586
  if (editor.editor === e.target) {
38440
38587
  editor.s.focus();
38441
38588
  } else {
@@ -38445,7 +38592,7 @@ function focus(editor) {
38445
38592
  });
38446
38593
  });
38447
38594
  }
38448
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
38595
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('focus', focus);
38449
38596
 
38450
38597
 
38451
38598
  /***/ }),
@@ -39618,18 +39765,29 @@ function hr(editor) {
39618
39765
  group: 'insert'
39619
39766
  });
39620
39767
  editor.registerCommand('insertHorizontalRule', ()=>{
39768
+ var _a;
39621
39769
  const elm = editor.createInside.element('hr');
39622
39770
  editor.s.insertNode(elm, false, false);
39623
39771
  const block = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
39624
- if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor) {
39772
+ // A block that holds other blocks, such as a list item or a table
39773
+ // cell, keeps the line
39774
+ if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(block) && block !== editor.editor && !((_a = editor.o.dtd) === null || _a === void 0 ? void 0 : _a.blockLimits[block.nodeName.toLowerCase()])) {
39625
39775
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(block, elm);
39626
39776
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(block);
39627
39777
  }
39628
- 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);
39629
- if (!p) {
39630
- p = editor.createInside.element(editor.o.enter);
39631
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39778
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, false);
39779
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(next)) {
39780
+ editor.s.setCursorIn(next, true);
39781
+ return false;
39632
39782
  }
39783
+ // In a list item or a table cell the text goes on after the line, as
39784
+ // it does with the browsers' own command
39785
+ if (next || elm.parentNode !== editor.editor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findNotEmptySibling(elm, true))) {
39786
+ editor.s.setCursorAfter(elm);
39787
+ return false;
39788
+ }
39789
+ const p = editor.createInside.element(editor.o.enter);
39790
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(elm, p);
39633
39791
  editor.s.setCursorIn(p);
39634
39792
  return false;
39635
39793
  });
@@ -39662,7 +39820,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeBaseUrl = '';
39662
39820
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeTitle = 'Jodit Editor';
39663
39821
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDoctype = '<!DOCTYPE html>';
39664
39822
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeDefaultSrc = 'about:blank';
39665
- _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '.jodit_editor .jodit_iframe_wrapper{' + 'display: block;' + 'clear: both;' + 'user-select: none;' + 'position: relative;' + '}' + '.jodit_editor .jodit_iframe_wrapper:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
39823
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeStyle = 'html{' + 'margin:0;' + 'padding:0;' + 'min-height: 100%;' + '}' + 'body{' + 'box-sizing:border-box;' + 'font-size:13px;' + 'line-height:1.6;' + 'padding:10px;' + 'margin:0;' + 'background:transparent;' + 'color:#000;' + 'position:' + 'relative;' + 'z-index:2;' + 'user-select:auto;' + 'margin:0px;' + 'overflow:auto;' + 'outline:none;' + '}' + 'table{' + 'width:100%;' + 'border:none;' + 'border-collapse:collapse;' + 'empty-cells: show;' + 'max-width: 100%;' + '}' + 'th,td{' + 'padding: 2px 5px;' + 'border:1px solid #ccc;' + '-webkit-user-select:text;' + '-moz-user-select:text;' + '-ms-user-select:text;' + 'user-select:text' + '}' + 'p{' + 'margin-top:0;' + '}' + '[data-jodit_iframe_wrapper]{' + 'display: block;' + 'user-select: none;' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper] iframe{' + 'position: relative;' + '}' + '[data-jodit_iframe_wrapper]:after {' + 'position:absolute;' + 'content:"";' + 'z-index:1;' + 'top:0;' + 'left:0;' + 'right: 0;' + 'bottom: 0;' + 'cursor: pointer;' + 'display: block;' + 'background: rgba(0, 0, 0, 0);' + '} ' + '[data-jodit_iframe_wrapper][data-jodit-wrapper_active=true] iframe{' + 'z-index: 2;' + '}' + '.jodit-wysiwyg_image-selected::selection,' + '.jodit-wysiwyg_image-selected *:not(img)::selection{' + 'background:transparent' + '}' + '.jodit_disabled{' + 'user-select: none;' + '-o-user-select: none;' + '-moz-user-select: none;' + '-khtml-user-select: none;' + '-webkit-user-select: none;' + '-ms-user-select: none' + '}';
39666
39824
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeCSSLinks = [];
39667
39825
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
39668
39826
 
@@ -42422,10 +42580,30 @@ const align = {
42422
42580
  // A media wrapper kept in the content gets the media popup
42423
42581
  const type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
42424
42582
  if (target && type && this.canShowPopupForType(type)) {
42425
- this.showPopup(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j), type, target);
42583
+ const isMedia = type === 'jodit-media';
42584
+ // Beside the media in a wrapper kept in the content, which can fill
42585
+ // the line
42586
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
42587
+ this.showPopup(()=>this.__bound(bound, isMedia), type, target);
42426
42588
  return false;
42427
42589
  }
42428
42590
  }
42591
+ /**
42592
+ * The box the popup opens beside: the target's, with room for the
42593
+ * resizer's handles when the target gets them, so it doesn't cover them
42594
+ */ __bound(target, isMedia) {
42595
+ const bound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, this.j);
42596
+ const resizable = this.j.o.allowResizeTags;
42597
+ if (!isMedia && !(resizable && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(target, resizable))) {
42598
+ return bound;
42599
+ }
42600
+ const room = parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue('--jd-resizer-handle-size'), 10) / 2 || 0;
42601
+ return {
42602
+ ...bound,
42603
+ top: bound.top - room,
42604
+ height: bound.height + room * 2
42605
+ };
42606
+ }
42429
42607
  /**
42430
42608
  * Show inline popup with some toolbar
42431
42609
  *
@@ -43760,7 +43938,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
43760
43938
  height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
43761
43939
  });
43762
43940
  if (embed !== html) {
43763
- return jodit.createInside.fromHTML(embed);
43941
+ const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.prepareEmbedCode)(jodit, embed);
43942
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
43764
43943
  }
43765
43944
  }
43766
43945
  if (jodit.s.isCollapsed()) {
@@ -44238,10 +44417,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
44238
44417
  } else {
44239
44418
  return;
44240
44419
  }
44420
+ // Selected, as an image is, so Delete and Backspace remove it
44241
44421
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
44242
- editor.s.setCursorAfter(element);
44422
+ editor.s.select(element);
44243
44423
  });
44244
44424
  };
44425
+ // Media in a wrapper kept in the content let clicks through to it, as
44426
+ // jodit-media covers its media, so a click selects the media rather than
44427
+ // playing it. An inline wrapper holds it as an inline-block, unless its
44428
+ // classes or style give it a display of their own
44429
+ const wrappers = Object.values(mediaWrappers);
44430
+ if (wrappers.length) {
44431
+ editor.e.on('afterInit', ()=>{
44432
+ const selectors = (list)=>[
44433
+ ...new Set(list)
44434
+ ].join(',');
44435
+ const scoped = ({ tag, className })=>`.jodit-wysiwyg ${tag}.${className}`;
44436
+ const inline = selectors(wrappers.filter(({ tag })=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE.test(tag)).map(scoped));
44437
+ const media = selectors(wrappers.flatMap((wrapper)=>mediaBlocks.map((tag)=>`${scoped(wrapper)}>${tag}`)));
44438
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__.getContainer)(editor, 'media-wrappers', 'style', true).innerHTML = (inline ? `:where(${inline}){display:inline-block}` : '') + `${media}{pointer-events:none}`;
44439
+ });
44440
+ }
44245
44441
  if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
44246
44442
  editor.e.on('afterGetValueFromEditor', (data)=>{
44247
44443
  const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
@@ -45134,12 +45330,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45134
45330
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45135
45331
  /* harmony export */ askInsertTypeDialog: function() { return /* binding */ askInsertTypeDialog; },
45136
45332
  /* harmony export */ getAllTypes: function() { return /* binding */ getAllTypes; },
45137
- /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; }
45333
+ /* harmony export */ pasteInsertHtml: function() { return /* binding */ pasteInsertHtml; },
45334
+ /* harmony export */ removeGoogleDocsWrapper: function() { return /* binding */ removeGoogleDocsWrapper; }
45138
45335
  /* harmony export */ });
45139
45336
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
45140
45337
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
45141
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27613);
45142
- /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10830);
45338
+ /* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
45339
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27613);
45340
+ /* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10830);
45143
45341
  /*!
45144
45342
  * Jodit Editor (https://xdsoft.net/jodit/)
45145
45343
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -45148,6 +45346,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45148
45346
 
45149
45347
 
45150
45348
 
45349
+
45151
45350
  /**
45152
45351
  * Remove special HTML comments
45153
45352
  * @private
@@ -45163,6 +45362,21 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45163
45362
  }
45164
45363
  return html;
45165
45364
  }
45365
+ /**
45366
+ * Google Docs wraps the copied content in
45367
+ * `<b style="font-weight:normal;" id="docs-internal-guid-…">`. Kept, the
45368
+ * wrapper holds the pasted blocks, and without its style it makes the whole
45369
+ * paste bold
45370
+ * @private
45371
+ */ function removeGoogleDocsWrapper(html) {
45372
+ if (!/<b\s[^>]*docs-internal-guid-/i.test(html)) {
45373
+ return html;
45374
+ }
45375
+ // An inert document: images don't load and handlers don't run
45376
+ const { body } = new DOMParser().parseFromString(html, 'text/html');
45377
+ (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(body.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap);
45378
+ return body.innerHTML;
45379
+ }
45166
45380
  /**
45167
45381
  * @private
45168
45382
  */ function isDragEvent(e) {
@@ -45179,11 +45393,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45179
45393
  editor.s.insertCursorAtPoint(e.clientX, e.clientY);
45180
45394
  }
45181
45395
  const result = editor.e.fire('beforePasteInsert', html);
45182
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(result) && ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(result) || (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isNumber)(result) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
45396
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isVoid)(result) && ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(result) || (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(result) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isNode(result))) {
45183
45397
  html = result;
45184
45398
  }
45185
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) {
45186
- html = removeExtraFragments(html);
45399
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
45400
+ html = removeExtraFragments(removeGoogleDocsWrapper(html));
45187
45401
  }
45188
45402
  editor.s.insertHTML(html);
45189
45403
  }
@@ -45193,7 +45407,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45193
45407
  */ function getAllTypes(dt) {
45194
45408
  const types = dt.types;
45195
45409
  let types_str = '';
45196
- if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
45410
+ if ((0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__.isArray)(types) || ({}).toString.call(types) === '[object DOMStringList]') {
45197
45411
  for(let i = 0; i < types.length; i += 1){
45198
45412
  types_str += types[i] + ';';
45199
45413
  }
@@ -45210,7 +45424,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45210
45424
  return;
45211
45425
  }
45212
45426
  const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
45213
- const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
45427
+ const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
45214
45428
  text,
45215
45429
  name: text.toLowerCase(),
45216
45430
  tabIndex: 0
@@ -45226,7 +45440,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45226
45440
  }
45227
45441
  jodit.e.fire('afterClosePasteDialog', dialog);
45228
45442
  });
45229
- const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_3__.Button)(jodit, {
45443
+ const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
45230
45444
  text: 'Cancel',
45231
45445
  tabIndex: 0
45232
45446
  }).onAction(()=>{
@@ -45375,7 +45589,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
45375
45589
  this.j.buffer.set(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, html);
45376
45590
  switch(action){
45377
45591
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_CLEAR_HTML:
45378
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)(html);
45592
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)((0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__.removeGoogleDocsWrapper)(html));
45379
45593
  break;
45380
45594
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
45381
45595
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
@@ -46525,7 +46739,7 @@ const keyBInd = '__jodit-resizer_binded';
46525
46739
  addEventListeners() {
46526
46740
  const editor = this.j;
46527
46741
  editor.e.off(editor.editor, '.resizer').off(editor.ow, '.resizer').on(editor.editor, 'keydown.resizer', (e)=>{
46528
- if (this.isShown && e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE && this.element && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(this.element, 'table')) {
46742
+ if (this.isShown && (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE) && this.element && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(this.element, 'table')) {
46529
46743
  this.onDelete(e);
46530
46744
  }
46531
46745
  }).on(editor.ow, 'resize.resizer', this.updateSize).on('resize.resizer', this.updateSize).on([
@@ -46732,8 +46946,12 @@ const keyBInd = '__jodit-resizer_binded';
46732
46946
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
46733
46947
  this.j.s.select(element);
46734
46948
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
46735
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth + 'px');
46736
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight + 'px');
46949
+ // Only a resize sets the embed's size, and as the plain numbers
46950
+ // the attributes take, so a click leaves `width="100%"` alone
46951
+ if (this.isResizeMode) {
46952
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'width', element.offsetWidth);
46953
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(iframe, 'height', element.offsetHeight);
46954
+ }
46737
46955
  });
46738
46956
  }
46739
46957
  this.j.e.on(element, 'dragstart', this.hide);
@@ -48107,15 +48325,23 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48107
48325
  this.__tableModule.mergeSelected(table);
48108
48326
  break;
48109
48327
  case 'empty':
48110
- cells.forEach((td)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td));
48328
+ cells.forEach((td)=>{
48329
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(td);
48330
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(td, this.j.createInside.element('br'));
48331
+ });
48111
48332
  break;
48112
48333
  case 'bin':
48113
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
48334
+ this.__removeTable(table);
48114
48335
  break;
48115
48336
  case 'binrow':
48116
- new Set(cells.map((td)=>td.parentNode)).forEach((row)=>{
48117
- this.__tableModule.removeRow(table, row.rowIndex);
48118
- });
48337
+ {
48338
+ const rows = new Set(cells.map((td)=>td.parentNode));
48339
+ const next = this.__nearestCell(table, cell, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(rows).map((row)=>row.rowIndex), true);
48340
+ rows.forEach((row)=>{
48341
+ this.__tableModule.removeRow(table, row.rowIndex);
48342
+ });
48343
+ next && this.j.s.setCursorIn(next);
48344
+ }
48119
48345
  break;
48120
48346
  case 'bincolumn':
48121
48347
  {
@@ -48128,9 +48354,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48128
48354
  columnsSet.add(col);
48129
48355
  }
48130
48356
  });
48357
+ const next = this.__nearestCell(table, cell, columns, false);
48131
48358
  columns.sort((a, b)=>b - a).forEach((col)=>{
48132
48359
  this.__tableModule.removeColumn(table, col);
48133
48360
  });
48361
+ next && this.j.s.setCursorIn(next);
48134
48362
  }
48135
48363
  break;
48136
48364
  case 'addcolumnafter':
@@ -48142,10 +48370,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48142
48370
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
48143
48371
  break;
48144
48372
  }
48373
+ if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
48374
+ this.__removeTable(table);
48375
+ }
48145
48376
  }
48146
48377
  return false;
48147
48378
  }
48148
48379
  }
48380
+ /**
48381
+ * The cell that takes the caret when rows or columns are deleted: the next
48382
+ * one in the same column (or row) that is not deleted, else the previous one
48383
+ */ __nearestCell(table, cell, deleted, isRow) {
48384
+ const box = this.__tableModule.formalMatrix(table);
48385
+ const [row, column] = this.__tableModule.formalCoordinate(table, cell);
48386
+ const start = isRow ? row : column;
48387
+ const count = isRow ? box.length : box[row].length;
48388
+ const find = (i)=>!deleted.includes(i) && (isRow ? box[i][column] : box[row][i]) || null;
48389
+ for(let i = start + 1; i < count; i += 1){
48390
+ const next = find(i);
48391
+ if (next) {
48392
+ return next;
48393
+ }
48394
+ }
48395
+ for(let i = start - 1; i >= 0; i -= 1){
48396
+ const prev = find(i);
48397
+ if (prev) {
48398
+ return prev;
48399
+ }
48400
+ }
48401
+ return null;
48402
+ }
48149
48403
  /**
48150
48404
  * Add some align after native command
48151
48405
  */ onAfterCommand(command) {
@@ -48153,6 +48407,14 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
48153
48407
  this.__tableModule.getAllSelectedCells().forEach((elm)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.alignElement)(command, elm));
48154
48408
  }
48155
48409
  }
48410
+ /**
48411
+ * Remove the table and put the caret where it stood: at the start of what
48412
+ * follows it, else at the end of what precedes it
48413
+ */ __removeTable(table) {
48414
+ const parent = table.parentNode, next = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(table, false), prev = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(table, true);
48415
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(table);
48416
+ this.j.s.setCursorIn(next || prev || parent, Boolean(next));
48417
+ }
48156
48418
  /** @override */ beforeDestruct(jodit) {
48157
48419
  this.__onRemoveSelection();
48158
48420
  jodit.e.off('.select-cells');
@@ -52640,7 +52902,7 @@ const WORK_KEYS = new Set([
52640
52902
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(next, first);
52641
52903
  editor.s.setCursorBefore(first);
52642
52904
  } else {
52643
- if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
52905
+ if (key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(next)) {
52644
52906
  editor.s.select(next, true);
52645
52907
  } else {
52646
52908
  editor.s.setCursorIn(next, key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN);
@@ -52704,6 +52966,37 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.table = {
52704
52966
  useExtraClassesOptions: false
52705
52967
  };
52706
52968
  _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('table', _table_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]);
52969
+ /**
52970
+ * Elements in `dtd.blockLimits` that hold only rows, cells or list items, so
52971
+ * a table can't go directly inside them
52972
+ */ const ROW_AND_ITEM_HOLDERS = new Set([
52973
+ 'table',
52974
+ 'thead',
52975
+ 'tbody',
52976
+ 'tfoot',
52977
+ 'tr',
52978
+ 'ul',
52979
+ 'ol',
52980
+ 'dl'
52981
+ ]);
52982
+ /**
52983
+ * The nearest block around the cursor that can hold the new table: an element
52984
+ * in `dtd.blockLimits`, such as a table cell, a list item or a `<div>`. The
52985
+ * cursor's own block of the `enter` tag is a line, not a container, as in the
52986
+ * dtd plugin's `checkBlockNesting`
52987
+ */ function findTableContainer(editor, current) {
52988
+ const line = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
52989
+ const container = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, (node)=>{
52990
+ var _a;
52991
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) || node === line && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, editor.o.enter)) {
52992
+ return false;
52993
+ }
52994
+ const tag = node.nodeName.toLowerCase();
52995
+ return Boolean((_a = editor.o.dtd) === null || _a === void 0 ? void 0 : _a.blockLimits[tag]) && !ROW_AND_ITEM_HOLDERS.has(tag);
52996
+ }, editor.editor);
52997
+ // With the cursor between two rows, `current` is the next row's text
52998
+ return container && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(container, editor.s.range.startContainer) ? container : null;
52999
+ }
52707
53000
  _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52708
53001
  data: {
52709
53002
  cols: 10,
@@ -52801,7 +53094,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52801
53094
  editor.s.removeMarkers();
52802
53095
  editor.editor.normalize();
52803
53096
  editor.history.snapshot.restore(snapshot);
52804
- const block = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(editor.s.current(), _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, editor.editor);
53097
+ const current = editor.s.current();
53098
+ // The table goes into the cell, list item or box holding the
53099
+ // cursor, and only a block inside it is split
53100
+ const container = findTableContainer(editor, current);
53101
+ const block = container === current ? null : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, container !== null && container !== void 0 ? container : editor.editor);
52805
53102
  if (block && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(block)) {
52806
53103
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.replace(block, table, undefined, false, true);
52807
53104
  } else {
@@ -52823,6 +53120,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.table = {
52823
53120
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(block, table);
52824
53121
  }
52825
53122
  }
53123
+ } else if (container && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(container) && !editor.o.table.splitBlockOnInsertTable) {
53124
+ // With no block to go after, the table goes after the text
53125
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(container, table);
52826
53126
  } else {
52827
53127
  editor.s.insertNode(table, false);
52828
53128
  }
@@ -53081,33 +53381,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
53081
53381
 
53082
53382
 
53083
53383
 
53084
- // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
53085
- // with `mediaDefaultAlign`
53086
- function prepareMedia(jodit, element) {
53087
- const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
53088
- const { mediaDefaultAlign } = jodit.o;
53089
- if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
53090
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
53091
- }
53092
- return media;
53093
- }
53094
53384
  function insertVideos(data) {
53095
53385
  var _a;
53096
53386
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach((file)=>{
53097
- this.s.insertNode(prepareMedia(this, this.createInside.element('video', {
53387
+ this.s.insertNode((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareMedia)(this, this.createInside.element('video', {
53098
53388
  controls: '',
53099
53389
  src: data.baseurl + file
53100
53390
  })));
53101
53391
  });
53102
53392
  }
53103
- // Embed code that is one element is prepared as media; other code goes in as
53104
- // it is
53105
- function prepareEmbedCode(jodit, code) {
53106
- const box = jodit.createInside.div();
53107
- box.innerHTML = code.trim();
53108
- const element = box.firstElementChild;
53109
- return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
53110
- }
53111
53393
  _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
53112
53394
  parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
53113
53395
  defaultWidth: 400,
@@ -53145,7 +53427,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
53145
53427
  ])
53146
53428
  ]), tabs = [], insertCode = (code)=>{
53147
53429
  jodit.s.restore();
53148
- jodit.s.insertHTML(prepareEmbedCode(jodit, code));
53430
+ jodit.s.insertHTML((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.prepareEmbedCode)(jodit, code));
53149
53431
  close();
53150
53432
  };
53151
53433
  jodit.s.save();
@@ -53180,7 +53462,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
53180
53462
  formCode.onSubmit((data)=>{
53181
53463
  insertCode(data.code);
53182
53464
  });
53183
- return (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
53465
+ const box = (0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_5__.TabsWidget)(jodit, tabs);
53466
+ // Its tabs are sized to their labels, as the file selector's are, since
53467
+ // "Upload" doesn't fit a third of the popup
53468
+ box.classList.add('jodit-file-selector');
53469
+ return box;
53184
53470
  },
53185
53471
  tags: [
53186
53472
  'iframe'