jodit-pro 4.19.3 → 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 +20 -7
  3. package/es2015/jodit.js +853 -154
  4. package/es2015/jodit.min.js +20 -7
  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 +20 -7
  79. package/es2018/jodit.min.js +25 -12
  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 +21 -8
  109. package/es2021/jodit.js +853 -154
  110. package/es2021/jodit.min.js +32 -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 +21 -8
  186. package/es2021.en/jodit.js +853 -154
  187. package/es2021.en/jodit.min.js +31 -18
  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 +1003 -159
  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.3
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.3";
1771
+ */ const APP_VERSION = "4.19.5";
1772
1772
  // prettier-ignore
1773
1773
  const ES = "es2021";
1774
1774
  const IS_ES_MODERN = true;
@@ -10977,7 +10977,13 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
10977
10977
  * When the cursor is positioned in its place, it must be inside the element and not outside its border.
10978
10978
  * @private
10979
10979
  */ function moveNodeInsideStart(j, node, start) {
10980
- let sibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start), anotherSibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start);
10980
+ // A text node of non-breaking spaces trims to nothing, but it's text the
10981
+ // node mustn't move past
10982
+ const isContent = (n)=>{
10983
+ var _a;
10984
+ return !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(n) || Boolean((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.includes(_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
10985
+ };
10986
+ let sibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, start, isContent), anotherSibling = _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(node, !start, isContent);
10981
10987
  while(_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, j.editor) && (!anotherSibling || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement, j.editor))){
10982
10988
  if (start || !sibling.firstChild) {
10983
10989
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(sibling, node);
@@ -13595,9 +13601,11 @@ const WRAP_NODES = new Set([
13595
13601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13596
13602
  /* harmony export */ ApplyStyle: function() { return /* binding */ ApplyStyle; }
13597
13603
  /* harmony export */ });
13598
- /* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63687);
13599
- /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77361);
13600
- /* 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);
13601
13609
  /*!
13602
13610
  * Jodit Editor (https://xdsoft.net/jodit/)
13603
13611
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -13605,27 +13613,55 @@ const WRAP_NODES = new Set([
13605
13613
  */
13606
13614
 
13607
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
+ }
13608
13641
  /** @internal */ function ApplyStyle(jodit, cs) {
13609
- var _a;
13642
+ var _a, _b;
13610
13643
  const { s: sel, editor } = jodit;
13611
13644
  (_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
13612
13645
  const fakes = sel.fakes();
13613
13646
  const collapsed = sel.isCollapsed();
13614
- let mode = _constants_js__WEBPACK_IMPORTED_MODULE_1__.INITIAL;
13647
+ let mode = _constants_js__WEBPACK_IMPORTED_MODULE_3__.INITIAL;
13615
13648
  try {
13616
13649
  // for...of closes the generator on an exception, releasing every
13617
13650
  // temporary wrapper before the selection is restored in finally.
13618
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
+ }
13619
13655
  let state = {
13620
13656
  collapsed,
13621
13657
  mode,
13622
13658
  element: font,
13623
- next: _transactions_js__WEBPACK_IMPORTED_MODULE_2__.states.START,
13659
+ next: _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START,
13624
13660
  jodit,
13625
13661
  style: cs
13626
13662
  };
13627
- 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);
13628
- 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){
13629
13665
  state = machine.dispatch('exec', state);
13630
13666
  }
13631
13667
  // The first selected fragment determines how later fragments toggle.
@@ -18141,6 +18177,20 @@ const FOCUS_EVENTS = new Set([
18141
18177
  'focusin',
18142
18178
  'focusout'
18143
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
+ }
18144
18194
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18145
18195
  const __defaultClassesKey = 'data-jodit-default-classes';
18146
18196
  const NOEDIT = {
@@ -19199,7 +19249,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19199
19249
  }
19200
19250
  }
19201
19251
  const w = this.ew;
19202
- if (event instanceof w.KeyboardEvent && event.isComposing) {
19252
+ if (event instanceof w.KeyboardEvent && isInputMethodKey(event)) {
19203
19253
  return;
19204
19254
  }
19205
19255
  if (this.e && this.e.fire) {
@@ -34825,6 +34875,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34825
34875
  if (checkJoinBareText(jodit, fakeNode, backspace)) {
34826
34876
  return true;
34827
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
+ }
34828
34885
  let nextBox = fakeNode, mainClosestBox = nextBox;
34829
34886
  // Find the main big closest element
34830
34887
  while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
@@ -35105,7 +35162,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35105
35162
  * in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
35106
35163
  */ function checkJoinBareText(jodit, fakeNode, backspace) {
35107
35164
  const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
35108
- 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)) {
35109
35166
  return false;
35110
35167
  }
35111
35168
  const filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
@@ -35132,6 +35189,24 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
35132
35189
  jodit.s.setCursorBefore(fakeNode);
35133
35190
  return true;
35134
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
+ }
35135
35210
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
35136
35211
  // Process UL/LI/OL cases
35137
35212
  const siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -35565,7 +35640,6 @@ function isNotEditable(jodit, node) {
35565
35640
  if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
35566
35641
  return false;
35567
35642
  }
35568
- const neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
35569
35643
  do {
35570
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)) {
35571
35645
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
@@ -35580,6 +35654,9 @@ function isNotEditable(jodit, node) {
35580
35654
  if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
35581
35655
  return true;
35582
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);
35583
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)) {
35584
35661
  setCursorIn(neighbor, !backspace);
35585
35662
  } else {
@@ -36016,8 +36093,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
36016
36093
  }
36017
36094
  cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
36018
36095
  });
36096
+ const element = control.tags ? control.tags[0] : undefined;
36019
36097
  editor.s.commitStyle({
36020
- 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
+ ] : []
36021
36105
  });
36022
36106
  editor.synchronizeValues();
36023
36107
  return false;
@@ -38282,11 +38366,12 @@ __webpack_require__.r(__webpack_exports__);
38282
38366
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
38283
38367
 
38284
38368
  /* unused harmony export deleteCommand */
