jodit-pro 4.18.13 → 4.18.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +5 -5
  3. package/es2015/jodit.js +331 -73
  4. package/es2015/jodit.min.js +9 -9
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/chart/chart.css +1 -1
  20. package/es2015/plugins/chart/chart.js +1 -1
  21. package/es2015/plugins/chart/chart.min.js +1 -1
  22. package/es2015/plugins/color-picker/color-picker.css +1 -1
  23. package/es2015/plugins/color-picker/color-picker.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  25. package/es2015/plugins/emoji/emoji.css +1 -1
  26. package/es2015/plugins/emoji/emoji.js +1 -1
  27. package/es2015/plugins/emoji/emoji.min.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.js +1 -1
  29. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  30. package/es2015/plugins/finder/finder.css +1 -1
  31. package/es2015/plugins/finder/finder.js +1 -1
  32. package/es2015/plugins/finder/finder.min.js +1 -1
  33. package/es2015/plugins/google-maps/google-maps.css +1 -1
  34. package/es2015/plugins/google-maps/google-maps.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  36. package/es2015/plugins/google-search/google-search.js +1 -1
  37. package/es2015/plugins/google-search/google-search.min.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  39. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  46. package/es2015/plugins/keyboard/keyboard.css +1 -1
  47. package/es2015/plugins/keyboard/keyboard.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  49. package/es2015/plugins/math/math.css +1 -1
  50. package/es2015/plugins/math/math.js +1 -1
  51. package/es2015/plugins/math/math.min.js +1 -1
  52. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  53. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  54. package/es2015/plugins/page-break/page-break.js +1 -1
  55. package/es2015/plugins/page-break/page-break.min.js +1 -1
  56. package/es2015/plugins/paste-code/paste-code.css +1 -1
  57. package/es2015/plugins/paste-code/paste-code.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  59. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  60. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  61. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  62. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  63. package/es2015/plugins/style/style.css +1 -1
  64. package/es2015/plugins/style/style.js +1 -1
  65. package/es2015/plugins/style/style.min.js +1 -1
  66. package/es2015/plugins/templates/templates.css +1 -1
  67. package/es2015/plugins/templates/templates.js +1 -1
  68. package/es2015/plugins/templates/templates.min.js +1 -1
  69. package/es2015/plugins/todo-list/todo-list.css +1 -1
  70. package/es2015/plugins/todo-list/todo-list.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  72. package/es2015/plugins/translate/translate.css +1 -1
  73. package/es2015/plugins/translate/translate.js +1 -1
  74. package/es2015/plugins/translate/translate.min.js +1 -1
  75. package/es2015/plugins/tune-block/tune-block.css +1 -1
  76. package/es2015/plugins/tune-block/tune-block.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  78. package/es2018/jodit.fat.min.js +13 -13
  79. package/es2018/jodit.min.js +5 -5
  80. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  81. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  82. package/es2018/plugins/backup/backup.min.js +1 -1
  83. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  84. package/es2018/plugins/change-case/change-case.min.js +1 -1
  85. package/es2018/plugins/chart/chart.min.js +1 -1
  86. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  87. package/es2018/plugins/emoji/emoji.min.js +1 -1
  88. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  89. package/es2018/plugins/finder/finder.min.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  91. package/es2018/plugins/google-search/google-search.min.js +1 -1
  92. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  93. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  94. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  95. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  96. package/es2018/plugins/math/math.min.js +1 -1
  97. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  98. package/es2018/plugins/page-break/page-break.min.js +1 -1
  99. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  100. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  101. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  102. package/es2018/plugins/style/style.min.js +1 -1
  103. package/es2018/plugins/templates/templates.min.js +1 -1
  104. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  105. package/es2018/plugins/translate/translate.min.js +1 -1
  106. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  107. package/es2021/jodit.css +1 -1
  108. package/es2021/jodit.fat.min.js +14 -14
  109. package/es2021/jodit.js +331 -73
  110. package/es2021/jodit.min.js +6 -6
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  112. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  113. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  115. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  116. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  117. package/es2021/plugins/backup/backup.css +1 -1
  118. package/es2021/plugins/backup/backup.js +1 -1
  119. package/es2021/plugins/backup/backup.min.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.css +1 -1
  121. package/es2021/plugins/button-generator/button-generator.js +1 -1
  122. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  123. package/es2021/plugins/change-case/change-case.js +1 -1
  124. package/es2021/plugins/change-case/change-case.min.js +1 -1
  125. package/es2021/plugins/chart/chart.css +1 -1
  126. package/es2021/plugins/chart/chart.js +1 -1
  127. package/es2021/plugins/chart/chart.min.js +1 -1
  128. package/es2021/plugins/color-picker/color-picker.css +1 -1
  129. package/es2021/plugins/color-picker/color-picker.js +1 -1
  130. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  131. package/es2021/plugins/emoji/emoji.css +1 -1
  132. package/es2021/plugins/emoji/emoji.js +1 -1
  133. package/es2021/plugins/emoji/emoji.min.js +1 -1
  134. package/es2021/plugins/export-docs/export-docs.js +1 -1
  135. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  136. package/es2021/plugins/finder/finder.css +1 -1
  137. package/es2021/plugins/finder/finder.js +1 -1
  138. package/es2021/plugins/finder/finder.min.js +1 -1
  139. package/es2021/plugins/google-maps/google-maps.css +1 -1
  140. package/es2021/plugins/google-maps/google-maps.js +1 -1
  141. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  142. package/es2021/plugins/google-search/google-search.js +1 -1
  143. package/es2021/plugins/google-search/google-search.min.js +1 -1
  144. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  145. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  146. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  147. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  148. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  149. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  150. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  151. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  152. package/es2021/plugins/keyboard/keyboard.css +1 -1
  153. package/es2021/plugins/keyboard/keyboard.js +1 -1
  154. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  155. package/es2021/plugins/math/math.css +1 -1
  156. package/es2021/plugins/math/math.js +1 -1
  157. package/es2021/plugins/math/math.min.js +1 -1
  158. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  159. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  160. package/es2021/plugins/page-break/page-break.js +1 -1
  161. package/es2021/plugins/page-break/page-break.min.js +1 -1
  162. package/es2021/plugins/paste-code/paste-code.css +1 -1
  163. package/es2021/plugins/paste-code/paste-code.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  165. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  166. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  167. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  168. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  169. package/es2021/plugins/style/style.css +1 -1
  170. package/es2021/plugins/style/style.js +1 -1
  171. package/es2021/plugins/style/style.min.js +1 -1
  172. package/es2021/plugins/templates/templates.css +1 -1
  173. package/es2021/plugins/templates/templates.js +1 -1
  174. package/es2021/plugins/templates/templates.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +1 -1
  185. package/es2021.en/jodit.fat.min.js +6 -6
  186. package/es2021.en/jodit.js +331 -73
  187. package/es2021.en/jodit.min.js +9 -9
  188. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  189. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  190. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  191. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  192. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  193. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  194. package/es2021.en/plugins/backup/backup.css +1 -1
  195. package/es2021.en/plugins/backup/backup.js +1 -1
  196. package/es2021.en/plugins/backup/backup.min.js +1 -1
  197. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  198. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  199. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  200. package/es2021.en/plugins/change-case/change-case.js +1 -1
  201. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  202. package/es2021.en/plugins/chart/chart.css +1 -1
  203. package/es2021.en/plugins/chart/chart.js +1 -1
  204. package/es2021.en/plugins/chart/chart.min.js +1 -1
  205. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  206. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  207. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  208. package/es2021.en/plugins/emoji/emoji.css +1 -1
  209. package/es2021.en/plugins/emoji/emoji.js +1 -1
  210. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  211. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  212. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  213. package/es2021.en/plugins/finder/finder.css +1 -1
  214. package/es2021.en/plugins/finder/finder.js +1 -1
  215. package/es2021.en/plugins/finder/finder.min.js +1 -1
  216. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  217. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  218. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  219. package/es2021.en/plugins/google-search/google-search.js +1 -1
  220. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  221. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  222. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  223. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  224. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  225. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  226. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  227. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  228. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  229. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  230. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  231. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  232. package/es2021.en/plugins/math/math.css +1 -1
  233. package/es2021.en/plugins/math/math.js +1 -1
  234. package/es2021.en/plugins/math/math.min.js +1 -1
  235. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  237. package/es2021.en/plugins/page-break/page-break.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  239. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  242. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  244. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  246. package/es2021.en/plugins/style/style.css +1 -1
  247. package/es2021.en/plugins/style/style.js +1 -1
  248. package/es2021.en/plugins/style/style.min.js +1 -1
  249. package/es2021.en/plugins/templates/templates.css +1 -1
  250. package/es2021.en/plugins/templates/templates.js +1 -1
  251. package/es2021.en/plugins/templates/templates.min.js +1 -1
  252. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  255. package/es2021.en/plugins/translate/translate.css +1 -1
  256. package/es2021.en/plugins/translate/translate.js +1 -1
  257. package/es2021.en/plugins/translate/translate.min.js +1 -1
  258. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  261. package/es5/jodit.css +2 -2
  262. package/es5/jodit.fat.min.js +2 -2
  263. package/es5/jodit.js +378 -74
  264. package/es5/jodit.min.css +2 -2
  265. package/es5/jodit.min.js +2 -2
  266. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  267. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  269. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  270. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  272. package/es5/plugins/backup/backup.css +1 -1
  273. package/es5/plugins/backup/backup.js +1 -1
  274. package/es5/plugins/backup/backup.min.js +1 -1
  275. package/es5/plugins/button-generator/button-generator.css +1 -1
  276. package/es5/plugins/button-generator/button-generator.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  278. package/es5/plugins/change-case/change-case.js +1 -1
  279. package/es5/plugins/change-case/change-case.min.js +1 -1
  280. package/es5/plugins/chart/chart.css +1 -1
  281. package/es5/plugins/chart/chart.js +1 -1
  282. package/es5/plugins/chart/chart.min.js +1 -1
  283. package/es5/plugins/color-picker/color-picker.css +1 -1
  284. package/es5/plugins/color-picker/color-picker.js +1 -1
  285. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  286. package/es5/plugins/emoji/emoji.css +1 -1
  287. package/es5/plugins/emoji/emoji.js +1 -1
  288. package/es5/plugins/emoji/emoji.min.js +1 -1
  289. package/es5/plugins/export-docs/export-docs.js +1 -1
  290. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  291. package/es5/plugins/finder/finder.css +1 -1
  292. package/es5/plugins/finder/finder.js +1 -1
  293. package/es5/plugins/finder/finder.min.js +1 -1
  294. package/es5/plugins/google-maps/google-maps.css +1 -1
  295. package/es5/plugins/google-maps/google-maps.js +1 -1
  296. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  297. package/es5/plugins/google-search/google-search.js +1 -1
  298. package/es5/plugins/google-search/google-search.min.js +1 -1
  299. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  300. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  301. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  302. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  303. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  304. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  305. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  306. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  307. package/es5/plugins/keyboard/keyboard.css +1 -1
  308. package/es5/plugins/keyboard/keyboard.js +1 -1
  309. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  310. package/es5/plugins/math/math.css +1 -1
  311. package/es5/plugins/math/math.js +1 -1
  312. package/es5/plugins/math/math.min.js +1 -1
  313. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  314. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  315. package/es5/plugins/page-break/page-break.js +1 -1
  316. package/es5/plugins/page-break/page-break.min.js +1 -1
  317. package/es5/plugins/paste-code/paste-code.css +1 -1
  318. package/es5/plugins/paste-code/paste-code.js +1 -1
  319. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  320. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  321. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  322. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  323. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  324. package/es5/plugins/style/style.css +1 -1
  325. package/es5/plugins/style/style.js +1 -1
  326. package/es5/plugins/style/style.min.js +1 -1
  327. package/es5/plugins/templates/templates.css +1 -1
  328. package/es5/plugins/templates/templates.js +1 -1
  329. package/es5/plugins/templates/templates.min.js +1 -1
  330. package/es5/plugins/todo-list/todo-list.css +1 -1
  331. package/es5/plugins/todo-list/todo-list.js +1 -1
  332. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  333. package/es5/plugins/translate/translate.css +1 -1
  334. package/es5/plugins/translate/translate.js +1 -1
  335. package/es5/plugins/translate/translate.min.js +1 -1
  336. package/es5/plugins/tune-block/tune-block.css +1 -1
  337. package/es5/plugins/tune-block/tune-block.js +1 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  339. package/es5/polyfills.fat.min.js +1 -1
  340. package/es5/polyfills.js +1 -1
  341. package/es5/polyfills.min.js +1 -1
  342. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.13
