jodit-pro 4.19.5 → 4.19.8

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 +382 -117
  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 +5 -5
  79. package/es2018/jodit.min.js +9 -9
  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 +7 -7
  109. package/es2021/jodit.js +274 -60
  110. package/es2021/jodit.min.js +19 -19
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  112. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  113. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  115. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  116. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  117. package/es2021/plugins/backup/backup.css +1 -1
  118. package/es2021/plugins/backup/backup.js +1 -1
  119. package/es2021/plugins/backup/backup.min.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.css +1 -1
  121. package/es2021/plugins/button-generator/button-generator.js +1 -1
  122. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  123. package/es2021/plugins/change-case/change-case.js +1 -1
  124. package/es2021/plugins/change-case/change-case.min.js +1 -1
  125. package/es2021/plugins/chart/chart.css +1 -1
  126. package/es2021/plugins/chart/chart.js +1 -1
  127. package/es2021/plugins/chart/chart.min.js +1 -1
  128. package/es2021/plugins/color-picker/color-picker.css +1 -1
  129. package/es2021/plugins/color-picker/color-picker.js +1 -1
  130. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  131. package/es2021/plugins/emoji/emoji.css +1 -1
  132. package/es2021/plugins/emoji/emoji.js +1 -1
  133. package/es2021/plugins/emoji/emoji.min.js +1 -1
  134. package/es2021/plugins/export-docs/export-docs.js +1 -1
  135. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  136. package/es2021/plugins/finder/finder.css +1 -1
  137. package/es2021/plugins/finder/finder.js +1 -1
  138. package/es2021/plugins/finder/finder.min.js +1 -1
  139. package/es2021/plugins/google-maps/google-maps.css +1 -1
  140. package/es2021/plugins/google-maps/google-maps.js +1 -1
  141. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  142. package/es2021/plugins/google-search/google-search.js +1 -1
  143. package/es2021/plugins/google-search/google-search.min.js +1 -1
  144. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  145. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  146. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  147. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  148. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  149. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  150. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  151. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  152. package/es2021/plugins/keyboard/keyboard.css +1 -1
  153. package/es2021/plugins/keyboard/keyboard.js +1 -1
  154. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  155. package/es2021/plugins/math/math.css +1 -1
  156. package/es2021/plugins/math/math.js +1 -1
  157. package/es2021/plugins/math/math.min.js +1 -1
  158. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  159. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  160. package/es2021/plugins/page-break/page-break.js +1 -1
  161. package/es2021/plugins/page-break/page-break.min.js +1 -1
  162. package/es2021/plugins/paste-code/paste-code.css +1 -1
  163. package/es2021/plugins/paste-code/paste-code.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  165. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  166. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  167. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  168. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  169. package/es2021/plugins/style/style.css +1 -1
  170. package/es2021/plugins/style/style.js +1 -1
  171. package/es2021/plugins/style/style.min.js +1 -1
  172. package/es2021/plugins/templates/templates.css +1 -1
  173. package/es2021/plugins/templates/templates.js +1 -1
  174. package/es2021/plugins/templates/templates.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +1 -1
  185. package/es2021.en/jodit.fat.min.js +7 -7
  186. package/es2021.en/jodit.js +274 -60
  187. package/es2021.en/jodit.min.js +7 -7
  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 +692 -117
  264. package/es5/jodit.min.css +2 -2
  265. package/es5/jodit.min.js +2 -2
  266. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  267. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  269. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  270. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  272. package/es5/plugins/backup/backup.css +1 -1
  273. package/es5/plugins/backup/backup.js +1 -1
  274. package/es5/plugins/backup/backup.min.js +1 -1
  275. package/es5/plugins/button-generator/button-generator.css +1 -1
  276. package/es5/plugins/button-generator/button-generator.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  278. package/es5/plugins/change-case/change-case.js +1 -1
  279. package/es5/plugins/change-case/change-case.min.js +1 -1
  280. package/es5/plugins/chart/chart.css +1 -1
  281. package/es5/plugins/chart/chart.js +1 -1
  282. package/es5/plugins/chart/chart.min.js +1 -1
  283. package/es5/plugins/color-picker/color-picker.css +1 -1
  284. package/es5/plugins/color-picker/color-picker.js +1 -1
  285. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  286. package/es5/plugins/emoji/emoji.css +1 -1
  287. package/es5/plugins/emoji/emoji.js +1 -1
  288. package/es5/plugins/emoji/emoji.min.js +1 -1
  289. package/es5/plugins/export-docs/export-docs.js +1 -1
  290. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  291. package/es5/plugins/finder/finder.css +1 -1
  292. package/es5/plugins/finder/finder.js +1 -1
  293. package/es5/plugins/finder/finder.min.js +1 -1
  294. package/es5/plugins/google-maps/google-maps.css +1 -1
  295. package/es5/plugins/google-maps/google-maps.js +1 -1
  296. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  297. package/es5/plugins/google-search/google-search.js +1 -1
  298. package/es5/plugins/google-search/google-search.min.js +1 -1
  299. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  300. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  301. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  302. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  303. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  304. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  305. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  306. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  307. package/es5/plugins/keyboard/keyboard.css +1 -1
  308. package/es5/plugins/keyboard/keyboard.js +1 -1
  309. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  310. package/es5/plugins/math/math.css +1 -1
  311. package/es5/plugins/math/math.js +1 -1
  312. package/es5/plugins/math/math.min.js +1 -1
  313. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  314. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  315. package/es5/plugins/page-break/page-break.js +1 -1
  316. package/es5/plugins/page-break/page-break.min.js +1 -1
  317. package/es5/plugins/paste-code/paste-code.css +1 -1
  318. package/es5/plugins/paste-code/paste-code.js +1 -1
  319. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  320. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  321. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  322. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  323. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  324. package/es5/plugins/style/style.css +1 -1
  325. package/es5/plugins/style/style.js +1 -1
  326. package/es5/plugins/style/style.min.js +1 -1
  327. package/es5/plugins/templates/templates.css +1 -1
  328. package/es5/plugins/templates/templates.js +1 -1
  329. package/es5/plugins/templates/templates.min.js +1 -1
  330. package/es5/plugins/todo-list/todo-list.css +1 -1
  331. package/es5/plugins/todo-list/todo-list.js +1 -1
  332. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  333. package/es5/plugins/translate/translate.css +1 -1
  334. package/es5/plugins/translate/translate.js +1 -1
  335. package/es5/plugins/translate/translate.min.js +1 -1
  336. package/es5/plugins/tune-block/tune-block.css +1 -1
  337. package/es5/plugins/tune-block/tune-block.js +1 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  339. package/es5/polyfills.fat.min.js +1 -1
  340. package/es5/polyfills.js +1 -1
  341. package/es5/polyfills.min.js +1 -1
  342. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.19.5