38285
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
38286
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
38287
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21537);
38288
- /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
38289
- /* 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);
38290
38375
  /*!
38291
38376
  * Jodit Editor (https://xdsoft.net/jodit/)
38292
38377
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38297,6 +38382,7 @@ __webpack_require__.r(__webpack_exports__);
38297
38382
 
38298
38383
 
38299
38384
 
38385
+
38300
38386
  const NOT_EMPTY_CONTENT_TAGS = new Set([
38301
38387
  'img',
38302
38388
  'table',
@@ -38304,7 +38390,19 @@ const NOT_EMPTY_CONTENT_TAGS = new Set([
38304
38390
  'iframe',
38305
38391
  'hr'
38306
38392
  ]);
38307
- 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 {
38308
38406
  afterInit(jodit) {
38309
38407
  jodit.e.on('afterCommand.delete', (command)=>{
38310
38408
  if (command === 'delete') {
@@ -38325,11 +38423,11 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38325
38423
  */ __afterDeleteCommand() {
38326
38424
  const jodit = this.j;
38327
38425
  const current = jodit.s.current();
38328
- 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')) {
38329
38427
  jodit.s.removeNode(current.firstChild);
38330
38428
  }
38331
- 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))) {
38332
- _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);
38333
38431
  const node = jodit.s.setCursorIn(jodit.editor);
38334
38432
  jodit.s.removeNode(node);
38335
38433
  }
@@ -38349,14 +38447,15 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38349
38447
  range.deleteContents();
38350
38448
  const fake = jodit.createInside.fake();
38351
38449
  range.insertNode(fake);
38352
- const leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fake, true);
38353
- 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);
38354
38452
  this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
38453
+ this.__keepSpacesVisible(fake);
38355
38454
  range.setStartBefore(fake);
38356
38455
  range.collapse(true);
38357
38456
  this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
38358
38457
  this.__addBrInEmptyBlock(fake, range);
38359
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38458
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38360
38459
  jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
38361
38460
  return false;
38362
38461
  }
@@ -38370,23 +38469,23 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38370
38469
  * Returns where the caret goes, or null when no table is involved
38371
38470
  */ __clearSelectedCells(range) {
38372
38471
  const { editor, createInside } = this.j;
38373
- 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);
38374
- 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);
38375
38474
  if (startCell === endCell) {
38376
38475
  return null;
38377
38476
  }
38378
- const startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(startCell, 'table', editor);
38379
- 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);
38380
38479
  const caret = range.cloneRange();
38381
38480
  caret.collapse(true);
38382
38481
  const parts = [];
38383
38482
  const addParts = (table)=>{
38384
- (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)=>{
38385
38484
  const part = range.cloneRange();
38386
- 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)) {
38387
38486
  part.setStart(cell, 0);
38388
38487
  }
38389
- 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)) {
38390
38489
  part.setEnd(cell, cell.childNodes.length);
38391
38490
  }
38392
38491
  parts.push([
@@ -38409,9 +38508,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38409
38508
  }
38410
38509
  parts.forEach(([cell, part])=>{
38411
38510
  part.deleteContents();
38412
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(cell)) {
38413
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(cell);
38414
- _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'));
38415
38514
  }
38416
38515
  });
38417
38516
  return startTable ? caret : null;
@@ -38419,46 +38518,76 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38419
38518
  __moveContentInLeftSibling(fake, leftSibling, rightSibling) {
38420
38519
  leftSibling = this.__defineRightLeftBox(leftSibling);
38421
38520
  // Nothing is moved into a table, and a block left empty after it goes
38422
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(leftSibling, 'table')) {
38423
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38424
- _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);
38425
38524
  }
38426
38525
  return;
38427
38526
  }
38428
- 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)) {
38429
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38430
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.moveContent(rightSibling, leftSibling);
38431
- _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);
38432
38531
  }
38433
- 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)) {
38434
38533
  const item = rightSibling.firstElementChild;
38435
38534
  // What's left of the right list's first item joins the left block,
38436
38535
  // up to a list nested in the item
38437
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(leftSibling)) {
38438
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(leftSibling, fake);
38439
- while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(item.firstChild)){
38440
- _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);
38441
38540
  }
38442
38541
  }
38443
38542
  // Remove empty right LI
38444
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(item)) {
38445
- _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);
38446
38545
  }
38447
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(rightSibling)) {
38448
- _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);
38449
38548
  }
38450
38549
  }
38451
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
+ }
38452
38581
  /**
38453
38582
  * If left sibling is list - return last leaf
38454
38583
  */ __defineRightLeftBox(leftSibling) {
38455
- 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)) {
38456
38585
  return leftSibling;
38457
38586
  }
38458
38587
  let lastLeaf = leftSibling.lastElementChild;
38459
- 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)) {
38460
38589
  lastLeaf = this.j.createInside.element('li');
38461
- _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);
38462
38591
  }
38463
38592
  return lastLeaf;
38464
38593
  }
@@ -38466,22 +38595,22 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38466
38595
  * Add BR in the empty block left at the caret
38467
38596
  */ __addBrInEmptyBlock(fake, range) {
38468
38597
  const jodit = this.j;
38469
- 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) {
38470
38599
  const br = jodit.createInside.element('br');
38471
- _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);
38472
38601
  range.setStartBefore(br);
38473
38602
  range.collapse(true);
38474
38603
  }
38475
38604
  }
38476
38605
  __moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
38477
38606
  var _a;
38478
- if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(leftSibling)) {
38479
- 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;
38480
- 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);
38481
38610
  if (leftText) {
38482
38611
  range.setStartAfter(leftText);
38483
38612
  range.collapse(true);
38484
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(fake);
38613
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
38485
38614
  }
38486
38615
  }
38487
38616
  }
@@ -38489,7 +38618,7 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
38489
38618
  deleteCommand.requires = [
38490
38619
  'backspace'
38491
38620
  ];
38492
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('deleteCommand', deleteCommand);
38621
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
38493
38622
 
38494
38623
 
38495
38624
  /***/ }),
