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
@@ -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) {
@@ -34831,6 +34875,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34831
34875
  if (checkJoinBareText(jodit, fakeNode, backspace)) {
34832
34876
  return true;
34833
34877
  }
34878
+ // Old content can have an inline element round blocks beside the text:
34879
+ // moved inside them, the line joins the block as it would bare text
34880
+ // (#1781)
34881
+ const inline = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
34882
+ if (joinsBareText(jodit, edgeBlock(inline, backspace)) && moveInlineInside(inline, jodit.editor)) {
34883
+ return joinNeighbors(jodit, fakeNode, backspace, moved);
34884
+ }
34834
34885
  let nextBox = fakeNode, mainClosestBox = nextBox;
34835
34886
  // Find the main big closest element
34836
34887
  while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -35111,7 +35162,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35111
35162
  * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
35112
35163
  */ function checkJoinBareText(jodit, fakeNode, backspace) {
35113
35164
  const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
35114
- 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))) {
35165
+ if (!joinsBareText(jodit, block)) {
35115
35166
  return false;
35116
35167
  }
35117
35168
  const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
@@ -35138,6 +35189,24 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35138
35189
  jodit.s.setCursorBefore(fakeNode);
35139
35190
  return true;
35140
35191
  }
35192
+ /**
35193
+ * Whether a block joins the bare text beside it: not a list, a table or a
35194
+ * cell, and holding no block of its own
35195
+ */ function joinsBareText(jodit, block) {
35196
+ 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));
35197
+ }
35198
+ /**
35199
+ * The block an inline element holds on its side facing the caret, through
35200
+ * the inline elements in it: the `<p>` of `<span><strong><p>…</p></strong></span>`
35201
+ */ function edgeBlock(node, backspace) {
35202
+ var _a;
35203
+ let edge = node;
35204
+ while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(edge) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(edge)){
35205
+ const children = Array.from(edge.childNodes).filter((child)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child));
35206
+ edge = (_a = backspace ? children[children.length - 1] : children[0]) !== null && _a !== void 0 ? _a : null;
35207
+ }
35208
+ return edge === node ? null : edge;
35209
+ }
35141
35210
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
35142
35211
  // Process UL/LI/OL cases
35143
35212
  const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -35571,7 +35640,6 @@ function isNotEditable(jodit, node) {
35571
35640
  if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
35572
35641
  return false;
35573
35642
  }
35574
- const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
35575
35643
  do {
35576
35644
  if (prn && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(prn)) {
35577
35645
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
@@ -35586,6 +35654,9 @@ function isNotEditable(jodit, node) {
35586
35654
  if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
35587
35655
  return true;
35588
35656
  }
35657
+ // Looked for once the empty elements have gone, as the one beside the
35658
+ // caret can be in them: the `<br>` that Delete in `<p>|<br></p>` leaves
35659
+ const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
35589
35660
  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)) {
35590
35661
  setCursorIn(neighbor, !backspace);
35591
35662
  } else {
@@ -36022,8 +36093,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
36022
36093
  }
36023
36094
  cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
36024
36095
  });
36096
+ const element = control.tags ? control.tags[0] : undefined;
36025
36097
  editor.s.commitStyle({
36026
- element: control.tags ? control.tags[0] : undefined
36098
+ element,
36099
+ // As in the browsers and Word, each takes the other's place
36100
+ exclude: element === 'sub' ? [
36101
+ 'sup'
36102
+ ] : element === 'sup' ? [
36103
+ 'sub'
36104
+ ] : []
36027
36105
  });
36028
36106
  editor.synchronizeValues();
36029
36107
  return false;
@@ -38288,11 +38366,12 @@ __webpack_require__.r(__webpack_exports__);
38288
38366
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
38289
38367
 
38290
38368
  /* unused harmony export deleteCommand */
38291
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
38292
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
38293
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21537);
38294
- /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
38295
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
38369
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38370
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
38371
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38372
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
38373
+ /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
38374
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
38296
38375
  /*!
38297
38376
  * Jodit Editor (https://xdsoft.net/jodit/)
38298
38377
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38303,6 +38382,7 @@ __webpack_require__.r(__webpack_exports__);
38303
38382
 
38304
38383
 
38305
38384
 
38385
+
38306
38386
  const NOT_EMPTY_CONTENT_TAGS = new Set([
38307
38387
  'img',
38308
38388
  'table',
@@ -38310,7 +38390,19 @@ const NOT_EMPTY_CONTENT_TAGS = new Set([
38310
38390
  'iframe',
38311
38391
  'hr'
38312
38392
  ]);
38313
- class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
38393
+ const KEEPS_SPACES = new Set([
38394
+ 'pre',
38395
+ 'pre-wrap',
38396
+ 'break-spaces'
38397
+ ]);
38398
+ /**
38399
+ * A plain space beside this neighbor isn't shown: there is none, or it's a
38400
+ * line break, a block or text starting (or ending) with a plain space
38401
+ */ function hidesSpace(neighbor, edge) {
38402
+ var _a;
38403
+ 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 : '');
38404
+ }
38405
+ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
38314
38406
  afterInit(jodit) {
38315
38407
  jodit.e.on('afterCommand.delete', (command)=>{
38316
38408
  if (command === 'delete') {
@@ -38331,11 +38423,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38331
38423
  */ __afterDeleteCommand() {
38332
38424
  const jodit = this.j;
38333
38425
  const current = jodit.s.current();
38334
- if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current.firstChild, 'br')) {
38426
+ if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current.firstChild, 'br')) {
38335
38427
  jodit.s.removeNode(current.firstChild);
38336
38428
  }
38337
- 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))) {
38338
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(jodit.editor);
38429
+ 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))) {
38430
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(jodit.editor);
38339
38431
  const node = jodit.s.setCursorIn(jodit.editor);
38340
38432
  jodit.s.removeNode(node);
38341
38433
  }