4
+ * Version: v4.19.8
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1768,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
1768
1768
  * ```
1769
1769
  * @packageDocumentation
1770
1770
  * @module constants
1771
- */ const APP_VERSION = "4.19.5";
1771
+ */ const APP_VERSION = "4.19.8";
1772
1772
  // prettier-ignore
1773
1773
  const ES = "es2021";
1774
1774
  const IS_ES_MODERN = true;
@@ -1907,6 +1907,8 @@ const EMULATE_DBLCLICK_TIMEOUT = 300;
1907
1907
  * ```
1908
1908
  */ const INSERT_ONLY_TEXT = 'insert_only_text';
1909
1909
  const SAFE_COUNT_CHANGE_CALL = 10;
1910
+ // Connector answer code for a file name that is already taken (same as the HTTP status)
1911
+ const ERROR_CODE_CONFLICT = 409;
1910
1912
  const IS_MAC = typeof globalWindow !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
1911
1913
  const KEY_ALIASES = {
1912
1914
  add: '+',
@@ -1990,6 +1992,7 @@ const PASSIVE_EVENTS = new Set([
1990
1992
  /* harmony export */ "CLIPBOARD_ID", 0, /* binding */ CLIPBOARD_ID,
1991
1993
  /* harmony export */ "COMMAND_KEYS", 0, /* binding */ COMMAND_KEYS,
1992
1994
  /* harmony export */ "EMULATE_DBLCLICK_TIMEOUT", 0, /* binding */ EMULATE_DBLCLICK_TIMEOUT,
1995
+ /* harmony export */ "ERROR_CODE_CONFLICT", 0, /* binding */ ERROR_CODE_CONFLICT,
1993
1996
  /* harmony export */ "ES", 0, /* binding */ ES,
1994
1997
  /* harmony export */ "FAT_MODE", 0, /* binding */ FAT_MODE,
1995
1998
  /* harmony export */ "HOMEPAGE", 0, /* binding */ HOMEPAGE,
@@ -6513,6 +6516,7 @@ function isAdjacent(prev, item) {
6513
6516
  __webpack_require__.r(__webpack_exports__);
6514
6517
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6515
6518
  /* harmony export */ $$: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.$$; },
6519
+ /* harmony export */ AnswerError: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.AnswerError; },
6516
6520
  /* harmony export */ CamelCaseToKebabCase: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.CamelCaseToKebabCase; },
6517
6521
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.ConfigDeepFlatten; },
6518
6522
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.ConfigFlatten; },
@@ -6526,6 +6530,7 @@ __webpack_require__.r(__webpack_exports__);
6526
6530
  /* harmony export */ abort: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.abort; },
6527
6531
  /* harmony export */ alignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.alignElement; },
6528
6532
  /* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.alreadyLoadedList; },
6533
+ /* harmony export */ answer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.answer; },
6529
6534
  /* harmony export */ appendScriptAsync: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.appendScriptAsync; },
6530
6535
  /* harmony export */ appendStyleAsync: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.appendStyleAsync; },
6531
6536
  /* harmony export */ applyStyles: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.applyStyles; },
@@ -8603,6 +8608,7 @@ const dataBind = (elm, key, value)=>{
8603
8608
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8604
8609
 
8605
8610
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8611
+ /* harmony export */ answer: function() { return /* binding */ answer; },
8606
8612
  /* harmony export */ connection: function() { return /* binding */ connection; },
8607
8613
  /* harmony export */ error: function() { return /* binding */ error; },
8608
8614
  /* harmony export */ options: function() { return /* binding */ options; }
@@ -8626,6 +8632,9 @@ function connection(message) {
8626
8632
  function options(message) {
8627
8633
  return new _errors_index_js__WEBPACK_IMPORTED_MODULE_0__.OptionsError(message);
8628
8634
  }
8635
+ function answer(message, resp, code) {
8636
+ return new _errors_index_js__WEBPACK_IMPORTED_MODULE_0__.AnswerError(message, resp, code);
8637
+ }
8629
8638
 
8630
8639
 
8631
8640
  /***/ }),