@@ -46085,6 +46214,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.link = {
46085
46214
  followOnDblClick: false,
46086
46215
  processVideoLink: true,
46087
46216
  processPastedLink: true,
46217
+ processTypedLink: false,
46218
+ typedLinkTlds: [],
46219
+ typedLinkFileEndings: [
46220
+ 'zip',
46221
+ 'mov',
46222
+ 'md',
46223
+ 'py',
46224
+ 'sh',
46225
+ 'pub'
46226
+ ],
46088
46227
  deriveUrlFromText: false,
46089
46228
  noFollowCheckbox: true,
46090
46229
  openInNewTabCheckbox: true,
@@ -46149,12 +46288,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46149
46288
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
46150
46289
 
46151
46290
  /* unused harmony export link */
46152
- /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
46153
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
46154
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
46155
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
46156
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
46157
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5827);
46291
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
46292
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
46293
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
46294
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
46295
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
46296
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
46297
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5827);
46298
+ /* harmony import */ var _typed_link_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58970);
46158
46299
  /*!
46159
46300
  * Jodit Editor (https://xdsoft.net/jodit/)
46160
46301
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -46171,9 +46312,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46171
46312
 
46172
46313
 
46173
46314
 
46315
+
46316
+
46174
46317
  /**
46175
46318
  * Process link. Insert, dblclick or remove format
46176
- */ class link extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
46319
+ */ class link extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
46177
46320
  /** @override */ afterInit(jodit) {
46178
46321
  if (jodit.o.link.followOnDblClick) {
46179
46322
  jodit.e.on('dblclick.link', this.__onDblClickOnLink);
@@ -46182,6 +46325,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46182
46325
  if (jodit.o.link.processPastedLink) {
46183
46326
  jodit.e.on('processPaste.link', this.onProcessPasteLink);
46184
46327
  }
46328
+ if (jodit.o.link.processTypedLink) {
46329
+ this.__linkAfterEnter = jodit.async.microDebounce(this.__linkTyped);
46330
+ jodit.e.on('input.link', this.__onTypedSpace).on('beforeEnter.link', this.__onBeforeEnter).on('afterEnter.link', this.__onAfterEnter).on('mousedown.link blur.link beforeCommand.link', this.__forgetLink)// Without a namespace it runs ahead of table navigation,
46331
+ // which moves the caret on Tab, and of the backspace plugin
46332
+ .on('keydown', this.__onKeyDown, {
46333
+ top: true
46334
+ });
46335
+ }
46185
46336
  jodit.e.on('generateLinkForm.link', this.__generateForm);
46186
46337
  jodit.registerCommand('openLinkDialog', {
46187
46338
  exec: ()=>{
@@ -46195,7 +46346,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46195
46346
  dialog.setContent(htmlForm);
46196
46347
  dialog.open();
46197
46348
  jodit.async.requestIdleCallback(()=>{
46198
- const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.refs)(htmlForm.container);
46349
+ const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm.container);
46199
46350
  url_input === null || url_input === void 0 ? void 0 : url_input.focus();
46200
46351
  });
46201
46352
  },
@@ -46203,10 +46354,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46203
46354
  });
46204
46355
  }
46205
46356
  __onDblClickOnLink(e) {
46206
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(e.target, 'a')) {
46357
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
46207
46358
  return;
46208
46359
  }
46209
- const href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(e.target, 'href');
46360
+ const href = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(e.target, 'href');
46210
46361
  if (href) {
46211
46362
  location.href = href;
46212
46363
  e.preventDefault();
@@ -46215,23 +46366,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46215
46366
  onProcessPasteLink(ignore, html) {
46216
46367
  var _a, _b, _c, _d;
46217
46368
  const { jodit } = this;
46218
- if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
46369
+ if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isURL)(html) || !jodit.o.link.processPastedLink) {
46219
46370
  return;
46220
46371
  }
46221
46372
  jodit.e.stopPropagation('processPaste');
46222
46373
  if (jodit.o.link.processVideoLink) {
46223
- const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
46374
+ const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.convertMediaUrlToVideoEmbed, html, {
46224
46375
  width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
46225
46376
  height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
46226
46377
  });
46227
46378
  if (embed !== html) {
46228
- const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.prepareEmbedCode)(jodit, embed);
46229
- return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
46379
+ const media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.prepareEmbedCode)(jodit, embed);
46380
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(media) ? jodit.createInside.fromHTML(media) : media;
46230
46381
  }
46231
46382
  }
46232
46383
  if (jodit.s.isCollapsed()) {
46233
46384
  const a = jodit.createInside.element('a');
46234
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', html);
46385
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', html);
46235
46386
  a.textContent = html;
46236
46387
  jodit.e.fire('applyLink', jodit, a, null);
46237
46388
  return a;
@@ -46249,16 +46400,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46249
46400
  const i18n = jodit.i18n.bind(jodit);
46250
46401
  const { openInNewTabCheckbox, openInNewTabCheckboxDefaultChecked, noFollowCheckbox, formTemplate, formClassName, modeClassName } = jodit.o.link;
46251
46402
  const html = formTemplate(jodit);
46252
- const form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html) ? jodit.c.fromHTML(html, {
46403
+ const form = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isString)(html) ? jodit.c.fromHTML(html, {
46253
46404
  target_checkbox_box: openInNewTabCheckbox,
46254
46405
  nofollow_checkbox_box: noFollowCheckbox
46255
46406
  }) : html;
46256
- const htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(form) ? form : form.container;
46257
- const elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.refs)(htmlForm);
46407
+ const htmlForm = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form) ? form : form.container;
46408
+ const elements = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.refs)(htmlForm);
46258
46409
  const { insert, unlink, content_input_box } = elements;
46259
46410
  const { target_checkbox, nofollow_checkbox, url_input } = elements;
46260
46411
  const currentElement = current;
46261
- const isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isImage(currentElement);
46412
+ const isImageContent = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(currentElement);
46262
46413
  let { content_input } = elements;
46263
46414
  const { className_input } = elements, { className_select } = elements, { aria_label_input } = elements;
46264
46415
  if (!content_input) {
@@ -46271,12 +46422,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46271
46422
  htmlForm.classList.add(formClassName);
46272
46423
  }
46273
46424
  if (isImageContent) {
46274
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.hide(content_input_box);
46425
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(content_input_box);
46275
46426
  }
46276
46427
  let link;
46277
- const getSelectionText = ()=>link ? link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
46278
- if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'a', jodit.editor)) {
46279
- link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'a', jodit.editor);
46428
+ const getSelectionText = ()=>link ? link.innerText : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(jodit.s.range.cloneContents(), jodit.ed);
46429
+ if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor)) {
46430
+ link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(current, 'a', jodit.editor);
46280
46431
  } else {
46281
46432
  link = false;
46282
46433
  }
@@ -46284,22 +46435,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46284
46435
  content_input.value = getSelectionText();
46285
46436
  }
