jodit-pro 4.19.4 → 4.19.5

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 (342) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +6 -6
  3. package/es2015/jodit.js +500 -102
  4. package/es2015/jodit.min.js +41 -41
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/chart/chart.css +1 -1
  20. package/es2015/plugins/chart/chart.js +1 -1
  21. package/es2015/plugins/chart/chart.min.js +1 -1
  22. package/es2015/plugins/color-picker/color-picker.css +1 -1
  23. package/es2015/plugins/color-picker/color-picker.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  25. package/es2015/plugins/emoji/emoji.css +1 -1
  26. package/es2015/plugins/emoji/emoji.js +1 -1
  27. package/es2015/plugins/emoji/emoji.min.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.js +1 -1
  29. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  30. package/es2015/plugins/finder/finder.css +1 -1
  31. package/es2015/plugins/finder/finder.js +1 -1
  32. package/es2015/plugins/finder/finder.min.js +1 -1
  33. package/es2015/plugins/google-maps/google-maps.css +1 -1
  34. package/es2015/plugins/google-maps/google-maps.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  36. package/es2015/plugins/google-search/google-search.js +1 -1
  37. package/es2015/plugins/google-search/google-search.min.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  39. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  46. package/es2015/plugins/keyboard/keyboard.css +1 -1
  47. package/es2015/plugins/keyboard/keyboard.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  49. package/es2015/plugins/math/math.css +1 -1
  50. package/es2015/plugins/math/math.js +1 -1
  51. package/es2015/plugins/math/math.min.js +1 -1
  52. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  53. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  54. package/es2015/plugins/page-break/page-break.js +1 -1
  55. package/es2015/plugins/page-break/page-break.min.js +1 -1
  56. package/es2015/plugins/paste-code/paste-code.css +1 -1
  57. package/es2015/plugins/paste-code/paste-code.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  59. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  60. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  61. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  62. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  63. package/es2015/plugins/style/style.css +1 -1
  64. package/es2015/plugins/style/style.js +1 -1
  65. package/es2015/plugins/style/style.min.js +1 -1
  66. package/es2015/plugins/templates/templates.css +1 -1
  67. package/es2015/plugins/templates/templates.js +1 -1
  68. package/es2015/plugins/templates/templates.min.js +1 -1
  69. package/es2015/plugins/todo-list/todo-list.css +1 -1
  70. package/es2015/plugins/todo-list/todo-list.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  72. package/es2015/plugins/translate/translate.css +1 -1
  73. package/es2015/plugins/translate/translate.js +1 -1
  74. package/es2015/plugins/translate/translate.min.js +1 -1
  75. package/es2015/plugins/tune-block/tune-block.css +1 -1
  76. package/es2015/plugins/tune-block/tune-block.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  78. package/es2018/jodit.fat.min.js +6 -6
  79. package/es2018/jodit.min.js +7 -7
  80. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  81. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  82. package/es2018/plugins/backup/backup.min.js +1 -1
  83. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  84. package/es2018/plugins/change-case/change-case.min.js +1 -1
  85. package/es2018/plugins/chart/chart.min.js +1 -1
  86. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  87. package/es2018/plugins/emoji/emoji.min.js +1 -1
  88. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  89. package/es2018/plugins/finder/finder.min.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  91. package/es2018/plugins/google-search/google-search.min.js +1 -1
  92. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  93. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  94. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  95. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  96. package/es2018/plugins/math/math.min.js +1 -1
  97. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  98. package/es2018/plugins/page-break/page-break.min.js +1 -1
  99. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  100. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  101. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  102. package/es2018/plugins/style/style.min.js +1 -1
  103. package/es2018/plugins/templates/templates.min.js +1 -1
  104. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  105. package/es2018/plugins/translate/translate.min.js +1 -1
  106. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  107. package/es2021/jodit.css +1 -1
  108. package/es2021/jodit.fat.min.js +7 -7
  109. package/es2021/jodit.js +500 -102
  110. package/es2021/jodit.min.js +19 -19
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  112. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  113. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  115. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  116. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  117. package/es2021/plugins/backup/backup.css +1 -1
  118. package/es2021/plugins/backup/backup.js +1 -1
  119. package/es2021/plugins/backup/backup.min.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.css +1 -1
  121. package/es2021/plugins/button-generator/button-generator.js +1 -1
  122. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  123. package/es2021/plugins/change-case/change-case.js +1 -1
  124. package/es2021/plugins/change-case/change-case.min.js +1 -1
  125. package/es2021/plugins/chart/chart.css +1 -1
  126. package/es2021/plugins/chart/chart.js +1 -1
  127. package/es2021/plugins/chart/chart.min.js +1 -1
  128. package/es2021/plugins/color-picker/color-picker.css +1 -1
  129. package/es2021/plugins/color-picker/color-picker.js +1 -1
  130. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  131. package/es2021/plugins/emoji/emoji.css +1 -1
  132. package/es2021/plugins/emoji/emoji.js +1 -1
  133. package/es2021/plugins/emoji/emoji.min.js +1 -1
  134. package/es2021/plugins/export-docs/export-docs.js +1 -1
  135. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  136. package/es2021/plugins/finder/finder.css +1 -1
  137. package/es2021/plugins/finder/finder.js +1 -1
  138. package/es2021/plugins/finder/finder.min.js +1 -1
  139. package/es2021/plugins/google-maps/google-maps.css +1 -1
  140. package/es2021/plugins/google-maps/google-maps.js +1 -1
  141. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  142. package/es2021/plugins/google-search/google-search.js +1 -1
  143. package/es2021/plugins/google-search/google-search.min.js +1 -1
  144. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  145. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  146. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  147. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  148. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  149. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  150. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  151. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  152. package/es2021/plugins/keyboard/keyboard.css +1 -1
  153. package/es2021/plugins/keyboard/keyboard.js +1 -1
  154. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  155. package/es2021/plugins/math/math.css +1 -1
  156. package/es2021/plugins/math/math.js +1 -1
  157. package/es2021/plugins/math/math.min.js +1 -1
  158. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  159. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  160. package/es2021/plugins/page-break/page-break.js +1 -1
  161. package/es2021/plugins/page-break/page-break.min.js +1 -1
  162. package/es2021/plugins/paste-code/paste-code.css +1 -1
  163. package/es2021/plugins/paste-code/paste-code.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  165. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  166. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  167. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  168. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  169. package/es2021/plugins/style/style.css +1 -1
  170. package/es2021/plugins/style/style.js +1 -1
  171. package/es2021/plugins/style/style.min.js +1 -1
  172. package/es2021/plugins/templates/templates.css +1 -1
  173. package/es2021/plugins/templates/templates.js +1 -1
  174. package/es2021/plugins/templates/templates.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +1 -1
  185. package/es2021.en/jodit.fat.min.js +7 -7
  186. package/es2021.en/jodit.js +500 -102
  187. package/es2021.en/jodit.min.js +7 -7
  188. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  189. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  190. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  191. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  192. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  193. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  194. package/es2021.en/plugins/backup/backup.css +1 -1
  195. package/es2021.en/plugins/backup/backup.js +1 -1
  196. package/es2021.en/plugins/backup/backup.min.js +1 -1
  197. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  198. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  199. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  200. package/es2021.en/plugins/change-case/change-case.js +1 -1
  201. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  202. package/es2021.en/plugins/chart/chart.css +1 -1
  203. package/es2021.en/plugins/chart/chart.js +1 -1
  204. package/es2021.en/plugins/chart/chart.min.js +1 -1
  205. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  206. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  207. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  208. package/es2021.en/plugins/emoji/emoji.css +1 -1
  209. package/es2021.en/plugins/emoji/emoji.js +1 -1
  210. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  211. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  212. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  213. package/es2021.en/plugins/finder/finder.css +1 -1
  214. package/es2021.en/plugins/finder/finder.js +1 -1
  215. package/es2021.en/plugins/finder/finder.min.js +1 -1
  216. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  217. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  218. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  219. package/es2021.en/plugins/google-search/google-search.js +1 -1
  220. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  221. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  222. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  223. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  224. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  225. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  226. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  227. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  228. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  229. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  230. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  231. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  232. package/es2021.en/plugins/math/math.css +1 -1
  233. package/es2021.en/plugins/math/math.js +1 -1
  234. package/es2021.en/plugins/math/math.min.js +1 -1
  235. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  237. package/es2021.en/plugins/page-break/page-break.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  239. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  242. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  244. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  246. package/es2021.en/plugins/style/style.css +1 -1
  247. package/es2021.en/plugins/style/style.js +1 -1
  248. package/es2021.en/plugins/style/style.min.js +1 -1
  249. package/es2021.en/plugins/templates/templates.css +1 -1
  250. package/es2021.en/plugins/templates/templates.js +1 -1
  251. package/es2021.en/plugins/templates/templates.min.js +1 -1
  252. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  255. package/es2021.en/plugins/translate/translate.css +1 -1
  256. package/es2021.en/plugins/translate/translate.js +1 -1
  257. package/es2021.en/plugins/translate/translate.min.js +1 -1
  258. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  261. package/es5/jodit.css +2 -2
  262. package/es5/jodit.fat.min.js +2 -2
  263. package/es5/jodit.js +584 -107
  264. package/es5/jodit.min.css +2 -2
  265. package/es5/jodit.min.js +2 -2
  266. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  267. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  269. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  270. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  272. package/es5/plugins/backup/backup.css +1 -1
  273. package/es5/plugins/backup/backup.js +1 -1
  274. package/es5/plugins/backup/backup.min.js +1 -1
  275. package/es5/plugins/button-generator/button-generator.css +1 -1
  276. package/es5/plugins/button-generator/button-generator.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  278. package/es5/plugins/change-case/change-case.js +1 -1
  279. package/es5/plugins/change-case/change-case.min.js +1 -1
  280. package/es5/plugins/chart/chart.css +1 -1
  281. package/es5/plugins/chart/chart.js +1 -1
  282. package/es5/plugins/chart/chart.min.js +1 -1
  283. package/es5/plugins/color-picker/color-picker.css +1 -1
  284. package/es5/plugins/color-picker/color-picker.js +1 -1
  285. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  286. package/es5/plugins/emoji/emoji.css +1 -1
  287. package/es5/plugins/emoji/emoji.js +1 -1
  288. package/es5/plugins/emoji/emoji.min.js +1 -1
  289. package/es5/plugins/export-docs/export-docs.js +1 -1
  290. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  291. package/es5/plugins/finder/finder.css +1 -1
  292. package/es5/plugins/finder/finder.js +1 -1
  293. package/es5/plugins/finder/finder.min.js +1 -1
  294. package/es5/plugins/google-maps/google-maps.css +1 -1
  295. package/es5/plugins/google-maps/google-maps.js +1 -1
  296. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  297. package/es5/plugins/google-search/google-search.js +1 -1
  298. package/es5/plugins/google-search/google-search.min.js +1 -1
  299. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  300. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  301. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  302. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  303. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  304. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  305. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  306. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  307. package/es5/plugins/keyboard/keyboard.css +1 -1
  308. package/es5/plugins/keyboard/keyboard.js +1 -1
  309. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  310. package/es5/plugins/math/math.css +1 -1
  311. package/es5/plugins/math/math.js +1 -1
  312. package/es5/plugins/math/math.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 +1 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  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/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.19.4