@@ -8645,6 +8654,31 @@ function options(message) {
8645
8654
  }
8646
8655
 
8647
8656
 
8657
+ /***/ }),
8658
+
8659
+ /***/ 5311:
8660
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8661
+
8662
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8663
+ /* harmony export */ AnswerError: function() { return /* binding */ AnswerError; }
8664
+ /* harmony export */ });
8665
+ /*!
8666
+ * Jodit Editor (https://xdsoft.net/jodit/)
8667
+ * Released under MIT see LICENSE.txt in the project root for license information.
8668
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8669
+ */ /**
8670
+ * @module helpers/utils
8671
+ */ // A connector refused the request: the answer and its `data.code` stay reachable for the handler
8672
+ class AnswerError extends Error {
8673
+ constructor(message, answer, code){
8674
+ super(message);
8675
+ this.answer = answer;
8676
+ this.code = code;
8677
+ Object.setPrototypeOf(this, AnswerError.prototype);
8678
+ }
8679
+ }
8680
+
8681
+
8648
8682
  /***/ }),
8649
8683
 
8650
8684
  /***/ 86397:
@@ -8673,13 +8707,15 @@ function options(message) {
8673
8707
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8674
8708
 
8675
8709
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8676
- /* harmony export */ ConnectionError: function() { return /* reexport safe */ _connection_error_js__WEBPACK_IMPORTED_MODULE_1__.ConnectionError; },
8677
- /* harmony export */ OptionsError: function() { return /* reexport safe */ _options_error_js__WEBPACK_IMPORTED_MODULE_2__.OptionsError; },
8710
+ /* harmony export */ AnswerError: function() { return /* reexport safe */ _answer_error_js__WEBPACK_IMPORTED_MODULE_1__.AnswerError; },
8711
+ /* harmony export */ ConnectionError: function() { return /* reexport safe */ _connection_error_js__WEBPACK_IMPORTED_MODULE_2__.ConnectionError; },
8712
+ /* harmony export */ OptionsError: function() { return /* reexport safe */ _options_error_js__WEBPACK_IMPORTED_MODULE_3__.OptionsError; },
8678
8713
  /* harmony export */ abort: function() { return /* reexport safe */ _abort_error_js__WEBPACK_IMPORTED_MODULE_0__.abort; }
8679
8714
  /* harmony export */ });
8680
8715
  /* harmony import */ var _abort_error_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93661);
8681
- /* harmony import */ var _connection_error_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86397);
8682
- /* harmony import */ var _options_error_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57865);
8716
+ /* harmony import */ var _answer_error_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5311);
8717
+ /* harmony import */ var _connection_error_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86397);
8718
+ /* harmony import */ var _options_error_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57865);
8683
8719
  /*!
8684
8720
  * Jodit Editor (https://xdsoft.net/jodit/)
8685
8721
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8691,6 +8727,7 @@ function options(message) {
8691
8727
 
8692
8728
 
8693
8729
 
8730
+
8694
8731
  /***/ }),
8695
8732
 
8696
8733
  /***/ 57865:
@@ -8719,9 +8756,11 @@ function options(message) {
8719
8756
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8720
8757
 
8721
8758
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8759
+ /* harmony export */ AnswerError: function() { return /* reexport safe */ _errors_index_js__WEBPACK_IMPORTED_MODULE_1__.AnswerError; },
8722
8760
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _errors_index_js__WEBPACK_IMPORTED_MODULE_1__.ConnectionError; },
8723
8761
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _errors_index_js__WEBPACK_IMPORTED_MODULE_1__.OptionsError; },
8724
8762
  /* harmony export */ abort: function() { return /* reexport safe */ _errors_index_js__WEBPACK_IMPORTED_MODULE_1__.abort; },
8763
+ /* harmony export */ answer: function() { return /* reexport safe */ _error_js__WEBPACK_IMPORTED_MODULE_0__.answer; },
8725
8764
  /* harmony export */ connection: function() { return /* reexport safe */ _error_js__WEBPACK_IMPORTED_MODULE_0__.connection; },
8726
8765
  /* harmony export */ error: function() { return /* reexport safe */ _error_js__WEBPACK_IMPORTED_MODULE_0__.error; },
8727
8766
  /* harmony export */ options: function() { return /* reexport safe */ _error_js__WEBPACK_IMPORTED_MODULE_0__.options; }
@@ -8952,6 +8991,7 @@ const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTML
8952
8991
 
8953
8992
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8954
8993
  /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.$$; },
8994
+ /* harmony export */ AnswerError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.AnswerError; },
8955
8995
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8956
8996
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8957
8997
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
@@ -8963,6 +9003,7 @@ const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTML
8963
9003
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
8964
9004
  /* harmony export */ alignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.alignElement; },
8965
9005
  /* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.alreadyLoadedList; },
9006
+ /* harmony export */ answer: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.answer; },
8966
9007
  /* harmony export */ appendScriptAsync: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.appendScriptAsync; },
8967
9008
  /* harmony export */ appendStyleAsync: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.appendStyleAsync; },