46286
46437
  if (aria_label_input) {
46287
- aria_label_input.value = link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'aria-label') || '' : '';
46438
+ aria_label_input.value = link ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'aria-label') || '' : '';
46288
46439
  }
46289
46440
  if (link) {
46290
- url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href') || '';
46441
+ url_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'href') || '';
46291
46442
  if (modeClassName) {
46292
46443
  readClassnames(modeClassName, className_input, link, className_select);
46293
46444
  }
46294
46445
  if (openInNewTabCheckbox && target_checkbox) {
46295
- target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'target') === '_blank';
46446
+ target_checkbox.checked = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'target') === '_blank';
46296
46447
  }
46297
46448
  if (noFollowCheckbox && nofollow_checkbox) {
46298
- nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
46449
+ nofollow_checkbox.checked = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
46299
46450
  }
46300
46451
  insert.textContent = i18n('Update');
46301
46452
  } else {
46302
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.hide(unlink);
46453
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.hide(unlink);
46303
46454
  if (jodit.o.link.deriveUrlFromText && url_input && !isImageContent && !url_input.value.trim()) {
46304
46455
  url_input.value = guessUrlFromText(content_input.value);
46305
46456
  }
@@ -46314,7 +46465,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46314
46465
  jodit.s.restore();
46315
46466
  jodit.history.snapshot.restore(snapshot);
46316
46467
  if (link) {
46317
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(link);
46468
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
46318
46469
  }
46319
46470
  jodit.synchronizeValues();
46320
46471
  close();
@@ -46335,12 +46486,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46335
46486
  const textWasChanged = getSelectionText() !== content_input.value.trim();
46336
46487
  const ci = jodit.createInside;
46337
46488
  let caretAfter = null;
46338
- if (!link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, link)) {
46489
+ if (!link || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, link)) {
46339
46490
  if (!jodit.s.isCollapsed()) {
46340
46491
  const node = jodit.s.current();
46341
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img')) {
46492
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'img')) {
46342
46493
  links = [
46343
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrap(node, 'a', ci)
46494
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(node, 'a', ci)
46344
46495
  ];
46345
46496
  } else {
46346
46497
  links = jodit.s.wrapInTag('a');
@@ -46360,27 +46511,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46360
46511
  ];
46361
46512
  }
46362
46513
  links.forEach((a)=>{
46363
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', url_input.value);
46514
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', url_input.value);
46364
46515
  writeClasses(modeClassName, className_input, className_select, a);
46365
46516
  if (!isImageContent) {
46366
46517
  writeImage(a, content_input, textWasChanged, url_input);
46367
46518
  }
46368
46519
  if (openInNewTabCheckbox && target_checkbox) {
46369
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
46520
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
46370
46521
  }
46371
46522
  if (noFollowCheckbox && nofollow_checkbox) {
46372
- const relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
46523
+ const relParts = ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
46373
46524
  const hasNofollow = relParts.includes('nofollow');
46374
46525
  if (nofollow_checkbox.checked && !hasNofollow) {
46375
46526
  relParts.push('nofollow');
46376
46527
  } else if (!nofollow_checkbox.checked && hasNofollow) {
46377
46528
  relParts.splice(relParts.indexOf('nofollow'), 1);
46378
46529
  }
46379
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
46530
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
46380
46531
  }
46381
46532
  if (aria_label_input) {
46382
46533
  const ariaLabel = aria_label_input.value.trim();
46383
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'aria-label', ariaLabel || null);
46534
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'aria-label', ariaLabel || null);
46384
46535
  }
46385
46536
  jodit.e.fire('applyLink', jodit, a, form);
46386
46537
  });
@@ -46395,7 +46546,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46395
46546
  close();
46396
46547
  return false;
46397
46548
  };
46398
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(form)) {
46549
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(form)) {
46399
46550
  jodit.e.on(form, 'submit', (event)=>{
46400
46551
  event.preventDefault();
46401
46552
  event.stopImmediatePropagation();
@@ -46408,11 +46559,96 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46408
46559
  return form;
46409
46560
  }
46410
46561
  /** @override */ beforeDestruct(jodit) {
46411
- jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink);
46562
+ jodit.e.off('generateLinkForm.link', this.__generateForm).off('dblclick.link', this.__onDblClickOnLink).off(jodit.editor, 'click.link', this.__onClickReadOnlyLink).off('processPaste.link', this.onProcessPasteLink).off('input.link', this.__onTypedSpace).off('beforeEnter.link', this.__onBeforeEnter).off('afterEnter.link', this.__onAfterEnter).off('mousedown.link blur.link beforeCommand.link', this.__forgetLink).off('keydown', this.__onKeyDown);
46563
+ }
46564
+ __onTypedSpace(event) {
46565
+ if (event.inputType !== 'insertText' || !event.data || /\S/.test(event.data)) {
46566
+ return;
46567
+ }
46568
+ const { range } = this.j.s;
46569
+ if (range.collapsed) {
46570
+ this.__linkTyped(range.startContainer, range.startOffset - event.data.length);
46571
+ }
46572
+ }
46573
+ __onBeforeEnter() {
46574
+ const { range } = this.j.s;
46575
+ this.__enteredAt = range.collapsed ? [
46576
+ range.startContainer,
46577
+ range.startOffset
46578
+ ] : null;
46579
+ }
46580
+ __onAfterEnter() {
46581
+ if (this.__enteredAt) {
46582
+ this.__linkAfterEnter(...this.__enteredAt);
46583
+ this.__enteredAt = null;
46584
+ }
46585
+ }
46586
+ __forgetLink() {
46587
+ this.__justLinked = null;
46588
+ }
46589
+ __onKeyDown(event) {
46590
+ const { jodit } = this;
46591
+ if (jodit.o.readonly) {
46592
+ return;
46593
+ }
46594
+ const link = this.__justLinked;
46595
+ const modified = event.ctrlKey || event.metaKey || event.altKey;
46596
+ if (!MODIFIER_KEYS.has(event.key)) {
46597
+ this.__justLinked = null;
46598
+ }
46599
+ if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE && !modified && (link === null || link === void 0 ? void 0 : link.isConnected)) {
46600
+ this.__recordStep();
46601
+ jodit.s.save();
46602
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.unwrap(link);
46603
+ jodit.s.restore();
46604
+ this.__recordStep();
46605
+ // Or the backspace plugin takes a character too
46606
+ jodit.e.stopPropagation('keydown');
46607
+ return false;
46608
+ }
46609
+ const { range } = jodit.s;
46610
+ if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && !modified && range.collapsed) {
46611
+ this.__linkTyped(range.startContainer, range.startOffset);
46612
+ }
46613
+ }
46614
+ /**
46615
+ * Links the address that ends at `end` in a text node, as a step of its
46616
+ * own in the history, so Undo straight after takes the link off and
46617
+ * leaves the text
46618
+ */ __linkTyped(node, end) {
46619
+ const { jodit } = this;
46620
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) || !node.isConnected || end < 0 || end > node.length || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, NO_TYPED_LINKS, jodit.editor)) {
46621
+ return;
46622
+ }
46623
+ const found = (0,_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.findTypedLink)(node.data, end, jodit.o.link.typedLinkTlds, jodit.o.link.typedLinkFileEndings);
46624
+ if (!found) {
46625
+ return;
46626
+ }
46627
+ const [start, stop, href] = found;
46628
+ this.__recordStep();
46629
+ // The text round the caret splits, and WebKit doesn't keep the caret
46630
+ // where it was
46631
+ jodit.s.save();
46632
+ const range = jodit.ed.createRange();
46633
+ range.setStart(node, start);
46634
+ range.setEnd(node, stop);
46635
+ const a = jodit.createInside.element('a');
46636
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'href', href);
46637
+ range.surroundContents(a);
46638
+ jodit.s.restore();
46639
+ jodit.e.fire('applyLink', jodit, a, null);
46640
+ this.__recordStep();
46641
+ this.__justLinked = a;
46642
+ }
46643
+ /**
46644
+ * Reports what's changed and makes it a history step of its own
46645
+ */ __recordStep() {
46646
+ this.j.setEditorValue();
46647
+ this.j.e.fire('internalChange');
46412
46648
  }
