jodit-pro 4.2.11 → 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/es5/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.11
4
+ * Version: v4.2.13
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -3840,7 +3840,7 @@ __webpack_require__.r(__webpack_exports__);
3840
3840
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
3841
3841
  */
3842
3842
 
3843
- var APP_VERSION = "4.2.11";
3843
+ var APP_VERSION = "4.2.13";
3844
3844
  // prettier-ignore
3845
3845
  var ES = "es5";
3846
3846
  var IS_ES_MODERN = false;
@@ -12411,10 +12411,14 @@ var Response = /** @class */ (function () {
12411
12411
 
12412
12412
  "use strict";
12413
12413
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12414
- /* harmony export */ W: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_0__.W; }
12414
+ /* harmony export */ Qe: function() { return /* binding */ cursorInTheEdgeOfString; },
12415
+ /* harmony export */ W8: function() { return /* reexport safe */ _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__.W; },
12416
+ /* harmony export */ dY: function() { return /* binding */ findCorrectCurrentNode; }
12415
12417
  /* harmony export */ });
12416
- /* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49967);
12417
- /* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13088);
12418
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
12419
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23545);
12420
+ /* harmony import */ var _move_node_inside_start__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49967);
12421
+ /* harmony import */ var _move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13088);
12418
12422
  /*!
12419
12423
  * Jodit Editor (https://xdsoft.net/jodit/)
12420
12424
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -12427,6 +12431,55 @@ var Response = /** @class */ (function () {
12427
12431
 
12428
12432
 
12429
12433
 
12434
+ /**
12435
+ * Check if the cursor is at the edge of the string
12436
+ * @private
12437
+ */
12438
+ function cursorInTheEdgeOfString(container, offset, start, end) {
12439
+ var _a;
12440
+ var text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
12441
+ if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
12442
+ return true;
12443
+ }
12444
+ var inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
12445
+ return start && ((inv && inv[0].length < offset) || (!inv && offset > 0));
12446
+ }
12447
+ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild, child) {
12448
+ node = range.startContainer.childNodes[range.startOffset];
12449
+ if (!node) {
12450
+ node = range.startContainer.childNodes[range.startOffset - 1];
12451
+ rightMode = true;
12452
+ }
12453
+ if (node && isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
12454
+ // test Current method - Cursor in the left of some SPAN
12455
+ if (!rightMode && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node.previousSibling)) {
12456
+ node = node.previousSibling;
12457
+ }
12458
+ else if (checkChild) {
12459
+ var current = child(node);
12460
+ while (current) {
12461
+ if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current)) {
12462
+ node = current;
12463
+ break;
12464
+ }
12465
+ current = child(current);
12466
+ }
12467
+ }
12468
+ }
12469
+ if (node && !isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node)) {
12470
+ var leftChild = node, rightChild = node;
12471
+ do {
12472
+ leftChild = leftChild.firstChild;
12473
+ rightChild = rightChild.lastChild;
12474
+ } while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild));
12475
+ if (leftChild === rightChild && leftChild && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(leftChild)) {
12476
+ node = leftChild;
12477
+ }
12478
+ }
12479
+ return { node: node, rightMode: rightMode };
12480
+ }
12481
+
12482
+
12430
12483
  /***/ }),
12431
12484
 
12432
12485
  /***/ 49967:
@@ -12548,7 +12601,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
12548
12601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12549
12602
  /* harmony export */ L: function() { return /* binding */ Selection; }
12550
12603
  /* harmony export */ });
12551
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
12604
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
12552
12605
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67259);
12553
12606
  /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53557);
12554
12607
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23545);
@@ -12558,6 +12611,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
12558
12611
  /* 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__);
12559
12612
  /* harmony import */ var jodit_core_selection_helpers_move_the_node_along_the_edge_outward__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13088);
12560
12613
  /* harmony import */ var _style_commit_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11232);
12614
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92185);
12561
12615
  /*!
12562
12616
  * Jodit Editor (https://xdsoft.net/jodit/)
12563
12617
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -12574,6 +12628,7 @@ function moveTheNodeAlongTheEdgeOutward(node, start, root) {
12574
12628
 
12575
12629
 
12576
12630
 
12631
+
12577
12632
  var Selection = /** @class */ (function () {
12578
12633
  function Selection(jodit) {
12579
12634
  var _this = this;
@@ -12869,7 +12924,7 @@ var Selection = /** @class */ (function () {
12869
12924
  if (!nodes.length) {
12870
12925
  return;
12871
12926
  }
12872
- var _e = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__read */ .zs)(nodes, 2), fakeLeft = _e[0], fakeRight = _e[1];
12927
+ var _e = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__read */ .zs)(nodes, 2), fakeLeft = _e[0], fakeRight = _e[1];
12873
12928
  var range = this.createRange();
12874
12929
  range.setStartAfter(fakeLeft);
12875
12930
  if (fakeRight) {
@@ -13014,65 +13069,37 @@ var Selection = /** @class */ (function () {
13014
13069
  if (checkChild === void 0) {
13015
13070
  checkChild = true;
13016
13071
  }
13017
- if (this.j.getRealMode() === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
13018
- var sel = this.sel;
13019
- if (!sel || sel.rangeCount === 0) {
13020
- return null;
13021
- }
13022
- var range = sel.getRangeAt(0);
13023
- var node = range.startContainer, rightMode_1 = false;
13024
- var child = function (nd) {
13025
- return rightMode_1 ? nd.lastChild : nd.firstChild;
13026
- };
13027
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
13028
- return node;
13029
- }
13030
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
13031
- node = range.startContainer.childNodes[range.startOffset];
13032
- if (!node) {
13033
- node =
13034
- range.startContainer.childNodes[range.startOffset - 1];
13035
- rightMode_1 = true;
13036
- }
13037
- if (node && sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
13038
- // test Current method - Cursor in the left of some SPAN
13039
- if (!rightMode_1 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node.previousSibling)) {
13040
- node = node.previousSibling;
13041
- }
13042
- else if (checkChild) {
13043
- var current = child(node);
13044
- while (current) {
13045
- if (current && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(current)) {
13046
- node = current;
13047
- break;
13048
- }
13049
- current = child(current);
13050
- }
13051
- }
13052
- }
13053
- if (node && !sel.isCollapsed && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
13054
- var leftChild = node, rightChild = node;
13055
- do {
13056
- leftChild = leftChild.firstChild;
13057
- rightChild = rightChild.lastChild;
13058
- } while (leftChild && rightChild && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild));
13059
- if (leftChild === rightChild &&
13060
- leftChild &&
13061
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(leftChild)) {
13062
- node = leftChild;
13063
- }
13064
- }
13065
- }
13066
- // check - cursor inside editor
13067
- if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
13068
- return node;
13069
- }
13072
+ if (this.j.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
13073
+ return null;
13074
+ }
13075
+ var sel = this.sel;
13076
+ if (!sel || sel.rangeCount === 0) {
13077
+ return null;
13078
+ }
13079
+ var range = sel.getRangeAt(0);
13080
+ var node = range.startContainer;
13081
+ var rightMode = false;
13082
+ var child = function (nd) {
13083
+ return rightMode ? nd.lastChild : nd.firstChild;
13084
+ };
13085
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(node, 'br') && sel.isCollapsed) {
13086
+ return node;
13087
+ }
13088
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(node)) {
13089
+ var ret = (0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .findCorrectCurrentNode */ .dY)(node, range, rightMode, sel.isCollapsed, checkChild, child);
13090
+ node = ret.node;
13091
+ rightMode = ret.rightMode;
13092
+ }
13093
+ // check - cursor inside editor
13094
+ if (node && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, node)) {
13095
+ return node;
13070
13096
  }