8968
9009
  /* harmony export */ assert: function() { return /* reexport safe */ _assert_js__WEBPACK_IMPORTED_MODULE_2__.assert; },
@@ -9555,6 +9596,7 @@ const map = {};
9555
9596
  /**
9556
9597
  * Check if element is in view
9557
9598
  */ function inView(elm, root, doc) {
9599
+ var _a;
9558
9600
  let rect = elm.getBoundingClientRect(), el = elm;
9559
9601
  const top = rect.top, height = rect.height;
9560
9602
  while(el && el !== root && el.parentNode){
@@ -9579,7 +9621,11 @@ const map = {};
9579
9621
  // element scrolled above the top was wrongly reported as visible and never
9580
9622
  // scrolled to. See #1279
9581
9623
  const clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
9582
- return (top + height <= clientHeight + SUBPIXEL_TOLERANCE || top <= 0) && top + height >= 0;
9624
+ // `scrollIntoView` keeps clear of the document's `scroll-padding`, which
9625
+ // is how a page allows for a fixed header or footer, so its edges are the
9626
+ // viewport's edges here too
9627
+ const style = (_a = doc.defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(doc.documentElement), padding = (value = '')=>value.endsWith('%') ? parseFloat(value) * clientHeight / 100 : parseFloat(value) || 0, viewTop = padding(style === null || style === void 0 ? void 0 : style.scrollPaddingTop), viewBottom = clientHeight - padding(style === null || style === void 0 ? void 0 : style.scrollPaddingBottom);
9628
+ return (top + height <= viewBottom + SUBPIXEL_TOLERANCE || top <= viewTop) && top + height >= viewTop;
9583
9629
  }
9584
9630
  /**
9585
9631
  * Scroll element into view if it is not in view
@@ -10479,6 +10525,23 @@ class Ajax {
10479
10525
  } catch (_a) {}
10480
10526
  return this;
10481
10527
  }
10528
+ // A connector answers an error with its JSON envelope and a real HTTP status (403, 409): the body says why, the reason phrase does not
10529
+ __hasAnswerEnvelope() {
10530
+ const { xhr } = this;
10531
+ if (xhr.responseType && xhr.responseType !== 'text') {
10532
+ return false;
10533
+ }
10534
+ const text = xhr.responseText;
10535
+ if (!text || text[0] !== '{') {
10536
+ return false;
10537
+ }
10538
+ try {
10539
+ const answer = JSON.parse(text);
10540
+ return (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isPlainObject)(answer) && 'success' in answer;
10541
+ } catch (_a) {
10542
+ return false;
10543
+ }
10544
+ }
10482
10545
  send() {
10483
10546
  this.__activated = true;
10484
10547
  const { xhr, o } = this;
@@ -10515,7 +10578,7 @@ class Ajax {
10515
10578
  var _a, _b;
10516
10579
  (_b = (_a = this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, 10);
10517
10580
  if (xhr.readyState === XMLHttpRequest.DONE) {
10518
- if (o.successStatuses.includes(xhr.status)) {
10581
+ if (o.successStatuses.includes(xhr.status) || this.__hasAnswerEnvelope()) {
10519
10582
  onResolve();
10520
10583
  } else if (xhr.statusText) {
10521
10584
  this.__isFulfilled = true;
@@ -11683,19 +11746,22 @@ class Selection {
11683
11746
  }
11684
11747
  if (sel && sel.rangeCount) {
11685
11748
  const range = sel.getRangeAt(0);
11686
- const { firstChild } = node;
11749
+ // A block has no first child outside itself to go by, and what's
11750
+ // left beside it would show as a line of its own
11751
+ const isBlock = _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(node), first = isBlock ? node : node.firstChild;
11687
11752
  if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, range.commonAncestorContainer)) {
11688
11753
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeInsertNode(range, node);
11689
11754
  } else {
11690
11755
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.area, node);
11691
11756
  }
11692
11757
  [
11693
- ()=>firstChild === null || firstChild === void 0 ? void 0 : firstChild.previousSibling,
11694
- ()=>firstChild === null || firstChild === void 0 ? void 0 : firstChild.previousSibling,
11758
+ ()=>first === null || first === void 0 ? void 0 : first.previousSibling,
11759
+ ()=>first === null || first === void 0 ? void 0 : first.previousSibling,
11695
11760
  ()=>{
11696
11761
  var _a;
11697
- return (_a = firstChild === null || firstChild === void 0 ? void 0 : firstChild.previousSibling) === null || _a === void 0 ? void 0 : _a.lastChild;
11698
- }
11762
+ return (_a = first === null || first === void 0 ? void 0 : first.previousSibling) === null || _a === void 0 ? void 0 : _a.lastChild;
11763
+ },
11764
+ ()=>isBlock ? node.nextSibling : null
11699
11765
  ].forEach((getChildNode)=>{
11700
11766
  const childNode = getChildNode();
11701
11767
  // Only a text node left with nothing in it by the split
@@ -27657,8 +27723,9 @@ class DataProvider {
27657
27723
  this.progressHandler(100);
27658
27724
  }).catch(()=>null);
27659
27725
  return promise.then((resp)=>resp.json()).then((resp)=>{
27726
+ var _a;
27660
27727
  if (resp && !this.isSuccess(resp)) {
27661
- throw new Error(this.getMessage(resp));
27728
+ throw (0,_core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_7__.answer)(this.getMessage(resp), resp, (_a = resp.data) === null || _a === void 0 ? void 0 : _a.code);
27662
27729
  }
27663
27730
  return resp;
27664
27731
  });
@@ -27794,10 +27861,11 @@ class DataProvider {
27794
27861
  */ getPathByUrl(url) {
27795
27862
  ;(0,_core_helpers_utils_set_js__WEBPACK_IMPORTED_MODULE_8__.set)('options.getLocalFileByUrl.data.url', url, this);
27796
27863
  return this.get('getLocalFileByUrl').then((resp)=>{
27864
+ var _a;
27797
27865
  if (this.isSuccess(resp)) {
27798
27866
  return resp.data;
27799
27867
  }
27800
- throw (0,_core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_7__.error)(this.getMessage(resp));
27868
+ throw (0,_core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_7__.answer)(this.getMessage(resp), resp, (_a = resp.data) === null || _a === void 0 ? void 0 : _a.code);
27801
27869
  });
27802
27870
  }
27803
27871
  /**
@@ -32649,6 +32717,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.uploader = {
32649
32717
  defaultHandlerError (e) {
32650
32718
  this.j.message.error(e.message);
32651
32719
  },
32720
+ promptOnExists: true,
32721
+ promptOnExistsSuggestName (name) {
32722
+ return name;
32723
+ },
32652
32724
  contentType (requestData) {
32653
32725
  return this.ow.FormData !== undefined && typeof requestData !== 'string' ? false : 'application/x-www-form-urlencoded; charset=UTF-8';
32654
32726
  }
@@ -32815,32 +32887,58 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
32815
32887
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32816
32888
  /* harmony export */ sendFiles: function() { return /* binding */ sendFiles; }
32817
32889
  /* harmony export */ });
