jodit-pro 4.2.23 → 4.2.24

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 +4 -2
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +95 -57
  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 +4 -2
  62. package/es2018/jodit.fat.min.css +1 -1
  63. package/es2018/jodit.fat.min.js +2 -2
  64. package/es2018/jodit.js +95 -57
  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 +4 -2
  122. package/es2021/jodit.fat.min.css +1 -1
  123. package/es2021/jodit.fat.min.js +2 -2
  124. package/es2021/jodit.js +95 -57
  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 +4 -2
  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 +95 -57
  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 +11 -6
  242. package/es5/jodit.fat.min.css +1 -1
  243. package/es5/jodit.fat.min.js +2 -2
  244. package/es5/jodit.js +98 -57
  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/es2015/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.23
4
+ * Version: v4.2.24
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -2450,7 +2450,7 @@ __webpack_require__.r(__webpack_exports__);
2450
2450
  * Released under MIT see LICENSE.txt in the project root for license information.
2451
2451
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
2452
2452
  */
2453
- const APP_VERSION = "4.2.23";
2453
+ const APP_VERSION = "4.2.24";
2454
2454
  // prettier-ignore
2455
2455
  const ES = "es2015";
2456
2456
  const IS_ES_MODERN = true;
@@ -2612,8 +2612,8 @@ const KEY_ALIASES = {
2612
2612
  option: 'alt',
2613
2613
  return: 'enter',
2614
2614
  right: 'arrowright',
2615
- space: ' ',
2616
- spacebar: ' ',
2615
+ space: 'space',
2616
+ spacebar: 'space',
2617
2617
  up: 'arrowup',
2618
2618
  win: 'meta',
2619
2619
  windows: 'meta'
@@ -3575,11 +3575,17 @@ class Dom {
3575
3575
  }
3576
3576
  static replace(elm, newTagName, create, withAttributes = false, notMoveContent = false) {
3577
3577
  if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isHTML */ .AH)(newTagName)) {
3578
+ void 0;
3578
3579
  newTagName = create.fromHTML(newTagName);
3579
3580
  }
3580
- const tag = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)
3581
- ? create.element(newTagName)
3582
- : newTagName;
3581
+ let tag;
3582
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)) {
3583
+ void 0;
3584
+ tag = create.element(newTagName);
3585
+ }
3586
+ else {
3587
+ tag = newTagName;
3588
+ }
3583
3589
  if (!notMoveContent) {
3584
3590
  while (elm.firstChild) {
3585
3591
  tag.appendChild(elm.firstChild);
@@ -5232,7 +5238,8 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
5232
5238
  const data = boxes.get(jodit) || {}, key = name + tag;
5233
5239
  const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
5234
5240
  if (!data[key]) {
5235
- let c = view.c, body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
5241
+ let c = view.c;
5242
+ let body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
5236
5243
  ? jodit.o.shadowRoot
5237
5244
  : jodit.od.body;
5238
5245
  if (createInsideEditor &&
@@ -5252,6 +5259,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
5252
5259
  body.appendChild(box);
5253
5260
  data[key] = box;
5254
5261
  jodit.hookStatus('beforeDestruct', () => {
5262
+ view.events.off(box);
5255
5263
  _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box);
5256
5264
  delete data[key];
5257
5265
  if (Object.keys(data).length) {
@@ -5259,6 +5267,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
5259
5267
  }
5260
5268
  });
5261
5269
  boxes.set(jodit, data);
5270
+ view.events.fire('getContainer', box);
5262
5271
  }
5263
5272
  data[key].classList.remove('jodit_theme_default', 'jodit_theme_dark');
5264
5273
  data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
@@ -7059,7 +7068,8 @@ function normalizeKeyAliases(keys) {
7059
7068
  ctrl: 2,
7060
7069
  control: 2,
7061
7070
  alt: 3,
7062
- shift: 4
7071
+ shift: 4,
7072
+ space: 5
7063
7073
  };
7064
7074
  return keys
7065
7075
  .replace(/\+\+/g, '+add')
@@ -14112,15 +14122,21 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
14112
14122
  if (!view.o.textIcons &&
14113
14123
  view.o.showTooltip &&
14114
14124
  !view.o.useNativeTooltip) {
14125
+ this.j.e.on('getContainer', (box) => {
14126
+ this.__onAttach(box);
14127
+ });
14115
14128
  view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
14116
- // TODO Move it inside __show method. Now it is here because testcase failed with capturing
14117
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
14118
- view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
14119
- capture: true
14120
- });
14129
+ this.__onAttach(this.j.container);
14121
14130
  });