4
+ * Version: v4.19.5
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.19.4";
1771
+ */ const APP_VERSION = "4.19.5";
1772
1772
  // prettier-ignore
1773
1773
  const ES = "es2021";
1774
1774
  const IS_ES_MODERN = true;
@@ -13601,9 +13601,11 @@ const WRAP_NODES = new Set([
13601
13601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13602
13602
  /* harmony export */ ApplyStyle: function() { return /* binding */ ApplyStyle; }
13603
13603
  /* harmony export */ });
13604
- /* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63687);
13605
- /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77361);
13606
- /* harmony import */ var _transactions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55307);
13604
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
13605
+ /* harmony import */ var _helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76078);
13606
+ /* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63687);
13607
+ /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77361);
13608
+ /* harmony import */ var _transactions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55307);
13607
13609
  /*!
13608
13610
  * Jodit Editor (https://xdsoft.net/jodit/)
13609
13611
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -13611,27 +13613,55 @@ const WRAP_NODES = new Set([
13611
13613
  */
13612
13614
 
13613
13615
 
13616
+
13617
+
13618
+ /**
13619
+ * Take a selected fragment out of the elements its style takes the place
13620
+ * of: one around it is split, so the fragment leaves it, and one in it is
13621
+ * unwrapped
13622
+ */ function takeOutOf(jodit, font, tags) {
13623
+ const range = jodit.s.createRange();
13624
+ let outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
13625
+ while(outer){
13626
+ range.selectNodeContents(outer);
13627
+ range.setEndBefore(font);
13628
+ const before = range.cloneContents();
13629
+ range.selectNodeContents(outer);
13630
+ range.setStartAfter(font);
13631
+ // Split only when there's more in it, as a split leaves empty copies
13632
+ // of the elements between
13633
+ if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(before) || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(range.cloneContents())) {
13634
+ (0,_api_index_js__WEBPACK_IMPORTED_MODULE_2__.extractSelectedPart)(outer, font, jodit);
13635
+ }
13636
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(outer);
13637
+ outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
13638
+ }
13639
+ ;(0,_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__.$$)(tags.join(','), font).forEach((inner)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(inner));
13640
+ }
13614
13641
  /** @internal */ function ApplyStyle(jodit, cs) {
13615
- var _a;
13642
+ var _a, _b;
13616
13643
  const { s: sel, editor } = jodit;
13617
13644
  (_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
13618
13645
  const fakes = sel.fakes();
13619
13646
  const collapsed = sel.isCollapsed();
13620
- let mode = _constants_js__WEBPACK_IMPORTED_MODULE_1__.INITIAL;
13647
+ let mode = _constants_js__WEBPACK_IMPORTED_MODULE_3__.INITIAL;
13621
13648
  try {
13622
13649
  // for...of closes the generator on an exception, releasing every
13623
13650
  // temporary wrapper before the selection is restored in finally.
13624
13651
  for (const font of sel.wrapInTagGen(fakes)){
13652
+ if ((_b = cs.options.exclude) === null || _b === void 0 ? void 0 : _b.length) {
13653
+ takeOutOf(jodit, font, cs.options.exclude);
13654
+ }
13625
13655
  let state = {
13626
13656
  collapsed,
13627
13657
  mode,
13628
13658
  element: font,
13629
- next: _transactions_js__WEBPACK_IMPORTED_MODULE_2__.states.START,
13659
+ next: _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START,
13630
13660
  jodit,
13631
13661
  style: cs
13632
13662
  };
13633
- const machine = new _api_index_js__WEBPACK_IMPORTED_MODULE_0__.FiniteStateMachine(_transactions_js__WEBPACK_IMPORTED_MODULE_2__.states.START, _transactions_js__WEBPACK_IMPORTED_MODULE_2__.transactions);
13634
- while(!jodit.isInDestruct && machine.getState() !== _transactions_js__WEBPACK_IMPORTED_MODULE_2__.states.END){
13663
+ const machine = new _api_index_js__WEBPACK_IMPORTED_MODULE_2__.FiniteStateMachine(_transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START, _transactions_js__WEBPACK_IMPORTED_MODULE_4__.transactions);
13664
+ while(!jodit.isInDestruct && machine.getState() !== _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.END){
13635
13665
  state = machine.dispatch('exec', state);
13636
13666
  }
13637
13667
  // The first selected fragment determines how later fragments toggle.
@@ -18147,6 +18177,20 @@ const FOCUS_EVENTS = new Set([
18147
18177
  'focusin',
18148
18178
  'focusout'
18149
18179
  ]);
18180
+ const EDITING_KEYS = new Set([
18181
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER,
18182
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE,
18183
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE
18184
+ ]);
18185
+ /**
18186
+ * Whether the input method (IME) is using the key. Safari fires the keydown
18187
+ * that ends a composition, as the Enter that confirms Japanese text, after
18188
+ * `compositionend`, and types Korean without one, so `isComposing` is false and
18189
+ * only keyCode 229 tells. Only the keys the editor turns into edits are held
18190
+ * back: the handlers that follow typing still see the rest.
18191
+ */ function isInputMethodKey(event) {
18192
+ return event.isComposing || event.keyCode === 229 && EDITING_KEYS.has(event.key);
18193
+ }
18150
18194
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18151
18195
  const __defaultClassesKey = 'data-jodit-default-classes';
18152
18196
  const NOEDIT = {
@@ -19205,7 +19249,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19205
19249
  }
19206
19250
  }
19207
19251
  const w = this.ew;
19208
- if (event instanceof w.KeyboardEvent && event.isComposing) {
19252
+ if (event instanceof w.KeyboardEvent && isInputMethodKey(event)) {
19209
19253
  return;
19210
19254
  }
19211
19255
  if (this.e && this.e.fire) {
@@ -34882,6 +34926,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34882
34926
  if (checkJoinBareText(jodit, fakeNode, backspace)) {
34883
34927
  return true;
34884
34928
  }
34929
+ // Old content can have an inline element round blocks beside the text:
34930
+ // moved inside them, the line joins the block as it would bare text
34931
+ // (#1781)
34932
+ const inline = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
34933
+ if (joinsBareText(jodit, edgeBlock(inline, backspace)) && moveInlineInside(inline, jodit.editor)) {
34934
+ return joinNeighbors(jodit, fakeNode, backspace, moved);
34935
+ }
34885
34936
  let nextBox = fakeNode, mainClosestBox = nextBox;
34886
34937
  // Find the main big closest element
34887
34938
  while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -35162,7 +35213,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35162
35213
  * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
35163
35214
  */ function checkJoinBareText(jodit, fakeNode, backspace) {
35164
35215
  const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
35165
- if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(block) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(block) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(block) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'table') || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(block) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(block, jodit.editor) || Array.from(block.childNodes).some((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node))) {
35216
+ if (!joinsBareText(jodit, block)) {
35166
35217
  return false;
35167
35218
  }
35168
35219
  const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
@@ -35189,6 +35240,24 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35189
35240
  jodit.s.setCursorBefore(fakeNode);
35190
35241
  return true;
35191
35242
  }
35243
+ /**
35244
+ * Whether a block joins the bare text beside it: not a list, a table or a
35245
+ * cell, and holding no block of its own
35246
+ */ function joinsBareText(jodit, block) {
35247
+ return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'table') && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(block, jodit.editor) && !Array.from(block.childNodes).some((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node));
35248
+ }
35249
+ /**
35250
+ * The block an inline element holds on its side facing the caret, through
35251
+ * the inline elements in it: the `<p>` of `<span><strong><p>…</p></strong></span>`
35252
+ */ function edgeBlock(node, backspace) {
35253
+ var _a;
35254
+ let edge = node;
35255
+ while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(edge) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(edge)){
35256
+ const children = Array.from(edge.childNodes).filter((child)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child));
35257
+ edge = (_a = backspace ? children[children.length - 1] : children[0]) !== null && _a !== void 0 ? _a : null;
35258
+ }
35259
+ return edge === node ? null : edge;
35260
+ }
35192
35261
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
35193
35262
  // Process UL/LI/OL cases
35194
35263
  const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -35622,7 +35691,6 @@ function isNotEditable(jodit, node) {
35622
35691
  if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
35623
35692
  return false;
35624
35693
  }
35625
- const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
35626
35694
  do {
35627
35695
  if (prn && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(prn)) {
35628
35696
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
@@ -35637,6 +35705,9 @@ function isNotEditable(jodit, node) {
35637
35705
  if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
35638
35706
  return true;
35639
35707
  }
35708
+ // Looked for once the empty elements have gone, as the one beside the
35709
+ // caret can be in them: the `<br>` that Delete in `<p>|<br></p>` leaves
35710
+ const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
35640
35711
  if (neighbor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
35641
35712
  setCursorIn(neighbor, !backspace);
35642
35713
  } else {
@@ -36073,8 +36144,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
36073
36144
  }
36074
36145
  cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
36075
36146
  });
36147
+ const element = control.tags ? control.tags[0] : undefined;
36076
36148
  editor.s.commitStyle({
36077
- element: control.tags ? control.tags[0] : undefined
36149
+ element,
36150
+ // As in the browsers and Word, each takes the other's place
36151
+ exclude: element === 'sub' ? [
36152
+ 'sup'
36153
+ ] : element === 'sup' ? [
36154
+ 'sub'
36155
+ ] : []
36078
36156
  });
36079
36157
  editor.synchronizeValues();
36080
36158
  return false;
@@ -38673,11 +38751,12 @@ __webpack_require__.r(__webpack_exports__);
38673
38751
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
38674
38752
 
38675
38753
  /* unused harmony export deleteCommand */
38676
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
38677
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
38678
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21537);
38679
- /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
38680
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
38754
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38755
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
38756
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38757
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
38758
+ /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
38759
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
38681
38760
  /*!
38682
38761
  * Jodit Editor (https://xdsoft.net/jodit/)
38683
38762
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38688,6 +38767,7 @@ __webpack_require__.r(__webpack_exports__);
38688
38767
 
38689
38768
 
38690
38769
 
38770
+
38691
38771
  const NOT_EMPTY_CONTENT_TAGS = new Set([
38692
38772
  'img',
38693
38773
  'table',
@@ -38695,7 +38775,19 @@ const NOT_EMPTY_CONTENT_TAGS = new Set([
38695
38775
  'iframe',
38696
38776
  'hr'
38697
38777
  ]);
38698
- class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
38778
+ const KEEPS_SPACES = new Set([
38779
+ 'pre',
38780
+ 'pre-wrap',
38781
+ 'break-spaces'
38782
+ ]);
38783
+ /**
38784
+ * A plain space beside this neighbor isn't shown: there is none, or it's a
38785
+ * line break, a block or text starting (or ending) with a plain space
38786
+ */ function hidesSpace(neighbor, edge) {
38787
+ var _a;
38788
+ return !neighbor || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, 'br') || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(neighbor) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && edge.test((_a = neighbor.nodeValue) !== null && _a !== void 0 ? _a : '');
38789
+ }
38790
+ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
38699
38791
  afterInit(jodit) {
38700
38792
  jodit.e.on('afterCommand.delete', (command)=>{
38701
38793
  if (command === 'delete') {
@@ -38716,11 +38808,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38716
38808
  */ __afterDeleteCommand() {
38717
38809
  const jodit = this.j;
38718
38810
  const current = jodit.s.current();
38719
- if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current.firstChild, 'br')) {
38811
+ if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current.firstChild, 'br')) {
38720
38812
  jodit.s.removeNode(current.firstChild);
38721
38813
  }
38722
- if (!(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(jodit.editor.textContent || '') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.first(jodit.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS)) && (!current || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'table', jodit.editor))) {
38723
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(jodit.editor);
38814
+ if (!(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim)(jodit.editor.textContent || '') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(jodit.editor, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS)) && (!current || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'table', jodit.editor))) {
38815
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(jodit.editor);
38724
38816
  const node = jodit.s.setCursorIn(jodit.editor);
38725
38817
  jodit.s.removeNode(node);
38726
38818
  }