13071
13097
  return null;
13072
13098
  };
13073
13099
  /**
13074
13100
  * Insert element in editor
13075
13101
  *
13102
+ * @param node - Node for insert
13076
13103
  * @param insertCursorAfter - After insert, cursor will move after element
13077
13104
  * @param fireChange - After insert, editor fire change event. You can prevent this behavior
13078
13105
  */
@@ -13141,6 +13168,7 @@ var Selection = /** @class */ (function () {
13141
13168
  * Inserts in the current cursor position some HTML snippet
13142
13169
  *
13143
13170
  * @param html - HTML The text to be inserted into the document
13171
+ * @param insertCursorAfter - After insert, cursor will move after element
13144
13172
  * @example
13145
13173
  * ```javascript
13146
13174
  * parent.s.insertHTML('<img src="image.png"/>');
@@ -13187,6 +13215,7 @@ var Selection = /** @class */ (function () {
13187
13215
  *
13188
13216
  * @param url - URL for image, or HTMLImageElement
13189
13217
  * @param styles - If specified, it will be applied <code>$(image).css(styles)</code>
13218
+ * @param defaultWidth - If specified, it will be applied <code>css('width', defaultWidth)</code>
13190
13219
  */
13191
13220
  Selection.prototype.insertImage = function (url, styles, defaultWidth) {
13192
13221
  if (styles === void 0) {
@@ -13249,74 +13278,81 @@ var Selection = /** @class */ (function () {
13249
13278
  var _this = this;
13250
13279
  var _a;
13251
13280
  var sel = this.sel;
13252
- if (sel && sel.rangeCount) {
13253
- var range = sel.getRangeAt(0);
13254
- var root_1 = range.commonAncestorContainer;
13255
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root_1)) {
13256
- root_1 = root_1.parentElement;
13257
- }
13258
- var nodes_1 = [], startOffset = range.startOffset, length = root_1.childNodes.length, elementOffset = startOffset < length ? startOffset : length - 1;
13259
- var start = range.startContainer === this.area
13260
- ? root_1.childNodes[elementOffset]
13261
- : range.startContainer, end_1 = range.endContainer === this.area
13262
- ? root_1.childNodes[range.endOffset - 1]
13263
- : range.endContainer;
13264
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
13265
- start === range.startContainer &&
13266
- range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
13267
- start.nextSibling) {
13268
- start = start.nextSibling;
13269
- }
13270
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end_1) &&
13271
- end_1 === range.endContainer &&
13272
- range.endOffset === 0 &&
13273
- end_1.previousSibling) {
13274
- end_1 = end_1.previousSibling;
13275
- }
13276
- var checkElm_1 = function (node) {
13277
- if (node &&
13278
- node !== root_1 &&
13279
- !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
13280
- !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
13281
- nodes_1.push(node);
13282
- }
13283
- };
13284
- checkElm_1(start);
13285
- if (start !== end_1 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root_1, start, true)) {
13286
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, function (node) {
13287
- checkElm_1(node);
13288
- // checks parentElement as well because partial selections are not equal to entire element
13289
- return (node === end_1 ||
13290
- (node && node.contains && node.contains(end_1)));
13291
- }, root_1, true, false);
13292
- }
13293
- var forEvery_1 = function (current) {
13294
- if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(_this.j.editor, current, true)) {
13295
- return;
13296
- }
13297
- if (current.nodeName.match(/^(UL|OL)$/)) {
13298
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery_1);
13281
+ if (!sel || !sel.rangeCount) {
13282
+ return;
13283
+ }
13284
+ var range = sel.getRangeAt(0);
13285
+ var root = range.commonAncestorContainer;
13286
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isHTMLElement(root)) {
13287
+ root = root.parentElement;
13288
+ }
13289
+ var nodes = [];
13290
+ var startOffset = range.startOffset;
13291
+ var length = root.childNodes.length;
13292
+ var elementOffset = startOffset < length ? startOffset : length - 1;
13293
+ var start = range.startContainer === this.area
13294
+ ? root.childNodes[elementOffset]
13295
+ : range.startContainer;
13296
+ var end = range.endContainer === this.area
13297
+ ? root.childNodes[range.endOffset - 1]
13298
+ : range.endContainer;
13299
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) &&
13300
+ start === range.startContainer &&
13301
+ range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) &&
13302
+ start.nextSibling) {
13303
+ start = start.nextSibling;
13304
+ }
13305
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) &&
13306
+ end === range.endContainer &&
13307
+ range.endOffset === 0 &&
13308
+ end.previousSibling) {
13309
+ end = end.previousSibling;
13310
+ }
13311
+ var checkElm = function (node) {
13312
+ if (node &&
13313
+ node !== root &&
13314
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node) &&
13315
+ !(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_4__/* .isMarker */ .rg)(node)) {
13316
+ nodes.push(node);
13317
+ }
13318
+ };
13319
+ checkElm(start);
13320
+ if (start !== end && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(root, start, true)) {
13321
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.find(start, function (node) {
13322
+ checkElm(node);
13323
+ // checks parentElement as well because partial selections are not equal to entire element
13324
+ return (node === end ||
13325
+ (node && node.contains && node.contains(end)));
13326
+ }, root, true, false);
13327
+ }
13328
+ var forEvery = function (current) {
13329
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(_this.j.editor, current, true)) {
13330
+ return;
13331
+ }
13332
+ if (current.nodeName.match(/^(UL|OL)$/)) {
13333
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.toArray)(current.childNodes).forEach(forEvery);
13334
+ }
13335
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
13336
+ if (current.firstChild) {
13337
+ current = current.firstChild;
13299
13338
  }
13300
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(current, 'li')) {
13301
- if (current.firstChild) {
13302
- current = current.firstChild;
13303
- }
13304
- else {
13305
- var currentB = _this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
13306
- current.appendChild(currentB);
13307
- current = currentB;
13308
- }
13339
+ else {
13340
+ var currentB = _this.j.createInside.text(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE);
13341
+ current.appendChild(currentB);
13342
+ current = currentB;
13309
13343
  }
13310
- callback(current);
13311
- };
13312
- if (nodes_1.length === 0 && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
13313
- nodes_1.push(start);
13314
13344
  }
13315
- if (nodes_1.length === 0 && start.firstChild) {
13316
- nodes_1.push(start.firstChild);
13345
+ callback(current);
13346
+ };
13347
+ if (nodes.length === 0) {
13348
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(start)) {
13349
+ nodes.push(start);
13350
+ }
13351
+ if (start.firstChild) {
13352
+ nodes.push(start.firstChild);
13317
13353
  }
13318
- nodes_1.forEach(forEvery_1);
13319
13354
  }
13355
+ nodes.forEach(forEvery);
13320
13356
  };
13321
13357
  /**
13322
13358
  * Checks if the cursor is at the end(start) block
@@ -13329,7 +13365,7 @@ var Selection = /** @class */ (function () {
13329
13365
  */
13330
13366
  Selection.prototype.cursorInTheEdge = function (start, parentBlock, fake) {
13331
13367
  var _this = this;
13332
- var _a, _b;
13368
+ var _a;
13333
13369
  if (fake === void 0) {
13334
13370
  fake = null;
13335
13371
  }
@@ -13350,13 +13386,7 @@ var Selection = /** @class */ (function () {
13350
13386
  };
13351
13387
  // check right offset
13352
13388
  if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(container)) {
13353
- var text = ((_b = container.nodeValue) === null || _b === void 0 ? void 0 : _b.length) ? container.nodeValue : '';
13354
- if (end && text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
13355
- return false;
13356
- }
13357
- var inv = (0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
13358
- if (start &&
13359
- ((inv && inv[0].length < offset) || (!inv && offset > 0))) {
13389
+ if ((0,_helpers__WEBPACK_IMPORTED_MODULE_8__/* .cursorInTheEdgeOfString */ .Qe)(container, offset, start, end)) {
13360
13390
  return false;
13361
13391
  }
13362
13392
  }
@@ -13448,6 +13478,7 @@ var Selection = /** @class */ (function () {
13448
13478
  };
13449
13479
  /**
13450
13480
  * Set cursor in the node
13481
+ * @param node - Node element
13451
13482
  * @param inStart - set cursor in start of element
13452
13483
  */
13453
13484
  Selection.prototype.setCursorIn = function (node, inStart) {
@@ -13517,6 +13548,7 @@ var Selection = /** @class */ (function () {
13517
13548
  };
13518
13549
  /**
13519
13550
  * Select node
13551
+ * @param node - Node element
13520
13552
  * @param inward - select all inside
13521
13553
  */
13522
13554
  Selection.prototype.select = function (node, inward) {
@@ -13564,7 +13596,7 @@ var Selection = /** @class */ (function () {
13564
13596
  Selection.prototype.wrapInTagGen = function (fakes) {
13565
13597
  var font, elms, elms_1, elms_1_1, font, firstChild, lastChild, e_1_1;
13566
13598
  var e_1, _a;
13567
- return (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__generator */ .YH)(this, function (_b) {
13599
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__generator */ .YH)(this, function (_b) {
13568
13600
  switch (_b.label) {
13569
13601
  case 0:
13570
13602
  if (!this.isCollapsed())
@@ -13597,7 +13629,7 @@ var Selection = /** @class */ (function () {
13597
13629
  _b.label = 3;
13598
13630
  case 3:
13599
13631
  _b.trys.push([3, 8, 9, 10]);
13600
- elms_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__values */ .Ju)(elms), elms_1_1 = elms_1.next();
13632
+ elms_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__values */ .Ju)(elms), elms_1_1 = elms_1.next();
13601
13633
  _b.label = 4;
13602
13634
  case 4:
13603
13635
  if (!!elms_1_1.done)
@@ -13650,7 +13682,7 @@ var Selection = /** @class */ (function () {
13650
13682
  var e_2, _a;
13651
13683
  var result = [];
13652
13684
  try {
13653
- for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__values */ .Ju)(this.wrapInTagGen()), _c = _b.next(); !_c.done; _c = _b.next()) {
13685
+ for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__values */ .Ju)(this.wrapInTagGen()), _c = _b.next(); !_c.done; _c = _b.next()) {
13654
13686
  var font = _c.value;
13655
13687
  try {
13656
13688
  if (font.firstChild &&
@@ -13858,19 +13890,19 @@ var Selection = /** @class */ (function () {
13858
13890
  }
13859
13891
  return this;
13860
13892
  };
13861
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
13893
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
13862
13894
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
13863
13895
  ], Selection.prototype, "createRange", null);
13864
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
13896
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
13865
13897
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
13866
13898
  ], Selection.prototype, "focus", null);
13867
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
13899
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
13868
13900
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
13869
13901
  ], Selection.prototype, "setCursorAfter", null);
13870
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
13902
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
13871
13903
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
13872
13904
  ], Selection.prototype, "setCursorBefore", null);
13873
- (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
13905
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
13874
13906
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
13875
13907
  ], Selection.prototype, "setCursorIn", null);
13876
13908
  return Selection;
@@ -19175,17 +19207,17 @@ View.defaultOptions = {
19175
19207
 
19176
19208
  "use strict";
19177
19209
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19178
- /* harmony export */ x: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_6__.x; }
19210
+ /* harmony export */ x: function() { return /* reexport safe */ _jodit__WEBPACK_IMPORTED_MODULE_0__.x; }
19179
19211
  /* harmony export */ });
19180
19212
  /* unused harmony export CommitMode */
19181
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58588);
19182
- /* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22743);
19213
+ /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90268);
19214
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58588);
19183
19215
  /* harmony import */ var _core_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67259);
19184
19216
  /* harmony import */ var _core_decorators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53557);
19185
19217
  /* harmony import */ var _modules___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35102);
19186
19218
  /* harmony import */ var _styles_icons___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97186);
19187
- /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90268);
19188
- /* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(459);
19219
+ /* harmony import */ var _languages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(459);
19220
+ /* harmony import */ var jodit_plugins_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22743);
19189
19221
  /*!
19190
19222
  * Jodit Editor (https://xdsoft.net/jodit/)
19191
19223
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -19196,6 +19228,7 @@ View.defaultOptions = {
19196
19228
  * @packageDocumentation
19197
19229
  * @module jodit
19198
19230
  */
19231
+ // eslint-disable-next-line simple-import-sort/imports
19199
19232
 
19200
19233
 
19201
19234
 
@@ -19215,7 +19248,7 @@ if (typeof process !== 'undefined' &&
19215
19248
  // JODIT-SECTION-END:POLYFILLS
19216
19249
  // copy constants in Jodit
19217
19250
  Object.keys(_core_constants__WEBPACK_IMPORTED_MODULE_2__).forEach(function (key) {
19218
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
19251
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _core_constants__WEBPACK_IMPORTED_MODULE_2__[key];
19219
19252
  });
19220
19253
  var esFilter = function (key) { return key !== '__esModule'; };
19221
19254
  // Icons
@@ -19231,32 +19264,32 @@ Object.keys(_modules___WEBPACK_IMPORTED_MODULE_4__)
19231
19264
  var _a;
19232
19265
  // @ts-ignore
19233
19266
  var module = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
19234
- var name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
19267
+ var name = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className)
19235
19268
  ? module.prototype.className()
19236
19269
  : key;
19237
- if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(name)) {
19270
+ if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
19238
19271
  console.warn('Module name must be a string', key);
19239
19272
  return;
19240
19273
  }
19241
19274
  // @ts-ignore
19242
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.modules[name] = module;
19275
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.modules[name] = module;
19243
19276
  });
19244
19277
  // Decorators
19245
19278
  Object.keys(_core_decorators__WEBPACK_IMPORTED_MODULE_3__)
19246
19279
  .filter(esFilter)
19247
19280
  .forEach(function (key) {
19248
19281
  // @ts-ignore
19249
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
19282
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.decorators[key] = _core_decorators__WEBPACK_IMPORTED_MODULE_3__[key];
19250
19283
  });
19251
19284
  ['Confirm', 'Alert', 'Prompt'].forEach(function (key) {
19252
19285
  // @ts-ignore
19253
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
19286
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x[key] = _modules___WEBPACK_IMPORTED_MODULE_4__[key];
19254
19287
  });
19255
19288
  // Languages
19256
- Object.keys(_languages__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)
19289
+ Object.keys(_languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)
19257
19290
  .filter(esFilter)
19258
19291
  .forEach(function (key) {
19259
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A[key];
19292
+ _jodit__WEBPACK_IMPORTED_MODULE_0__/* .Jodit */ .x.lang[key] = _languages__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A[key];
19260
19293
  });
19261
19294
 
19262
19295
  var CommitMode = /** @class */ (function () {
@@ -25766,6 +25799,7 @@ var Table = /** @class */ (function (_super) {
25766
25799
  };
25767
25800
  /**
25768
25801
  * Generate formal table martix columns*rows
25802
+ * @param table - Working table
25769
25803
  * @param callback - if return false cycle break
25770
25804
  */
25771
25805
  Table.prototype.formalMatrix = function (table, callback) {
@@ -25841,7 +25875,6 @@ var Table = /** @class */ (function (_super) {
25841
25875
  * @param line - Insert a new line after/before this
25842
25876
  * line contains the selected cell
25843
25877
  * @param after - Insert a new line after line contains the selected cell
25844
- * @param create - Instance of Create class
25845
25878
  */
25846
25879
  Table.prototype.appendRow = function (table, line, after) {
25847
25880
  return Table.__appendRow(table, line, after, this.j.createInside);
@@ -26010,13 +26043,36 @@ var Table = /** @class */ (function (_super) {
26010
26043
  return Table.__getSelectedBound(table, selectedCells);
26011
26044
  };
26012
26045
  Table.__normalizeTable = function (table) {
26013
- var i, j, min, not;
26014
26046
  var __marked = [], box = Table.__formalMatrix(table);
26015
- // remove extra colspans
26016
- for (j = 0; j < box[0].length; j += 1) {
26017
- min = 1000000;
26018
- not = false;
26019
- for (i = 0; i < box.length; i += 1) {
26047
+ Table.__removeExtraColspans(box, __marked);
26048
+ Table.__removeExtraRowspans(box, __marked);
26049
+ // remove rowspans and colspans equal 1 and empty class
26050
+ for (var i = 0; i < box.length; i += 1) {
26051
+ for (var j = 0; j < box[i].length; j += 1) {
26052
+ if (box[i][j] === undefined) {
26053
+ continue; // broken table
26054
+ }
26055
+ if (box[i][j].hasAttribute('rowspan') &&
26056
+ box[i][j].rowSpan === 1) {
26057
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
26058
+ }
26059
+ if (box[i][j].hasAttribute('colspan') &&
26060
+ box[i][j].colSpan === 1) {
26061
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
26062
+ }
26063
+ if (box[i][j].hasAttribute('class') &&
26064
+ !(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
26065
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
26066
+ }
26067
+ }
26068
+ }
26069
+ Table.__unmark(__marked);
26070
+ };
26071
+ Table.__removeExtraColspans = function (box, __marked) {
26072
+ for (var j = 0; j < box[0].length; j += 1) {
26073
+ var min = 1000000;
26074
+ var not = false;
26075
+ for (var i = 0; i < box.length; i += 1) {
26020
26076
  if (box[i][j] === undefined) {
26021
26077
  continue; // broken table
26022
26078
  }
@@ -26027,7 +26083,7 @@ var Table = /** @class */ (function (_super) {
26027
26083
  min = Math.min(min, box[i][j].colSpan);
26028
26084
  }
26029
26085
  if (!not) {
26030
- for (i = 0; i < box.length; i += 1) {
26086
+ for (var i = 0; i < box.length; i += 1) {
26031
26087
  if (box[i][j] === undefined) {
26032
26088
  continue; // broken table
26033
26089
  }
@@ -26035,10 +26091,13 @@ var Table = /** @class */ (function (_super) {
26035
26091
  }
26036
26092
  }
26037
26093
  }
26038
- // remove extra rowspans
26094
+ };
26095
+ Table.__removeExtraRowspans = function (box, marked) {
26096
+ var i = 0;
26097
+ var j = 0;
26039
26098
  for (i = 0; i < box.length; i += 1) {
26040
- min = 1000000;
26041
- not = false;
26099
+ var min = 1000000;
26100
+ var not = false;
26042
26101
  for (j = 0; j < box[i].length; j += 1) {
26043
26102
  if (box[i][j] === undefined) {
26044
26103
  continue; // broken table
@@ -26054,31 +26113,10 @@ var Table = /** @class */ (function (_super) {
26054
26113
  if (box[i][j] === undefined) {
26055
26114
  continue; // broken table
26056
26115
  }
26057
- Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, __marked);
26116
+ Table.__mark(box[i][j], 'rowspan', box[i][j].rowSpan - min + 1, marked);
26058
26117
  }
26059
26118
  }
26060
26119
  }
26061
- // remove rowspans and colspans equal 1 and empty class
26062
- for (i = 0; i < box.length; i += 1) {
26063
- for (j = 0; j < box[i].length; j += 1) {
26064
- if (box[i][j] === undefined) {
26065
- continue; // broken table
26066
- }
26067
- if (box[i][j].hasAttribute('rowspan') &&
26068
- box[i][j].rowSpan === 1) {
26069
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'rowspan', null);
26070
- }
26071
- if (box[i][j].hasAttribute('colspan') &&
26072
- box[i][j].colSpan === 1) {
26073
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', null);
26074
- }
26075
- if (box[i][j].hasAttribute('class') &&
26076
- !(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class')) {
26077
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'class', null);
26078
- }
26079
- }
26080
- }
26081
- Table.__unmark(__marked);
26082
26120
  };
26083
26121
  /**
26084
26122
  * Try recalculate all coluns and rows after change
@@ -27559,37 +27597,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
27559
27597
  }
27560
27598
  var promises = [];
27561
27599
  if (o.insertImageAsBase64URI) {
27562
- var file_1, i = void 0;
27563
- var _loop_1 = function () {
27564
- file_1 = fileList[i];
27565
- if (file_1 && file_1.type) {
27566
- var mime = file_1.type.match(/\/([a-z0-9]+)/i);
27567
- var extension = mime[1] ? mime[1].toLowerCase() : '';
27568
- if (o.imagesExtensions.includes(extension)) {
27569
- var reader_1 = new FileReader();
27570
- promises.push(uploader.j.async.promise(function (resolve, reject) {
27571
- reader_1.onerror = reject;
27572
- reader_1.onloadend = function () {
27573
- var resp = {
27574
- baseurl: '',
27575
- files: [reader_1.result],
27576
- isImages: [true]
27577
- };
27578
- var handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
27579
- ? handlerSuccess
27580
- : o.defaultHandlerSuccess;
27581
- handler.call(uploader, resp);
27582
- resolve(resp);
27583
- };
27584
- reader_1.readAsDataURL(file_1);
27585
- }));
27586
- fileList[i] = null;
27587
- }
27588
- }
27589
- };
27590
- for (i = 0; i < fileList.length; i += 1) {
27591
- _loop_1();
27592
- }
27600
+ readImagesWithReader(fileList, o.imagesExtensions, promises, uploader, handlerSuccess, o.defaultHandlerSuccess);
27593
27601
  }
27594
27602
  fileList = fileList.filter(function (a) { return a; });
27595
27603
  if (fileList.length) {
@@ -27600,7 +27608,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
27600
27608
  for (var i = 0; i < fileList.length; i += 1) {
27601
27609
  file = fileList[i];
27602
27610
  if (file) {
27603
- var hasRealExtension = /\.[\d\w]+$/.test(file.name);
27611
+ var hasRealExtension = /\.\w+$/.test(file.name);
27604
27612
  var mime = file.type.match(/\/([a-z0-9]+)/i);
27605
27613
  var extension = mime && mime[1] ? mime[1].toLowerCase() : '';
27606
27614
  var newName = fileList[i].name ||
@@ -27649,6 +27657,40 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
27649
27657
  }
27650
27658
  return Promise.all(promises);
27651
27659
  }
27660
+ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
27661
+ var file, i;
27662
+ var _loop_1 = function () {
27663
+ file = fileList[i];
27664
+ if (file && file.type) {
27665
+ var mime = file.type.match(/\/([a-z0-9]+)/i);
27666
+ var extension = mime[1] ? mime[1].toLowerCase() : '';
27667
+ if (!imagesExtensions.includes(extension)) {
27668
+ return "continue";
27669
+ }
27670
+ var reader_1 = new FileReader();
27671
+ promises.push(uploader.j.async.promise(function (resolve, reject) {
27672
+ reader_1.onerror = reject;
27673
+ reader_1.onloadend = function () {
27674
+ var resp = {
27675
+ baseurl: '',
27676
+ files: [reader_1.result],
27677
+ isImages: [true]
27678
+ };
27679
+ var handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess)
27680
+ ? handlerSuccess
27681
+ : defaultHandlerSuccess;
27682
+ handler.call(uploader, resp);
27683
+ resolve(resp);
27684
+ };
27685
+ reader_1.readAsDataURL(file);
27686
+ }));
27687
+ fileList[i] = null;
27688
+ }
27689
+ };
27690
+ for (i = 0; i < fileList.length; i += 1) {
27691
+ _loop_1();
27692
+ }
27693
+ }
27652
27694
 
27653
27695
 
27654
27696
  /***/ }),
@@ -29315,7 +29357,7 @@ var backspace = /** @class */ (function (_super) {
29315
29357
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
29316
29358
  return false;
29317
29359
  }
29318
- (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W)(jodit, fakeNode, backspace);
29360
+ (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_4__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
29319
29361
  if (_cases__WEBPACK_IMPORTED_MODULE_6__/* .cases */ .C.some(function (func) {
29320
29362
  if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_9__/* .isFunction */ .T)(func) &&
29321
29363
  func(jodit, fakeNode, backspace, mode)) {
@@ -29578,22 +29620,15 @@ function checkNotCollapsed(jodit) {
29578
29620
  * @private
29579
29621
  */
29580
29622
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
29581
- var _a, _b, _c;
29623
+ var _a, _b;
29582
29624
  var step = backspace ? -1 : 1;
29583
29625
  var anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
29584
- var sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace), removeNeighbor = null;
29585
- var charRemoved = false, removed;
29586
- var getNextInlineSibling = function (sibling) {
29587
- var nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
29588
- if (!nextSibling &&
29589
- sibling.parentNode &&
29590
- sibling.parentNode !== jodit.editor) {
29591
- nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, jodit.editor, true);
29592
- }
29593
- return nextSibling;
29594
- };
29626
+ var sibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
29627
+ var removeNeighbor = null;
29628
+ var charRemoved = false;
29629
+ var removed;
29595
29630
  if (!sibling) {
29596
- sibling = getNextInlineSibling(fakeNode);
29631
+ sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
29597
29632
  }
29598
29633
  while (sibling && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(sibling) || jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling))) {
29599
29634
  while (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)) {
@@ -29603,57 +29638,17 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
29603
29638
  break;
29604
29639
  }
29605
29640
  if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
29606
- // For Unicode escapes
29607
- var value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
29608
- var length = value.length;
29609
- var index = backspace ? length - 1 : 0;
29610
- if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29611
- while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29612
- index += step;
29613
- }
29614
- }
29615
- removed = value[index];
29616
- if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29617
- index += step;
29618
- while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29619
- index += step;
29620
- }
29621
- index += backspace ? 1 : -1;
29622
- }
29623
- if (backspace && index < 0) {
29624
- value = [];
29625
- }
29626
- else {
29627
- value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
29628
- }
29629
- if (!anotherSibling ||
29630
- !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
29631
- (!backspace ? / $/ : /^ /).test((_b = anotherSibling.nodeValue) !== null && _b !== void 0 ? _b : '') ||
29632
- !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
29633
- for (var i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
29634
- if (value[i] === ' ') {
29635
- value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
29636
- }
29637
- else {
29638
- break;
29639
- }
29640
- }
29641
- }
29642
- sibling.nodeValue = value.join('');
29641
+ removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
29643
29642
  }
29644
- if (!((_c = sibling.nodeValue) === null || _c === void 0 ? void 0 : _c.length)) {
29643
+ if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
29645
29644
  removeNeighbor = sibling;
29646
29645
  }
29647
29646
  if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29647
+ checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit);
29648
29648
  charRemoved = true;
29649
- (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);
29650
- if (mode === 'sentence' ||
29651
- (mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
29652
- checkRemoveChar(jodit, fakeNode, backspace, mode);
29653
- }
29654
29649
  break;
29655
29650
  }
29656
- var nextSibling = getNextInlineSibling(sibling);
29651
+ var nextSibling = getNextInlineSibling(sibling, backspace, jodit.editor);
29657
29652
  if (removeNeighbor) {
29658
29653
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(removeNeighbor);
29659
29654
  removeNeighbor = null;
@@ -29675,6 +29670,13 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
29675
29670
  }
29676
29671
  return charRemoved;
29677
29672
  }
29673
+ function getNextInlineSibling(sibling, backspace, root) {
29674
+ var nextSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(sibling, backspace);
29675
+ if (!nextSibling && sibling.parentNode && sibling.parentNode !== root) {
29676
+ nextSibling = (0,jodit_plugins_backspace_helpers__WEBPACK_IMPORTED_MODULE_3__/* .findMostNestedNeighbor */ .s)(sibling, !backspace, root, true);
29677
+ }
29678
+ return nextSibling;
29679
+ }
29678
29680
  /**
29679
29681
  * Helper removes all empty inline parents
29680
29682
  */
@@ -29699,6 +29701,57 @@ function addBRInsideEmptyBlock(jodit, node) {
29699
29701
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(node, jodit.createInside.element('br'));
29700
29702
  }
29701
29703
  }
29704
+ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
29705
+ // For Unicode escapes
29706
+ var value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
29707
+ var length = value.length;
29708
+ var index = backspace ? length - 1 : 0;
29709
+ if (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29710
+ while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29711
+ index += step;
29712
+ }
29713
+ }
29714
+ var removed = value[index];
29715
+ if (value[index + step] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29716
+ index += step;
29717
+ while (value[index] === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
29718
+ index += step;
29719
+ }
29720
+ index += backspace ? 1 : -1;
29721
+ }
29722
+ if (backspace && index < 0) {
29723
+ value = [];
29724
+ }
29725
+ else {
29726
+ value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
29727
+ }
29728
+ replaceSpaceOnNBSP(anotherSibling, backspace, value);
29729
+ sibling.nodeValue = value.join('');
29730
+ return removed;
29731
+ }
29732
+ function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
29733
+ var _a;
29734
+ if (!anotherSibling ||
29735
+ !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) ||
29736
+ (!backspace ? / $/ : /^ /).test((_a = anotherSibling.nodeValue) !== null && _a !== void 0 ? _a : '') ||
29737
+ !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
29738
+ for (var i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1) {
29739
+ if (value[i] === ' ') {
29740
+ value[i] = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
29741
+ }
29742
+ else {
29743
+ break;
29744
+ }
29745
+ }
29746
+ }
29747
+ }
29748
+ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed, jodit) {
29749
+ (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);
29750
+ if (mode === 'sentence' ||
29751
+ (mode === 'word' && removed !== ' ' && removed !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE)) {
29752
+ checkRemoveChar(jodit, fakeNode, backspace, mode);
29753
+ }
29754
+ }
29702
29755
 
29703
29756
 
29704
29757
  /***/ }),
@@ -29736,7 +29789,7 @@ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
29736
29789
  !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isContentEditable(neighbor, jodit.editor)) {
29737
29790
  (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);
29738
29791
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(neighbor);
29739
- (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W)(jodit, fakeNode, backspace);
29792
+ (0,jodit_core_selection_helpers__WEBPACK_IMPORTED_MODULE_2__/* .moveNodeInsideStart */ .W8)(jodit, fakeNode, backspace);
29740
29793
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
29741
29794
  return true;
29742
29795
  }
@@ -32668,45 +32721,11 @@ var dragAndDrop = /** @class */ (function (_super) {
32668
32721
  var sel = this.j.s.sel;
32669
32722
  var range = this.bufferRange ||
32670
32723
  (sel && sel.rangeCount ? sel.getRangeAt(0) : null);
32671
- var fragment = null;
32672
- if (!this.draggable && range) {
32673
- fragment = this.isCopyMode
32674
- ? range.cloneContents()
32675
- : range.extractContents();
32676
- }
32677
- else if (this.draggable) {
32678
- if (this.isCopyMode) {
32679
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
32680
- ? ['a', 'href']
32681
- : ['img', 'src'], 2), tagName = _a[0], field = _a[1];
32682
- fragment = this.j.createInside.element(tagName);
32683
- fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
32684
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
32685
- '');
32686
- if (tagName === 'a') {
32687
- fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
32688
- }
32689
- }
32690
- else {
32691
- fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
32692
- }
32693
- }
32694
- else if (this.getText(event)) {
32695
- fragment = this.j.createInside.fromHTML(this.getText(event));
32696
- }
32724
+ var fragment = this.__getWorkFragment(range, event);
32697
32725
  sel && sel.removeAllRanges();
32698
32726
  this.j.s.insertCursorAtPoint(event.clientX, event.clientY);
32699
32727
  if (fragment) {
32700
- this.j.s.insertNode(fragment, false, false);
32701
- if (range && fragment.firstChild && fragment.lastChild) {
32702
- range.setStartBefore(fragment.firstChild);
32703
- range.setEndAfter(fragment.lastChild);
32704
- this.j.s.selectRange(range);
32705
- this.j.e.fire('synchro');
32706
- }
32707
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
32708
- this.j.e.fire('afterInsertImage', fragment);
32709
- }
32728
+ this.__insertFragment.call(this, fragment, range);
32710
32729
  }
32711
32730
  event.preventDefault();
32712
32731
  event.stopPropagation();
@@ -32714,6 +32733,47 @@ var dragAndDrop = /** @class */ (function (_super) {
32714
32733
  this.isFragmentFromEditor = false;
32715
32734
  this.removeDragListeners();
32716
32735
  };
32736
+ dragAndDrop.prototype.__getWorkFragment = function (range, event) {
32737
+ var fragment = null;
32738
+ if (!this.draggable && range) {
32739
+ fragment = this.isCopyMode
32740
+ ? range.cloneContents()
32741
+ : range.extractContents();
32742
+ }
32743
+ else if (this.draggable) {
32744
+ if (this.isCopyMode) {
32745
+ var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__read */ .zs)((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, '-is-file') === '1'
32746
+ ? ['a', 'href']
32747
+ : ['img', 'src'], 2), tagName = _a[0], field = _a[1];
32748
+ fragment = this.j.createInside.element(tagName);
32749
+ fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'data-src') ||
32750
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.draggable, 'src') ||
32751
+ '');
32752
+ if (tagName === 'a') {
32753
+ fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(fragment, field) || '';
32754
+ }
32755
+ }
32756
+ else {
32757
+ fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.dataBind)(this.draggable, 'target');
32758
+ }
32759
+ }
32760
+ else if (this.getText(event)) {
32761
+ fragment = this.j.createInside.fromHTML(this.getText(event));
32762
+ }
32763
+ return fragment;
32764
+ };
32765
+ dragAndDrop.prototype.__insertFragment = function (fragment, range) {
32766
+ this.j.s.insertNode(fragment, false, false);
32767
+ if (range && fragment.firstChild && fragment.lastChild) {
32768
+ range.setStartBefore(fragment.firstChild);
32769
+ range.setEndAfter(fragment.lastChild);
32770
+ this.j.s.selectRange(range);
32771
+ this.j.e.fire('synchro');
32772
+ }
32773
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isTag(fragment, 'img') && this.j.events) {
32774
+ this.j.e.fire('afterInsertImage', fragment);
32775
+ }
32776
+ };
32717
32777
  /** @override */
32718
32778
  dragAndDrop.prototype.beforeDestruct = function () {
32719
32779
  this.onDragEnd();
@@ -38622,35 +38682,7 @@ var link = /** @class */ (function (_super) {
38622
38682
  if (link) {
38623
38683
  url_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'href') || '';
38624
38684
  if (modeClassName) {
38625
- switch (modeClassName) {
38626
- case 'input':
38627
- if (className_input) {
38628
- className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
38629
- }
38630
- break;
38631
- case 'select':
38632
- if (className_select) {
38633
- for (var i = 0; i < className_select.selectedOptions.length; i++) {
38634
- var option = className_select.options.item(i);
38635
- if (option) {
38636
- option.selected = false;
38637
- }
38638
- }
38639
- var classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
38640
- classNames.split(' ').forEach(function (className) {
38641
- if (className) {
38642
- for (var i = 0; i < className_select.options.length; i++) {
38643
- var option = className_select.options.item(i);
38644
- if ((option === null || option === void 0 ? void 0 : option.value) &&
38645
- option.value === className) {
38646
- option.selected = true;
38647
- }
38648
- }
38649
- }
38650
- });
38651
- }
38652
- break;
38653
- }
38685
+ readClassnames(modeClassName, className_input, link, className_select);
38654
38686
  }
38655
38687
  if (openInNewTabCheckbox && target_checkbox) {
38656
38688
  target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'target') === '_blank';
@@ -38711,44 +38743,10 @@ var link = /** @class */ (function (_super) {
38711
38743
  links = [link];
38712
38744
  }
38713
38745
  links.forEach(function (a) {
38714
- var _a;
38715
38746
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'href', url_input.value);
38716
- if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
38717
- if (modeClassName === 'input') {
38718
- if (className_input.value === '' &&
38719
- a.hasAttribute('class')) {
38720
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
38721
- }
38722
- if (className_input.value !== '') {
38723
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
38724
- }
38725
- }
38726
- else if (modeClassName === 'select') {
38727
- if (a.hasAttribute('class')) {
38728
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
38729
- }
38730
- for (var i = 0; i < className_select.selectedOptions.length; i++) {
38731
- var className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
38732
- if (className) {
38733
- a.classList.add(className);
38734
- }
38735
- }
38736
- }
38737
- }
38747
+ writeClasses(modeClassName, className_input, className_select, a);
38738
38748
  if (!isImageContent) {
38739
- var newContent = a.textContent;
38740
- if (content_input.value.trim().length) {
38741
- if (textWasChanged) {
38742
- newContent = content_input.value;
38743
- }
38744
- }
38745
- else {
38746
- newContent = url_input.value;
38747
- }
38748
- var content = a.textContent;
38749
- if (newContent !== content) {
38750
- a.textContent = newContent;
38751
- }
38749
+ writeImage(a, content_input, textWasChanged, url_input);
38752
38750
  }
38753
38751
  if (openInNewTabCheckbox && target_checkbox) {
38754
38752
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
@@ -38795,6 +38793,75 @@ var link = /** @class */ (function (_super) {
38795
38793
  }(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k));
38796
38794
 
38797
38795
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
38796
+ function writeClasses(modeClassName, className_input, className_select, a) {
38797
+ var _a;
38798
+ if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
38799
+ if (modeClassName === 'input') {
38800
+ if (className_input.value === '' && a.hasAttribute('class')) {
38801
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
38802
+ }
38803
+ if (className_input.value !== '') {
38804
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', className_input.value);
38805
+ }
38806
+ }
38807
+ else if (modeClassName === 'select') {
38808
+ if (a.hasAttribute('class')) {
38809
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
38810
+ }
38811
+ for (var i = 0; i < className_select.selectedOptions.length; i++) {
38812
+ var className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
38813
+ if (className) {
38814
+ a.classList.add(className);
38815
+ }
38816
+ }
38817
+ }
38818
+ }
38819
+ }
38820
+ function readClassnames(modeClassName, className_input, link, className_select) {
38821
+ switch (modeClassName) {
38822
+ case 'input':
38823
+ if (className_input) {
38824
+ className_input.value = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
38825
+ }
38826
+ break;
38827
+ case 'select':
38828
+ if (className_select) {
38829
+ for (var i = 0; i < className_select.selectedOptions.length; i++) {
38830
+ var option = className_select.options.item(i);
38831
+ if (option) {
38832
+ option.selected = false;
38833
+ }
38834
+ }
38835
+ var classNames = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.attr)(link, 'class') || '';
38836
+ classNames.split(' ').forEach(function (className) {
38837
+ if (className) {
38838
+ for (var i = 0; i < className_select.options.length; i++) {
38839
+ var option = className_select.options.item(i);
38840
+ if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
38841
+ option.selected = true;
38842
+ }
38843
+ }
38844
+ }
38845
+ });
38846
+ }
38847
+ break;
38848
+ }
38849
+ }
38850
+ function writeImage(a, content_input, textWasChanged, url_input) {
38851
+ var newContent = a.textContent;
38852
+ if (content_input.value.trim().length) {
38853
+ if (textWasChanged) {
38854
+ newContent = content_input.value;
38855
+ }
38856
+ }
38857
+ else {
38858
+ newContent = url_input.value;
38859
+ }
38860
+ var content = a.textContent;
38861
+ if (newContent !== content) {
38862
+ a.textContent = newContent;
38863
+ }
38864
+ }
38798
38865
 
38799
38866
 
38800
38867
  /***/ }),
@@ -41766,7 +41833,6 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.fin
41766
41833
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
41767
41834
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
41768
41835
  /* harmony export */ });
41769
- /* unused harmony export isSelectionWrapper */
41770
41836
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31635);
41771
41837
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23545);
41772
41838
  /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52989);
@@ -41786,11 +41852,65 @@ var TMP_ATTR = 'jd-tmp-selection';
41786
41852
  * @private
41787
41853
  */
41788
41854
  function highlightTextRanges(jodit, rng, restRanges, ci, root) {
41789
- var _a, e_1, _b;
41855
+ var _a;
41790
41856
  if (rng.startContainer.nodeValue == null ||
41791
41857
  rng.endContainer.nodeValue == null) {
41792
41858
  return;
41793
41859
  }
41860
+ if (checkNativeSelectionMethod(jodit, rng, restRanges)) {
41861
+ return;
41862
+ }
41863
+ var span = ci.element('span', (_a = {},
41864
+ _a[TMP_ATTR] = true,
41865
+ _a));
41866
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
41867
+ normalizeRanges(rng, restRanges, ci);
41868
+ var next = rng.startContainer;
41869
+ do {
41870
+ if (!next) {
41871
+ break;
41872
+ }
41873
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
41874
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
41875
+ }
41876
+ if (next === rng.endContainer) {
41877
+ break;
41878
+ }
41879
+ var step = next.firstChild || next.nextSibling;
41880
+ if (!step) {
41881
+ while (next && !next.nextSibling && next !== root) {
41882
+ next = next.parentNode;
41883
+ }
41884
+ step = next === null || next === void 0 ? void 0 : next.nextSibling;
41885
+ }
41886
+ next = step;
41887
+ } while (next && next !== root);
41888
+ }
41889
+ /**
41890
+ * @private
41891
+ */
41892
+ function getSelectionWrappers(root) {
41893
+ return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)("[".concat(TMP_ATTR, "]"), root);
41894
+ }
41895
+ /**
41896
+ * @private
41897
+ */
41898
+ function clearSelectionWrappers(root) {
41899
+ getSelectionWrappers(root).forEach(function (span) { return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span); });
41900
+ }
41901
+ /**
41902
+ * @private
41903
+ */
41904
+ function clearSelectionWrappersFromHTML(root) {
41905
+ return root.replace(RegExp("<span[^>]+".concat(TMP_ATTR, "[^>]+>(.*?)</span>"), 'g'), '$1');
41906
+ }
41907
+ /**
41908
+ * @private
41909
+ */
41910
+ function isSelectionWrapper(node) {
41911
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
41912
+ }
41913
+ function checkNativeSelectionMethod(jodit, rng, restRanges) {
41794
41914
  if (jodit.o.search.useCustomHighlightAPI &&
41795
41915
  // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
41796
41916
  typeof window.Highlight !== 'undefined') {
@@ -41807,12 +41927,12 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
41807
41927
  // @ts-ignore
41808
41928
  CSS.highlights.set('jodit-search-result', searchHighlight);
41809
41929
  restRanges.length = 0;
41810
- return;
41930
+ return true;
41811
41931
  }
41812
- var span = ci.element('span', (_a = {},
41813
- _a[TMP_ATTR] = true,
41814
- _a));
41815
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
41932
+ return false;
41933
+ }
41934
+ function normalizeRanges(rng, restRanges, ci) {
41935
+ var e_1, _a;
41816
41936
  var startText = rng.startContainer.nodeValue;
41817
41937
  var diff = 0;
41818
41938
  if (rng.startOffset !== 0) {
@@ -41851,8 +41971,8 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
41851
41971
  }
41852
41972
  finally {
41853
41973
  try {
41854
- if (restRanges_1_1 && !restRanges_1_1.done && (_b = restRanges_1.return))
41855
- _b.call(restRanges_1);
41974
+ if (restRanges_1_1 && !restRanges_1_1.done && (_a = restRanges_1.return))
41975
+ _a.call(restRanges_1);
41856
41976
  }
41857
41977
  finally {
41858
41978
  if (e_1)
@@ -41861,50 +41981,6 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
41861
41981
  }
41862
41982
  rng.endOffset = rng.endContainer.nodeValue.length;
41863
41983
  }
41864
- var next = rng.startContainer;
41865
- do {
41866
- if (!next) {
41867
- break;
41868
- }
41869
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
41870
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
41871
- }
41872
- if (next === rng.endContainer) {
41873
- break;
41874
- }
41875
- var step = next.firstChild || next.nextSibling;
41876
- if (!step) {
41877
- while (next && !next.nextSibling && next !== root) {
41878
- next = next.parentNode;
41879
- }
41880
- step = next === null || next === void 0 ? void 0 : next.nextSibling;
41881
- }
41882
- next = step;
41883
- } while (next && next !== root);
41884
- }
41885
- /**
41886
- * @private
41887
- */
41888
- function getSelectionWrappers(root) {
41889
- return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)("[".concat(TMP_ATTR, "]"), root);
41890
- }
41891
- /**
41892
- * @private
41893
- */
41894
- function clearSelectionWrappers(root) {
41895
- getSelectionWrappers(root).forEach(function (span) { return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span); });
41896
- }
41897
- /**
41898
- * @private
41899
- */
41900
- function clearSelectionWrappersFromHTML(root) {
41901
- return root.replace(RegExp("<span[^>]+".concat(TMP_ATTR, "[^>]+>(.*?)</span>"), 'g'), '$1');
41902
- }
41903
- /**
41904
- * @private
41905
- */
41906
- function isSelectionWrapper(node) {
41907
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
41908
41984
  }
41909
41985
 
41910
41986
 
@@ -46308,40 +46384,10 @@ function tableKeyboardNavigation(editor) {
46308
46384
  .off('.tableKeyboardNavigation')
46309
46385
  .on('keydown.tableKeyboardNavigation', function (event) {
46310
46386
  var key = event.key;
46311
- if (!WORK_KEYS.has(key)) {
46312
- return;
46313
- }
46314
- var current = editor.s.current();
46315
- if (!current) {
46316
- return;
46317
- }
46318
- var 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);
46387
+ var cell = findCell(editor, key);
46319
46388
  if (!cell) {
46320
46389
  return;
46321
46390
  }
46322
- var range = editor.s.range;
46323
- if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
46324
- var isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
46325
- var 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, function (elm) {
46326
- return key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
46327
- ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
46328
- : Boolean(elm);
46329
- }, cell);
46330
- if ((!isNextDirection &&
46331
- (hasNext ||
46332
- (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
46333
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
46334
- range.startOffset !== 0))) ||
46335
- (isNextDirection &&
46336
- (hasNext ||
46337
- (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
46338
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
46339
- current.nodeValue &&
46340
- range.startOffset !==
46341
- current.nodeValue.length)))) {
46342
- return;
46343
- }
46344
- }
46345
46391
  var tableModule = editor.getInstance(jodit_modules_table_table__WEBPACK_IMPORTED_MODULE_4__/* .Table */ .X, editor.o);
46346
46392
  var table = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.closest(cell, 'table', editor.editor);
46347
46393
  var next = null;
@@ -46401,6 +46447,42 @@ function tableKeyboardNavigation(editor) {
46401
46447
  });
46402
46448
  }
46403
46449
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('tableKeyboardNavigation', tableKeyboardNavigation);
46450
+ function findCell(editor, key) {
46451
+ if (!WORK_KEYS.has(key)) {
46452
+ return;
46453
+ }
46454
+ var current = editor.s.current();
46455
+ if (!current) {
46456
+ return;
46457
+ }
46458
+ var 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);
46459
+ if (!cell) {
46460
+ return;
46461
+ }
46462
+ var range = editor.s.range;
46463
+ if (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && current !== cell) {
46464
+ var isNextDirection = key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN;
46465
+ var 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, function (elm) {
46466
+ return key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN
46467
+ ? jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'br')
46468
+ : Boolean(elm);
46469
+ }, cell);
46470
+ if ((!isNextDirection &&
46471
+ (hasNext ||
46472
+ (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP &&
46473
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
46474
+ range.startOffset !== 0))) ||
46475
+ (isNextDirection &&
46476
+ (hasNext ||
46477
+ (key !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN &&
46478
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(current) &&
46479
+ current.nodeValue &&
46480
+ range.startOffset !== current.nodeValue.length)))) {
46481
+ return;
46482
+ }
46483
+ }
46484
+ return cell;
46485
+ }
46404
46486
 
46405
46487
 
46406
46488
  /***/ }),