@@ -38355,14 +38447,15 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38355
38447
  range.deleteContents();
38356
38448
  const fake = jodit.createInside.fake();
38357
38449
  range.insertNode(fake);
38358
- const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fake, true);
38359
- const rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fake, false);
38450
+ const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, true);
38451
+ const rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, false);
38360
38452
  this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
38453
+ this.__keepSpacesVisible(fake);
38361
38454
  range.setStartBefore(fake);
38362
38455
  range.collapse(true);
38363
38456
  this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
38364
38457
  this.__addBrInEmptyBlock(fake, range);
38365
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38458
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38366
38459
  jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
38367
38460
  return false;
38368
38461
  }
@@ -38376,23 +38469,23 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38376
38469
  * Returns where the caret goes, or null when no table is involved
38377
38470
  */ __clearSelectedCells(range) {
38378
38471
  const { editor, createInside } = this.j;
38379
- 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);
38380
- 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);
38472
+ 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);
38473
+ 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);
38381
38474
  if (startCell === endCell) {
38382
38475
  return null;
38383
38476
  }
38384
- const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(startCell, 'table', editor);
38385
- const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(endCell, 'table', editor);
38477
+ const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(startCell, 'table', editor);
38478
+ const endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(endCell, 'table', editor);
38386
38479
  const caret = range.cloneRange();
38387
38480
  caret.collapse(true);
38388
38481
  const parts = [];
38389
38482
  const addParts = (table)=>{
38390
- (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)=>{
38483
+ (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)=>{
38391
38484
  const part = range.cloneRange();
38392
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.startContainer)) {
38485
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.startContainer)) {
38393
38486
  part.setStart(cell, 0);
38394
38487
  }
38395
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isOrContains(cell, range.endContainer)) {
38488
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.endContainer)) {
38396
38489
  part.setEnd(cell, cell.childNodes.length);
38397
38490
  }
38398
38491
  parts.push([
@@ -38415,9 +38508,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38415
38508
  }
38416
38509
  parts.forEach(([cell, part])=>{
38417
38510
  part.deleteContents();
38418
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(cell)) {
38419
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(cell);
38420
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(cell, createInside.element('br'));
38511
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(cell)) {
38512
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(cell);
38513
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(cell, createInside.element('br'));
38421
38514
  }
38422
38515
  });
38423
38516
  return startTable ? caret : null;
@@ -38425,46 +38518,76 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38425
38518
  __moveContentInLeftSibling(fake, leftSibling, rightSibling) {
38426
38519
  leftSibling = this.__defineRightLeftBox(leftSibling);
38427
38520
  // Nothing is moved into a table, and a block left empty after it goes
38428
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(leftSibling, 'table')) {
38429
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38430
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38521
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(leftSibling, 'table')) {
38522
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
38523
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38431
38524
  }
38432
38525
  return;
38433
38526
  }
38434
- 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)) {
38435
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38436
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(rightSibling, leftSibling);
38437
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38527
+ 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)) {
38528
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
38529
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(rightSibling, leftSibling);
38530
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38438
38531
  }
38439
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(rightSibling.firstElementChild)) {
38532
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(rightSibling.firstElementChild)) {
38440
38533
  const item = rightSibling.firstElementChild;
38441
38534
  // What's left of the right list's first item joins the left block,
38442
38535
  // up to a list nested in the item
38443
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
38444
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38445
- while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(item.firstChild)){
38446
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, item.firstChild);
38536
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
38537
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
38538
+ while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(item.firstChild)){
38539
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, item.firstChild);
38447
38540
  }
38448
38541
  }
38449
38542
  // Remove empty right LI
38450
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item)) {
38451
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(item);
38543
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item)) {
38544
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(item);
38452
38545
  }
38453
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38454
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(rightSibling);
38546
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
38547
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
38455
38548
  }
38456
38549
  }
38457
38550
  }