4
+ * Version: v4.18.15
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1405,7 +1405,8 @@ class Async {
1405
1405
  this.__requestsIdle.forEach((key)=>this.cancelIdleCallback(key));
1406
1406
  this.__requestsRaf.forEach((key)=>this.cancelAnimationFrame(key));
1407
1407
  this.__controllers.forEach((controller)=>controller.abort());
1408
- this.timers.forEach((key)=>(0,_helpers_async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout)(this.timers.get(key)));
1408
+ // A labelled timer is kept under its label, so clear by the value
1409
+ this.timers.forEach((timer)=>(0,_helpers_async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout)(timer));
1409
1410
  this.timers.clear();
1410
1411
  this.promisesRejections.forEach((reject)=>reject());
1411
1412
  this.promisesRejections.clear();
@@ -1766,7 +1767,7 @@ __webpack_require__.r(__webpack_exports__);
1766
1767
  * ```
1767
1768
  * @packageDocumentation
1768
1769
  * @module constants
1769
- */ const APP_VERSION = "4.18.13";
1770
+ */ const APP_VERSION = "4.18.15";
1770
1771
  // prettier-ignore
1771
1772
  const ES = "es2021";
1772
1773
  const IS_ES_MODERN = true;
@@ -7061,8 +7062,10 @@ function normalizeCssValue(key, value) {
7061
7062
  * ancestor's top-left corner. The returned offset should be subtracted from
7062
7063
  * the desired viewport coordinates before applying them.
7063
7064
  *
7064
- * Returns `{ x: 0, y: 0 }` when no such ancestor exists (the common case), so
7065
- * call sites keep their previous behaviour unchanged.
7065
+ * Without such an ancestor the containing block is the layout viewport. Its
7066
+ * offset is `{ x: 0, y: 0 }` in most browsers, but WebKit measures client
7067
+ * rects from the visual viewport, so once the page is pinch-zoomed and panned
7068
+ * the layout viewport starts above and to the left of the client origin.
7066
7069
  */ function getFixedPositionOffset(elm) {
7067
7070
  var _a;
7068
7071
  const win = (_a = elm.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
@@ -7077,6 +7080,15 @@ function normalizeCssValue(key, value) {
7077
7080
  }
7078
7081
  node = node.parentElement;
7079
7082
  }
7083
+ const vv = win === null || win === void 0 ? void 0 : win.visualViewport;
7084
+ // WebKit's `scrollX`/`scrollY` follow the visual viewport too (truncated),
7085
+ // where Blink's and Gecko's follow the layout viewport
7086
+ if (win && vv && (vv.offsetLeft || vv.offsetTop) && Math.abs(vv.pageLeft - win.scrollX) < 1 && Math.abs(vv.pageTop - win.scrollY) < 1) {
7087
+ return {
7088
+ x: -Math.round(vv.offsetLeft),
7089
+ y: -Math.round(vv.offsetTop)
7090
+ };
7091
+ }
7080
7092
  return {
7081
7093
  x: 0,
7082
7094
  y: 0
@@ -33377,12 +33389,13 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('about', _about_svg_js__W
33377
33389
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
33378
33390
 
33379
33391
  /* unused harmony export addNewLine */
33380
- /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
33381
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580);
33382
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21537);
33383
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
33384
- /* harmony import */ var _modules_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41409);
33385
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4604);
33392
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
33393
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
33394
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
33395
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
33396
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
33397
+ /* harmony import */ var _modules_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41409);
33398
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4604);
33386
33399
  /*!
33387
33400
  * Jodit Editor (https://xdsoft.net/jodit/)
33388
33401
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33399,10 +33412,11 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('about', _about_svg_js__W
33399
33412
 
33400
33413
 
33401
33414
 
33415
+
33402
33416
  const ns = 'addnewline';
33403
33417
  /**
33404
33418
  * Create helper for adding new paragraph(Jodit.defaultOptions.enter tag) before iframe, table or image
33405
- */ class addNewLine extends _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
33419
+ */ class addNewLine extends _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
33406
33420
  __show() {
33407
33421
  if (this.j.o.readonly || this.j.isLocked) {
33408
33422
  return;
@@ -33412,8 +33426,8 @@ const ns = 'addnewline';
33412
33426
  return;
33413
33427
  }
33414
33428
  this.__isShown = true;
33415
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.append(this.j.container, this.__line);
33416
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(this.__line, 'width', this.j.container.clientWidth);
33429
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(this.j.container, this.__line);
33430
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(this.__line, 'width', this.j.container.clientWidth);
33417
33431
  }
33418
33432
  onLock(isLocked) {
33419
33433
  if (isLocked && this.__isShown) {
@@ -33451,16 +33465,43 @@ const ns = 'addnewline';
33451
33465
  editor.editor
33452
33466
  ], 'scroll' + '.' + ns, this.__hideForce).on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce).on(editor.editor, 'click' + '.' + ns, this.__hide).on(editor.container, 'mouseleave' + '.' + ns, this.__hide).on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
33453
33467
  }
33468
+ /**
33469
+ * A paragraph holding only an embed has no place for the caret, so the
33470
+ * arrow keys can't get past one that ends the content, or before one that
33471
+ * starts it. When an arrow key leaves the caret where it was and there is
33472
+ * content beyond it, a new line goes there, as when the line is clicked.
33473
+ */ onArrowKey(e) {
33474
+ const editor = this.j;
33475
+ const forward = e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
33476
+ if (!editor.o.addNewLine || editor.o.readonly || editor.isLocked || e.shiftKey || !(forward || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT) || !editor.s.isCollapsed()) {
33477
+ return;
33478
+ }
33479
+ const { startContainer, startOffset } = editor.s.range;
33480
+ // Once the browser has moved the caret, if it could. With a 0 timeout
33481
+ // Jodit would run this at once, before the browser moves it
33482
+ editor.async.setTimeout(()=>{
33483
+ const { range } = editor.s;
33484
+ const block = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.closest(startContainer, _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock, editor.editor);
33485
+ if (e.defaultPrevented || !editor.s.isInsideArea || !range.collapsed || range.startContainer !== startContainer || range.startOffset !== startOffset || !block || !_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.findNotEmptyNeighbor(block, !forward, editor.editor)) {
33486
+ return;
33487
+ }
33488
+ const p = editor.createInside.element(editor.o.enter);
33489
+ forward ? _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p) : _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
33490
+ editor.s.setCursorIn(p);
33491
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
33492
+ editor.synchronizeValues();
33493
+ }, 1);
33494
+ }
33454
33495
  onDblClickEditor(e) {
33455
33496
  const editor = this.j;
33456
33497
  if (!editor.o.readonly && editor.o.addNewLineOnDBLClick && e.target === editor.editor && editor.s.isCollapsed()) {
33457
- const editorBound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.offset)(editor.editor, editor, editor.ed);
33498
+ const editorBound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.offset)(editor.editor, editor, editor.ed);
33458
33499
  const top = e.pageY - editor.ew.scrollX;
33459
33500
  const p = editor.createInside.element(editor.o.enter);
33460
33501
  if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
33461
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.prepend(editor.editor, p);
33502
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
33462
33503
  } else {
33463
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.append(editor.editor, p);
33504
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p);
33464
33505
  }
33465
33506
  editor.s.setCursorIn(p);
33466
33507
  editor.synchronizeValues();
@@ -33474,27 +33515,27 @@ const ns = 'addnewline';
33474
33515
  // Inside Shadow DOM `document.elementFromPoint` returns the shadow
33475
33516
  // host, so the lookup must start from the shadow root
33476
33517
  let currentElement = ((_a = editor.o.shadowRoot) !== null && _a !== void 0 ? _a : editor.ed).elementFromPoint(e.clientX, e.clientY);
33477
- if (!_modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.isHTMLElement(currentElement) || !_modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.isOrContains(editor.editor, currentElement)) {
33518
+ if (!_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isHTMLElement(currentElement) || !_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isOrContains(editor.editor, currentElement)) {
33478
33519
  return;
33479
33520
  }
33480
33521
  if (editor.editor !== currentElement && !this.__isMatchedTag(currentElement)) {
33481
- currentElement = _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.closest(currentElement, this.__isMatchedTag, editor.editor);
33522
+ currentElement = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.closest(currentElement, this.__isMatchedTag, editor.editor);
33482
33523
  }
33483
33524
  if (!currentElement) {
33484
33525
  this.__hide();
33485
33526
  return;
33486
33527
  }
33487
33528
  if (this.__isMatchedTag(currentElement)) {
33488
- const parentBox = _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.up(currentElement, _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.isBlock, editor.editor);
33529
+ const parentBox = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.up(currentElement, _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock, editor.editor);
33489
33530
  if (parentBox && parentBox !== editor.editor) {
33490
33531
  currentElement = parentBox;
33491
33532
  }
33492
33533
  }
33493
- const pos = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.position)(currentElement, this.j);
33534
+ const pos = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(currentElement, this.j);
33494
33535
  let top = false;
33495
33536
  let { clientY, clientX } = e;
33496
33537
  if (this.j.iframe) {
33497
- const { top, left } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.position)(this.j.iframe, this.j, true);
33538
+ const { top, left } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(this.j.iframe, this.j, true);
33498
33539
  clientY += top;
33499
33540
  clientX += left;
33500
33541
  }
@@ -33507,8 +33548,8 @@ const ns = 'addnewline';
33507
33548
  this.__isBeforeContent = false;
33508
33549
  }
33509
33550
  const isEditor = editor.editor === currentElement;
33510
- if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.call)(this.__isBeforeContent ? _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.prev : _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.next, currentElement, this.__canGetFocus, editor.editor))) {
33511
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(this.__line, 'top', top);
33551
+ if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(this.__isBeforeContent ? _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prev : _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.next, currentElement, this.__canGetFocus, editor.editor))) {
33552
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(this.__line, 'top', top);
33512
33553
  this.__current = currentElement;
33513
33554
  this.__show();
33514
33555
  this.__line.style.setProperty('--jd-anl-handle-offset', clientX - pos.left - 10 + 'px');
@@ -33520,7 +33561,7 @@ const ns = 'addnewline';
33520
33561
  /** @override */ beforeDestruct() {
33521
33562
  this.j.async.clearTimeout(this.__timeout);
33522
33563
  this.j.e.off(this.__line).off('changePlace', this.__addEventListeners);
33523
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(this.__line);
33564
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.safeRemove(this.__line);
33524
33565
  this.j.e.off([
33525
33566
  this.j.ow,
33526
33567
  this.j.ew,
@@ -33529,7 +33570,7 @@ const ns = 'addnewline';
33529
33570
  }
33530
33571
  constructor(){
33531
33572
  super(...arguments);
33532
- this.__line = this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n('Break')}" class="jodit-add-new-line"><span>${_modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Icon.get('enter')}</span></div>`);
33573
+ this.__line = this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n('Break')}" class="jodit-add-new-line"><span>${_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Icon.get('enter')}</span></div>`);
33533
33574
  this.__isMatchedTag = (node)=>Boolean(node && this.j.o.addNewLineTagsTriggers.includes(node.nodeName.toLowerCase()));