46413
46649
  __onClickReadOnlyLink(e) {
46414
46650
  const { jodit } = this;
46415
- if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(e.target, 'a')) {
46651
+ if (jodit.o.readonly && jodit.o.link.preventReadOnlyNavigation && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(e.target, 'a')) {
46416
46652
  e.preventDefault();
46417
46653
  }
46418
46654
  }
@@ -46424,21 +46660,61 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
46424
46660
  group: 'insert'
46425
46661
  }
46426
46662
  ];
46663
+ /**
46664
+ * Where the caret was when Enter was pressed. Enter splits the line in a
46665
+ * history transaction, so the link waits until it's over
46666
+ */ this.__enteredAt = null;
46667
+ this.__linkAfterEnter = ()=>{};
46668
+ /**
46669
+ * The link just made, which Backspace straight after takes off again, as
46670
+ * in CKEditor 5. Any other key but a modifier, a click or a command
46671
+ * forgets it
46672
+ */ this.__justLinked = null;
46427
46673
  }
46428
46674
  }
46429
46675
  __decorate([
46430
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
46676
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46431
46677
  ], link.prototype, "__onDblClickOnLink", null);
46432
46678
  __decorate([
46433
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
46679
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46434
46680
  ], link.prototype, "onProcessPasteLink", null);
46435
46681
  __decorate([
46436
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
46682
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46437
46683
  ], link.prototype, "__generateForm", null);
46438
46684
  __decorate([
46439
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
46685
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46686
+ ], link.prototype, "__onTypedSpace", null);
46687
+ __decorate([
46688
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46689
+ ], link.prototype, "__onBeforeEnter", null);
46690
+ __decorate([
46691
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46692
+ ], link.prototype, "__onAfterEnter", null);
46693
+ __decorate([
46694
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46695
+ ], link.prototype, "__forgetLink", null);
46696
+ __decorate([
46697
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46698
+ ], link.prototype, "__onKeyDown", null);
46699
+ __decorate([
46700
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46701
+ ], link.prototype, "__linkTyped", null);
46702
+ __decorate([
46703
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
46440
46704
  ], link.prototype, "__onClickReadOnlyLink", null);
46441
- _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
46705
+ const NO_TYPED_LINKS = new Set([
46706
+ 'a',
46707
+ 'pre',
46708
+ 'code'
46709
+ ]);
46710
+ const MODIFIER_KEYS = new Set([
46711
+ 'Shift',
46712
+ 'Control',
46713
+ 'Alt',
46714
+ 'Meta',
46715
+ 'CapsLock'
46716
+ ]);
46717
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('link', link);
46442
46718
  /**
46443
46719
  * Guess a usable `href` from the selected text for the link dialog.
46444
46720
  * Returns an empty string when the text is not a plausible URL/email,
@@ -46453,7 +46729,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('link', link);
46453
46729
  return value;
46454
46730
  }
46455
46731
  // email address -> mailto:
46456
- if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
46732
+ if (_typed_link_js__WEBPACK_IMPORTED_MODULE_7__.EMAIL.test(value)) {
46457
46733
  return `mailto:${value}`;
46458
46734
  }
46459
46735
  // bare domain like example.com or www.example.com/path -> https://
@@ -46467,14 +46743,14 @@ function writeClasses(modeClassName, className_input, className_select, a) {
46467
46743
  if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
46468
46744
  if (modeClassName === 'input') {
46469
46745
  if (className_input.value === '' && a.hasAttribute('class')) {
46470
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
46746
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
46471
46747
  }
46472
46748
  if (className_input.value !== '') {
46473
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
46749
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', className_input.value);
46474
46750
  }
46475
46751
  } else if (modeClassName === 'select') {
46476
46752
  if (a.hasAttribute('class')) {
46477
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
46753
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(a, 'class', null);
46478
46754
  }
46479
46755
  for(let i = 0; i < className_select.selectedOptions.length; i++){
46480
46756
  const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
@@ -46491,7 +46767,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
46491
46767
  switch(modeClassName){
46492
46768
  case 'input':
46493
46769
  if (className_input) {
46494
- className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
46770
+ className_input.value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
46495
46771
  }
46496
46772
  break;
46497
46773
  case 'select':
@@ -46502,7 +46778,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
46502
46778
  option.selected = false;
46503
46779
  }
46504
46780
  }
46505
- const classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
46781
+ const classNames = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(link, 'class') || '';
46506
46782
  classNames.split(/\s+/).filter((cn)=>cn.trim().length > 0).forEach((className)=>{
46507
46783
  if (className) {
46508
46784
  for(let i = 0; i < className_select.options.length; i++){
@@ -46630,6 +46906,154 @@ const formTemplate = (editor)=>{
46630
46906
  /* harmony export */ ]);