38551
+ /**
38552
+ * A plain space the deletion leaves at an edge of the block, before a line
38553
+ * break or next to another space isn't shown, and the browser drops it when
38554
+ * the next char is typed. It becomes non-breaking, as in the browsers' own
38555
+ * delete and in Backspace without a selection (#1522)
38556
+ */ __keepSpacesVisible(fake) {
38557
+ var _a;
38558
+ const { jodit } = this;
38559
+ 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;
38560
+ if (KEEPS_SPACES.has(jodit.ew.getComputedStyle(block).whiteSpace)) {
38561
+ return;
38562
+ }
38563
+ const before = this.__findNeighbor(fake, true, block);
38564
+ const after = this.__findNeighbor(fake, false, block);
38565
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
38566
+ before.nodeValue = before.nodeValue.replace(/ +$/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
38567
+ }
38568
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
38569
+ after.nodeValue = after.nodeValue.replace(/^ +/, (spaces)=>_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length));
38570
+ }
38571
+ }
38572
+ /**
38573
+ * The text, line break or other element next to the caret in its block,
38574
+ * looking inside inline elements
38575
+ */ __findNeighbor(fake, left, block) {
38576
+ 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)=>{
38577
+ var _a;
38578
+ 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);
38579
+ }, block);
38580
+ }
38458
38581
  /**
38459
38582
  * If left sibling is list - return last leaf
38460
38583
  */ __defineRightLeftBox(leftSibling) {
38461
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isList(leftSibling)) {
38584
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(leftSibling)) {
38462
38585
  return leftSibling;
38463
38586
  }
38464
38587
  let lastLeaf = leftSibling.lastElementChild;
38465
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(lastLeaf)) {
38588
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(lastLeaf)) {
38466
38589
  lastLeaf = this.j.createInside.element('li');
38467
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, lastLeaf);
38590
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, lastLeaf);
38468
38591
  }
38469
38592
  return lastLeaf;
38470
38593
  }
@@ -38472,22 +38595,22 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38472
38595
  * Add BR in the empty block left at the caret
38473
38596
  */ __addBrInEmptyBlock(fake, range) {
38474
38597
  const jodit = this.j;
38475
- if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
38598
+ if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
38476
38599
  const br = jodit.createInside.element('br');
38477
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(fake, br);
38600
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fake, br);
38478
38601
  range.setStartBefore(br);
38479
38602
  range.collapse(true);
38480
38603
  }
38481
38604
  }
38482
38605
  __moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
38483
38606
  var _a;
38484
- if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(leftSibling)) {
38485
- 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;
38486
- const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText, root);
38607
+ if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(leftSibling)) {
38608
+ 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;
38609
+ const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText, root);
38487
38610
  if (leftText) {
38488
38611
  range.setStartAfter(leftText);
38489
38612
  range.collapse(true);
38490
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38613
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38491
38614
  }
38492
38615
  }
38493
38616
  }
@@ -38495,7 +38618,7 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38495
38618
  deleteCommand.requires = [
38496
38619
  'backspace'
38497
38620
  ];
38498
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('deleteCommand', deleteCommand);
38621
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
38499
38622
 
38500
38623
 
38501
38624
  /***/ }),
@@ -48951,7 +49074,7 @@ const key = 'table_processor_observer-resize';
48951
49074
  /**
48952
49075
  * Click on resize handle
48953
49076
  */ onHandleMouseDown(event) {
48954
- if (this.j.isLocked) {
49077
+ if (this.j.isLocked || this.j.o.readonly) {
48955
49078
  return;
48956
49079
  }
48957
49080
  this.drag = true;
@@ -48986,10 +49109,15 @@ const key = 'table_processor_observer-resize';
48986
49109
  let box;
48987
49110
  this.minX = 0;
48988
49111
  this.maxX = 1000000;
49112
+ this.startTableWidth = this.workTable.offsetWidth;
48989
49113
  if (this.wholeTable != null) {
48990
- const tableBox = this.workTable.parentNode.getBoundingClientRect();
49114
+ const parent = this.workTable.parentNode;
49115
+ const tableBox = parent.getBoundingClientRect();
48991
49116
  this.minX = tableBox.left;
48992
49117
  this.maxX = this.minX + tableBox.width;
49118
+ const side = this.isRTL ? 'marginRight' : 'marginLeft';
49119
+ this.startParentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(parent, this.j.ew);
49120
+ this.startMargin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
48993
49121
  } else {
48994
49122
  // find maximum columns
48995
49123
  const coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
@@ -49003,6 +49131,17 @@ const key = 'table_processor_observer-resize';
49003
49131
  this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, this.maxX);
49004
49132
  }
49005
49133
  });