@@ -38740,14 +38832,15 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38740
38832
  range.deleteContents();
38741
38833
  const fake = jodit.createInside.fake();
38742
38834
  range.insertNode(fake);
38743
- const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fake, true);
38744
- const rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fake, false);
38835
+ const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, true);
38836
+ const rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, false);
38745
38837
  this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
38838
+ this.__keepSpacesVisible(fake);
38746
38839
  range.setStartBefore(fake);
38747
38840
  range.collapse(true);
38748
38841
  this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
38749
38842
  this.__addBrInEmptyBlock(fake, range);
38750
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38843
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38751
38844
  jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
38752
38845
  return false;
38753
38846
  }
@@ -38761,23 +38854,23 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38761
38854
  * Returns where the caret goes, or null when no table is involved
38762
38855
  */ __clearSelectedCells(range) {
38763
38856
  const { editor, createInside } = this.j;
38764
- const startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell, editor);
38765
- const endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell, editor);
38857
+ const startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
38858
+ const endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
38766
38859
  if (startCell === endCell) {
38767
38860
  return null;
38768
38861
  }
38769
- const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(startCell, 'table', editor);
38770
- const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(endCell, 'table', editor);
38862
+ const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(startCell, 'table', editor);
38863
+ const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(endCell, 'table', editor);
38771
38864
  const caret = range.cloneRange();