46631
46907
 
46632
46908
 
46909
+ /***/ }),
46910
+
46911
+ /***/ 67272:
46912
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
46913
+
46914
+ /*!
46915
+ * Jodit Editor (https://xdsoft.net/jodit/)
46916
+ * Released under MIT see LICENSE.txt in the project root for license information.
46917
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
46918
+ */ /**
46919
+ * @module plugins/link
46920
+ */ /**
46921
+ * The endings a bare domain links with, besides those `link.typedLinkTlds`
46922
+ * adds: the generic ones of at least 1 in 1,000 of the sites in Tranco's top
46923
+ * million (list GQ38K, https://tranco-list.eu/list/GQ38K), then every
46924
+ * two-letter one in IANA's list (version 2026102900,
46925
+ * https://data.iana.org/TLD/tlds-alpha-by-domain.txt). Together they're the
46926
+ * endings of 96% of those sites
46927
+ * @private
46928
+ */ const TLDS = new Set(`
46929
+ app biz casino click cloud club com dev edu gov info live net online org pro
46930
+ shop site space store tech top vip xyz
46931
+ ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi
46932
+ bj bm bn bo br bs bt bv bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu
46933
+ cv cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga
46934
+ gb gd ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id
46935
+ ie il im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la
46936
+ lb lc li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms
46937
+ mt mu mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph
46938
+ pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk
46939
+ sl sm sn so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt
46940
+ tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw
46941
+ `.trim().split(/\s+/));
46942
+
46943
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
46944
+ /* harmony export */ "TLDS", 0, /* binding */ TLDS
46945
+ /* harmony export */ ]);
46946
+
46947
+
46948
+ /***/ }),
46949
+
46950
+ /***/ 58970:
46951
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
46952
+
46953
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46954
+ /* harmony export */ findTypedLink: function() { return /* binding */ findTypedLink; }
46955
+ /* harmony export */ });
46956
+ /* harmony import */ var _core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26049);
46957
+ /* harmony import */ var _tlds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67272);
46958
+ /*!
46959
+ * Jodit Editor (https://xdsoft.net/jodit/)
46960
+ * Released under MIT see LICENSE.txt in the project root for license information.
46961
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
46962
+ */ /**
46963
+ * @module plugins/link
46964
+ */
46965
+
46966
+ /**
46967
+ * An email address, for `mailto:`
46968
+ * @private
46969
+ */ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
46970
+ const OPENING = new Set([
46971
+ '(',
46972
+ '[',
46973
+ '"',
46974
+ "'",
46975
+ '“',
46976
+ '‘',
46977
+ '<'
46978
+ ]);
46979
+ const CLOSING = new Set([
46980
+ '.',
46981
+ ',',
46982
+ ';',
46983
+ ':',
46984
+ '!',
46985
+ '?',
46986
+ '"',
46987
+ "'",
46988
+ '”',
46989
+ '’',
46990
+ '>'
46991
+ ]);
46992
+ const BRACKETS = {
46993
+ ')': '(',
46994
+ ']': '['
46995
+ };
46996
+ const LABEL = /^[a-z\d][a-z\d-]{0,62}$/i;
46997
+ /**
46998
+ * The address that ends at `end` in a line of text typed, back to the
46999
+ * whitespace before it, as `[start, end, href]`. Punctuation round it, such as
47000
+ * a sentence's full stop or a bracket the address doesn't open, stays out.
47001
+ * An address counts with a scheme, with `www.`, as an email address, or as a
47002
+ * bare domain that `isBareDomain` accepts, so `Node.js` or `e.g.` don't
47003
+ * @private
47004
+ */ function findTypedLink(text, end, tlds, fileEndings) {
47005
+ let start = end;
47006
+ while(start > 0 && !/\s/.test(text[start - 1])){
47007
+ start -= 1;
47008
+ }
47009
+ while(start < end && OPENING.has(text[start])){
47010
+ start += 1;
47011
+ }
47012
+ while(end > start){
47013
+ const char = text[end - 1];
47014
+ const opening = BRACKETS[char];
47015
+ if (CLOSING.has(char) || opening && !text.slice(start, end - 1).includes(opening)) {
47016
+ end -= 1;
47017
+ } else {
47018
+ break;
47019
+ }
47020
+ }
47021
+ const href = typedLinkHref(text.slice(start, end), tlds, fileEndings);
47022
+ return href ? [
47023
+ start,
47024
+ end,
47025
+ href
47026
+ ] : null;
47027
+ }
47028
+ function typedLinkHref(address, tlds, fileEndings) {
47029
+ const email = address.replace(/^mailto:/i, '');
47030
+ if (EMAIL.test(email)) {
47031
+ return `mailto:${email}`;
47032
+ }
47033
+ if (/^www\.[^\s.]+\.\S+$/i.test(address) || isBareDomain(address, tlds, fileEndings)) {
47034
+ return `https://${address}`;
47035
+ }
47036
+ return /^[a-z][a-z\d+.-]*:\/\//i.test(address) && (0,_core_helpers_checker_is_url_js__WEBPACK_IMPORTED_MODULE_0__.isURL)(address) ? address : '';
47037
+ }
47038
+ /**
47039
+ * A domain typed without a scheme or `www.`, as `example.com`, `elections.nz`
47040
+ * or `bit.ly/enrol`. Its ending has to be in `TLDS` or `tlds`, typed in lower
47041
+ * case, so `Node.js` and a sentence run on, as in `home.It`, don't count, and
47042
+ * not in `fileEndings`, as in `photos.zip`. The first part has a letter,
47043
+ * which leaves out a time or a numbered step such as `11.am`
47044
+ */ function isBareDomain(address, tlds, fileEndings) {
47045
+ const cut = address.search(/[/?#]/);
47046
+ const host = cut < 0 ? address : address.slice(0, cut);
47047
+ const labels = host.split('.');
47048
+ const ending = labels[labels.length - 1];
47049
+ return labels.length > 1 && labels.every((label)=>LABEL.test(label) && !label.endsWith('-')) && (_tlds_js__WEBPACK_IMPORTED_MODULE_1__.TLDS.has(ending) || tlds.includes(ending)) && !fileEndings.includes(ending) && /[a-z]/i.test(labels[0]);
47050
+ }
47051
+
47052
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
47053
+ /* harmony export */ "EMAIL", 0, /* binding */ EMAIL
47054
+ /* harmony export */ ]);
47055
+
47056
+
46633
47057
  /***/ }),