49134
+ const matrix = this.module.formalMatrix(this.workTable);
49135
+ this.startWidths = this.resizedColumns().map((column)=>{
49136
+ const cells = matrix.map((row)=>row[column]);
49137
+ const index = cells.findIndex((td)=>td.colSpan === 1 || cells.length === 1);
49138
+ const cell = cells[index];
49139
+ return [
49140
+ cell,
49141
+ cell ? cell.offsetWidth : 0,
49142
+ cells.slice(Math.max(index, 0) + 1)
49143
+ ];
49144
+ });
49006
49145
  }
49007
49146
  return false;
49008
49147
  }
@@ -49031,8 +49170,11 @@ const key = 'table_processor_observer-resize';
49031
49170
  x = this.maxX;
49032
49171
  }
49033
49172
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
49034
- this.restoreStyles();
49035
- this.resizeColumnsOrTable();
49173
+ if (this.wholeTable == null) {
49174
+ this.setColumnWidths();
49175
+ } else {
49176
+ this.resizeTable();
49177
+ }
49036
49178
  const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
49037
49179
  Object.assign(this.resizeHandler.style, {
49038
49180
  left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
@@ -49145,21 +49287,49 @@ const key = 'table_processor_observer-resize';
49145
49287
  };
49146
49288
  this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
49147
49289
  }
49290
+ /**
49291
+ * The two columns a column drag resizes: the work cell's last, and the
49292
+ * next cell's first
49293
+ */ resizedColumns() {
49294
+ 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);
49295
+ return [
49296
+ this.module.formalCoordinate(this.workTable, this.workCell, true)[1],
49297
+ this.module.formalCoordinate(this.workTable, nextTD)[1]
49298
+ ];
49299
+ }
49148
49300
  /**
49149
49301
  * Resize only one column
49150
49302
  */ resizeColumns() {
49151
49303
  const delta = this.resizeDelta;
49152
49304
  const marked = [];
49153
49305
  const tableModule = this.module;
49154
- tableModule.setColumnWidthByDelta(this.workTable, tableModule.formalCoordinate(this.workTable, this.workCell, true)[1], delta, true, marked);
49155
- 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);
49156
- tableModule.setColumnWidthByDelta(this.workTable, tableModule.formalCoordinate(this.workTable, nextTD)[1], -delta, false, marked);
49306
+ const [column, nextColumn] = this.resizedColumns();
49307
+ tableModule.setColumnWidthByDelta(this.workTable, column, delta, true, marked);
49308
+ tableModule.setColumnWidthByDelta(this.workTable, nextColumn, -delta, false, marked);
49309
+ }
49310
+ /**
49311
+ * Sets the widths `resizeColumns` would while the handle is dragged, from
49312
+ * the widths the drag started with, so that a move doesn't put back every
49313
+ * cell's style and lay the table out again to measure them
49314
+ */ setColumnWidths() {
49315
+ this.startWidths.forEach(([cell, width, below], index)=>{
49316
+ const delta = index ? -this.resizeDelta : this.resizeDelta;
49317
+ if (cell) {
49318
+ (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) + '%');
49319
+ }
49320
+ below.forEach((td)=>{
49321
+ td.style.removeProperty('width');
49322
+ if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style')) {
49323
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style', null);
49324
+ }
49325
+ });
49326
+ });
49157
49327
  }
49158
49328
  /**
49159
49329
  * Resize whole table
49160
49330
  */ resizeTable() {
49161
49331
  const delta = this.resizeDelta * (this.isRTL ? -1 : 1);
49162
- const width = this.workTable.offsetWidth, parentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(this.workTable.parentNode, this.j.ew);
49332
+ const width = this.startTableWidth, parentWidth = this.startParentWidth;
49163
49333
  // for RTL use mirror logic
49164
49334
  const rightSide = !this.wholeTable;
49165
49335
  const needChangeWidth = this.isRTL ? !rightSide : rightSide;
@@ -49168,10 +49338,9 @@ const key = 'table_processor_observer-resize';
49168
49338
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
49169
49339
  } else {
49170
49340
  const side = this.isRTL ? 'marginRight' : 'marginLeft';
49171
- const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
49172
49341
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, {
49173
49342
  width: (width - delta) / parentWidth * 100 + '%',
49174
- [side]: (margin + delta) / parentWidth * 100 + '%'
49343
+ [side]: (this.startMargin + delta) / parentWidth * 100 + '%'
49175
49344
  });
49176
49345
  }
49177
49346
  }
@@ -49247,9 +49416,10 @@ const key = 'table_processor_observer-resize';
49247
49416
  if (!editor.o.tableAllowCellResize) {
49248
49417
  return;
49249
49418
  }
49250
- editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
49419
+ const observeTables = ()=>{
49251
49420
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
49252
- }).on(this.j.ow, 'scroll.resize-cells', ()=>{
49421
+ };
49422
+ 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', ()=>{
49253
49423
  if (!this.drag || this.workRow) {
49254
49424
  return;
49255
49425
  }
@@ -49265,6 +49435,8 @@ const key = 'table_processor_observer-resize';
49265
49435
  tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
49266
49436
  });