38772
38865
  caret.collapse(true);
38773
38866
  const parts = [];
38774
38867
  const addParts = (table)=>{
38775
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(table.rows).flatMap((row)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(row.cells)).filter((cell)=>range.intersectsNode(cell)).forEach((cell)=>{
38868
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(table.rows).flatMap((row)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(row.cells)).filter((cell)=>range.intersectsNode(cell)).forEach((cell)=>{
38776
38869
  const part = range.cloneRange();
38777
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.startContainer)) {
38870
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.startContainer)) {
38778
38871
  part.setStart(cell, 0);
38779
38872
  }
38780
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.endContainer)) {
38873
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.endContainer)) {
38781
38874
  part.setEnd(cell, cell.childNodes.length);
38782
38875
  }
38783
38876
  parts.push([
@@ -38800,9 +38893,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38800
38893
  }
38801
38894
  parts.forEach(([cell, part])=>{
38802
38895
  part.deleteContents();
38803
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(cell)) {
38804
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(cell);
38805
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(cell, createInside.element('br'));
38896
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(cell)) {
38897
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(cell);
38898
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(cell, createInside.element('br'));
38806
38899
  }
38807
38900
  });
38808
38901
  return startTable ? caret : null;
@@ -38810,46 +38903,76 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38810
38903
  __moveContentInLeftSibling(fake, leftSibling, rightSibling) {
38811
38904
  leftSibling = this.__defineRightLeftBox(leftSibling);
38812
38905
  // Nothing is moved into a table, and a block left empty after it goes
38813
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(leftSibling, 'table')) {
38814
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38815
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38906
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(leftSibling, 'table')) {
38907
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
38908
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38816
38909
  }
38817
38910
  return;
38818
38911
  }
38819
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(rightSibling, 'table') && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
38820
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38821
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(rightSibling, leftSibling);
38822
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38912
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(rightSibling, 'table') && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
38913
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
38914
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(rightSibling, leftSibling);
38915
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38823
38916
  }
38824
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(rightSibling.firstElementChild)) {
38917
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(rightSibling.firstElementChild)) {
38825
38918
  const item = rightSibling.firstElementChild;
38826
38919
  // What's left of the right list's first item joins the left block,
38827
38920
  // up to a list nested in the item
38828
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
38829
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38830
- while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(item.firstChild)){
38831
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, item.firstChild);
38921
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
38922
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
38923
+ while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(item.firstChild)){
38924
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, item.firstChild);
38832
38925
  }
38833
38926
  }
38834
38927
  // Remove empty right LI
38835
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item)) {
38836
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(item);
38928
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item)) {
38929
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(item);
38837
38930
  }
38838
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38839
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38931
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
38932
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38840
38933
  }
38841
38934
  }
38842
38935
  }
38936
+ /**
38937
+ * A plain space the deletion leaves at an edge of the block, before a line
38938
+ * break or next to another space isn't shown, and the browser drops it when
38939
+ * the next char is typed. It becomes non-breaking, as in the browsers' own
38940
+ * delete and in Backspace without a selection (#1522)
38941
+ */ __keepSpacesVisible(fake) {
38942
+ var _a;
38943
+ const { jodit } = this;
38944
+ const block = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
38945
+ if (KEEPS_SPACES.has(jodit.ew.getComputedStyle(block).whiteSpace)) {
38946
+ return;
38947
+ }
38948
+ const before = this.__findNeighbor(fake, true, block);
38949
+ const after = this.__findNeighbor(fake, false, block);
38950
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
38951
+ before.nodeValue = before.nodeValue.replace(/ +$/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
38952
+ }
38953
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
38954
+ after.nodeValue = after.nodeValue.replace(/^ +/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
38955
+ }
38956
+ }
38957
+ /**
38958
+ * The text, line break or other element next to the caret in its block,
38959
+ * looking inside inline elements
38960
+ */ __findNeighbor(fake, left, block) {
38961
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(left ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.next, fake, (node)=>{
38962
+ var _a;
38963
+ return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.trimInv)((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').length > 0 : !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isComment(node) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(node) && node.firstChild);
38964
+ }, block);
38965
+ }
38843
38966
  /**
38844
38967
  * If left sibling is list - return last leaf
38845
38968
  */ __defineRightLeftBox(leftSibling) {
38846
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(leftSibling)) {
38969
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(leftSibling)) {
38847
38970
  return leftSibling;
38848
38971
  }
38849
38972
  let lastLeaf = leftSibling.lastElementChild;
38850
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(lastLeaf)) {
38973
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(lastLeaf)) {
38851
38974
  lastLeaf = this.j.createInside.element('li');
38852
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, lastLeaf);
38975
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, lastLeaf);
38853
38976
  }