33534
33575
  this.__isBeforeContent = false;
33535
33576
  this.__lineInFocus = false;
@@ -33541,26 +33582,26 @@ const ns = 'addnewline';
33541
33582
  this.__isShown = false;
33542
33583
  this.j.async.clearTimeout(this.__timeout);
33543
33584
  this.__lineInFocus = false;
33544
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.safeRemove(this.__line);
33585
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.safeRemove(this.__line);
33545
33586
  this.__line.style.setProperty('--jd-anl-handle-offset', '0');
33546
33587
  };
33547
33588
  this.__canGetFocus = (elm)=>{
33548
- return elm != null && _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.isBlock(elm) && !/^(img|table|iframe|hr)$/i.test(elm.nodeName);
33589
+ return elm != null && _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock(elm) && !/^(img|table|iframe|hr)$/i.test(elm.nodeName);
33549
33590
  };
33550
33591
  this.__onClickLine = (e)=>{
33551
33592
  const editor = this.j;
33552
33593
  const p = editor.createInside.element(editor.o.enter);
33553
33594
  if (this.__isBeforeContent && this.__current && this.__current.parentNode) {
33554
33595
  if (this.__current === editor.editor) {
33555
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.prepend(editor.editor, p);
33596
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
33556
33597
  } else {
33557
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.before(this.__current, p);
33598
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.before(this.__current, p);
33558
33599
  }
33559
33600
  } else {
33560
- _modules_index_js__WEBPACK_IMPORTED_MODULE_4__.Dom.append(editor.editor, p);
33601
+ _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p);
33561
33602
  }