49267
49437
  });
49438
+ // None of those events comes with the editor's starting value
49439
+ observeTables();
49268
49440
  }
49269
49441
  /**
49270
49442
  * Add to every Table listeners
@@ -49278,7 +49450,9 @@ const key = 'table_processor_observer-resize';
49278
49450
  this.hideResizeHandle();
49279
49451
  }
49280
49452
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
49281
- if (this.j.isLocked) {
49453
+ // A drag from a cell isn't a resize, and the handle on
49454
+ // a border it passes would take its moves (#1778)
49455
+ if (this.j.isLocked || this.j.o.readonly || event.buttons) {
49282
49456
  return;
49283
49457
  }
49284
49458
  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);
@@ -49320,10 +49494,21 @@ const key = 'table_processor_observer-resize';
49320
49494
  this.startX = 0;
49321
49495
  /**
49322
49496
  * The table's and its cells' styles as a column drag started, put back
49323
- * before each new width
49497
+ * as it ends, before the final widths
49324
49498
  */ this.startStyles = [];
49325
49499
  this.startLeft = 0;
49326
49500
  this.startEdge = 0;
49501
+ /**
49502
+ * For each of the two columns a drag resizes, the cell whose width
49503
+ * `setColumnWidthByDelta` sets, with its width as the drag started, and
49504
+ * the cells below it, whose widths it clears
49505
+ */ this.startWidths = [];
49506
+ /**
49507
+ * The table's width as the drag started, and for a drag of its edge, the
49508
+ * width inside what holds it and its margin on that side
49509
+ */ this.startTableWidth = 0;
49510
+ this.startParentWidth = 0;
49511
+ this.startMargin = 0;
49327
49512
  /**
49328
49513
  * The row whose height the handle sets, or null while it sets a width
49329
49514
  */ this.workRow = null;
@@ -51098,7 +51283,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
51098
51283
 
51099
51284
 
51100
51285
  const key = 'table_processor_observer';
51101
- const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
51102
51286
  class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
51103
51287
  /**
51104
51288
  * Shortcut for Jodit.modules.Table
@@ -51113,6 +51297,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51113
51297
  // move the caret, as table-keyboard-navigation's do
51114
51298
  .on('keydown', this.__onKeyDown, {
51115
51299
  top: true
51300
+ }).on('clickEditor', this.__onClickAfterDrag, {
51301
+ top: true
51116
51302
  }).on('keydown.select-cells', (event)=>{
51117
51303
  if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
51118
51304
  this.unselectCells();
@@ -51232,18 +51418,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51232
51418
  }
51233
51419
  this.__isSelectionMode = true;
51234
51420
  this.__selectedCell = cell;
51421
+ this.__movedTo = cell;
51235
51422
  this.__tableModule.addSelection(cell);
51236
- this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', // Don't use decorator because need clear label on mouseup
51237
- this.j.async.throttle(this.__onMove.bind(this, table), {
51238
- label: MOUSE_MOVE_LABEL,
51239
- timeout: this.j.defaultTimeout / 2
51240
- })).on(table, 'mouseup.select-cells touchend.select-cells', this.__onStopSelection.bind(this, table));
51423
+ 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));
51424
+ new Set([
51425
+ this.j.ew,
51426
+ this.j.ow
51427
+ ]).forEach((win)=>this.j.e.on(win, 'mouseup.select-cells touchend.select-cells', this.__onRelease.bind(this, table)));
51241
51428
  return false;
51242
51429
  }
51243
51430
  onOutsideClick() {
51244
51431
  this.__selectedCell = null;
51245
51432
  this.__onRemoveSelection();
51246
51433
  }
51434
+ onMouseDown() {
51435
+ this.__keepMarks = false;
51436
+ }
51437
+ /**
51438
+ * The click that ends a drag let go outside the table, and inside the
51439
+ * editor, lands on the editor. Taken on, it would unmark the cells and
51440
+ * close their popup. As for the click on a row after a drag over the
51441
+ * cells, the browser's own selection from the drag goes
51442
+ */ __onClickAfterDrag() {
51443
+ var _a;
51444
+ if (this.__keepMarks) {
51445
+ this.__keepMarks = false;
51446
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
51447
+ this.j.e.stopPropagation('clickEditor');
51448
+ return false;
51449
+ }
51450
+ }
51247
51451
  onChange() {
51248
51452
  if (!this.j.isLocked && !this.__isSelectionMode) {
51249
51453
  this.__onRemoveSelection();
@@ -51262,16 +51466,20 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51262
51466
  // Inside Shadow DOM `document.elementFromPoint` returns the shadow
51263
51467
  // host, so the lookup must start from the shadow root
51264
51468
  const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
51265
- if (!node) {
51266
- return;
51267
- }
51268
- const cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
51469
+ const cell = node && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
51269
51470
  'td',
51270
51471
  'th'
51271
51472
  ], table);