32818
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21537);
32819
- /* harmony import */ var _send_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71686);
32890
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
32891
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
32892
+ /* harmony import */ var _core_traits_dlgs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70231);
32893
+ /* harmony import */ var _dialog_prompt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36806);
32894
+ /* harmony import */ var _send_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71686);
32895
+ /* harmony import */ var _upload_error_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76198);
32820
32896
  /*!
32821
32897
  * Jodit Editor (https://xdsoft.net/jodit/)
32822
32898
  * Released under MIT see LICENSE.txt in the project root for license information.
32823
32899
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
32824
32900
  */
32825
32901
 
32902
+
32903
+
32904
+
32905
+
32826
32906
  /**
32827
32907
  * Send files to server
32828
- */ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
32908
+ */ async function sendFiles(uploader, files, handlerSuccess, handlerError, process, // Set when a refused upload is sent again: `beforeUpload` already had its say
32909
+ retryOf) {
32829
32910
  if (!files) {
32830
- return Promise.reject((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.error)('Need files'));
32911
+ throw (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.error)('Need files');
32831
32912
  }
32832
32913
  const { o } = uploader;
32833
- let fileList = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(files);
32914
+ let fileList = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(files);
32834
32915
  if (!fileList.length) {
32835
- return Promise.reject((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.error)('Need files'));
32916
+ throw (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.error)('Need files');
32836
32917
  }
32837
- // Client-side validation hook — returning `false` aborts the upload.
32918
+ let extraData = retryOf === null || retryOf === void 0 ? void 0 : retryOf.data;
32919
+ // Client-side validation hook — returning `false` aborts the upload, and it may hand back the files to send instead
32838
32920
  // See https://github.com/xdan/jodit/issues/1329
32839
- if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(o.beforeUpload)) {
32840
- if (o.beforeUpload.call(uploader, fileList) === false) {
32841
- const err = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.error)('Upload canceled');
32921
+ if (!retryOf && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isFunction)(o.beforeUpload)) {
32922
+ let plan;
32923
+ try {
32924
+ plan = await o.beforeUpload.call(uploader, fileList);
32925
+ } catch (e) {
32926
+ (handlerError || o.defaultHandlerError).call(uploader, e);
32927
+ throw e;
32928
+ }
32929
+ if (plan === false) {
32930
+ const err = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.error)('Upload canceled');
32842
32931
  (handlerError || o.defaultHandlerError).call(uploader, err);
32843
- return Promise.reject(err);
32932
+ throw err;
32933
+ }
32934
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(plan)) {
32935
+ fileList = plan;
32936
+ } else if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(plan) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(plan.files)) {
32937
+ fileList = plan.files;
32938
+ extraData = plan.data;
32939
+ }
32940
+ if (!fileList.length) {
32941
+ return [];
32844
32942
  }
32845
32943
  }
32846
32944
  const promises = [];
@@ -32880,20 +32978,38 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
32880
32978
  if (process) {
32881
32979
  process(form);
32882
32980
  }