38854
38977
  return lastLeaf;
38855
38978
  }
@@ -38857,22 +38980,22 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38857
38980
  * Add BR in the empty block left at the caret
38858
38981
  */ __addBrInEmptyBlock(fake, range) {
38859
38982
  const jodit = this.j;
38860
- if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
38983
+ if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
38861
38984
  const br = jodit.createInside.element('br');
38862
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(fake, br);
38985
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fake, br);
38863
38986
  range.setStartBefore(br);
38864
38987
  range.collapse(true);
38865
38988
  }
38866
38989
  }
38867
38990
  __moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
38868
38991
  var _a;
38869
- if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(leftSibling)) {
38870
- const root = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
38871
- const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText, root);
38992
+ if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(leftSibling)) {
38993
+ const root = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
38994
+ const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText, root);
38872
38995
  if (leftText) {
38873
38996
  range.setStartAfter(leftText);
38874
38997
  range.collapse(true);
38875
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38998
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38876
38999
  }
38877
39000
  }
38878
39001
  }
@@ -38880,7 +39003,7 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38880
39003
  deleteCommand.requires = [
38881
39004
  'backspace'
38882
39005
  ];
38883
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('deleteCommand', deleteCommand);
39006
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
38884
39007
 
38885
39008
 
38886
39009
  /***/ }),
@@ -49725,7 +49848,7 @@ const key = 'table_processor_observer-resize';
49725
49848
  /**
49726
49849
  * Click on resize handle
49727
49850
  */ onHandleMouseDown(event) {
49728
- if (this.j.isLocked) {
49851
+ if (this.j.isLocked || this.j.o.readonly) {
49729
49852
  return;
49730
49853
  }
49731
49854
  this.drag = true;
@@ -49760,10 +49883,15 @@ const key = 'table_processor_observer-resize';
49760
49883
  let box;
49761
49884
  this.minX = 0;
49762
49885
  this.maxX = 1000000;
49886
+ this.startTableWidth = this.workTable.offsetWidth;
49763
49887
  if (this.wholeTable != null) {
49764
- const tableBox = this.workTable.parentNode.getBoundingClientRect();
49888
+ const parent = this.workTable.parentNode;
49889
+ const tableBox = parent.getBoundingClientRect();
49765
49890
  this.minX = tableBox.left;
49766
49891
  this.maxX = this.minX + tableBox.width;
49892
+ const side = this.isRTL ? 'marginRight' : 'marginLeft';
49893
+ this.startParentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(parent, this.j.ew);
49894
+ this.startMargin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
49767
49895
  } else {
49768
49896
  // find maximum columns
49769
49897
  const coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
@@ -49777,6 +49905,17 @@ const key = 'table_processor_observer-resize';
49777
49905
  this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, this.maxX);
49778
49906
  }
49779
49907
  });
49908
+ const matrix = this.module.formalMatrix(this.workTable);
49909
+ this.startWidths = this.resizedColumns().map((column)=>{
49910
+ const cells = matrix.map((row)=>row[column]);
49911
+ const index = cells.findIndex((td)=>td.colSpan === 1 || cells.length === 1);
49912
+ const cell = cells[index];
49913
+ return [
49914
+ cell,
49915
+ cell ? cell.offsetWidth : 0,
49916
+ cells.slice(Math.max(index, 0) + 1)
49917
+ ];
49918
+ });
49780
49919
  }
49781
49920
  return false;
49782
49921
  }
@@ -49805,8 +49944,11 @@ const key = 'table_processor_observer-resize';
49805
49944
  x = this.maxX;
49806
49945
  }
49807
49946
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
49808
- this.restoreStyles();
49809
- this.resizeColumnsOrTable();
49947
+ if (this.wholeTable == null) {
49948
+ this.setColumnWidths();
49949
+ } else {
49950
+ this.resizeTable();
49951
+ }
49810
49952
  const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
49811
49953
  Object.assign(this.resizeHandler.style, {
49812
49954
  left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
@@ -49919,21 +50061,49 @@ const key = 'table_processor_observer-resize';
49919
50061
  };
49920
50062
  this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
49921
50063
  }
50064
+ /**
50065
+ * The two columns a column drag resizes: the work cell's last, and the
50066
+ * next cell's first
50067
+ */ resizedColumns() {
50068
+ const nextTD = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(this.isRTL ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prev : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next, this.workCell, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, this.workCell.parentNode);
50069
+ return [
50070
+ this.module.formalCoordinate(this.workTable, this.workCell, true)[1],
50071
+ this.module.formalCoordinate(this.workTable, nextTD)[1]
50072
+ ];
50073
+ }
49922
50074
  /**
49923
50075
  * Resize only one column
49924
50076
  */ resizeColumns() {
49925
50077
  const delta = this.resizeDelta;
49926
50078
  const marked = [];
49927
50079
  const tableModule = this.module;
49928
- tableModule.setColumnWidthByDelta(this.workTable, tableModule.formalCoordinate(this.workTable, this.workCell, true)[1], delta, true, marked);
49929
- const nextTD = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(this.isRTL ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prev : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next, this.workCell, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, this.workCell.parentNode);
49930
- tableModule.setColumnWidthByDelta(this.workTable, tableModule.formalCoordinate(this.workTable, nextTD)[1], -delta, false, marked);
50080
+ const [column, nextColumn] = this.resizedColumns();
50081
+ tableModule.setColumnWidthByDelta(this.workTable, column, delta, true, marked);
50082
+ tableModule.setColumnWidthByDelta(this.workTable, nextColumn, -delta, false, marked);
50083
+ }
50084
+ /**
50085
+ * Sets the widths `resizeColumns` would while the handle is dragged, from
50086
+ * the widths the drag started with, so that a move doesn't put back every
50087
+ * cell's style and lay the table out again to measure them
50088
+ */ setColumnWidths() {
50089
+ this.startWidths.forEach(([cell, width, below], index)=>{
50090
+ const delta = index ? -this.resizeDelta : this.resizeDelta;
50091
+ if (cell) {
50092
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(cell, 'width', ((width + delta) / this.startTableWidth * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.ACCURACY) + '%');
50093
+ }
50094
+ below.forEach((td)=>{
50095
+ td.style.removeProperty('width');
50096
+ if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style')) {
50097
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style', null);
50098
+ }
50099
+ });
50100
+ });
49931
50101
  }