33562
33603
  editor.s.setCursorIn(p);
33563
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
33604
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
33564
33605
  editor.synchronizeValues();
33565
33606
  this.__hideForce();
33566
33607
  e.preventDefault();
@@ -33568,18 +33609,21 @@ const ns = 'addnewline';
33568
33609
  }
33569
33610
  }
33570
33611
  __decorate([
33571
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':lock')
33612
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':lock')
33572
33613
  ], addNewLine.prototype, "onLock", null);
33573
33614
  __decorate([
33574
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
33615
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
33575
33616
  ], addNewLine.prototype, "__hide", null);
33576
33617
  __decorate([
33577
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.watch)(':dblclick')
33618
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
33619
+ ], addNewLine.prototype, "onArrowKey", null);
33620
+ __decorate([
33621
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':dblclick')
33578
33622
  ], addNewLine.prototype, "onDblClickEditor", null);
33579
33623
  __decorate([
33580
- (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.throttle)((ctx)=>ctx.defaultTimeout)
33624
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.throttle)((ctx)=>ctx.defaultTimeout)
33581
33625
  ], addNewLine.prototype, "__onMouseMove", null);
33582
- _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('addNewLine', addNewLine);
33626
+ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('addNewLine', addNewLine);
33583
33627
 
33584
33628
 