46634
47058
 
46635
47059
  /***/ 757:
@@ -48650,7 +49074,7 @@ const key = 'table_processor_observer-resize';
48650
49074
  /**
48651
49075
  * Click on resize handle
48652
49076
  */ onHandleMouseDown(event) {
48653
- if (this.j.isLocked) {
49077
+ if (this.j.isLocked || this.j.o.readonly) {
48654
49078
  return;
48655
49079
  }
48656
49080
  this.drag = true;
@@ -48685,10 +49109,15 @@ const key = 'table_processor_observer-resize';
48685
49109
  let box;
48686
49110
  this.minX = 0;
48687
49111
  this.maxX = 1000000;
49112
+ this.startTableWidth = this.workTable.offsetWidth;
48688
49113
  if (this.wholeTable != null) {
48689
- const tableBox = this.workTable.parentNode.getBoundingClientRect();
49114
+ const parent = this.workTable.parentNode;
49115
+ const tableBox = parent.getBoundingClientRect();
48690
49116
  this.minX = tableBox.left;
48691
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);
48692
49121
  } else {
48693
49122
  // find maximum columns
48694
49123
  const coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
@@ -48702,6 +49131,17 @@ const key = 'table_processor_observer-resize';
48702
49131
  this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, this.maxX);
48703
49132
  }
48704
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
+ });
48705
49145
  }
48706
49146
  return false;
48707
49147
  }
@@ -48730,8 +49170,11 @@ const key = 'table_processor_observer-resize';
48730
49170
  x = this.maxX;
48731
49171
  }
48732
49172
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
48733
- this.restoreStyles();
48734
- this.resizeColumnsOrTable();
49173
+ if (this.wholeTable == null) {
49174
+ this.setColumnWidths();
49175
+ } else {
49176
+ this.resizeTable();
49177
+ }
48735
49178
  const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
48736
49179
  Object.assign(this.resizeHandler.style, {
48737
49180
  left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
@@ -48844,21 +49287,49 @@ const key = 'table_processor_observer-resize';
48844
49287
  };
48845
49288
  this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
48846
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
+ }
48847
49300
  /**
48848
49301
  * Resize only one column
48849
49302
  */ resizeColumns() {
48850
49303
  const delta = this.resizeDelta;
48851
49304
  const marked = [];
48852
49305
  const tableModule = this.module;
48853
- tableModule.setColumnWidthByDelta(this.workTable, tableModule.formalCoordinate(this.workTable, this.workCell, true)[1], delta, true, marked);
48854
- 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);
48855
- 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
+ });
48856
49327
  }
48857
49328
  /**
48858
49329
  * Resize whole table
48859
49330
  */ resizeTable() {
48860
49331
  const delta = this.resizeDelta * (this.isRTL ? -1 : 1);
48861
- 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;
48862
49333
  // for RTL use mirror logic
48863
49334
  const rightSide = !this.wholeTable;
48864
49335
  const needChangeWidth = this.isRTL ? !rightSide : rightSide;
@@ -48867,10 +49338,9 @@ const key = 'table_processor_observer-resize';
48867
49338
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
48868
49339
  } else {
48869
49340
  const side = this.isRTL ? 'marginRight' : 'marginLeft';
48870
- const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
48871
49341
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, {
48872
49342
  width: (width - delta) / parentWidth * 100 + '%',
48873
- [side]: (margin + delta) / parentWidth * 100 + '%'
49343
+ [side]: (this.startMargin + delta) / parentWidth * 100 + '%'
48874
49344
  });
48875
49345
  }
48876
49346
  }
@@ -48946,9 +49416,10 @@ const key = 'table_processor_observer-resize';
48946
49416
  if (!editor.o.tableAllowCellResize) {
48947
49417
  return;
48948
49418
  }
48949
- editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
49419
+ const observeTables = ()=>{
48950
49420
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
48951
- }).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', ()=>{
48952
49423
  if (!this.drag || this.workRow) {
48953
49424
  return;
48954
49425
  }
@@ -48964,6 +49435,8 @@ const key = 'table_processor_observer-resize';
48964
49435
  tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
48965
49436
  });
48966
49437
  });
49438
+ // None of those events comes with the editor's starting value
49439
+ observeTables();
48967
49440
  }
48968
49441
  /**
48969
49442
  * Add to every Table listeners
@@ -48977,7 +49450,9 @@ const key = 'table_processor_observer-resize';
48977
49450
  this.hideResizeHandle();
48978
49451
  }
48979
49452
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
48980
- 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) {
48981
49456
  return;
48982
49457
  }
48983
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);
@@ -49019,10 +49494,21 @@ const key = 'table_processor_observer-resize';
49019
49494
  this.startX = 0;
49020
49495
  /**
49021
49496
  * The table's and its cells' styles as a column drag started, put back
49022
- * before each new width
49497
+ * as it ends, before the final widths
49023
49498
  */ this.startStyles = [];
49024
49499
  this.startLeft = 0;
49025
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;
49026
49512
  /**
49027
49513
  * The row whose height the handle sets, or null while it sets a width
49028
49514
  */ this.workRow = null;
@@ -50797,7 +51283,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellSelection
50797
51283
 
50798
51284
 
50799
51285
  const key = 'table_processor_observer';
50800
- const MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
50801
51286
  class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
