jodit-pro 4.2.12 → 4.2.13

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 (301) hide show
  1. package/es2015/jodit.css +115 -115
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +525 -444
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +2 -2
  7. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  9. package/es2015/plugins/backup/backup.css +1 -1
  10. package/es2015/plugins/backup/backup.js +1 -1
  11. package/es2015/plugins/backup/backup.min.js +1 -1
  12. package/es2015/plugins/button-generator/button-generator.css +1 -1
  13. package/es2015/plugins/button-generator/button-generator.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  15. package/es2015/plugins/change-case/change-case.js +1 -1
  16. package/es2015/plugins/change-case/change-case.min.js +1 -1
  17. package/es2015/plugins/color-picker/color-picker.css +1 -1
  18. package/es2015/plugins/color-picker/color-picker.js +1 -1
  19. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  20. package/es2015/plugins/emoji/emoji.css +1 -1
  21. package/es2015/plugins/emoji/emoji.js +1 -1
  22. package/es2015/plugins/emoji/emoji.min.js +1 -1
  23. package/es2015/plugins/export-docs/export-docs.js +1 -1
  24. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  25. package/es2015/plugins/finder/finder.css +1 -1
  26. package/es2015/plugins/finder/finder.js +1 -1
  27. package/es2015/plugins/finder/finder.min.js +1 -1
  28. package/es2015/plugins/google-maps/google-maps.css +1 -1
  29. package/es2015/plugins/google-maps/google-maps.js +1 -1
  30. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  31. package/es2015/plugins/google-search/google-search.js +1 -1
  32. package/es2015/plugins/google-search/google-search.min.js +1 -1
  33. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  34. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  35. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  36. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  38. package/es2015/plugins/keyboard/keyboard.css +1 -1
  39. package/es2015/plugins/keyboard/keyboard.js +1 -1
  40. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  41. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  42. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  43. package/es2015/plugins/page-break/page-break.js +1 -1
  44. package/es2015/plugins/page-break/page-break.min.js +1 -1
  45. package/es2015/plugins/paste-code/paste-code.css +1 -1
  46. package/es2015/plugins/paste-code/paste-code.js +1 -1
  47. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  48. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  49. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  50. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  51. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  52. package/es2015/plugins/todo-list/todo-list.css +1 -1
  53. package/es2015/plugins/todo-list/todo-list.js +1 -1
  54. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  55. package/es2015/plugins/translate/translate.css +1 -1
  56. package/es2015/plugins/translate/translate.js +1 -1
  57. package/es2015/plugins/translate/translate.min.js +1 -1
  58. package/es2015/plugins/tune-block/tune-block.css +1 -1
  59. package/es2015/plugins/tune-block/tune-block.js +1 -1
  60. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  61. package/es2018/jodit.css +115 -115
  62. package/es2018/jodit.fat.min.css +1 -1
  63. package/es2018/jodit.fat.min.js +2 -2
  64. package/es2018/jodit.js +525 -444
  65. package/es2018/jodit.min.css +1 -1
  66. package/es2018/jodit.min.js +2 -2
  67. package/es2018/plugins/autocomplete/autocomplete.js +1 -1
  68. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  69. package/es2018/plugins/backup/backup.css +1 -1
  70. package/es2018/plugins/backup/backup.js +1 -1
  71. package/es2018/plugins/backup/backup.min.js +1 -1
  72. package/es2018/plugins/button-generator/button-generator.css +1 -1
  73. package/es2018/plugins/button-generator/button-generator.js +1 -1
  74. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  75. package/es2018/plugins/change-case/change-case.js +1 -1
  76. package/es2018/plugins/change-case/change-case.min.js +1 -1
  77. package/es2018/plugins/color-picker/color-picker.css +1 -1
  78. package/es2018/plugins/color-picker/color-picker.js +1 -1
  79. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  80. package/es2018/plugins/emoji/emoji.css +1 -1
  81. package/es2018/plugins/emoji/emoji.js +1 -1
  82. package/es2018/plugins/emoji/emoji.min.js +1 -1
  83. package/es2018/plugins/export-docs/export-docs.js +1 -1
  84. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  85. package/es2018/plugins/finder/finder.css +1 -1
  86. package/es2018/plugins/finder/finder.js +1 -1
  87. package/es2018/plugins/finder/finder.min.js +1 -1
  88. package/es2018/plugins/google-maps/google-maps.css +1 -1
  89. package/es2018/plugins/google-maps/google-maps.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  91. package/es2018/plugins/google-search/google-search.js +1 -1
  92. package/es2018/plugins/google-search/google-search.min.js +1 -1
  93. package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
  94. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  95. package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
  96. package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/keyboard/keyboard.css +1 -1
  99. package/es2018/plugins/keyboard/keyboard.js +1 -1
  100. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  101. package/es2018/plugins/mobile-view/mobile-view.js +1 -1
  102. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  103. package/es2018/plugins/page-break/page-break.js +1 -1
  104. package/es2018/plugins/page-break/page-break.min.js +1 -1
  105. package/es2018/plugins/paste-code/paste-code.css +1 -1
  106. package/es2018/plugins/paste-code/paste-code.js +1 -1
  107. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  108. package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
  109. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  110. package/es2018/plugins/show-blocks/show-blocks.js +1 -1
  111. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  112. package/es2018/plugins/todo-list/todo-list.css +1 -1
  113. package/es2018/plugins/todo-list/todo-list.js +1 -1
  114. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  115. package/es2018/plugins/translate/translate.css +1 -1
  116. package/es2018/plugins/translate/translate.js +1 -1
  117. package/es2018/plugins/translate/translate.min.js +1 -1
  118. package/es2018/plugins/tune-block/tune-block.css +1 -1
  119. package/es2018/plugins/tune-block/tune-block.js +1 -1
  120. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  121. package/es2021/jodit.css +115 -115
  122. package/es2021/jodit.fat.min.css +1 -1
  123. package/es2021/jodit.fat.min.js +2 -2
  124. package/es2021/jodit.js +519 -440
  125. package/es2021/jodit.min.css +1 -1
  126. package/es2021/jodit.min.js +2 -2
  127. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  128. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  129. package/es2021/plugins/backup/backup.css +1 -1
  130. package/es2021/plugins/backup/backup.js +1 -1
  131. package/es2021/plugins/backup/backup.min.js +1 -1
  132. package/es2021/plugins/button-generator/button-generator.css +1 -1
  133. package/es2021/plugins/button-generator/button-generator.js +1 -1
  134. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  135. package/es2021/plugins/change-case/change-case.js +1 -1
  136. package/es2021/plugins/change-case/change-case.min.js +1 -1
  137. package/es2021/plugins/color-picker/color-picker.css +1 -1
  138. package/es2021/plugins/color-picker/color-picker.js +1 -1
  139. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  140. package/es2021/plugins/emoji/emoji.css +1 -1
  141. package/es2021/plugins/emoji/emoji.js +1 -1
  142. package/es2021/plugins/emoji/emoji.min.js +1 -1
  143. package/es2021/plugins/export-docs/export-docs.js +1 -1
  144. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  145. package/es2021/plugins/finder/finder.css +1 -1
  146. package/es2021/plugins/finder/finder.js +1 -1
  147. package/es2021/plugins/finder/finder.min.js +1 -1
  148. package/es2021/plugins/google-maps/google-maps.css +1 -1
  149. package/es2021/plugins/google-maps/google-maps.js +1 -1
  150. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  151. package/es2021/plugins/google-search/google-search.js +1 -1
  152. package/es2021/plugins/google-search/google-search.min.js +1 -1
  153. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  154. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  155. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  156. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  157. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  158. package/es2021/plugins/keyboard/keyboard.css +1 -1
  159. package/es2021/plugins/keyboard/keyboard.js +1 -1
  160. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  161. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  162. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  163. package/es2021/plugins/page-break/page-break.js +1 -1
  164. package/es2021/plugins/page-break/page-break.min.js +1 -1
  165. package/es2021/plugins/paste-code/paste-code.css +1 -1
  166. package/es2021/plugins/paste-code/paste-code.js +1 -1
  167. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  168. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  169. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  170. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  171. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  172. package/es2021/plugins/todo-list/todo-list.css +1 -1
  173. package/es2021/plugins/todo-list/todo-list.js +1 -1
  174. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  175. package/es2021/plugins/translate/translate.css +1 -1
  176. package/es2021/plugins/translate/translate.js +1 -1
  177. package/es2021/plugins/translate/translate.min.js +1 -1
  178. package/es2021/plugins/tune-block/tune-block.css +1 -1
  179. package/es2021/plugins/tune-block/tune-block.js +1 -1
  180. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  181. package/es2021.en/jodit.css +115 -115
  182. package/es2021.en/jodit.fat.min.css +1 -1
  183. package/es2021.en/jodit.fat.min.js +2 -2
  184. package/es2021.en/jodit.js +519 -440
  185. package/es2021.en/jodit.min.css +1 -1
  186. package/es2021.en/jodit.min.js +2 -2
  187. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  188. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  189. package/es2021.en/plugins/backup/backup.css +1 -1
  190. package/es2021.en/plugins/backup/backup.js +1 -1
  191. package/es2021.en/plugins/backup/backup.min.js +1 -1
  192. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  193. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  194. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  195. package/es2021.en/plugins/change-case/change-case.js +1 -1
  196. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  197. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  198. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  199. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  200. package/es2021.en/plugins/emoji/emoji.css +1 -1
  201. package/es2021.en/plugins/emoji/emoji.js +1 -1
  202. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  203. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  204. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  205. package/es2021.en/plugins/finder/finder.css +1 -1
  206. package/es2021.en/plugins/finder/finder.js +1 -1
  207. package/es2021.en/plugins/finder/finder.min.js +1 -1
  208. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  209. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  210. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  211. package/es2021.en/plugins/google-search/google-search.js +1 -1
  212. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  213. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  214. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  215. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  216. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  217. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  218. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  219. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  220. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  221. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  222. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  223. package/es2021.en/plugins/page-break/page-break.js +1 -1
  224. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  225. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  226. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  227. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  228. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  229. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  230. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  231. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  232. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  233. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  234. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  235. package/es2021.en/plugins/translate/translate.css +1 -1
  236. package/es2021.en/plugins/translate/translate.js +1 -1
  237. package/es2021.en/plugins/translate/translate.min.js +1 -1
  238. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  239. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  240. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  241. package/es5/jodit.css +129 -129
  242. package/es5/jodit.fat.min.css +1 -1
  243. package/es5/jodit.fat.min.js +2 -2
  244. package/es5/jodit.js +543 -461
  245. package/es5/jodit.min.css +3 -3
  246. package/es5/jodit.min.js +2 -2
  247. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  248. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  249. package/es5/plugins/backup/backup.css +1 -1
  250. package/es5/plugins/backup/backup.js +1 -1
  251. package/es5/plugins/backup/backup.min.js +1 -1
  252. package/es5/plugins/button-generator/button-generator.css +1 -1
  253. package/es5/plugins/button-generator/button-generator.js +1 -1
  254. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  255. package/es5/plugins/change-case/change-case.js +1 -1
  256. package/es5/plugins/change-case/change-case.min.js +1 -1
  257. package/es5/plugins/color-picker/color-picker.css +1 -1
  258. package/es5/plugins/color-picker/color-picker.js +1 -1
  259. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  260. package/es5/plugins/emoji/emoji.css +1 -1
  261. package/es5/plugins/emoji/emoji.js +1 -1
  262. package/es5/plugins/emoji/emoji.min.js +1 -1
  263. package/es5/plugins/export-docs/export-docs.js +1 -1
  264. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  265. package/es5/plugins/finder/finder.css +1 -1
  266. package/es5/plugins/finder/finder.js +1 -1
  267. package/es5/plugins/finder/finder.min.js +1 -1
  268. package/es5/plugins/google-maps/google-maps.css +1 -1
  269. package/es5/plugins/google-maps/google-maps.js +1 -1
  270. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  271. package/es5/plugins/google-search/google-search.js +1 -1
  272. package/es5/plugins/google-search/google-search.min.js +1 -1
  273. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  274. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  275. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  276. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  277. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  278. package/es5/plugins/keyboard/keyboard.css +1 -1
  279. package/es5/plugins/keyboard/keyboard.js +1 -1
  280. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  281. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  282. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  283. package/es5/plugins/page-break/page-break.js +1 -1
  284. package/es5/plugins/page-break/page-break.min.js +1 -1
  285. package/es5/plugins/paste-code/paste-code.css +1 -1
  286. package/es5/plugins/paste-code/paste-code.js +1 -1
  287. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  288. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  289. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  290. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  291. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  292. package/es5/plugins/todo-list/todo-list.css +1 -1
  293. package/es5/plugins/todo-list/todo-list.js +1 -1
  294. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  295. package/es5/plugins/translate/translate.css +1 -1
  296. package/es5/plugins/translate/translate.js +1 -1
  297. package/es5/plugins/translate/translate.min.js +1 -1
  298. package/es5/plugins/tune-block/tune-block.css +1 -1
  299. package/es5/plugins/tune-block/tune-block.js +1 -1
  300. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  301. package/package.json +1 -1