32883
- if (o.data && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(o.data)) {
32981
+ if (o.data && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(o.data)) {
32884
32982
  Object.keys(o.data).forEach((key)=>{
32885
32983
  form.append(key, o.data[key]);
32886
32984
  });
32887
32985
  }
32986
+ if (extraData) {
32987
+ Object.keys(extraData).forEach((key)=>{
32988
+ form.append(key, extraData[key]);
32989
+ });
32990
+ }
32888
32991
  o.prepareData.call(uploader, form);
32889
- promises.push((0,_send_js__WEBPACK_IMPORTED_MODULE_1__.send)(uploader, form).then((resp)=>{
32992
+ promises.push((0,_send_js__WEBPACK_IMPORTED_MODULE_4__.send)(uploader, form).then((resp)=>{
32890
32993
  if (o.isSuccess.call(uploader, resp)) {
32891
- const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : o.defaultHandlerSuccess;
32994
+ const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handlerSuccess) ? handlerSuccess : o.defaultHandlerSuccess;
32892
32995
  handler.call(uploader, o.process.call(uploader, resp));
32893
32996
  return resp;
32894
32997
  }
32895
- const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerError) ? handlerError : o.defaultHandlerError;
32896
- handler.call(uploader, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.error)(o.getMessage.call(uploader, resp)));
32998
+ const err = new _upload_error_js__WEBPACK_IMPORTED_MODULE_5__.UploadError(o.getMessage.call(uploader, resp), resp, fileList, (plan)=>{
32999
+ var _a;
33000
+ return sendFiles(uploader, (_a = plan === null || plan === void 0 ? void 0 : plan.files) !== null && _a !== void 0 ? _a : fileList, handlerSuccess, handlerError, process, {
33001
+ data: {
33002
+ ...extraData,
33003
+ ...plan === null || plan === void 0 ? void 0 : plan.data
33004
+ }
33005
+ });
33006
+ });
33007
+ // A taken name is part of the upload, not a failure: ask for another one first
33008
+ if (err.code === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.ERROR_CODE_CONFLICT && o.promptOnExists) {
33009
+ return askAnotherName(uploader, err);
33010
+ }
33011
+ const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handlerError) ? handlerError : o.defaultHandlerError;
33012
+ handler.call(uploader, err);
32897
33013
  return resp;
32898
33014
  }).then(()=>{
32899
33015
  uploader.j.events && uploader.j.e.fire('filesWereUploaded');
@@ -32901,6 +33017,45 @@ function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFina
32901
33017
  }
32902
33018
  return Promise.all(promises);
32903
33019
  }
33020
+ function askAnotherName(uploader, err) {
33021
+ const { files } = err;
33022
+ // A batch is refused as a whole (the connector saved nothing) and the answer does not say which name is taken,
33023
+ // so the files go again one by one: the free ones are simply stored, the taken one answers 409 alone and gets its prompt
33024
+ if (files.length > 1) {
33025
+ return files.reduce((chain, file)=>chain.then(()=>err.retry({
33026
+ files: [
33027
+ file
33028
+ ]
33029
+ })), Promise.resolve());
33030
+ }
33031
+ const [file] = files;
33032
+ const { j, o } = uploader;
33033
+ return new Promise((resolve)=>{
33034
+ let answered = false;
33035
+ // `Dlgs.prototype.dlg`: the uploader's view does not always carry the Dlgs trait
33036
+ const dialog = _dialog_prompt_js__WEBPACK_IMPORTED_MODULE_3__.Prompt.call(_core_traits_dlgs_js__WEBPACK_IMPORTED_MODULE_2__.Dlgs.prototype.dlg.call(j, {
33037
+ closeOnClickOverlay: true
33038
+ }), j.i18n(err.message), j.i18n('Rename'), (newName)=>{
33039
+ newName = newName.trim();
33040
+ if (!newName) {
33041
+ return false;
33042
+ }
33043
+ answered = true;
33044
+ resolve(err.retry({
33045
+ files: [
33046
+ new File([
33047
+ file
33048
+ ], newName, {
33049
+ type: file.type
33050
+ })
33051
+ ]
33052
+ }));
33053
+ }, j.i18n('Enter new name'), o.promptOnExistsSuggestName.call(uploader, file.name));
33054
+ dialog.e.on(dialog, 'afterClose', ()=>{
33055
+ !answered && resolve(undefined);
33056
+ });
33057
+ });
33058
+ }
32904
33059
  function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
32905
33060
  const readerPromises = [];
32906
33061
  let file, i;
@@ -32929,7 +33084,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
32929
33084
  name
32930
33085
  ]
32931
33086
  };
32932
- const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
33087
+ const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
32933
33088
  handler.call(uploader, resp);
32934
33089
  resolve(resp);
32935
33090
  };
@@ -33042,6 +33197,32 @@ function send(uploader, data) {
33042
33197
  /* harmony export */ ]);
33043
33198
 
33044
33199
 
33200
+ /***/ }),
33201
+
33202
+ /***/ 76198:
33203
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
33204
+
33205
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33206
+ /* harmony export */ UploadError: function() { return /* binding */ UploadError; }
33207
+ /* harmony export */ });
33208
+ /* harmony import */ var _core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89890);
33209
+ /*!
33210
+ * Jodit Editor (https://xdsoft.net/jodit/)
33211
+ * Released under MIT see LICENSE.txt in the project root for license information.
33212
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
33213
+ */
33214
+ // The connector refused these files: the handler can change the request and send it again
33215
+ class UploadError extends _core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_0__.AnswerError {
33216
+ constructor(message, answer, files, retry){
33217
+ var _a;
33218
+ super(message, answer, (_a = answer.data) === null || _a === void 0 ? void 0 : _a.code);
33219
+ this.files = files;
33220
+ this.retry = retry;
33221
+ Object.setPrototypeOf(this, UploadError.prototype);
33222
+ }
33223
+ }
33224
+
33225
+
33045
33226
  /***/ }),