50802
51287
  /**
50803
51288
  * Shortcut for Jodit.modules.Table
@@ -50812,6 +51297,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
50812
51297
  // move the caret, as table-keyboard-navigation's do
50813
51298
  .on('keydown', this.__onKeyDown, {
50814
51299
  top: true
51300
+ }).on('clickEditor', this.__onClickAfterDrag, {
51301
+ top: true
50815
51302
  }).on('keydown.select-cells', (event)=>{
50816
51303
  if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
50817
51304
  this.unselectCells();
@@ -50931,18 +51418,36 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
50931
51418
  }
50932
51419
  this.__isSelectionMode = true;
50933
51420
  this.__selectedCell = cell;
51421
+ this.__movedTo = cell;
50934
51422
  this.__tableModule.addSelection(cell);
50935
- this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', // Don't use decorator because need clear label on mouseup
50936
- this.j.async.throttle(this.__onMove.bind(this, table), {
50937
- label: MOUSE_MOVE_LABEL,
50938
- timeout: this.j.defaultTimeout / 2
50939
- })).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)));
50940
51428
  return false;
50941
51429
  }
50942
51430
  onOutsideClick() {
50943
51431
  this.__selectedCell = null;
50944
51432
  this.__onRemoveSelection();
50945
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
+ }
50946
51451
  onChange() {
50947
51452
  if (!this.j.isLocked && !this.__isSelectionMode) {
50948
51453
  this.__onRemoveSelection();
@@ -50961,16 +51466,20 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
50961
51466
  // Inside Shadow DOM `document.elementFromPoint` returns the shadow
50962
51467
  // host, so the lookup must start from the shadow root
50963
51468
  const node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
50964
- if (!node) {
50965
- return;
50966
- }
50967
- 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, [
50968
51470
  'td',
50969
51471
  'th'
50970
51472
  ], table);
50971
51473
  if (!cell || !this.__selectedCell) {
50972
51474
  return;
50973
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;
50974
51483
  if (cell !== this.__selectedCell) {
50975
51484
  this.j.lock(key);
50976
51485
  }
@@ -51007,7 +51516,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51007
51516
  /**
51008
51517
  * Stop a selection process
51009
51518
  */ __onStopSelection(table, e) {
51010
- var _a, _b, _c;
51519
+ var _a;
51011
51520
  if (!this.__selectedCell) {
51012
51521
  return;
51013
51522
  }
@@ -51030,11 +51539,34 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51030
51539
  if (ownTable && ownTable !== table) {
51031
51540
  return; // Nested tables
51032
51541
  }
51033
- const bound = this.__tableModule.getSelectedBound(table, [
51542
+ this.__showCellsPopup(table, [
51034
51543
  cell,
51035
51544
  this.__selectedCell
51036
- ]), box = this.__tableModule.formalMatrix(table);
51037
- 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]];
51038
51570
  // `getSelectedBound` keeps its `Infinity` sentinel when none of the
51039
51571
  // selected cells belong to this table's matrix — e.g. after a
51040
51572
  // drag-and-drop that moved/removed the cells, leaving a stale anchor and
@@ -51053,10 +51585,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51053
51585
  height: maxOffset.top - minOffset.top + maxOffset.height
51054
51586
  };
51055
51587
  }, 'cells');
51056
- (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)=>{
51057
51591
  this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
51058
51592
  });
51059
- 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;
51060
51598
  }
51061
51599
  /**
51062
51600
  * Remove selection for all cells
@@ -51227,7 +51765,8 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51227
51765
  }
51228
51766
  /** @override */ beforeDestruct(jodit) {
51229
51767
  this.__onRemoveSelection();
51230
- 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);
51231
51770
  }
51232
51771
  constructor(){
51233
51772
  super(...arguments);
@@ -51244,6 +51783,13 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51244
51783
  /**
51245
51784
  * User is selecting cells now
51246
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;
51247
51793
  }
51248
51794
  }
51249
51795
  selectCells.requires = [
@@ -51261,6 +51807,15 @@ __decorate([
51261
51807
  __decorate([
51262
51808
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
51263
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);
51264
51819
  __decorate([
51265
51820
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
51266
51821
  ], selectCells.prototype, "onChange", null);
@@ -51308,10 +51863,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51308
51863
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
51309
51864
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
51310
51865
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
51311
- /* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87058);
51312
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
51313
- /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67510);
51314
- /* 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);
51315
51871
  /*!
51316
51872
  * Jodit Editor (https://xdsoft.net/jodit/)
51317
51873
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -51330,6 +51886,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51330
51886
 
51331
51887
 
51332
51888
 
51889
+
51333
51890
  /**
51334
51891
  * A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
51335
51892
  *
@@ -51340,22 +51897,27 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51340
51897
  * console.log(img.src);
51341
51898
  * })
51342
51899
  * ```
51343
- */ 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 {
51344
51901
  afterInit(jodit) {
51345
51902
  this.proxyEventsList.forEach((eventName)=>{
51346
51903
  jodit.e.on(eventName + '.select', this.onStartSelection);
51347
51904
  });
51905
+ jodit.e.on('dblclick', this.__onDblClickBesideRow, {
51906
+ top: true
51907
+ });
51348
51908
  }
51349
51909
  beforeDestruct(jodit) {
51350
51910
  this.proxyEventsList.forEach((eventName)=>{
51351
- jodit.e.on(eventName + '.select', this.onStartSelection);
51911
+ jodit.e.off(eventName + '.select', this.onStartSelection);
51352
51912
  });
51913
+ this.__endPressBesideRow();
51914
+ jodit.e.off('dblclick', this.__onDblClickBesideRow);
51353
51915
  }
51354
51916
  onStartSelection(e) {
51355
51917
  const { j } = this;
51356
51918
  let result, target = e.target;
51357
51919
  while(result === undefined && target && target !== j.editor){
51358
- 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);
51359
51921
  target = target.parentElement;
51360
51922
  }
51361
51923
  if (e.type === 'click' && result === undefined && target === j.editor) {
@@ -51375,10 +51937,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51375
51937
  }
51376
51938
  // Selecting the text of a popup input with the mouse and releasing
51377
51939
  // the button past the popup's edge is not a click outside of it.
51378
- 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)) {
51379
51941
  return;
51380
51942
  }
51381
- 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);
51382
51944
  if (!box) {
51383
51945
  this.j.e.fire('outsideClick', e);
51384
51946
  }
@@ -51424,6 +51986,127 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51424
51986
  s.setCursorAfter(text);
51425
51987
  }
51426
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
+ }
51427
52110
  /**
51428
52111
  * Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
51429
52112
  * a collapsed cursor leaves empty marker elements with the caret inside; a
@@ -51489,6 +52172,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
51489
52172
  * element and ends in another as a `click` on their common ancestor, so a
51490
52173
  * press inside a popup is remembered to tell such a drag from a real click.
51491
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;
51492
52179
  }
51493
52180
  }
51494
52181
  __decorate([
@@ -51518,6 +52205,18 @@ __decorate([
51518
52205
  ':click'
51519
52206
  ])
51520
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);
51521
52220
  __decorate([
51522
52221
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
51523
52222
  ':click'