package/es2018/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valeriy <chupurnov@gmail.com>
4
- * Version: v4.2.12
4
+ * Version: v4.2.13
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -2443,7 +2443,7 @@ __webpack_require__.r(__webpack_exports__);
2443
2443
  * Released under MIT see LICENSE.txt in the project root for license information.
2444
2444
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
2445
2445
  */
2446
- const APP_VERSION = "4.2.12";
2446
+ const APP_VERSION = "4.2.13";
2447
2447
  // prettier-ignore
2448
2448
  const ES = "es2018";
2449
2449
  const IS_ES_MODERN = true;
@@ -10555,10 +10555,14 @@ class Response {
10555
10555
 
10556
10556
  "use strict";
10557
10557
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10558
- /* harmony export */ W: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_0__.W; }
10558
+ /* harmony export */ Qe: function() { return /* binding */ cursorInTheEdgeOfString; },
10559
+ /* harmony export */ W8: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__.W; },
10560
+ /* harmony export */ dY: function() { return /* binding */ findCorrectCurrentNode; }
10559
10561
  /* harmony export */ });
10560
- /* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49967);
10561
- /* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13088);
10562
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
10563
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23545);
10564
+ /* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49967);
10565
+ /* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13088);
10562
10566
  /*!
10563
10567
  * Jodit Editor (https://xdsoft.net/jodit/)
10564
10568
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -10571,6 +10575,55 @@ class Response {
10571
10575
 
10572
10576
 
10573
10577
 
10578
+ /**
10579
+ * Check if the cursor is at the edge of the string
10580
+ * @private
10581
+ */
10582
+ function cursorInTheEdgeOfString(container, offset, start, end) {
10583
+ var _a;
10584
+ const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
10585
+ if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
10586
+ return true;
10587
+ }
10588
+ const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
10589
+ return start && ((inv && inv[0].length < offset) || (!inv && offset > 0));
10590
+ }
10591
+ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild, child) {
10592
+ node = range.startContainer.childNodes[range.startOffset];
10593
+ if (!node) {
10594
+ node = range.startContainer.childNodes[range.startOffset - 1];
10595
+ rightMode = true;
10596
+ }
10597
+ if (node && isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
10598
+ // test Current method - Cursor in the left of some SPAN
10599
+ if (!rightMode && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node.previousSibling)) {
10600
+ node = node.previousSibling;
10601
+ }
10602
+ else if (checkChild) {
10603
+ let current = child(node);
10604
+ while (current) {
10605
+ if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current)) {
10606
+ node = current;
10607
+ break;
10608
+ }
10609
+ current = child(current);
10610
+ }
10611
+ }
10612
+ }
10613
+ if (node && !isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
10614
+ let leftChild = node, rightChild = node;
10615
+ do {
10616
+ leftChild = leftChild.firstChild;
10617
+ rightChild = rightChild.lastChild;
10618
+ } while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild));
10619
+ if (leftChild === rightChild && leftChild && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild)) {
10620
+ node = leftChild;
10621
+ }
10622
+ }
10623
+ return { node, rightMode };
10624
+ }
10625
+
10626
+
10574
10627
  /***/ }),