51272
51473
  if (!cell || !this.__selectedCell) {
51273
51474
  return;
51274
51475
  }
51476
+ // The marks change only when the mouse goes into another cell, and then
51477
+ // at once rather than throttled, as the browser's own selection from
51478
+ // the drag shows in the cells between until they do (#1778)
51479
+ if (cell === this.__movedTo) {
51480
+ return;
51481
+ }
51482
+ this.__movedTo = cell;
51275
51483
  if (cell !== this.__selectedCell) {
51276
51484
  this.j.lock(key);
51277
51485
  }
@@ -51308,7 +51516,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51308
51516
  /**
51309
51517
  * Stop a selection process
51310
51518
  */ __onStopSelection(table, e) {
51311
- var _a, _b, _c;
51519
+ var _a;
51312
51520
  if (!this.__selectedCell) {
51313
51521
  return;
51314
51522
  }
@@ -51331,11 +51539,34 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51331
51539
  if (ownTable && ownTable !== table) {
51332
51540
  return; // Nested tables
51333
51541
  }
51334
- const bound = this.__tableModule.getSelectedBound(table, [
51542
+ this.__showCellsPopup(table, [
51335
51543
  cell,
51336
51544
  this.__selectedCell
51337
- ]), box = this.__tableModule.formalMatrix(table);
51338
- 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]];
51545
+ ]);
51546
+ this.__stopListening();
51547
+ }
51548
+ /**
51549
+ * A drag let go outside the table doesn't reach the table's `mouseup`, so
51550
+ * the window's ends it, leaving the cells marked as they were (#1774)
51551
+ */ __onRelease(table, e) {
51552
+ if (this.__isSelectionMode) {
51553
+ this.__isSelectionMode = false;
51554
+ if (!this.j.isLockedNotBy(key)) {
51555
+ this.j.unlock();
51556
+ }
51557
+ const cells = this.__tableModule.getAllSelectedCells();
51558
+ // One let go outside the editor clicks outside it, which unmarks them
51559
+ if (cells.length > 1 && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.j.editor, e.target)) {
51560
+ this.__keepMarks = true;
51561
+ this.__showCellsPopup(table, cells);
51562
+ }
51563
+ }
51564
+ this.__stopListening();
51565
+ }
51566
+ __showCellsPopup(table, cells) {
51567
+ var _a, _b;
51568
+ const bound = this.__tableModule.getSelectedBound(table, cells), box = this.__tableModule.formalMatrix(table);
51569
+ 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]];
51339
51570
  // `getSelectedBound` keeps its `Infinity` sentinel when none of the
51340
51571
  // selected cells belong to this table's matrix — e.g. after a
51341
51572
  // drag-and-drop that moved/removed the cells, leaving a stale anchor and
@@ -51354,10 +51585,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51354
51585
  height: maxOffset.top - minOffset.top + maxOffset.height
51355
51586
  };
51356
51587
  }, 'cells');
51357
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach((table)=>{
51588
+ }
51589
+ __stopListening() {
51590
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach((table)=>{
51358
51591
  this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
51359
51592
  });
51360
- this.j.async.clearTimeout(MOUSE_MOVE_LABEL);
51593
+ new Set([
51594
+ this.j.ew,
51595
+ this.j.ow
51596
+ ]).forEach((win)=>this.j.e.off(win, 'mouseup.select-cells touchend.select-cells'));
51597
+ this.__movedTo = null;
51361
51598
  }
51362
51599
  /**
51363
51600
  * Remove selection for all cells
@@ -51528,7 +51765,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51528
51765
  }
51529
51766
  /** @override */ beforeDestruct(jodit) {
51530
51767
  this.__onRemoveSelection();
51531
- jodit.e.off('.select-cells').off('keydown', this.__onKeyDown);
51768
+ this.__stopListening();
51769
+ jodit.e.off('.select-cells').off('keydown', this.__onKeyDown).off('clickEditor', this.__onClickAfterDrag);
51532
51770
  }
51533
51771
  constructor(){
51534
51772
  super(...arguments);
@@ -51545,6 +51783,13 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51545
51783
  /**
51546
51784
  * User is selecting cells now
51547
51785
  */ this.__isSelectionMode = false;
51786
+ /**
51787
+ * The cell the marks were last drawn to
51788
+ */ this.__movedTo = null;
51789
+ /**
51790
+ * A drag let go outside the table ends in a click on the editor, which
51791
+ * would unmark its cells
51792
+ */ this.__keepMarks = false;
51548
51793
  }
51549
51794
  }