33585
33629
  /***/ }),
@@ -34311,6 +34355,7 @@ UiAiAssistant = __decorate([
34311
34355
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32496);
34312
34356
  /* harmony import */ var _cases_check_not_collapsed_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11338);
34313
34357
  /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14630);
34358
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63785);
34314
34359
  /*!
34315
34360
  * Jodit Editor (https://xdsoft.net/jodit/)
34316
34361
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34324,6 +34369,7 @@ UiAiAssistant = __decorate([
34324
34369
 
34325
34370
 
34326
34371
 
34372
+
34327
34373
  class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
34328
34374
  afterInit(jodit) {
34329
34375
  jodit.registerCommand('deleteButton', {
@@ -34401,19 +34447,53 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
34401
34447
  throw e;
34402
34448
  } finally{
34403
34449
  jodit.e.fire('backSpaceAfterDelete', backspace, fakeNode);
34450
+ this.moveCaretToTextBefore(fakeNode);
34404
34451
  this.safeRemoveEmptyNode(fakeNode);
34405
34452
  }
34406
34453
  return false;
34407
34454
  }
34455
+ /**
34456
+ * The browser types at the end of the text before the caret on its line,
34457
+ * in that text's formatting, but not inside a link. Moving the caret there
34458
+ * too makes a paste and the toolbar agree with what's typed:
34459
+ * `<p>one</p><p><b>|two</b></p>` joins to `<p>one|<b>two</b></p>`
34460
+ */ moveCaretToTextBefore(fakeNode) {
34461
+ var _a, _b;
34462
+ const { jodit } = this;
34463
+ const { range } = jodit.s;
34464
+ // A case may have merged the fake node away (#1722)
34465
+ if (!fakeNode.parentNode) {
34466
+ return;
34467
+ }
34468
+ const around = jodit.ed.createRange();
34469
+ around.selectNode(fakeNode);
34470
+ if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
34471
+ return;
34472
+ }
34473
+ const text = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
34474
+ const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
34475
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(text) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(text, jodit.editor) || link && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(link, fakeNode) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor) !== _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) {
34476
+ return;
34477
+ }
34478
+ range.setStart(text, (_b = (_a = text.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
34479
+ range.collapse(true);
34480
+ jodit.s.selectRange(range);
34481
+ }
34408
34482
  /**
34409
34483
  * Remove node and replace cursor position out of it
34410
34484
  */ safeRemoveEmptyNode(fakeNode) {
34411
- var _a, _b;
34485
+ var _a, _b, _c;
34412
34486
  const { range } = this.j.s;
34487
+ // wrap-nodes normalizes the line it wraps, which can merge the text
34488
+ // after the fake node into it: remove only the fake node's own space
34489
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(fakeNode) && fakeNode.nodeValue !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && ((_a = fakeNode.nodeValue) === null || _a === void 0 ? void 0 : _a.startsWith(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE))) {
34490
+ fakeNode.deleteData(0, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE.length);
34491
+ return;
34492
+ }
34413
34493
  if (range.startContainer === fakeNode) {
34414
34494
  if (fakeNode.previousSibling) {
34415
34495
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(fakeNode.previousSibling)) {
34416
- range.setStart(fakeNode.previousSibling, (_b = (_a = fakeNode.previousSibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
34496
+ range.setStart(fakeNode.previousSibling, (_c = (_b = fakeNode.previousSibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0);
34417
34497
  } else {
34418
34498
  range.setStartAfter(fakeNode.previousSibling);
34419
34499
  }
@@ -34458,6 +34538,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34458
34538
  * Check if two separate elements can be connected
34459
34539
  * @private
34460
34540
  */ function checkJoinNeighbors(jodit, fakeNode, backspace) {
34541
+ return joinNeighbors(jodit, fakeNode, backspace, false);
34542
+ }
34543
+ /**
34544
+ * `moved` is set on the one re-entrant pass after `moveToNextLine`
34545
+ */ function joinNeighbors(jodit, fakeNode, backspace, moved) {
34461
34546
  if (checkJoinBareText(jodit, fakeNode, backspace)) {
34462
34547
  return true;
34463
34548
  }
@@ -34473,6 +34558,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34473
34558
  return false;
34474
34559
  }
34475
34560
  const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(mainClosestBox, backspace);
34561
+ if (moveInlinesInside(jodit, fakeNode, sibling)) {
34562
+ return joinNeighbors(jodit, fakeNode, backspace, moved);
34563
+ }
34476
34564
  // A line break before the cursor is a single unit: remove it instead of
34477
34565
  // merging the current element into the (void) `<br>`, which used to move
34478
34566
  // the whole element's content into the `<br>` and delete it (#1282).
@@ -34487,7 +34575,19 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34487
34575
  jodit.s.setCursorBefore(fakeNode);
34488
34576
  return true;
34489
34577
  }
34578
+ // A non-editable sibling is removed by remove-not-editable, never joined
34579
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, jodit.editor)) {
34580
+ return false;
34581
+ }
34490
34582
  const box = findCaretBox(fakeNode, mainClosestBox);
34583
+ // One pass only: the line now sits beside the next one, so the
34584
+ // cases below join them. The DOM has changed either way
34585
+ if (!moved && sibling && moveToNextLine(jodit, fakeNode, box, sibling, backspace)) {
34586
+ if (!joinNeighbors(jodit, fakeNode, backspace, true)) {
34587
+ jodit.s.setCursorBefore(fakeNode);
34588
+ }
34589
+ return true;
34590
+ }
34491
34591
  if (sibling && (checkPullNextLine(jodit, fakeNode, box, sibling, backspace) || checkMoveListContent(jodit, box, sibling, backspace) || checkJoinInlineSibling(jodit, box, sibling, backspace) || moveContentAndRemoveEmpty(jodit, box, findEdgeBlock(resolveTableSibling(sibling, backspace), backspace, jodit.editor), backspace))) {
34492
34592
  jodit.s.setCursorBefore(fakeNode);
34493
34593
  return true;
@@ -34507,6 +34607,60 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34507
34607
  }
34508
34608
  return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(block) && block.parentElement ? block.parentElement : block;
34509
34609
  }
34610
+ /**
34611
+ * With an inline element round the caret's line or the one it joins moved
34612
+ * inside its blocks, the cases join the lines as they join any two, and its
34613
+ * styles stay with its text. One round both lines is left as it is.
34614
+ */ function moveInlinesInside(jodit, fakeNode, sibling) {
34615
+ if (!sibling) {
34616
+ return false;
34617
+ }
34618
+ const around = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(fakeNode, (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, sibling), jodit.editor);
34619
+ return moveInlineInside(around, jodit.editor) || moveInlineInside(sibling, jodit.editor);
34620
+ }
34621
+ /**
34622
+ * Old content can have an inline element round blocks. This moves it inside
34623
+ * them, and gives the text, images and line breaks beside them a copy of
34624
+ * their own: `<span style="…"><p>one</p><br><p>two</p></span>` becomes
34625
+ * `<p><span style="…">one</span></p><span style="…"><br></span><p><span style="…">two</span></p>`
34626
+ */ function moveInlineInside(node, root) {
34627
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node)) {
34628
+ return false;
34629
+ }
34630
+ // Embedded content, such as the `<iframe>` in a video's wrapper, counts
34631
+ // as a block in `Dom.isBlock`, but stays with the text beside it
34632
+ const isBlock = (child)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(child) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS);
34633
+ // The inner one first: `<span><strong><p>one</p></strong></span>`
34634
+ Array.from(node.childNodes).forEach((child)=>moveInlineInside(child, root));
34635
+ const children = Array.from(node.childNodes);
34636
+ if (!children.some(isBlock)) {
34637
+ return false;
34638
+ }
34639
+ let run = null;
34640
+ for (const child of children){
34641
+ if (!isBlock(child)) {
34642
+ // Blank text between blocks stays where it is
34643
+ if (!run && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child)) {
34644
+ run = node.cloneNode(false);
34645
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(child, run);
34646
+ }
34647
+ run && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(run, child);
34648
+ continue;
34649
+ }
34650
+ run = null;
34651
+ // Nothing goes inside a rule or a non-editable block
34652
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(child, root)) {
34653
+ continue;
34654
+ }
34655
+ const inner = node.cloneNode(false);
34656
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(child, inner);
34657
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(child, inner);
34658
+ // A list or a table: on down to its items or cells
34659
+ moveInlineInside(inner, root);
34660
+ }
34661
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(node);
34662
+ return true;
34663
+ }
34510
34664
  /**
34511
34665
  * The innermost block on the sibling's edge facing the caret, so the
34512
34666
  * content is joined to text: `<div><p>one</p></div><p>|two</p>` gives
@@ -34539,6 +34693,68 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
34539
34693
  });
34540
34694
  return cells.length ? cells[backspace ? cells.length - 1 : 0] : null;
34541
34695
  }
34696
+ /**
34697
+ * On Delete, Word joins two lines where the next one is, inside or outside
34698
+ * its box or quote, and the joined line keeps the caret line's kind, list item
34699
+ * or paragraph. Two paragraphs already join that way. When either line is a
34700
+ * list item, this moves the caret's line beside the next one, and the usual
34701
+ * cases then join them: `<p>one|</p><div><ul><li>two</li></ul></div>` becomes
34702
+ * `<div><p>one|</p><ul><li>two</li></ul></div>`
34703
+ * @private
34704
+ */ function moveToNextLine(jodit, fakeNode, box, sibling, backspace) {
34705
+ if (backspace || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, 'table') || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, jodit.editor)) {
34706
+ return false;
34707
+ }
34708
+ const line = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, box, true);
34709
+ const next = findEdgeBlock(sibling, false, jodit.editor);
34710
+ if (!line || !next || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(next, jodit.editor) || !(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(line) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(next)) || // A paragraph inside a list item is left as it is
34711
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(line.parentElement) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(next.parentElement) || boxOf(line) === boxOf(next)) {
34712
+ return false;
34713
+ }
34714
+ const from = line.parentElement;
34715
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(line) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(next)) {
34716
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(next, line);
34717
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(line)) {
34718
+ // A list item keeps its bullet, in a list of its own
34719
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(next, ownList(line));
34720
+ } else {
34721
+ // A paragraph can't go inside a list, so it goes in front of it
34722
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(next.parentElement, line);
34723
+ }
34724
+ let remove = from;
34725
+ while(remove && remove !== jodit.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(remove)){
34726
+ const parent = remove.parentElement;
34727
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(remove);
34728
+ remove = parent;
34729
+ }
34730
+ return true;
34731
+ }
34732
+ /**
34733
+ * The box or quote a line is in, past its lists
34734
+ */ function boxOf(line) {
34735
+ let box = line.parentElement;
34736
+ while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(box) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(box)){
34737
+ box = box.parentElement;
34738
+ }
34739
+ return box;
34740
+ }
34741
+ /**
34742
+ * Moves a list item into a list of its own, which carries on its numbering
34743
+ */ function ownList(item) {
34744
+ const list = item.parentElement;
34745
+ const own = list.cloneNode(false);
34746
+ const index = Array.from(list.children).indexOf(item);
34747
+ if (index) {
34748
+ // Two lists cannot share one id
34749
+ own.removeAttribute('id');
34750
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(list, 'ol')) {
34751
+ const start = parseInt(list.getAttribute('start') || '1', 10) || 1;
34752
+ own.setAttribute('start', String(start + index));
34753
+ }
34754
+ }
34755
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(own, item);
34756
+ return own;
34757
+ }
34542
34758
  /**
34543
34759
  * Delete at the edge of a list pulls the next line up to the caret, as the
34544
34760
  * browsers do, instead of moving the caret's line into the next block:
@@ -34796,7 +35012,9 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
34796
35012
  while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(sibling)){
34797
35013
  sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
34798
35014
  }
34799
- if (!sibling) {
35015
+ // A block inside an inline element, such as the `<p>` in
35016
+ // `<span><p>…</p></span>`, isn't a char: the join cases handle it
35017
+ if (!sibling || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(sibling)) {
34800
35018
  break;
34801
35019
  }
34802
35020
  if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
@@ -34944,6 +35162,7 @@ function isSpace(char) {
34944
35162
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
34945
35163
  /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
34946
35164
  /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45124);
35165
+ /* harmony import */ var _check_join_neighbors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62845);
34947
35166
  /*!
34948
35167
  * Jodit Editor (https://xdsoft.net/jodit/)
34949
35168
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34951,23 +35170,48 @@ function isSpace(char) {
34951
35170
  */