10575
10628
 
10576
10629
  /***/ 49967:
@@ -10692,7 +10745,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
10692
10745
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10693
10746
  /* harmony export */ L: function() { return /* binding */ Selection; }
10694
10747
  /* harmony export */ });
10695
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
10748
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
10696
10749
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
10697
10750
  /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53557);
10698
10751
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23545);
@@ -10702,6 +10755,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
10702
10755
  /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_5__);
10703
10756
  /* harmony import */ var jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13088);
10704
10757
  /* harmony import */ var _style_commit_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11232);
10758
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92185);
10705
10759
  /*!
10706
10760
  * Jodit Editor (https://xdsoft.net/jodit/)
10707
10761
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -10718,6 +10772,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
10718
10772
 
10719
10773
 
10720
10774
 
10775
+
10721
10776
  class Selection {
10722
10777
  constructor(jodit) {
10723
10778
  this.jodit = jodit;
@@ -11103,63 +11158,35 @@ class Selection {
11103
11158
  * Returns the current element under the cursor inside editor
11104
11159
  */
11105
11160
  current(checkChild = true) {
11106
- if (this.j.getRealMode() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
11107
- const sel = this.sel;
11108
- if (!sel || sel.rangeCount === 0) {
11109
- return null;
11110
- }
11111
- const range = sel.getRangeAt(0);
11112
- let node = range.startContainer, rightMode = false;
11113
- const child = (nd) => rightMode ? nd.lastChild : nd.firstChild;
11114
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
11115
- return node;
11116
- }
11117
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
11118
- node = range.startContainer.childNodes[range.startOffset];
11119
- if (!node) {
11120
- node =
11121
- range.startContainer.childNodes[range.startOffset - 1];
11122
- rightMode = true;
11123
- }
11124
- if (node && sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
11125
- // test Current method - Cursor in the left of some SPAN
11126
- if (!rightMode && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node.previousSibling)) {
11127
- node = node.previousSibling;
11128
- }
11129
- else if (checkChild) {
11130
- let current = child(node);
11131
- while (current) {
11132
- if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(current)) {
11133
- node = current;
11134
- break;
11135
- }
11136
- current = child(current);
11137
- }
11138
- }
11139
- }
11140
- if (node && !sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
11141
- let leftChild = node, rightChild = node;
11142
- do {
11143
- leftChild = leftChild.firstChild;
11144
- rightChild = rightChild.lastChild;
11145
- } while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild));
11146
- if (leftChild === rightChild &&
11147
- leftChild &&
11148
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild)) {
11149
- node = leftChild;
11150
- }
11151
- }
11152
- }
11153
- // check - cursor inside editor
11154
- if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
11155
- return node;
11156
- }
11161
+ if (this.j.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
11162
+ return null;
11163
+ }
11164
+ const sel = this.sel;
11165
+ if (!sel || sel.rangeCount === 0) {
11166
+ return null;
11167
+ }
11168
+ const range = sel.getRangeAt(0);
11169
+ let node = range.startContainer;
11170
+ let rightMode = false;
11171
+ const child = (nd) => rightMode ? nd.lastChild : nd.firstChild;
11172
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
11173
+ return node;
11174
+ }
11175
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
11176
+ const ret = (0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .findCorrectCurrentNode */ .dY)(node, range, rightMode, sel.isCollapsed, checkChild, child);
11177
+ node = ret.node;
11178
+ rightMode = ret.rightMode;
11179
+ }
11180
+ // check - cursor inside editor
11181
+ if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
11182
+ return node;
11157
11183
  }
11158
11184
  return null;
11159
11185
  }
11160
11186
  /**
11161
11187
  * Insert element in editor
11162
11188
  *
11189
+ * @param node - Node for insert
11163
11190
  * @param insertCursorAfter - After insert, cursor will move after element
11164
11191
  * @param fireChange - After insert, editor fire change event. You can prevent this behavior
11165
11192
  */