49932
50102
  /**
49933
50103
  * Resize whole table
49934
50104
  */ resizeTable() {
49935
50105
  const delta = this.resizeDelta * (this.isRTL ? -1 : 1);
49936
- const width = this.workTable.offsetWidth, parentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(this.workTable.parentNode, this.j.ew);
50106
+ const width = this.startTableWidth, parentWidth = this.startParentWidth;
49937
50107
  // for RTL use mirror logic
49938
50108
  const rightSide = !this.wholeTable;
49939
50109
  const needChangeWidth = this.isRTL ? !rightSide : rightSide;
@@ -49942,10 +50112,9 @@ const key = 'table_processor_observer-resize';
49942
50112
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
49943
50113
  } else {
49944
50114
  const side = this.isRTL ? 'marginRight' : 'marginLeft';
49945
- const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
49946
50115
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, {
49947
50116
  width: (width - delta) / parentWidth * 100 + '%',
49948
- [side]: (margin + delta) / parentWidth * 100 + '%'
50117
+ [side]: (this.startMargin + delta) / parentWidth * 100 + '%'
49949
50118
  });
49950
50119
  }
49951
50120
  }
@@ -50021,9 +50190,10 @@ const key = 'table_processor_observer-resize';
50021
50190
  if (!editor.o.tableAllowCellResize) {
50022
50191
  return;
50023
50192
  }
50024
- editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
50193
+ const observeTables = ()=>{
50025
50194
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
50026
- }).on(this.j.ow, 'scroll.resize-cells', ()=>{
50195
+ };
50196
+ editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', observeTables).on(this.j.ow, 'scroll.resize-cells', ()=>{
50027
50197
  if (!this.drag || this.workRow) {
50028
50198
  return;
50029
50199
  }
@@ -50039,6 +50209,8 @@ const key = 'table_processor_observer-resize';
50039
50209
  tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
50040
50210
  });
50041
50211
  });
50212
+ // None of those events comes with the editor's starting value
50213
+ observeTables();
50042
50214
  }
50043
50215
  /**
50044
50216
  * Add to every Table listeners
@@ -50052,7 +50224,9 @@ const key = 'table_processor_observer-resize';
50052
50224
  this.hideResizeHandle();
50053
50225
  }
50054
50226
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
50055
- if (this.j.isLocked) {
50227
+ // A drag from a cell isn't a resize, and the handle on
50228
+ // a border it passes would take its moves (#1778)
50229
+ if (this.j.isLocked || this.j.o.readonly || event.buttons) {
50056
50230
  return;
50057
50231
  }
50058
50232
  const cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(event.target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, table);
@@ -50094,10 +50268,21 @@ const key = 'table_processor_observer-resize';
50094
50268
  this.startX = 0;
50095
50269
  /**
50096
50270
  * The table's and its cells' styles as a column drag started, put back
50097
- * before each new width
50271
+ * as it ends, before the final widths
50098
50272
  */ this.startStyles = [];
50099
50273
  this.startLeft = 0;
50100
50274
  this.startEdge = 0;
50275
+ /**
50276
+ * For each of the two columns a drag resizes, the cell whose width
50277
+ * `setColumnWidthByDelta` sets, with its width as the drag started, and
50278
+ * the cells below it, whose widths it clears
50279
+ */ this.startWidths = [];
50280
+ /**
50281
+ * The table's width as the drag started, and for a drag of its edge, the
50282
+ * width inside what holds it and its margin on that side
50283
+ */ this.startTableWidth = 0;
50284
+ this.startParentWidth = 0;
50285
+ this.startMargin = 0;
50101
50286
  /**
50102
50287
  * The row whose height the handle sets, or null while it sets a width
50103
50288
  */ this.workRow = null;
@@ -51872,7 +52057,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
51872
52057
 
51873
52058
 
51874
52059
  const key = 'table_processor_observer';
51875
- const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
51876
52060
  class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
51877
52061
  /**
51878
52062
  * Shortcut for Jodit.modules.Table
@@ -51887,6 +52071,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51887
52071
  // move the caret, as table-keyboard-navigation's do
51888
52072
  .on('keydown', this.__onKeyDown, {
51889
52073
  top: true
52074
+ }).on('clickEditor', this.__onClickAfterDrag, {
52075
+ top: true
51890
52076
  }).on('keydown.select-cells', (event)=>{
51891
52077
  if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
51892
52078
  this.unselectCells();
@@ -52006,18 +52192,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52006
52192
  }
52007
52193
  this.__isSelectionMode = true;
52008
52194
  this.__selectedCell = cell;
52195
+ this.__movedTo = cell;
52009
52196
  this.__tableModule.addSelection(cell);
52010
- this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', // Don't use decorator because need clear label on mouseup
52011
- this.j.async.throttle(this.__onMove.bind(this, table), {
52012
- label: MOUSE_MOVE_LABEL,
52013
- timeout: this.j.defaultTimeout / 2
52014
- })).on(table, 'mouseup.select-cells touchend.select-cells', this.__onStopSelection.bind(this, table));
52197
+ this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', this.__onMove.bind(this, table)).on(table, 'mouseup.select-cells touchend.select-cells', this.__onStopSelection.bind(this, table));
52198
+ new Set([
52199
+ this.j.ew,
52200
+ this.j.ow
52201
+ ]).forEach((win)=>this.j.e.on(win, 'mouseup.select-cells touchend.select-cells', this.__onRelease.bind(this, table)));
52015
52202
  return false;
52016
52203
  }
52017
52204
  onOutsideClick() {
52018
52205
  this.__selectedCell = null;
52019
52206
  this.__onRemoveSelection();
52020
52207
  }
52208
+ onMouseDown() {
52209
+ this.__keepMarks = false;
52210
+ }
52211
+ /**
52212
+ * The click that ends a drag let go outside the table, and inside the
52213
+ * editor, lands on the editor. Taken on, it would unmark the cells and
52214
+ * close their popup. As for the click on a row after a drag over the
52215
+ * cells, the browser's own selection from the drag goes
52216
+ */ __onClickAfterDrag() {
52217
+ var _a;
52218
+ if (this.__keepMarks) {
52219
+ this.__keepMarks = false;
52220
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
52221
+ this.j.e.stopPropagation('clickEditor');
52222
+ return false;
52223
+ }
52224
+ }
52021
52225
  onChange() {
52022
52226
  if (!this.j.isLocked && !this.__isSelectionMode) {
52023
52227
  this.__onRemoveSelection();
@@ -52036,16 +52240,20 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52036
52240
  // Inside Shadow DOM `document.elementFromPoint` returns the shadow
52037
52241
  // host, so the lookup must start from the shadow root
52038
52242
  const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
52039
- if (!node) {
52040
- return;
52041
- }
52042
- const cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
52243
+ const cell = node && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
52043
52244
  'td',
52044
52245
  'th'
52045
52246
  ], table);
52046
52247
  if (!cell || !this.__selectedCell) {
52047
52248
  return;
52048
52249
  }
52250
+ // The marks change only when the mouse goes into another cell, and then
52251
+ // at once rather than throttled, as the browser's own selection from
52252
+ // the drag shows in the cells between until they do (#1778)
52253
+ if (cell === this.__movedTo) {
52254
+ return;
52255
+ }
52256
+ this.__movedTo = cell;
52049
52257
  if (cell !== this.__selectedCell) {
52050
52258
  this.j.lock(key);
52051
52259
  }