33046
33227
 
33047
33228
  /***/ 57380:
@@ -33054,9 +33235,10 @@ function send(uploader, data) {
33054
33235
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82758);
33055
33236
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
33056
33237
  /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
33057
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6441);
33058
- /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94122);
33059
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80536);
33238
+ /* harmony import */ var _core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89890);
33239
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
33240
+ /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(94122);
33241
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80536);
33060
33242
  /*!
33061
33243
  * Jodit Editor (https://xdsoft.net/jodit/)
33062
33244
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33068,6 +33250,7 @@ function send(uploader, data) {
33068
33250
 
33069
33251
 
33070
33252
 
33253
+
33071
33254
  class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
33072
33255
  get j() {
33073
33256
  return this.jodit;
@@ -33123,14 +33306,14 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33123
33306
  }
33124
33307
  };
33125
33308
  // send data on server
33126
- if (!_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_IE && (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasFiles)(cData)) {
33127
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.sendFiles)(self, cData.files, handlerSuccess, handlerError).finally(onFinally);
33309
+ if (!_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_IE && (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasFiles)(cData)) {
33310
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.sendFiles)(self, cData.files, handlerSuccess, handlerError).finally(onFinally);
33128
33311
  return false;
33129
33312
  }
33130
33313
  if (_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_IE && !_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_ES_NEXT) {
33131
- return (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.processOldBrowserDrag)(self, cData, handlerSuccess, handlerError, onFinally);
33314
+ return (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.processOldBrowserDrag)(self, cData, handlerSuccess, handlerError, onFinally);
33132
33315
  }
33133
- if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasItems)(cData)) {
33316
+ if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasItems)(cData)) {
33134
33317
  const { items } = cData;
33135
33318
  for(i = 0; i < items.length; i += 1){
33136
33319
  if (items[i].kind === 'file' && items[i].type === 'image/png') {
@@ -33138,7 +33321,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33138
33321
  if (file) {
33139
33322
  const mime = file.type.match(/\/([a-z0-9]+)/i);
33140
33323
  extension = mime[1] ? mime[1].toLowerCase() : '';
33141
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.sendFiles)(self, [
33324
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.sendFiles)(self, [
33142
33325
  file
33143
33326
  ], handlerSuccess, handlerError, processData).finally(onFinally);
33144
33327
  }
@@ -33160,21 +33343,21 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33160
33343
  self.j.e.on(form, 'dragend dragover dragenter dragleave drop', (e)=>{
33161
33344
  e.preventDefault();
33162
33345
  }).on(form, 'dragover', (event)=>{
33163
- if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasFiles)(event.dataTransfer) || (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasItems)(event.dataTransfer)) {
33346
+ if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasFiles)(event.dataTransfer) || (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasItems)(event.dataTransfer)) {
33164
33347
  form.classList.add('jodit_drag_hover');
33165
33348
  event.preventDefault();
33166
33349
  }
33167
33350
  }).on(form, 'dragend dragleave', (event)=>{
33168
33351
  form.classList.remove('jodit_drag_hover');
33169
- if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasFiles)(event.dataTransfer)) {
33352
+ if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasFiles)(event.dataTransfer)) {
33170
33353
  event.preventDefault();
33171
33354
  }
33172
33355
  }).on(form, 'drop', (event)=>{
33173
33356
  form.classList.remove('jodit_drag_hover');
33174
- if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.hasFiles)(event.dataTransfer)) {
33357
+ if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.hasFiles)(event.dataTransfer)) {
33175
33358
  event.preventDefault();
33176
33359
  event.stopImmediatePropagation();
33177
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.sendFiles)(self, event.dataTransfer.files, handlerSuccess, handlerError).finally(onFinally);
33360
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.sendFiles)(self, event.dataTransfer.files, handlerSuccess, handlerError).finally(onFinally);
33178
33361
  }
33179
33362
  });
33180
33363
  const inputFile = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.first(form, (node)=>{
@@ -33183,7 +33366,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33183
33366
  });
33184
33367
  if (inputFile) {
33185
33368
  self.j.e.on(inputFile, 'change', ()=>{
33186
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.sendFiles)(self, inputFile.files, handlerSuccess, handlerError).then(()=>{
33369
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.sendFiles)(self, inputFile.files, handlerSuccess, handlerError).then(()=>{
33187
33370
  inputFile.value = '';
33188
33371
  if (!/safari/i.test(navigator.userAgent)) {
33189
33372
  inputFile.type = '';
@@ -33198,26 +33381,41 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33198
33381
  */ uploadRemoteImage(url, handlerSuccess, handlerError) {
33199
33382
  const uploader = this, { o } = uploader;
33200
33383
  const handlerE = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(handlerError) ? handlerError : o.defaultHandlerError;
33201
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.send)(uploader, {
33384
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.send)(uploader, {
33202
33385
  action: 'fileUploadRemote',
33203
33386
  url
33204
33387
  }).then((resp)=>{
33388
+ var _a;
33205
33389
  if (o.isSuccess.call(uploader, resp)) {
33206
33390
  const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(handlerSuccess) ? handlerSuccess : o.defaultHandlerSuccess;
33207
33391
  handler.call(uploader, o.process.call(uploader, resp));
33208
33392
  return;
33209
33393
  }
33210
- handlerE.call(uploader, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.error)(o.getMessage.call(uploader, resp)));
33394
+ handlerE.call(uploader, (0,_core_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_4__.answer)(o.getMessage.call(uploader, resp), resp, (_a = resp.data) === null || _a === void 0 ? void 0 : _a.code));
33211
33395
  }).catch((e)=>handlerE.call(uploader, e));