@@ -11221,6 +11248,7 @@ class Selection {
11221
11248
  * Inserts in the current cursor position some HTML snippet
11222
11249
  *
11223
11250
  * @param html - HTML The text to be inserted into the document
11251
+ * @param insertCursorAfter - After insert, cursor will move after element
11224
11252
  * @example
11225
11253
  * ```javascript
11226
11254
  * parent.s.insertHTML('<img src="image.png"/>');
@@ -11264,6 +11292,7 @@ class Selection {
11264
11292
  *
11265
11293
  * @param url - URL for image, or HTMLImageElement
11266
11294
  * @param styles - If specified, it will be applied <code>$(image).css(styles)</code>
11295
+ * @param defaultWidth - If specified, it will be applied <code>css('width', defaultWidth)</code>
11267
11296
  */
11268
11297
  insertImage(url, styles = null, defaultWidth = null) {
11269
11298
  const image = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .Kg)(url) ? this.j.createInside.element('img') : url;
@@ -11319,74 +11348,81 @@ class Selection {
11319
11348
  eachSelection(callback) {
11320
11349
  var _a;
11321
11350
  const sel = this.sel;
11322
- if (sel && sel.rangeCount) {
11323
- const range = sel.getRangeAt(0);
11324
- let root = range.commonAncestorContainer;
11325
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root)) {
11326
- root = root.parentElement;
11327
- }
11328
- const nodes = [], startOffset = range.startOffset, length = root.childNodes.length, elementOffset = startOffset < length ? startOffset : length - 1;
11329
- let start = range.startContainer === this.area
11330
- ? root.childNodes[elementOffset]
11331
- : range.startContainer, end = range.endContainer === this.area
11332
- ? root.childNodes[range.endOffset - 1]
11333
- : range.endContainer;
11334
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
11335
- start === range.startContainer &&
11336
- range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
11337
- start.nextSibling) {
11338
- start = start.nextSibling;
11339
- }
11340
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) &&
11341
- end === range.endContainer &&
11342
- range.endOffset === 0 &&
11343
- end.previousSibling) {
11344
- end = end.previousSibling;
11345
- }
11346
- const checkElm = (node) => {
11347
- if (node &&
11348
- node !== root &&
11349
- !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
11350
- !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
11351
- nodes.push(node);
11352
- }
11353
- };
11354
- checkElm(start);
11355
- if (start !== end && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root, start, true)) {
11356
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, node => {
11357
- checkElm(node);
11358
- // checks parentElement as well because partial selections are not equal to entire element
11359
- return (node === end ||
11360
- (node && node.contains && node.contains(end)));
11361
- }, root, true, false);
11362
- }
11363
- const forEvery = (current) => {
11364
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, current, true)) {
11365
- return;
11366
- }
11367
- if (current.nodeName.match(/^(UL|OL)$/)) {
11368
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery);
11351
+ if (!sel || !sel.rangeCount) {
11352
+ return;
11353
+ }
11354
+ const range = sel.getRangeAt(0);
11355
+ let root = range.commonAncestorContainer;
11356
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root)) {
11357
+ root = root.parentElement;
11358
+ }
11359
+ const nodes = [];
11360
+ const startOffset = range.startOffset;
11361
+ const length = root.childNodes.length;
11362
+ const elementOffset = startOffset < length ? startOffset : length - 1;
11363
+ let start = range.startContainer === this.area
11364
+ ? root.childNodes[elementOffset]
11365
+ : range.startContainer;
11366
+ let end = range.endContainer === this.area
11367
+ ? root.childNodes[range.endOffset - 1]
11368
+ : range.endContainer;
11369
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
11370
+ start === range.startContainer &&
11371
+ range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
11372
+ start.nextSibling) {
11373
+ start = start.nextSibling;
11374
+ }
11375
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) &&
11376
+ end === range.endContainer &&
11377
+ range.endOffset === 0 &&
11378
+ end.previousSibling) {
11379
+ end = end.previousSibling;
11380
+ }
11381
+ const checkElm = (node) => {
11382
+ if (node &&
11383
+ node !== root &&
11384
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
11385
+ !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
11386
+ nodes.push(node);
11387
+ }
11388
+ };
11389
+ checkElm(start);
11390
+ if (start !== end && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root, start, true)) {
11391
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, node => {
11392
+ checkElm(node);
11393
+ // checks parentElement as well because partial selections are not equal to entire element
11394
+ return (node === end ||
11395
+ (node && node.contains && node.contains(end)));
11396
+ }, root, true, false);
11397
+ }
11398
+ const forEvery = (current) => {
11399
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.j.editor, current, true)) {
11400
+ return;
11401
+ }
11402
+ if (current.nodeName.match(/^(UL|OL)$/)) {
11403
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery);
11404
+ }
11405
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
11406
+ if (current.firstChild) {
11407
+ current = current.firstChild;
11369
11408
  }
11370
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
11371
- if (current.firstChild) {
11372
- current = current.firstChild;
11373
- }
11374
- else {
11375
- const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
11376
- current.appendChild(currentB);
11377
- current = currentB;
11378
- }
11409
+ else {
11410
+ const currentB = this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
11411
+ current.appendChild(currentB);
11412
+ current = currentB;
11379
11413
  }
11380
- callback(current);
11381
- };
11382
- if (nodes.length === 0 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
11414
+ }
11415
+ callback(current);
11416
+ };
11417
+ if (nodes.length === 0) {
11418
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
11383
11419
  nodes.push(start);
11384
11420
  }
11385
- if (nodes.length === 0 && start.firstChild) {
11421
+ if (start.firstChild) {
11386
11422
  nodes.push(start.firstChild);
11387
11423
  }
11388
- nodes.forEach(forEvery);
11389
11424
  }
11425
+ nodes.forEach(forEvery);
11390
11426
  }
11391
11427
  /**
11392
11428
  * Checks if the cursor is at the end(start) block
@@ -11398,7 +11434,7 @@ class Selection {
11398
11434
  * @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
11399
11435
  */
11400
11436
  cursorInTheEdge(start, parentBlock, fake = null) {
11401
- var _a, _b;
11437
+ var _a;
11402
11438
  const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
11403
11439
  fake !== null && fake !== void 0 ? fake : (fake = this.current(false));
11404
11440
  if (!range || !fake || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
@@ -11414,13 +11450,7 @@ class Selection {
11414
11450
  this.j.e.fire('isInvisibleForCursor', elm) === true));
11415
11451
  // check right offset
11416
11452
  if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(container)) {
11417
- const text = ((_b = container.nodeValue) === null || _b === void 0 ? void 0 : _b.length) ? container.nodeValue : '';
11418
- if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
11419
- return false;
11420
- }
11421
- const inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
11422
- if (start &&
11423
- ((inv && inv[0].length < offset) || (!inv && offset > 0))) {
11453
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .cursorInTheEdgeOfString */ .Qe)(container, offset, start, end)) {
11424
11454
  return false;
11425
11455
  }
11426
11456
  }
@@ -11509,6 +11539,7 @@ class Selection {
11509
11539
  }
11510
11540
  /**
11511
11541
  * Set cursor in the node
11542
+ * @param node - Node element
11512
11543
  * @param inStart - set cursor in start of element
11513
11544
  */
11514
11545
  setCursorIn(node, inStart = false) {
@@ -11569,6 +11600,7 @@ class Selection {
11569
11600
  }
11570
11601
  /**
11571
11602
  * Select node
11603
+ * @param node - Node element
11572
11604
  * @param inward - select all inside
11573
11605
  */
11574
11606
  select(node, inward = false) {
@@ -11843,19 +11875,19 @@ class Selection {
11843
11875
  return this;
11844
11876
  }
11845
11877
  }
11846
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
11878
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
11847
11879
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
11848
11880
  ], Selection.prototype, "createRange", null);
11849
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
11881
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
11850
11882
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
11851
11883
  ], Selection.prototype, "focus", null);
11852
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
11884
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
11853
11885
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
11854
11886
  ], Selection.prototype, "setCursorAfter", null);
11855
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
11887
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
11856
11888
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
11857
11889
  ], Selection.prototype, "setCursorBefore", null);
11858
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
11890
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
11859
11891
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
11860
11892
  ], Selection.prototype, "setCursorIn", null);
11861
11893
 
@@ -16894,17 +16926,17 @@ View.defaultOptions = {
16894
16926
 
16895
16927
  "use strict";
16896
16928
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16897
- /* harmony export */ x: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_6__.x; }
16929
+ /* harmony export */ x: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_0__.x; }
16898
16930
  /* harmony export */ });
16899
16931
  /* unused harmony export CommitMode */
16900
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58588);
16901
- /* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22743);
16932
+ /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90268);
16933
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58588);
16902
16934
  /* harmony import */ var _core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67259);
16903
16935
  /* harmony import */ var _core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53557);
16904
16936
  /* harmony import */ var _modules___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35102);
16905
16937
  /* harmony import */ var _styles_icons___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97186);
16906
- /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90268);
16907
- /* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(459);
16938
+ /* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(459);
16939
+ /* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22743);
16908
16940
  /*!
16909
16941
  * Jodit Editor (https://xdsoft.net/jodit/)
16910
16942
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -16915,6 +16947,7 @@ View.defaultOptions = {
16915
16947
  * @packageDocumentation
16916
16948
  * @module jodit
16917
16949
  */
16950
+ // eslint-disable-next-line simple-import-sort/imports
16918
16951
 
16919
16952
 
16920
16953
 
@@ -16927,7 +16960,7 @@ View.defaultOptions = {
16927
16960
 
16928
16961
  // copy constants in Jodit
16929
16962
  Object.keys(_core_constants__WEBPACK_IMPORTED_MODULE_2__).forEach((key) => {
16930
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
16963
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
16931
16964
  });
16932
16965
  const esFilter = (key) => key !== '__esModule';
16933
16966
  // Icons
@@ -16943,32 +16976,32 @@ Object.keys(_modules___WEBPACK_IMPORTED_MODULE_4__)
16943
16976
  var _a;
16944
16977
  // @ts-ignore
16945
16978
  const module = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
16946
- const name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
16979
+ const name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
16947
16980
  ? module.prototype.className()
16948
16981
  : key;
16949
- if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(name)) {
16982
+ if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
16950
16983
  console.warn('Module name must be a string', key);
16951
16984
  return;
16952
16985
  }
16953
16986
  // @ts-ignore
16954
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.modules[name] = module;
16987
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.modules[name] = module;
16955
16988
  });
16956
16989
  // Decorators
16957
16990
  Object.keys(_core_decorators__WEBPACK_IMPORTED_MODULE_3__)
16958
16991
  .filter(esFilter)
16959
16992
  .forEach((key) => {
16960
16993
  // @ts-ignore
16961
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
16994
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
16962
16995
  });
16963
16996
  ['Confirm', 'Alert', 'Prompt'].forEach((key) => {
16964
16997
  // @ts-ignore
16965
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
16998
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
16966
16999
  });
16967
17000
  // Languages
16968
- Object.keys(_languages__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)
17001
+ Object.keys(_languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)
16969
17002
  .filter(esFilter)
16970
17003
  .forEach((key) => {
16971
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A[key];
17004
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A[key];
16972
17005
  });
16973
17006
 
16974
17007
  class CommitMode {
@@ -23158,6 +23191,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23158
23191
  }
23159
23192
  /**
23160
23193
  * Generate formal table martix columns*rows
23194
+ * @param table - Working table
23161
23195
  * @param callback - if return false cycle break
23162
23196
  */
23163
23197
  formalMatrix(table, callback) {
@@ -23227,7 +23261,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23227
23261
  * @param line - Insert a new line after/before this
23228
23262
  * line contains the selected cell
23229
23263
  * @param after - Insert a new line after line contains the selected cell
23230
- * @param create - Instance of Create class
23231
23264
  */
23232
23265
  appendRow(table, line, after) {
23233
23266
  return Table.__appendRow(table, line, after, this.j.createInside);
@@ -23396,13 +23429,36 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23396
23429
  return Table.__getSelectedBound(table, selectedCells);
23397
23430
  }
23398
23431
  static __normalizeTable(table) {
23399
- let i, j, min, not;
23400
23432
  const __marked = [], box = Table.__formalMatrix(table);
23401
- // remove extra colspans
23402
- for (j = 0; j < box[0].length; j += 1) {
23403
- min = 1000000;
23404
- not = false;
23405
- for (i = 0; i < box.length; i += 1) {
23433
+ Table.__removeExtraColspans(box, __marked);
23434
+ Table.__removeExtraRowspans(box, __marked);
23435
+ // remove rowspans and colspans equal 1 and empty class
23436
+ for (let i = 0; i < box.length; i += 1) {
23437
+ for (let j = 0; j < box[i].length; j += 1) {
23438
+ if (box[i][j] === undefined) {
23439
+ continue; // broken table
23440
+ }
23441
+ if (box[i][j].hasAttribute('rowspan') &&
23442
+ box[i][j].rowSpan === 1) {
23443
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
23444
+ }
23445
+ if (box[i][j].hasAttribute('colspan') &&
23446
+ box[i][j].colSpan === 1) {
23447
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
23448
+ }
23449
+ if (box[i][j].hasAttribute('class') &&
23450
+ !(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
23451
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
23452
+ }
23453
+ }
23454
+ }
23455
+ Table.__unmark(__marked);
23456
+ }
23457
+ static __removeExtraColspans(box, __marked) {
23458
+ for (let j = 0; j < box[0].length; j += 1) {
23459
+ let min = 1000000;
23460
+ let not = false;
23461
+ for (let i = 0; i < box.length; i += 1) {
23406
23462
  if (box[i][j] === undefined) {
23407
23463
  continue; // broken table
23408
23464
  }
@@ -23413,7 +23469,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23413
23469
  min = Math.min(min, box[i][j].colSpan);
23414
23470
  }
23415
23471
  if (!not) {
23416
- for (i = 0; i < box.length; i += 1) {
23472
+ for (let i = 0; i < box.length; i += 1) {
23417
23473
  if (box[i][j] === undefined) {
23418
23474
  continue; // broken table
23419
23475
  }
@@ -23421,10 +23477,13 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23421
23477
  }
23422
23478
  }
23423
23479
  }
23424
- // remove extra rowspans
23480
+ }
23481
+ static __removeExtraRowspans(box, marked) {
23482
+ let i = 0;
23483
+ let j = 0;
23425
23484
  for (i = 0; i < box.length; i += 1) {
23426
- min = 1000000;
23427
- not = false;
23485
+ let min = 1000000;
23486
+ let not = false;
23428
23487
  for (j = 0; j < box[i].length; j += 1) {
23429
23488
  if (box[i][j] === undefined) {
23430
23489
  continue; // broken table
@@ -23440,31 +23499,10 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23440
23499
  if (box[i][j] === undefined) {
23441
23500
  continue; // broken table
23442
23501
  }
23443
- Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, __marked);
23444
- }
23445
- }
23446
- }
23447
- // remove rowspans and colspans equal 1 and empty class
23448
- for (i = 0; i < box.length; i += 1) {
23449
- for (j = 0; j < box[i].length; j += 1) {
23450
- if (box[i][j] === undefined) {
23451
- continue; // broken table
23452
- }
23453
- if (box[i][j].hasAttribute('rowspan') &&
23454
- box[i][j].rowSpan === 1) {
23455
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
23456
- }
23457
- if (box[i][j].hasAttribute('colspan') &&
23458
- box[i][j].colSpan === 1) {
23459
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
23460
- }
23461
- if (box[i][j].hasAttribute('class') &&
23462
- !(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
23463
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
23502
+ Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, marked);
23464
23503
  }
23465
23504
  }
23466
23505
  }
23467
- Table.__unmark(__marked);
23468
23506
  }
23469
23507
  /**
23470
23508
  * Try recalculate all coluns and rows after change
@@ -24896,34 +24934,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24896
24934
  }
24897
24935
  const promises = [];
24898
24936
  if (o.insertImageAsBase64URI) {
24899
- let file, i;
24900
- for (i = 0; i < fileList.length; i += 1) {
24901
- file = fileList[i];
24902
- if (file && file.type) {
24903
- const mime = file.type.match(/\/([a-z0-9]+)/i);
24904
- const extension = mime[1] ? mime[1].toLowerCase() : '';
24905
- if (o.imagesExtensions.includes(extension)) {
24906
- const reader = new FileReader();
24907
- promises.push(uploader.j.async.promise((resolve, reject) => {
24908
- reader.onerror = reject;
24909
- reader.onloadend = () => {
24910
- const resp = {
24911
- baseurl: '',
24912
- files: [reader.result],
24913
- isImages: [true]
24914
- };
24915
- const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
24916
- ? handlerSuccess
24917
- : o.defaultHandlerSuccess;
24918
- handler.call(uploader, resp);
24919
- resolve(resp);
24920
- };
24921
- reader.readAsDataURL(file);
24922
- }));
24923
- fileList[i] = null;
24924
- }
24925
- }
24926
- }
24937
+ readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
24927
24938
  }
24928
24939
  fileList = fileList.filter(a => a);
24929
24940
  if (fileList.length) {
@@ -24934,7 +24945,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24934
24945
  for (let i = 0; i < fileList.length; i += 1) {
24935
24946
  file = fileList[i];
24936
24947
  if (file) {
24937
- const hasRealExtension = /\.[\d\w]+$/.test(file.name);
24948
+ const hasRealExtension = /\.\w+$/.test(file.name);
24938
24949
  const mime = file.type.match(/\/([a-z0-9]+)/i);
24939
24950
  const extension = mime && mime[1] ? mime[1].toLowerCase() : '';
24940
24951
  let newName = fileList[i].name ||
@@ -24983,6 +24994,37 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24983
24994
  }
24984
24995
  return Promise.all(promises);
24985
24996
  }
24997
+ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
24998
+ let file, i;
24999
+ for (i = 0; i < fileList.length; i += 1) {
25000
+ file = fileList[i];
25001
+ if (file && file.type) {
25002
+ const mime = file.type.match(/\/([a-z0-9]+)/i);
25003
+ const extension = mime[1] ? mime[1].toLowerCase() : '';
25004
+ if (!imagesExtensions.includes(extension)) {
25005
+ continue;
25006
+ }
25007
+ const reader = new FileReader();
25008
+ promises.push(uploader.j.async.promise((resolve, reject) => {
25009
+ reader.onerror = reject;
25010
+ reader.onloadend = () => {
25011
+ const resp = {
25012
+ baseurl: '',
25013
+ files: [reader.result],
25014
+ isImages: [true]
25015
+ };
25016
+ const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
25017
+ ? handlerSuccess
25018
+ : defaultHandlerSuccess;
25019
+ handler.call(uploader, resp);
25020
+ resolve(resp);
25021
+ };
25022
+ reader.readAsDataURL(file);
25023
+ }));
25024
+ fileList[i] = null;
25025
+ }
25026
+ }
25027
+ }
24986
25028
 
24987
25029
 
24988
25030
  /***/ }),
@@ -26602,7 +26644,7 @@ class backspace extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin
26602
26644
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
26603
26645
  return false;
26604
26646
  }
26605
- (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W)(jodit, fakeNode, backspace);
26647
+ (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
26606
26648
  if (_cases__WEBPACK_IMPORTED_MODULE_6__/* .cases */ .C.some((func) => {
26607
26649
  if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__/* .isFunction */ .T)(func) &&
26608
26650
  func(jodit, fakeNode, backspace, mode)) {
@@ -26861,22 +26903,15 @@ function checkNotCollapsed(jodit) {
26861
26903
  * @private
26862
26904
  */
26863
26905
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26864
- var _a, _b, _c;
26906
+ var _a, _b;
26865
26907
  const step = backspace ? -1 : 1;
26866
26908
  const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
26867
- let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace), removeNeighbor = null;
26868
- let charRemoved = false, removed;
26869
- const getNextInlineSibling = (sibling) => {
26870
- let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
26871
- if (!nextSibling &&
26872
- sibling.parentNode &&
26873
- sibling.parentNode !== jodit.editor) {
26874
- nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, jodit.editor, true);
26875
- }
26876
- return nextSibling;
26877
- };
26909
+ let sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
26910
+ let removeNeighbor = null;
26911
+ let charRemoved = false;
26912
+ let removed;
26878
26913
  if (!sibling) {
26879
- sibling = getNextInlineSibling(fakeNode);
26914
+ sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
26880
26915
  }
26881
26916
  while (sibling && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(sibling) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling))) {
26882
26917
  while (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)) {
@@ -26886,57 +26921,17 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26886
26921
  break;
26887
26922
  }
26888
26923
  if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
26889
- // For Unicode escapes
26890
- let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
26891
- const length = value.length;
26892
- let index = backspace ? length - 1 : 0;
26893
- if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26894
- while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26895
- index += step;
26896
- }
26897
- }
26898
- removed = value[index];
26899
- if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26900
- index += step;
26901
- while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26902
- index += step;
26903
- }
26904
- index += backspace ? 1 : -1;
26905
- }
26906
- if (backspace && index < 0) {
26907
- value = [];
26908
- }
26909
- else {
26910
- value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
26911
- }
26912
- if (!anotherSibling ||
26913
- !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
26914
- (!backspace ? / $/ : /^ /).test((_b = anotherSibling.nodeValue) !== null && _b !== void 0 ? _b : '') ||
26915
- !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
26916
- for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
26917
- if (value[i] === ' ') {
26918
- value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
26919
- }
26920
- else {
26921
- break;
26922
- }
26923
- }
26924
- }
26925
- sibling.nodeValue = value.join('');
26924
+ removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
26926
26925
  }
26927
- if (!((_c = sibling.nodeValue) === null || _c === void 0 ? void 0 : _c.length)) {
26926
+ if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
26928
26927
  removeNeighbor = sibling;
26929
26928
  }
26930
26929
  if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26930
+ checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit);
26931
26931
  charRemoved = true;
26932
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before, sibling, fakeNode);
26933
- if (mode === 'sentence' ||
26934
- (mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
26935
- checkRemoveChar(jodit, fakeNode, backspace, mode);
26936
- }
26937
26932
  break;
26938
26933
  }
26939
- const nextSibling = getNextInlineSibling(sibling);
26934
+ const nextSibling = getNextInlineSibling(sibling, backspace, jodit.editor);
26940
26935
  if (removeNeighbor) {
26941
26936
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(removeNeighbor);
26942
26937
  removeNeighbor = null;
@@ -26958,6 +26953,13 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26958
26953
  }
26959
26954
  return charRemoved;
26960
26955
  }
26956
+ function getNextInlineSibling(sibling, backspace, root) {
26957
+ let nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
26958
+ if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
26959
+ nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, root, true);
26960
+ }
26961
+ return nextSibling;
26962
+ }
26961
26963
  /**
26962
26964
  * Helper removes all empty inline parents
26963
26965
  */
@@ -26982,6 +26984,57 @@ function addBRInsideEmptyBlock(jodit, node) {
26982
26984
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(node, jodit.createInside.element('br'));
26983
26985
  }
26984
26986
  }
26987
+ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
26988
+ // For Unicode escapes
26989
+ let value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
26990
+ const length = value.length;
26991
+ let index = backspace ? length - 1 : 0;
26992
+ if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26993
+ while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26994
+ index += step;
26995
+ }
26996
+ }
26997
+ const removed = value[index];
26998
+ if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
26999
+ index += step;
27000
+ while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
27001
+ index += step;
27002
+ }
27003
+ index += backspace ? 1 : -1;
27004
+ }
27005
+ if (backspace && index < 0) {
27006
+ value = [];
27007
+ }
27008
+ else {
27009
+ value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
27010
+ }
27011
+ replaceSpaceOnNBSP(anotherSibling, backspace, value);
27012
+ sibling.nodeValue = value.join('');
27013
+ return removed;
27014
+ }
27015
+ function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
27016
+ var _a;
27017
+ if (!anotherSibling ||
27018
+ !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
27019
+ (!backspace ? / $/ : /^ /).test((_a = anotherSibling.nodeValue) !== null && _a !== void 0 ? _a : '') ||
27020
+ !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
27021
+ for (let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
27022
+ if (value[i] === ' ') {
27023
+ value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
27024
+ }
27025
+ else {
27026
+ break;
27027
+ }
27028
+ }
27029
+ }
27030
+ }
27031
+ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
27032
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after : jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before, sibling, fakeNode);
27033
+ if (mode === 'sentence' ||
27034
+ (mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
27035
+ checkRemoveChar(jodit, fakeNode, backspace, mode);
27036
+ }
27037
+ }
26985
27038
 
26986
27039
 
26987
27040
  /***/ }),
@@ -27019,7 +27072,7 @@ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
27019
27072
  !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isContentEditable(neighbor, jodit.editor)) {
27020
27073
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before : jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after, neighbor, fakeNode);
27021
27074
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(neighbor);
27022
- (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W)(jodit, fakeNode, backspace);
27075
+ (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
27023
27076
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
27024
27077
  return true;
27025
27078
  }
@@ -29881,45 +29934,11 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
29881
29934
  const sel = this.j.s.sel;
29882
29935
  const range = this.bufferRange ||
29883
29936
  (sel && sel.rangeCount ? sel.getRangeAt(0) : null);
29884
- let fragment = null;
29885
- if (!this.draggable && range) {
29886
- fragment = this.isCopyMode
29887
- ? range.cloneContents()
29888
- : range.extractContents();
29889
- }
29890
- else if (this.draggable) {
29891
- if (this.isCopyMode) {
29892
- const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
29893
- ? ['a', 'href']
29894
- : ['img', 'src'];
29895
- fragment = this.j.createInside.element(tagName);
29896
- fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
29897
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
29898
- '');
29899
- if (tagName === 'a') {
29900
- fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
29901
- }
29902
- }
29903
- else {
29904
- fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
29905
- }
29906
- }
29907
- else if (this.getText(event)) {
29908
- fragment = this.j.createInside.fromHTML(this.getText(event));
29909
- }
29937
+ const fragment = this.__getWorkFragment(range, event);
29910
29938
  sel && sel.removeAllRanges();
29911
29939
  this.j.s.insertCursorAtPoint(event.clientX, event.clientY);
29912
29940
  if (fragment) {
29913
- this.j.s.insertNode(fragment, false, false);
29914
- if (range && fragment.firstChild && fragment.lastChild) {
29915
- range.setStartBefore(fragment.firstChild);
29916
- range.setEndAfter(fragment.lastChild);
29917
- this.j.s.selectRange(range);
29918
- this.j.e.fire('synchro');
29919
- }
29920
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
29921
- this.j.e.fire('afterInsertImage', fragment);
29922
- }
29941
+ this.__insertFragment.call(this, fragment, range);
29923
29942
  }
29924
29943
  event.preventDefault();
29925
29944
  event.stopPropagation();
@@ -29927,6 +29946,47 @@ class dragAndDrop extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
29927
29946
  this.isFragmentFromEditor = false;
29928
29947
  this.removeDragListeners();
29929
29948
  }
29949
+ __getWorkFragment(range, event) {
29950
+ let fragment = null;
29951
+ if (!this.draggable && range) {
29952
+ fragment = this.isCopyMode
29953
+ ? range.cloneContents()
29954
+ : range.extractContents();
29955
+ }
29956
+ else if (this.draggable) {
29957
+ if (this.isCopyMode) {
29958
+ const [tagName, field] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
29959
+ ? ['a', 'href']
29960
+ : ['img', 'src'];
29961
+ fragment = this.j.createInside.element(tagName);
29962
+ fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
29963
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
29964
+ '');
29965
+ if (tagName === 'a') {
29966
+ fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
29967
+ }
29968
+ }
29969
+ else {
29970
+ fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
29971
+ }
29972
+ }
29973
+ else if (this.getText(event)) {
29974
+ fragment = this.j.createInside.fromHTML(this.getText(event));
29975
+ }
29976
+ return fragment;
29977
+ }
29978
+ __insertFragment(fragment, range) {
29979
+ this.j.s.insertNode(fragment, false, false);
29980
+ if (range && fragment.firstChild && fragment.lastChild) {
29981
+ range.setStartBefore(fragment.firstChild);
29982
+ range.setEndAfter(fragment.lastChild);
29983
+ this.j.s.selectRange(range);
29984
+ this.j.e.fire('synchro');
29985
+ }
29986
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
29987
+ this.j.e.fire('afterInsertImage', fragment);
29988
+ }
29989
+ }
29930
29990
  /** @override */
29931
29991
  beforeDestruct() {
29932
29992
  this.onDragEnd();
@@ -35649,35 +35709,7 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
35649
35709
  if (link) {
35650
35710
  url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href') || '';
35651
35711
  if (modeClassName) {
35652
- switch (modeClassName) {
35653
- case 'input':
35654
- if (className_input) {
35655
- className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
35656
- }
35657
- break;
35658
- case 'select':
35659
- if (className_select) {
35660
- for (let i = 0; i < className_select.selectedOptions.length; i++) {
35661
- const option = className_select.options.item(i);
35662
- if (option) {
35663
- option.selected = false;
35664
- }
35665
- }
35666
- const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
35667
- classNames.split(' ').forEach(className => {
35668
- if (className) {
35669
- for (let i = 0; i < className_select.options.length; i++) {
35670
- const option = className_select.options.item(i);
35671
- if ((option === null || option === void 0 ? void 0 : option.value) &&
35672
- option.value === className) {
35673
- option.selected = true;
35674
- }
35675
- }
35676
- }
35677
- });
35678
- }
35679
- break;
35680
- }
35712
+ readClassnames(modeClassName, className_input, link, className_select);
35681
35713
  }
35682
35714
  if (openInNewTabCheckbox && target_checkbox) {
35683
35715
  target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'target') === '_blank';
@@ -35738,44 +35770,10 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
35738
35770
  links = [link];
35739
35771
  }
35740
35772
  links.forEach(a => {
35741
- var _a;
35742
35773
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', url_input.value);
35743
- if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
35744
- if (modeClassName === 'input') {
35745
- if (className_input.value === '' &&
35746
- a.hasAttribute('class')) {
35747
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
35748
- }
35749
- if (className_input.value !== '') {
35750
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
35751
- }
35752
- }
35753
- else if (modeClassName === 'select') {
35754
- if (a.hasAttribute('class')) {
35755
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
35756
- }
35757
- for (let i = 0; i < className_select.selectedOptions.length; i++) {
35758
- const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
35759
- if (className) {
35760
- a.classList.add(className);
35761
- }
35762
- }
35763
- }
35764
- }
35774
+ writeClasses(modeClassName, className_input, className_select, a);
35765
35775
  if (!isImageContent) {
35766
- let newContent = a.textContent;
35767
- if (content_input.value.trim().length) {
35768
- if (textWasChanged) {
35769
- newContent = content_input.value;
35770
- }
35771
- }
35772
- else {
35773
- newContent = url_input.value;
35774
- }
35775
- const content = a.textContent;
35776
- if (newContent !== content) {
35777
- a.textContent = newContent;
35778
- }
35776
+ writeImage(a, content_input, textWasChanged, url_input);
35779
35777
  }
35780
35778
  if (openInNewTabCheckbox && target_checkbox) {
35781
35779
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
@@ -35820,6 +35818,75 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
35820
35818
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
35821
35819
  ], link.prototype, "__generateForm", null);
35822
35820
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
35821
+ function writeClasses(modeClassName, className_input, className_select, a) {
35822
+ var _a;
35823
+ if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
35824
+ if (modeClassName === 'input') {
35825
+ if (className_input.value === '' && a.hasAttribute('class')) {
35826
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
35827
+ }
35828
+ if (className_input.value !== '') {
35829
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
35830
+ }
35831
+ }
35832
+ else if (modeClassName === 'select') {
35833
+ if (a.hasAttribute('class')) {
35834
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
35835
+ }
35836
+ for (let i = 0; i < className_select.selectedOptions.length; i++) {
35837
+ const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
35838
+ if (className) {
35839
+ a.classList.add(className);
35840
+ }
35841
+ }
35842
+ }
35843
+ }
35844
+ }
35845
+ function readClassnames(modeClassName, className_input, link, className_select) {
35846
+ switch (modeClassName) {
35847
+ case 'input':
35848
+ if (className_input) {
35849
+ className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
35850
+ }
35851
+ break;
35852
+ case 'select':
35853
+ if (className_select) {
35854
+ for (let i = 0; i < className_select.selectedOptions.length; i++) {
35855
+ const option = className_select.options.item(i);
35856
+ if (option) {
35857
+ option.selected = false;
35858
+ }
35859
+ }
35860
+ const classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
35861
+ classNames.split(' ').forEach(className => {
35862
+ if (className) {
35863
+ for (let i = 0; i < className_select.options.length; i++) {
35864
+ const option = className_select.options.item(i);
35865
+ if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
35866
+ option.selected = true;
35867
+ }
35868
+ }
35869
+ }
35870
+ });
35871
+ }
35872
+ break;
35873
+ }
35874
+ }
35875
+ function writeImage(a, content_input, textWasChanged, url_input) {
35876
+ let newContent = a.textContent;
35877
+ if (content_input.value.trim().length) {
35878
+ if (textWasChanged) {
35879
+ newContent = content_input.value;
35880
+ }
35881
+ }
35882
+ else {
35883
+ newContent = url_input.value;
35884
+ }
35885
+ const content = a.textContent;
35886
+ if (newContent !== content) {
35887
+ a.textContent = newContent;
35888
+ }
35889
+ }
35823
35890
 
35824
35891
 
35825
35892
  /***/ }),
@@ -38664,7 +38731,6 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
38664
38731
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
38665
38732
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
38666
38733
  /* harmony export */ });
38667
- /* unused harmony export isSelectionWrapper */
38668
38734
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
38669
38735
  /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52989);
38670
38736
  /*!
@@ -38686,60 +38752,14 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
38686
38752
  rng.endContainer.nodeValue == null) {
38687
38753
  return;
38688
38754
  }
38689
- if (jodit.o.search.useCustomHighlightAPI &&
38690
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
38691
- typeof window.Highlight !== 'undefined') {
38692
- const ranges = [rng, ...restRanges].map(rng => {
38693
- const range = jodit.selection.createRange();
38694
- range.setStart(rng.startContainer, rng.startOffset);
38695
- range.setEnd(rng.endContainer, rng.endOffset);
38696
- return range;
38697
- });
38698
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
38699
- const searchHighlight = new Highlight(...ranges);
38700
- // @ts-ignore
38701
- CSS.highlights.clear();
38702
- // @ts-ignore
38703
- CSS.highlights.set('jodit-search-result', searchHighlight);
38704
- restRanges.length = 0;
38755
+ if (checkNativeSelectionMethod(jodit, rng, restRanges)) {
38705
38756
  return;
38706
38757
  }
38707
38758
  const span = ci.element('span', {
38708
38759
  [TMP_ATTR]: true
38709
38760
  });
38710
38761
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
38711
- const startText = rng.startContainer.nodeValue;
38712
- let diff = 0;
38713
- if (rng.startOffset !== 0) {
38714
- const text = ci.text(startText.substring(0, rng.startOffset));
38715
- rng.startContainer.nodeValue = startText.substring(rng.startOffset);
38716
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
38717
- if (rng.startContainer === rng.endContainer) {
38718
- diff = rng.startOffset;
38719
- rng.endOffset -= diff;
38720
- }
38721
- rng.startOffset = 0;
38722
- }
38723
- const endText = rng.endContainer.nodeValue;
38724
- if (rng.endOffset !== endText.length) {
38725
- const text = ci.text(endText.substring(rng.endOffset));
38726
- rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
38727
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
38728
- for (const range of restRanges) {
38729
- if (range.startContainer === rng.endContainer) {
38730
- range.startContainer = text;
38731
- range.startOffset = range.startOffset - rng.endOffset - diff;
38732
- if (range.endContainer === rng.endContainer) {
38733
- range.endContainer = text;
38734
- range.endOffset = range.endOffset - rng.endOffset - diff;
38735
- }
38736
- }
38737
- else {
38738
- break;
38739
- }
38740
- }
38741
- rng.endOffset = rng.endContainer.nodeValue.length;
38742
- }
38762
+ normalizeRanges(rng, restRanges, ci);
38743
38763
  let next = rng.startContainer;
38744
38764
  do {
38745
38765
  if (!next) {
@@ -38785,6 +38805,61 @@ function clearSelectionWrappersFromHTML(root) {
38785
38805
  function isSelectionWrapper(node) {
38786
38806
  return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
38787
38807
  }
38808
+ function checkNativeSelectionMethod(jodit, rng, restRanges) {
38809
+ if (jodit.o.search.useCustomHighlightAPI &&
38810
+ // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
38811
+ typeof window.Highlight !== 'undefined') {
38812
+ const ranges = [rng, ...restRanges].map(rng => {
38813
+ const range = jodit.selection.createRange();
38814
+ range.setStart(rng.startContainer, rng.startOffset);
38815
+ range.setEnd(rng.endContainer, rng.endOffset);
38816
+ return range;
38817
+ });
38818
+ // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
38819
+ const searchHighlight = new Highlight(...ranges);
38820
+ // @ts-ignore
38821
+ CSS.highlights.clear();
38822
+ // @ts-ignore
38823
+ CSS.highlights.set('jodit-search-result', searchHighlight);
38824
+ restRanges.length = 0;
38825
+ return true;
38826
+ }
38827
+ return false;
38828
+ }
38829
+ function normalizeRanges(rng, restRanges, ci) {
38830
+ const startText = rng.startContainer.nodeValue;
38831
+ let diff = 0;
38832
+ if (rng.startOffset !== 0) {
38833
+ const text = ci.text(startText.substring(0, rng.startOffset));
38834
+ rng.startContainer.nodeValue = startText.substring(rng.startOffset);
38835
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
38836
+ if (rng.startContainer === rng.endContainer) {
38837
+ diff = rng.startOffset;
38838
+ rng.endOffset -= diff;
38839
+ }
38840
+ rng.startOffset = 0;
38841
+ }
38842
+ const endText = rng.endContainer.nodeValue;
38843
+ if (rng.endOffset !== endText.length) {
38844
+ const text = ci.text(endText.substring(rng.endOffset));
38845
+ rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
38846
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
38847
+ for (const range of restRanges) {
38848
+ if (range.startContainer === rng.endContainer) {
38849
+ range.startContainer = text;
38850
+ range.startOffset = range.startOffset - rng.endOffset - diff;
38851
+ if (range.endContainer === rng.endContainer) {
38852
+ range.endContainer = text;
38853
+ range.endOffset = range.endOffset - rng.endOffset - diff;
38854
+ }
38855
+ }
38856
+ else {
38857
+ break;
38858
+ }
38859
+ }
38860
+ rng.endOffset = rng.endContainer.nodeValue.length;
38861
+ }
38862
+ }
38788
38863
 
38789
38864
 
38790
38865
  /***/ }),
@@ -42986,38 +43061,10 @@ function tableKeyboardNavigation(editor) {
42986
43061
  .off('.tableKeyboardNavigation')
42987
43062
  .on('keydown.tableKeyboardNavigation', (event) => {
42988
43063
  const { key } = event;
42989
- if (!WORK_KEYS.has(key)) {
42990
- return;
42991
- }
42992
- const current = editor.s.current();
42993
- if (!current) {
42994
- return;
42995
- }
42996
- const cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.up(current, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isCell, editor.editor);
43064
+ const cell = findCell(editor, key);
42997
43065
  if (!cell) {
42998
43066
  return;
42999
43067
  }
43000
- const { range } = editor.s;
43001
- if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
43002
- const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
43003
- const hasNext = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(!isNextDirection ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.prev : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.next, current, elm => key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
43004
- ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
43005
- : Boolean(elm), cell);
43006
- if ((!isNextDirection &&
43007
- (hasNext ||
43008
- (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
43009
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
43010
- range.startOffset !== 0))) ||
43011
- (isNextDirection &&
43012
- (hasNext ||
43013
- (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
43014
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
43015
- current.nodeValue &&
43016
- range.startOffset !==
43017
- current.nodeValue.length)))) {
43018
- return;
43019
- }
43020
- }
43021
43068
  const tableModule = editor.getInstance(jodit_modules_table_table__WEBPACK_IMPORTED_MODULE_4__/* .Table */ .X, editor.o);
43022
43069
  const table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(cell, 'table', editor.editor);
43023
43070
  let next = null;
@@ -43075,6 +43122,40 @@ function tableKeyboardNavigation(editor) {
43075
43122
  });
43076
43123
  }
43077
43124
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('tableKeyboardNavigation', tableKeyboardNavigation);
43125
+ function findCell(editor, key) {
43126
+ if (!WORK_KEYS.has(key)) {
43127
+ return;
43128
+ }
43129
+ const current = editor.s.current();
43130
+ if (!current) {
43131
+ return;
43132
+ }
43133
+ const cell = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.up(current, jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isCell, editor.editor);
43134
+ if (!cell) {
43135
+ return;
43136
+ }
43137
+ const { range } = editor.s;
43138
+ if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
43139
+ const isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
43140
+ const hasNext = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)(!isNextDirection ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.prev : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.next, current, elm => key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
43141
+ ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
43142
+ : Boolean(elm), cell);
43143
+ if ((!isNextDirection &&
43144
+ (hasNext ||
43145
+ (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
43146
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
43147
+ range.startOffset !== 0))) ||
43148
+ (isNextDirection &&
43149
+ (hasNext ||
43150
+ (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
43151
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
43152
+ current.nodeValue &&
43153
+ range.startOffset !== current.nodeValue.length)))) {
43154
+ return;
43155
+ }
43156
+ }
43157
+ return cell;
43158
+ }
43078
43159
 
43079
43160
 
43080
43161
  /***/ }),