@@ -52082,7 +52290,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52082
52290
  /**
52083
52291
  * Stop a selection process
52084
52292
  */ __onStopSelection(table, e) {
52085
- var _a, _b, _c;
52293
+ var _a;
52086
52294
  if (!this.__selectedCell) {
52087
52295
  return;
52088
52296
  }
@@ -52105,11 +52313,34 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52105
52313
  if (ownTable && ownTable !== table) {
52106
52314
  return; // Nested tables
52107
52315
  }
52108
- const bound = this.__tableModule.getSelectedBound(table, [
52316
+ this.__showCellsPopup(table, [
52109
52317
  cell,
52110
52318
  this.__selectedCell
52111
- ]), box = this.__tableModule.formalMatrix(table);
52112
- const max = (_b = box[bound[1][0]]) === null || _b === void 0 ? void 0 : _b[bound[1][1]], min = (_c = box[bound[0][0]]) === null || _c === void 0 ? void 0 : _c[bound[0][1]];
52319
+ ]);
52320
+ this.__stopListening();
52321
+ }
52322
+ /**
52323
+ * A drag let go outside the table doesn't reach the table's `mouseup`, so
52324
+ * the window's ends it, leaving the cells marked as they were (#1774)
52325
+ */ __onRelease(table, e) {
52326
+ if (this.__isSelectionMode) {
52327
+ this.__isSelectionMode = false;
52328
+ if (!this.j.isLockedNotBy(key)) {
52329
+ this.j.unlock();
52330
+ }
52331
+ const cells = this.__tableModule.getAllSelectedCells();
52332
+ // One let go outside the editor clicks outside it, which unmarks them
52333
+ if (cells.length > 1 && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.j.editor, e.target)) {
52334
+ this.__keepMarks = true;
52335
+ this.__showCellsPopup(table, cells);
52336
+ }
52337
+ }
52338
+ this.__stopListening();
52339
+ }
52340
+ __showCellsPopup(table, cells) {
52341
+ var _a, _b;
52342
+ const bound = this.__tableModule.getSelectedBound(table, cells), box = this.__tableModule.formalMatrix(table);
52343
+ const max = (_a = box[bound[1][0]]) === null || _a === void 0 ? void 0 : _a[bound[1][1]], min = (_b = box[bound[0][0]]) === null || _b === void 0 ? void 0 : _b[bound[0][1]];
52113
52344
  // `getSelectedBound` keeps its `Infinity` sentinel when none of the
52114
52345
  // selected cells belong to this table's matrix — e.g. after a
52115
52346
  // drag-and-drop that moved/removed the cells, leaving a stale anchor and
@@ -52128,10 +52359,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52128
52359
  height: maxOffset.top - minOffset.top + maxOffset.height
52129
52360
  };
52130
52361
  }, 'cells');
52131
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach((table)=>{
52362
+ }
52363
+ __stopListening() {
52364
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach((table)=>{
52132
52365
  this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
52133
52366
  });
52134
- this.j.async.clearTimeout(MOUSE_MOVE_LABEL);
52367
+ new Set([
52368
+ this.j.ew,
52369
+ this.j.ow
52370
+ ]).forEach((win)=>this.j.e.off(win, 'mouseup.select-cells touchend.select-cells'));
52371
+ this.__movedTo = null;
52135
52372
  }
52136
52373
  /**
52137
52374
  * Remove selection for all cells
@@ -52302,7 +52539,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52302
52539
  }
52303
52540
  /** @override */ beforeDestruct(jodit) {
52304
52541
  this.__onRemoveSelection();
52305
- jodit.e.off('.select-cells').off('keydown', this.__onKeyDown);
52542
+ this.__stopListening();
52543
+ jodit.e.off('.select-cells').off('keydown', this.__onKeyDown).off('clickEditor', this.__onClickAfterDrag);
52306
52544
  }
52307
52545
  constructor(){
52308
52546
  super(...arguments);
@@ -52319,6 +52557,13 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
52319
52557
  /**
52320
52558
  * User is selecting cells now
52321
52559
  */ this.__isSelectionMode = false;
52560
+ /**
52561
+ * The cell the marks were last drawn to
52562
+ */ this.__movedTo = null;
52563
+ /**
52564
+ * A drag let go outside the table ends in a click on the editor, which
52565
+ * would unmark its cells
52566
+ */ this.__keepMarks = false;
52322
52567
  }
52323
52568
  }
52324
52569
  selectCells.requires = [
@@ -52336,6 +52581,15 @@ __decorate([
52336
52581
  __decorate([
52337
52582
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
52338
52583
  ], selectCells.prototype, "onOutsideClick", null);
52584
+ __decorate([
52585
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
52586
+ ':mousedown',
52587
+ ':touchstart'
52588
+ ])
52589
+ ], selectCells.prototype, "onMouseDown", null);
52590
+ __decorate([
52591
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52592
+ ], selectCells.prototype, "__onClickAfterDrag", null);
52339
52593
  __decorate([
52340
52594
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
52341
52595
  ], selectCells.prototype, "onChange", null);
@@ -52383,10 +52637,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52383
52637
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
52384
52638
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
52385
52639
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
52386
- /* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87058);
52387
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
52388
- /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67510);
52389
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67215);
52640
+ /* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4510);
52641
+ /* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87058);
52642
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
52643
+ /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67510);
52644
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67215);
52390
52645
  /*!
52391
52646
  * Jodit Editor (https://xdsoft.net/jodit/)
52392
52647
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52405,6 +52660,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52405
52660
 
52406
52661
 
52407
52662
 
52663
+
52408
52664
  /**
52409
52665
  * A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
52410
52666
  *
@@ -52415,22 +52671,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52415
52671
  * console.log(img.src);
52416
52672
  * })
52417
52673
  * ```
52418
- */ class select extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
52674
+ */ class select extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
52419
52675
  afterInit(jodit) {
52420
52676
  this.proxyEventsList.forEach((eventName)=>{
52421
52677
  jodit.e.on(eventName + '.select', this.onStartSelection);
52422
52678
  });
52679
+ jodit.e.on('dblclick', this.__onDblClickBesideRow, {
52680
+ top: true
52681
+ });
52423
52682
  }
52424
52683
  beforeDestruct(jodit) {
52425
52684
  this.proxyEventsList.forEach((eventName)=>{
52426
- jodit.e.on(eventName + '.select', this.onStartSelection);
52685
+ jodit.e.off(eventName + '.select', this.onStartSelection);
52427
52686
  });
52687
+ this.__endPressBesideRow();
52688
+ jodit.e.off('dblclick', this.__onDblClickBesideRow);
52428
52689
  }
52429
52690
  onStartSelection(e) {
52430
52691
  const { j } = this;
52431
52692
  let result, target = e.target;
52432
52693
  while(result === undefined && target && target !== j.editor){
52433
- result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_4__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
52694
+ result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
52434
52695
  target = target.parentElement;
52435
52696
  }
52436
52697
  if (e.type === 'click' && result === undefined && target === j.editor) {
@@ -52450,10 +52711,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52450
52711
  }
52451
52712
  // Selecting the text of a popup input with the mouse and releasing
52452
52713
  // the button past the popup's edge is not a click outside of it.
52453
- if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.Popup)) {
52714
+ if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
52454
52715
  return;
52455
52716
  }