51550
51795
  selectCells.requires = [
@@ -51562,6 +51807,15 @@ __decorate([
51562
51807
  __decorate([
51563
51808
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
51564
51809
  ], selectCells.prototype, "onOutsideClick", null);
51810
+ __decorate([
51811
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
51812
+ ':mousedown',
51813
+ ':touchstart'
51814
+ ])
51815
+ ], selectCells.prototype, "onMouseDown", null);
51816
+ __decorate([
51817
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
51818
+ ], selectCells.prototype, "__onClickAfterDrag", null);
51565
51819
  __decorate([
51566
51820
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
51567
51821
  ], selectCells.prototype, "onChange", null);
@@ -51609,10 +51863,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51609
51863
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
51610
51864
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
51611
51865
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
51612
- /* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87058);
51613
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
51614
- /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67510);
51615
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67215);
51866
+ /* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4510);
51867
+ /* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87058);
51868
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
51869
+ /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67510);
51870
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67215);
51616
51871
  /*!
51617
51872
  * Jodit Editor (https://xdsoft.net/jodit/)
51618
51873
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -51631,6 +51886,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51631
51886
 
51632
51887
 
51633
51888
 
51889
+
51634
51890
  /**
51635
51891
  * A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
51636
51892
  *
@@ -51641,22 +51897,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51641
51897
  * console.log(img.src);
51642
51898
  * })
51643
51899
  * ```
51644
- */ class select extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
51900
+ */ class select extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
51645
51901
  afterInit(jodit) {
51646
51902
  this.proxyEventsList.forEach((eventName)=>{
51647
51903
  jodit.e.on(eventName + '.select', this.onStartSelection);
51648
51904
  });
51905
+ jodit.e.on('dblclick', this.__onDblClickBesideRow, {
51906
+ top: true
51907
+ });
51649
51908
  }
51650
51909
  beforeDestruct(jodit) {
51651
51910
  this.proxyEventsList.forEach((eventName)=>{
51652
- jodit.e.on(eventName + '.select', this.onStartSelection);
51911
+ jodit.e.off(eventName + '.select', this.onStartSelection);
51653
51912
  });
51913
+ this.__endPressBesideRow();
51914
+ jodit.e.off('dblclick', this.__onDblClickBesideRow);
51654
51915
  }
51655
51916
  onStartSelection(e) {
51656
51917
  const { j } = this;
51657
51918
  let result, target = e.target;
51658
51919
  while(result === undefined && target && target !== j.editor){
51659
- result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_4__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
51920
+ result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
51660
51921
  target = target.parentElement;
51661
51922
  }
51662
51923
  if (e.type === 'click' && result === undefined && target === j.editor) {
@@ -51676,10 +51937,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51676
51937
  }
51677
51938
  // Selecting the text of a popup input with the mouse and releasing
51678
51939
  // the button past the popup's edge is not a click outside of it.
51679
- if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.Popup)) {
51940
+ if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
51680
51941
  return;
51681
51942
  }
51682
- const box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__.Popup);
51943
+ const box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup);
51683
51944
  if (!box) {
51684
51945
  this.j.e.fire('outsideClick', e);
51685
51946
  }
@@ -51725,6 +51986,127 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51725
51986
  s.setCursorAfter(text);
51726
51987
  }
51727
51988
  }