33212
33396
  }
33213
33397
  upload(files) {
33214
33398
  return this.async.promise((resolve, reject)=>{
33215
- ;(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.sendFiles)(this, files, resolve, reject);
33399
+ let settled = false;
33400
+ const settle = (end)=>(value)=>{
33401
+ settled = true;
33402
+ end(value);
33403
+ };
33404
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.sendFiles)(this, files, settle(resolve), settle(reject)).then(()=>{
33405
+ // `beforeUpload` kept no file, so no handler ran
33406
+ if (!settled) {
33407
+ resolve({
33408
+ baseurl: '',
33409
+ files: [],
33410
+ isImages: []
33411
+ });
33412
+ }
33413
+ }, settle(reject));
33216
33414
  });
33217
33415
  }
33218
33416
  destruct() {
33219
33417
  this.setStatus(_core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.STATUSES.beforeDestruct);
33220
- const instances = _helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.ajaxInstances.get(this);
33418
+ const instances = _helpers_index_js__WEBPACK_IMPORTED_MODULE_6__.ajaxInstances.get(this);
33221
33419
  if (instances) {
33222
33420
  instances.forEach((ajax)=>{
33223
33421
  try {
@@ -33232,7 +33430,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.Vie
33232
33430
  super(editor);
33233
33431
  this.path = '';
33234
33432
  this.source = 'default';
33235
- this.options = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(options || {}, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(_config_js__WEBPACK_IMPORTED_MODULE_4__.Config.defaultOptions.uploader, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isJoditObject)(editor) ? editor.o.uploader : {}));
33433
+ this.options = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(options || {}, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(_config_js__WEBPACK_IMPORTED_MODULE_5__.Config.defaultOptions.uploader, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isJoditObject)(editor) ? editor.o.uploader : {}));
33236
33434
  }
33237
33435
  }
33238
33436
 
@@ -39532,7 +39730,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('enter', enter);
39532
39730
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(br, clone);
39533
39731
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(clone, fake);
39534
39732
  }
39535
- ;(0,_core_helpers_utils_scroll_into_view_js__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(br, jodit.editor, jodit.ed);
39733
+ // The new `br` ends the line above, so it takes something on the
39734
+ // caret's own line to bring that line into view. Chrome won't scroll to
39735
+ // an inline element without width, but it will to a `br`
39736
+ const mark = br.cloneNode();
39737
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(fake, mark);
39738
+ (0,_core_helpers_utils_scroll_into_view_js__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(mark, jodit.editor, jodit.ed);
39739
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(mark);
39536
39740
  return true;
39537
39741
  }
39538
39742
  return false;
@@ -40155,6 +40359,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
40155
40359
  }
40156
40360
  };
40157
40361
  _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__["default"]);
40362
+ const hadSelection = new WeakSet();
40158
40363
  _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
40159
40364
  command: 'fontsize',
40160
40365
  data: {
@@ -40191,17 +40396,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
40191
40396
  tooltip: 'Font size',
40192
40397
  value: (editor, button)=>{
40193
40398
  var _a;
40194
- const current = editor.s.current();
40195
- if (!current) {
40196
- return;
40197
- }
40198
- const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
40199
- if (!box) {
40399
+ const current = editor.s.current(), box = current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor), control = button.control;
40400
+ // A select names its value, so until there is a selection it shows the
40401
+ // editor's own size, and afterwards the size of the last one
40402
+ if (box) {
40403
+ hadSelection.add(button);
40404
+ } else if (control.component !== 'select' || hadSelection.has(button)) {
40200
40405
  return;
40201
40406
  }
40202
- const control = button.control;
40203
40407
  const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
40204
- const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
40408
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, cssKey);
40205
40409
  if (cssKey === 'font-size') {
40206
40410
  const numValue = parseFloat(value.toString());
40207
40411
  if (editor.o.defaultFontSizePoints === 'pt') {
@@ -40233,7 +40437,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
40233
40437
  return keySet.has(normalize(value.toString()));
40234
40438
  }
40235
40439
  };
40236
- const hadSelection = new WeakSet();
40237
40440
  _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = {
40238
40441
  ..._config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize,
40239
40442
  command: 'fontname',
@@ -41389,6 +41592,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.commandToHotkeys = {
41389
41592
  40: 'down',
41390
41593
  45: 'insert',
41391
41594
  46: 'del',
41595
+ // With Shift the digit keys send other characters: `&` for 7
41596
+ 48: '0',
41597
+ 49: '1',
41598
+ 50: '2',
41599
+ 51: '3',
41600
+ 52: '4',
41601
+ 53: '5',
41602
+ 54: '6',
41603
+ 55: '7',
41604
+ 56: '8',
41605
+ 57: '9',
41392
41606
  59: ';',
41393
41607
  61: '=',
41394
41608
  91: 'meta',