14122
14131
  }
14123
14132
  }
14133
+ __onAttach(container) {
14134
+ // TODO Move it inside __show method. Now it is here because testcase failed with capturing
14135
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
14136
+ this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
14137
+ capture: true
14138
+ });
14139
+ }
14124
14140
  __addListenersOnEnter() {
14125
14141
  if (this.__listenClose) {
14126
14142
  return;
@@ -23267,46 +23283,39 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23267
23283
  removeRow(table, rowIndex) {
23268
23284
  return Table.__removeRow(table, rowIndex);
23269
23285
  }
23270
- static __appendColumn(table, j, after, create) {
23286
+ /**
23287
+ * Insert column before / after all the columns containing the selected cells
23288
+ */
23289
+ appendColumn(table, selectedCell, insertAfter = true) {
23271
23290
  const box = Table.__formalMatrix(table);
23272
- let i;
23273
- if (j === undefined || j < 0) {
23274
- j = Table.__getColumnsCount(table) - 1;
23275
- }
23276
- for (i = 0; i < box.length; i += 1) {
23277
- const cell = create.element('td');
23278
- const td = box[i][j];
23279
- let added = false;
23280
- if (after) {
23281
- if ((box[i] && td && j + 1 >= box[i].length) ||
23282
- td !== box[i][j + 1]) {
23283
- if (td.nextSibling) {
23284
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(td.nextSibling, cell);
23285
- }
23286
- else {
23287
- td.parentNode && td.parentNode.appendChild(cell);
23288
- }
23289
- added = true;
23291
+ if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
23292
+ return this.appendColumn(table, selectedCell.previousElementSibling, true);
23293
+ }
23294
+ const columnIndex = insertAfter
23295
+ ? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
23296
+ : selectedCell.cellIndex;
23297
+ const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
23298
+ for (let i = 0; i < box.length;) {
23299
+ const cells = box[i];
23300
+ if (cells[columnIndex] !== cells[newColumnIndex] ||
23301
+ columnIndex === newColumnIndex) {
23302
+ const cell = this.j.createInside.element('td');
23303
+ if (insertAfter) {
23304
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
23290
23305
  }
23291
- }
23292
- else {
23293
- if (j - 1 < 0 ||
23294
- (box[i][j] !== box[i][j - 1] && box[i][j].parentNode)) {
23295
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(box[i][j], cell);
23296
- added = true;
23306
+ else {
23307
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
23308
+ }
23309
+ if (cells[columnIndex].rowSpan > 1) {
23310
+ cell.rowSpan = cells[columnIndex].rowSpan;
23297
23311
  }
23298
23312
  }
23299
- if (!added) {
23300
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', parseInt((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan') || '1', 10) + 1);
23313
+ else {
23314
+ cells[columnIndex].colSpan += 1;
23301
23315
  }
23316
+ i += cells[columnIndex].rowSpan || 1;
23302
23317
  }
23303
23318
  }
23304
- /**
23305
- * Insert column before / after all the columns containing the selected cells
23306
- */
23307
- appendColumn(table, j, after) {
23308
- return Table.__appendColumn(table, j, after, this.j.createInside);
23309
- }
23310
23319
  static __removeColumn(table, j) {
23311
23320
  const box = Table.__formalMatrix(table);
23312
23321
  let dec;
@@ -23524,7 +23533,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23524
23533
  alreadyMerged.delete(first);
23525
23534
  Table.__unmark(__marked);
23526
23535
  Table.__normalizeTable(table);
23527
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach((tr, index) => {
23536
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(tr => {
23528
23537
  if (!tr.cells.length) {
23529
23538
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
23530
23539
  }
@@ -23533,7 +23542,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
23533
23542
  }
23534
23543
  }
23535
23544
  /**
23536
- * It combines all of the selected cells into one. The contents of the cells will also be combined
23545
+ * It combines all the selected cells into one. The contents of the cells will also be combined
23537
23546
  */
23538
23547
  mergeSelected(table) {
23539
23548
  return Table.__mergeSelected(table, this.j);
@@ -25874,7 +25883,9 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25874
25883
  editor.e
25875
25884
  .off(editor.editor, '.' + ns)
25876
25885
  .off(editor.container, '.' + ns)
25886
+ .off('.' + ns)
25877
25887
  .on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
25888
+ .on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
25878
25889
  .on(editor.editor, 'click' + '.' + ns, this.__hide)
25879
25890
  .on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
25880
25891
  .on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
@@ -25962,7 +25973,8 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25962
25973
  jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
25963
25974
  this.j.e
25964
25975
  .off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
25965
- .off(this.j.container, '.' + ns);
25976
+ .off(this.j.container, '.' + ns)
25977
+ .off('.' + ns);
25966
25978
  }
25967
25979
  }
25968
25980
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
@@ -28147,13 +28159,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
28147
28159
  */
28148
28160
 
28149
28161
 
28162
+ const TABLE_CONTAINER_TAGS = new Set([
28163
+ 'table',
28164
+ 'tbody',
28165
+ 'thead',
28166
+ 'tfoot',
28167
+ 'tr'
28168
+ ]);
28150
28169
  /**
28151
28170
  * @private
28152
28171
  */
28153
28172
  function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
28154
28173
  if (jodit.o.cleanHTML.fillEmptyParagraph &&
28155
28174
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
28156
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
28175
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
28176
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
28157
28177
  const br = jodit.createInside.element('br');
28158
28178
  nodeElm.appendChild(br);
28159
28179
  return true;
@@ -31376,7 +31396,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
31376
31396
  constructor() {
31377
31397
  super(...arguments);
31378
31398
  this.onKeyPress = (event) => {
31379
- const special = this.specialKeys[event.which], character = (event.key || String.fromCharCode(event.which)).toLowerCase();
31399
+ const special = this.specialKeys[event.which];
31400
+ const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
31380
31401
  const modif = [special || character];
31381
31402
  ['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
31382
31403
  if (event[specialKey + 'Key'] && special !== specialKey) {
@@ -31470,7 +31491,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
31470
31491
  }
31471
31492
  })
31472
31493
  .on('keydown.hotkeys', (event) => {
31473
- const shortcut = this.onKeyPress(event), stop = {
31494
+ const shortcut = this.onKeyPress(event);
31495
+ const stop = {
31474
31496
  shouldStop: true
31475
31497
  };
31476
31498
  const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
@@ -39859,7 +39881,7 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
39859
39881
  break;
39860
39882
  case 'addcolumnafter':
39861
39883
  case 'addcolumnbefore':
39862
- this.__tableModule.appendColumn(table, cell.cellIndex, command === 'addcolumnafter');
39884
+ this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
39863
39885
  break;
39864
39886
  case 'addrowafter':
39865
39887
  case 'addrowbefore':
@@ -43218,6 +43240,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
43218
43240
  }
43219
43241
  },
43220
43242
  popup: (editor, current, close, button) => {
43243
+ editor.editor.normalize();
43244
+ const snapshot = editor.history.snapshot.make();
43221
43245
  const control = button.control;
43222
43246
  const default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
43223
43247
  const generateExtraClasses = () => {
@@ -43310,10 +43334,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
43310
43334
  table.classList.add(className);
43311
43335
  });
43312
43336
  });
43313
- if (editor.editor.firstChild) {
43314
- editor.s.insertNode(crt.text('\n'), false, false);
43337
+ editor.s.restore();
43338
+ editor.s.removeMarkers();
43339
+ editor.editor.normalize();
43340
+ editor.history.snapshot.restore(snapshot);
43341
+ const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.furthest(editor.s.current(), jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, editor.editor);
43342
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
43343
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
43344
+ }
43345
+ else {
43346
+ if (block) {
43347
+ const fake = crt.text('\n');
43348
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
43349
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
43350
+ }
43351
+ else {
43352
+ editor.s.insertNode(table, false);
43353
+ }
43315
43354
  }
43316
- editor.s.insertNode(table, false);
43317
43355
  if (first_td) {
43318
43356
  editor.s.setCursorIn(first_td);
43319
43357
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);