51989
+ /**
51990
+ * The table row the mouse is to the right of
51991
+ */ __rowBeside(e) {
51992
+ var _a;
51993
+ const { j } = this;
51994
+ const target = e.target;
51995
+ 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)) {
51996
+ return null;
51997
+ }
51998
+ const table = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(target.children).find((elm)=>{
51999
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table')) {
52000
+ return false;
52001
+ }
52002
+ const box = elm.getBoundingClientRect();
52003
+ return e.clientX >= box.right && e.clientY >= box.top && e.clientY < box.bottom;
52004
+ });
52005
+ const rows = table ? (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).filter((row)=>row.cells.length) : [];
52006
+ if (!table || !rows.length) {
52007
+ return null;
52008
+ }
52009
+ const row = (_a = rows.find((row)=>e.clientY < row.getBoundingClientRect().bottom)) !== null && _a !== void 0 ? _a : rows[rows.length - 1];
52010
+ return {
52011
+ table,
52012
+ row
52013
+ };
52014
+ }
52015
+ /**
52016
+ * A press to the right of a table row puts the caret where Word's typing
52017
+ * goes from there: the start of the next row's first cell, or of the block
52018
+ * after the table for the last row (#1770). The browsers put it after the
52019
+ * table, whichever row it's beside, so typing starts a new line below it.
52020
+ * Their own press is stopped, as its drag would start after the table and
52021
+ * take in the rows below first
52022
+ */ onMouseDownBesideTableRow(e) {
52023
+ const { j } = this;
52024
+ const beside = this.__rowBeside(e);
52025
+ if (!beside) {
52026
+ return;
52027
+ }
52028
+ // A press before the last one was let go must not stack its listeners
52029
+ this.__endPressBesideRow();
52030
+ e.preventDefault();
52031
+ this.__putCaretBesideRow(beside.table, beside.row);
52032
+ this.__pressBesideRow = {
52033
+ row: beside.row,
52034
+ caret: j.s.range.cloneRange()
52035
+ };
52036
+ j.e.on(j.ew, 'mousemove', this.__onDragFromRow);
52037
+ new Set([
52038
+ j.ew,
52039
+ j.ow
52040
+ ]).forEach((win)=>j.e.on(win, 'mouseup', this.__onReleaseFromRow));
52041
+ }
52042
+ /**
52043
+ * A drag from beside a row selects from the end of the row to the mouse,
52044
+ * and back beside the row it's the caret again
52045
+ */ __onDragFromRow(e) {
52046
+ var _a, _b;
52047
+ const { s } = this.j;
52048
+ const press = this.__pressBesideRow;
52049
+ if (!press || !(e.buttons & 1)) {
52050
+ this.__endPressBesideRow();
52051
+ return;
52052
+ }
52053
+ if (((_a = this.__rowBeside(e)) === null || _a === void 0 ? void 0 : _a.row) === press.row) {
52054
+ if (!s.isCollapsed()) {
52055
+ s.selectRange(press.caret.cloneRange());
52056
+ }
52057
+ return;
52058
+ }
52059
+ const { cells } = press.row;
52060
+ const last = cells[cells.length - 1];
52061
+ if (s.insertCursorAtPoint(e.clientX, e.clientY)) {
52062
+ const { startContainer, startOffset } = s.range;
52063
+ (_b = s.sel) === null || _b === void 0 ? void 0 : _b.setBaseAndExtent(last, last.childNodes.length, startContainer, startOffset);
52064
+ }
52065
+ }
52066
+ /**
52067
+ * In iframe mode, a press in an editor without the focus puts the caret at
52068
+ * its end, so a release that selected nothing puts it back
52069
+ */ __onReleaseFromRow() {
52070
+ const press = this.__pressBesideRow;
52071
+ this.__endPressBesideRow();
52072
+ if (press && this.j.s.isCollapsed()) {
52073
+ this.j.s.selectRange(press.caret);
52074
+ }
52075
+ }
52076
+ __endPressBesideRow() {
52077
+ const { j } = this;
52078
+ this.__pressBesideRow = null;
52079
+ j.e.off(j.ew, 'mousemove', this.__onDragFromRow);
52080
+ new Set([
52081
+ j.ew,
52082
+ j.ow
52083
+ ]).forEach((win)=>j.e.off(win, 'mouseup', this.__onReleaseFromRow));
52084
+ }
52085
+ /**
52086
+ * A double click beside a row is two clicks there, so add-new-line,
52087
+ * which adds a line on a double click with a caret, doesn't see it
52088
+ */ __onDblClickBesideRow(e) {
52089
+ if (this.__rowBeside(e)) {
52090
+ this.j.e.stopPropagation('dblclick');
52091
+ return false;
52092
+ }
52093
+ }
52094
+ __putCaretBesideRow(table, row) {
52095
+ const { j } = this;
52096
+ const rows = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
52097
+ const next = rows.slice(rows.indexOf(row) + 1).find((row)=>row.cells.length);
52098
+ let after = table.nextSibling;
52099
+ while(after && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(after)){
52100
+ after = after.nextSibling;
52101
+ }
52102
+ if (next) {
52103
+ j.s.setCursorIn(next.cells[0], true);
52104
+ } 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)) {
52105
+ j.s.setCursorIn(after, true);
52106
+ } else {
52107
+ j.s.setCursorAfter(table);
52108
+ }
52109
+ }
51728
52110
  /**
51729
52111
  * Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
51730
52112
  * a collapsed cursor leaves empty marker elements with the caret inside; a
@@ -51790,6 +52172,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51790
52172
  * element and ends in another as a `click` on their common ancestor, so a
51791
52173
  * press inside a popup is remembered to tell such a drag from a real click.
51792
52174
  */ this.__pressTarget = null;
52175
+ /**
52176
+ * The row a press to its right was beside, and the caret it put there,
52177
+ * while the button is down
52178
+ */ this.__pressBesideRow = null;
51793
52179
  }
51794
52180
  }
51795
52181
  __decorate([
@@ -51819,6 +52205,18 @@ __decorate([
51819
52205
  ':click'
51820
52206
  ])
51821
52207
  ], select.prototype, "onClickRightOfNestedListItem", null);
52208
+ __decorate([
52209
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':mousedown')
52210
+ ], select.prototype, "onMouseDownBesideTableRow", null);
52211
+ __decorate([
52212
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52213
+ ], select.prototype, "__onDragFromRow", null);
52214
+ __decorate([
52215
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52216
+ ], select.prototype, "__onReleaseFromRow", null);
52217
+ __decorate([
52218
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
52219
+ ], select.prototype, "__onDblClickBesideRow", null);
51822
52220
  __decorate([
51823
52221
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
51824
52222
  ':click'