34952
35171
 
34953
35172
 
35173
+
34954
35174
  /**
34955
- * Checks if a non-editable element can be deleted
35175
+ * Checks if a non-editable element can be deleted. A non-editable block goes
35176
+ * whole, and the lines either side of it then join, as the spec's tests do:
35177
+ * `<ul><li>one|</li></ul><div contenteditable="false">x</div><p>two</p>`
35178
+ * gives `<ul><li>one|two</li></ul>`
34956
35179
  * @private
34957
35180
  */ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
34958
- let neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fakeNode, backspace);
34959
- if (!neighbor && fakeNode.parentElement && fakeNode.parentElement !== jodit.editor) {
34960
- neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(fakeNode.parentElement, backspace);
34961
- }
34962
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(neighbor) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isContentEditable(neighbor, jodit.editor)) {
34963
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after, neighbor, fakeNode);
34964
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(neighbor);
34965
- (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.moveNodeInsideStart)(jodit, fakeNode, backspace);
34966
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
35181
+ let node = fakeNode;
35182
+ let neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(node, backspace);
35183
+ // Past the edges of the blocks the caret is at, but not into a table cell
35184
+ while(!neighbor && node.parentElement && node.parentElement !== jodit.editor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(node.parentElement)){
35185
+ node = node.parentElement;
35186
+ neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(node, backspace);
35187
+ // At the start of a list item, Backspace takes the bullet off first,
35188
+ // unless the item before it is a non-editable one to remove
35189
+ if (backspace && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(node) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(neighbor) && isNotEditable(jodit, neighbor))) {
35190
+ return false;
35191
+ }
35192
+ }
35193
+ if (isNotEditable(jodit, neighbor)) {
35194
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(neighbor)) {
35195
+ // Backspace after a removed list item leaves the items apart: the
35196
+ // next press takes the bullet off, as for any later item
35197
+ const joinLines = !(backspace && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(neighbor));
35198
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(neighbor);
35199
+ if (joinLines) {
35200
+ (0,_check_join_neighbors_js__WEBPACK_IMPORTED_MODULE_3__.checkJoinNeighbors)(jodit, fakeNode, backspace);
35201
+ }
35202
+ } else {
35203
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after, neighbor, fakeNode);
35204
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(neighbor);
35205
+ (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.moveNodeInsideStart)(jodit, fakeNode, backspace);
35206
+ }
35207
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
34967
35208
  return true;