52456
- const box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.Popup);
52717
+ const box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup);
52457
52718
  if (!box) {
52458
52719
  this.j.e.fire('outsideClick', e);
52459
52720
  }
@@ -52499,6 +52760,127 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52499
52760
  s.setCursorAfter(text);
52500
52761
  }
52501
52762
  }
52763
+ /**
52764
+ * The table row the mouse is to the right of
52765
+ */ __rowBeside(e) {
52766
+ var _a;
52767
+ const { j } = this;
52768
+ const target = e.target;
52769
+ if (j.o.readonly || e.button !== 0 || e.detail > 2 || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(target) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, j.editor)) {
52770
+ return null;
52771
+ }
52772
+ const table = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(target.children).find((elm)=>{
52773
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table')) {
52774
+ return false;
52775
+ }
52776
+ const box = elm.getBoundingClientRect();
52777
+ return e.clientX >= box.right && e.clientY >= box.top && e.clientY < box.bottom;
52778
+ });
52779
+ const rows = table ? (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).filter((row)=>row.cells.length) : [];
52780
+ if (!table || !rows.length) {
52781
+ return null;
52782
+ }
52783
+ const row = (_a = rows.find((row)=>e.clientY < row.getBoundingClientRect().bottom)) !== null && _a !== void 0 ? _a : rows[rows.length - 1];
52784
+ return {
52785
+ table,
52786
+ row
52787
+ };
52788
+ }
52789
+ /**
52790
+ * A press to the right of a table row puts the caret where Word's typing
52791
+ * goes from there: the start of the next row's first cell, or of the block
52792
+ * after the table for the last row (#1770). The browsers put it after the
52793
+ * table, whichever row it's beside, so typing starts a new line below it.
52794
+ * Their own press is stopped, as its drag would start after the table and
52795
+ * take in the rows below first
52796
+ */ onMouseDownBesideTableRow(e) {
52797
+ const { j } = this;
52798
+ const beside = this.__rowBeside(e);
52799
+ if (!beside) {
52800
+ return;
52801
+ }
52802
+ // A press before the last one was let go must not stack its listeners
52803
+ this.__endPressBesideRow();
52804
+ e.preventDefault();
52805
+ this.__putCaretBesideRow(beside.table, beside.row);
52806
+ this.__pressBesideRow = {
52807
+ row: beside.row,
52808
+ caret: j.s.range.cloneRange()
52809
+ };
52810
+ j.e.on(j.ew, 'mousemove', this.__onDragFromRow);
52811
+ new Set([
52812
+ j.ew,
52813
+ j.ow
52814
+ ]).forEach((win)=>j.e.on(win, 'mouseup', this.__onReleaseFromRow));
52815
+ }
52816
+ /**
52817
+ * A drag from beside a row selects from the end of the row to the mouse,
52818
+ * and back beside the row it's the caret again
52819
+ */ __onDragFromRow(e) {
52820
+ var _a, _b;
52821
+ const { s } = this.j;
52822
+ const press = this.__pressBesideRow;
52823
+ if (!press || !(e.buttons & 1)) {
52824
+ this.__endPressBesideRow();
52825
+ return;
52826
+ }
52827
+ if (((_a = this.__rowBeside(e)) === null || _a === void 0 ? void 0 : _a.row) === press.row) {
52828
+ if (!s.isCollapsed()) {
52829
+ s.selectRange(press.caret.cloneRange());
52830
+ }
52831
+ return;
52832
+ }
52833
+ const { cells } = press.row;
52834
+ const last = cells[cells.length - 1];
52835
+ if (s.insertCursorAtPoint(e.clientX, e.clientY)) {
52836
+ const { startContainer, startOffset } = s.range;
52837
+ (_b = s.sel) === null || _b === void 0 ? void 0 : _b.setBaseAndExtent(last, last.childNodes.length, startContainer, startOffset);
52838
+ }
52839
+ }
52840
+ /**
52841
+ * In iframe mode, a press in an editor without the focus puts the caret at
52842
+ * its end, so a release that selected nothing puts it back
52843
+ */ __onReleaseFromRow() {
52844
+ const press = this.__pressBesideRow;
52845
+ this.__endPressBesideRow();
52846
+ if (press && this.j.s.isCollapsed()) {
52847
+ this.j.s.selectRange(press.caret);
52848
+ }
52849
+ }
52850
+ __endPressBesideRow() {
52851
+ const { j } = this;
52852
+ this.__pressBesideRow = null;
52853
+ j.e.off(j.ew, 'mousemove', this.__onDragFromRow);
52854
+ new Set([
52855
+ j.ew,
52856
+ j.ow
52857
+ ]).forEach((win)=>j.e.off(win, 'mouseup', this.__onReleaseFromRow));
52858
+ }
52859
+ /**
52860
+ * A double click beside a row is two clicks there, so add-new-line,
52861
+ * which adds a line on a double click with a caret, doesn't see it
52862
+ */ __onDblClickBesideRow(e) {
52863
+ if (this.__rowBeside(e)) {
52864
+ this.j.e.stopPropagation('dblclick');
52865
+ return false;
52866
+ }
52867
+ }
52868
+ __putCaretBesideRow(table, row) {
52869
+ const { j } = this;
52870
+ const rows = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
52871
+ const next = rows.slice(rows.indexOf(row) + 1).find((row)=>row.cells.length);
52872
+ let after = table.nextSibling;
52873
+ while(after && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(after)){
52874
+ after = after.nextSibling;
52875
+ }
52876
+ if (next) {
52877
+ j.s.setCursorIn(next.cells[0], true);
52878
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(after) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(after, 'table') && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isContentEditable(after, j.editor)) {
52879
+ j.s.setCursorIn(after, true);
52880
+ } else {
52881
+ j.s.setCursorAfter(table);
52882
+ }
52883
+ }
52502
52884
  /**
52503
52885
  * Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
52504
52886
  * a collapsed cursor leaves empty marker elements with the caret inside; a
@@ -52564,6 +52946,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
52564
52946
  * element and ends in another as a `click` on their common ancestor, so a
52565
52947
  * press inside a popup is remembered to tell such a drag from a real click.
52566
52948
  */ this.__pressTarget = null;
52949
+ /**
52950
+ * The row a press to its right was beside, and the caret it put there,
52951
+ * while the button is down
52952
+ */ this.__pressBesideRow = null;
52567
52953
  }
52568
52954
  }
52569
52955
  __decorate([
@@ -52593,6 +52979,18 @@ __decorate([
52593
52979
  ':click'
52594
52980
  ])
52595
52981
  ], select.prototype, "onClickRightOfNestedListItem", null);
52982
+ __decorate([
52983
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':mousedown')
52984
+ ], select.prototype, "onMouseDownBesideTableRow", null);
52985
+ __decorate([
52986
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52987
+ ], select.prototype, "__onDragFromRow", null);
52988
+ __decorate([
52989
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52990
+ ], select.prototype, "__onReleaseFromRow", null);
52991
+ __decorate([
52992
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52993
+ ], select.prototype, "__onDblClickBesideRow", null);
52596
52994
  __decorate([
52597
52995
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
52598
52996
  ':click'