34968
35209
  }
34969
35210
  return false;
34970
35211
  }
35212
+ function isNotEditable(jodit, node) {
35213
+ return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isContentEditable(node, jodit.editor);
35214
+ }
34971
35215
 
34972
35216
 
34973
35217
  /***/ }),
@@ -55699,12 +55943,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
55699
55943
  /***/ 72253:
55700
55944
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
55701
55945
 
55702
- /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65478);
55703
- /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
55704
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
55705
- /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
55706
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
55707
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96967);
55946
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
55947
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
55948
+ /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
55949
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
55950
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70799);
55951
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
55952
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96967);
55708
55953
  /*!
55709
55954
  * Jodit Editor (https://xdsoft.net/jodit/)
55710
55955
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -55721,9 +55966,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
55721
55966
 
55722
55967
 
55723
55968
 
55969
+
55724
55970
  /**
55725
55971
  * Wrap single text nodes in block wrapper
55726
- */ class wrapNodes extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
55972
+ */ class wrapNodes extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
55727
55973
  /** @override **/ afterInit(jodit) {
55728
55974
  if (jodit.o.enter.toLowerCase() === 'br') {
55729
55975
  return;
@@ -55752,10 +55998,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
55752
55998
  }
55753
55999
  isChanged = true;
55754
56000
  const box = jodit.createInside.element(jodit.o.enter);
55755
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(child, box);
55756
- while(child && this.isSuitable(child)){
56001
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(child, box);
56002
+ // `exclude` keeps a <br> from starting a box, but one between loose lines stays with them
56003
+ while(child && (this.isSuitable(child) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(child, 'br'))){
55757
56004
  const next = child.nextSibling;
55758
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(box, child);
56005
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, child);
55759
56006
  child = next;
55760
56007
  }
55761
56008
  box.normalize();
@@ -55779,8 +56026,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
55779
56026
  }
55780
56027
  const box = jodit.createInside.element(jodit.o.enter);
55781
56028
  const br = jodit.createInside.element('br');
55782
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(box, br);
55783
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(jodit.editor, box);
56029
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, br);
56030
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(jodit.editor, box);
55784
56031
  if (jodit.s.isFocused() || jodit.e.current === 'backSpaceAfterDelete') {
55785
56032
  jodit.s.setCursorBefore(br);
55786
56033
  }
@@ -55792,32 +56039,43 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
55792
56039
  * Found Node which should be wrapped
55793
56040
  */ this.isSuitableStart = (n)=>{
55794
56041
  var _a;
55795
- return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(n) && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(n.nodeValue) && (/[^\s]/.test(n.nodeValue) || ((_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === n && this.isSuitable(n.nextSibling)) || this.isNotWrapped(n) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTemporary(n);
56042
+ return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(n) && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__.isString)(n.nodeValue) && (/[^\s]/.test(n.nodeValue) || ((_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === n && this.isSuitable(n.nextSibling)) || this.isNotWrapped(n) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTemporary(n);
55796
56043
  };
55797
56044
  /**
55798
56045
  * Node should add in a block element
55799
- */ this.isSuitable = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(n) || this.isNotWrapped(n);
56046
+ */ this.isSuitable = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(n) || this.isNotWrapped(n);
55800
56047
  /**
55801
56048
  * Some element which needs to append in block
55802
- */ this.isNotWrapped = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(n) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(n) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(n, this.j.o.wrapNodes.exclude));
56049
+ */ this.isNotWrapped = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(n) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(n) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(n, this.j.o.wrapNodes.exclude) || holdsBlock(n));
55803
56050
  }
55804
56051
  }
55805
56052
  __decorate([
55806
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
56053
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
55807
56054
  ], wrapNodes.prototype, "postProcessSetEditorValue", null);
55808
56055
  __decorate([
55809
- _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.autobind
56056
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
55810
56057
  ], wrapNodes.prototype, "preprocessInput", null);
56058
+ /**
56059
+ * A block can't go in a paragraph, so neither can an element that holds one,
56060
+ * such as a `<span>` round a `<p>`. Embedded content such as an `<iframe>` can.
56061
+ */ function holdsBlock(elm) {
56062
+ for (const node of _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.eachGen(elm)){
56063
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(node) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS)) {
56064
+ return true;
56065
+ }
56066
+ }
56067
+ return false;
56068
+ }
55811
56069
  function checkAloneListLeaf(child, jodit) {
55812
56070
  let result = child;
55813
56071
  let next = child;
55814
56072
  do {
55815
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(next) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(next) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(next.parentElement)) {
55816
- const nextChild = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(next, false);
55817
- if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(result, 'ul')) {
55818
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(result, next);
56073
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(next) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isLeaf(next) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isList(next.parentElement)) {
56074
+ const nextChild = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(next, false);
56075
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(result, 'ul')) {
56076
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(result, next);
55819
56077
  } else {
55820
- result = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrap(next, 'ul', jodit.createInside);
56078
+ result = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(next, 'ul', jodit.createInside);
55821
56079
  }
55822
56080
  next = nextChild;
55823
56081
  } else {
@@ -55826,7 +56084,7 @@ function checkAloneListLeaf(child, jodit) {
55826
56084
  }while (next)
55827
56085
  return result;
55828
56086
  }
55829
- _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('wrapNodes', wrapNodes);
56087
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('wrapNodes', wrapNodes);
55830
56088
 
55831
56089
 
55832
56090
  /***/ }),