jodit-pro 4.15.18 → 4.15.21

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 (316) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +4 -4
  3. package/es2015/jodit.js +183 -53
  4. package/es2015/jodit.min.js +6 -6
  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/color-picker/color-picker.css +1 -1
  20. package/es2015/plugins/color-picker/color-picker.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  22. package/es2015/plugins/emoji/emoji.css +1 -1
  23. package/es2015/plugins/emoji/emoji.js +1 -1
  24. package/es2015/plugins/emoji/emoji.min.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.js +1 -1
  26. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  27. package/es2015/plugins/finder/finder.css +1 -1
  28. package/es2015/plugins/finder/finder.js +1 -1
  29. package/es2015/plugins/finder/finder.min.js +1 -1
  30. package/es2015/plugins/google-maps/google-maps.css +1 -1
  31. package/es2015/plugins/google-maps/google-maps.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  33. package/es2015/plugins/google-search/google-search.js +1 -1
  34. package/es2015/plugins/google-search/google-search.min.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  36. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  40. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  41. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  43. package/es2015/plugins/keyboard/keyboard.css +1 -1
  44. package/es2015/plugins/keyboard/keyboard.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  47. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  48. package/es2015/plugins/page-break/page-break.js +1 -1
  49. package/es2015/plugins/page-break/page-break.min.js +1 -1
  50. package/es2015/plugins/paste-code/paste-code.css +1 -1
  51. package/es2015/plugins/paste-code/paste-code.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  53. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  54. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  55. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  56. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  57. package/es2015/plugins/style/style.css +1 -1
  58. package/es2015/plugins/style/style.js +1 -1
  59. package/es2015/plugins/style/style.min.js +1 -1
  60. package/es2015/plugins/templates/templates.css +1 -1
  61. package/es2015/plugins/templates/templates.js +1 -1
  62. package/es2015/plugins/templates/templates.min.js +1 -1
  63. package/es2015/plugins/todo-list/todo-list.css +1 -1
  64. package/es2015/plugins/todo-list/todo-list.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  66. package/es2015/plugins/translate/translate.css +1 -1
  67. package/es2015/plugins/translate/translate.js +1 -1
  68. package/es2015/plugins/translate/translate.min.js +1 -1
  69. package/es2015/plugins/tune-block/tune-block.css +1 -1
  70. package/es2015/plugins/tune-block/tune-block.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  72. package/es2018/jodit.fat.min.js +4 -4
  73. package/es2018/jodit.min.js +6 -6
  74. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  75. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  76. package/es2018/plugins/backup/backup.min.js +1 -1
  77. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  78. package/es2018/plugins/change-case/change-case.min.js +1 -1
  79. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  80. package/es2018/plugins/emoji/emoji.min.js +1 -1
  81. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  82. package/es2018/plugins/finder/finder.min.js +1 -1
  83. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  84. package/es2018/plugins/google-search/google-search.min.js +1 -1
  85. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  86. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  87. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  88. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  89. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  90. package/es2018/plugins/page-break/page-break.min.js +1 -1
  91. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  92. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  93. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  94. package/es2018/plugins/style/style.min.js +1 -1
  95. package/es2018/plugins/templates/templates.min.js +1 -1
  96. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  97. package/es2018/plugins/translate/translate.min.js +1 -1
  98. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  99. package/es2021/jodit.css +1 -1
  100. package/es2021/jodit.fat.min.js +9 -9
  101. package/es2021/jodit.js +183 -53
  102. package/es2021/jodit.min.js +12 -12
  103. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  104. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  105. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  106. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  107. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  108. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  109. package/es2021/plugins/backup/backup.css +1 -1
  110. package/es2021/plugins/backup/backup.js +1 -1
  111. package/es2021/plugins/backup/backup.min.js +1 -1
  112. package/es2021/plugins/button-generator/button-generator.css +1 -1
  113. package/es2021/plugins/button-generator/button-generator.js +1 -1
  114. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  115. package/es2021/plugins/change-case/change-case.js +1 -1
  116. package/es2021/plugins/change-case/change-case.min.js +1 -1
  117. package/es2021/plugins/color-picker/color-picker.css +1 -1
  118. package/es2021/plugins/color-picker/color-picker.js +1 -1
  119. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  120. package/es2021/plugins/emoji/emoji.css +1 -1
  121. package/es2021/plugins/emoji/emoji.js +1 -1
  122. package/es2021/plugins/emoji/emoji.min.js +1 -1
  123. package/es2021/plugins/export-docs/export-docs.js +1 -1
  124. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  125. package/es2021/plugins/finder/finder.css +1 -1
  126. package/es2021/plugins/finder/finder.js +1 -1
  127. package/es2021/plugins/finder/finder.min.js +1 -1
  128. package/es2021/plugins/google-maps/google-maps.css +1 -1
  129. package/es2021/plugins/google-maps/google-maps.js +1 -1
  130. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  131. package/es2021/plugins/google-search/google-search.js +1 -1
  132. package/es2021/plugins/google-search/google-search.min.js +1 -1
  133. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  134. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  135. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  136. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  137. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  138. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  139. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  140. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  141. package/es2021/plugins/keyboard/keyboard.css +1 -1
  142. package/es2021/plugins/keyboard/keyboard.js +1 -1
  143. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  144. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  145. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  146. package/es2021/plugins/page-break/page-break.js +1 -1
  147. package/es2021/plugins/page-break/page-break.min.js +1 -1
  148. package/es2021/plugins/paste-code/paste-code.css +1 -1
  149. package/es2021/plugins/paste-code/paste-code.js +1 -1
  150. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  151. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  152. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  153. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  154. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  155. package/es2021/plugins/style/style.css +1 -1
  156. package/es2021/plugins/style/style.js +1 -1
  157. package/es2021/plugins/style/style.min.js +1 -1
  158. package/es2021/plugins/templates/templates.css +1 -1
  159. package/es2021/plugins/templates/templates.js +1 -1
  160. package/es2021/plugins/templates/templates.min.js +1 -1
  161. package/es2021/plugins/todo-list/todo-list.css +1 -1
  162. package/es2021/plugins/todo-list/todo-list.js +1 -1
  163. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  164. package/es2021/plugins/translate/translate.css +1 -1
  165. package/es2021/plugins/translate/translate.js +1 -1
  166. package/es2021/plugins/translate/translate.min.js +1 -1
  167. package/es2021/plugins/tune-block/tune-block.css +1 -1
  168. package/es2021/plugins/tune-block/tune-block.js +1 -1
  169. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  170. package/es2021.en/jodit.css +1 -1
  171. package/es2021.en/jodit.fat.min.js +9 -9
  172. package/es2021.en/jodit.js +183 -53
  173. package/es2021.en/jodit.min.js +12 -12
  174. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  175. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  176. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  177. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  178. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  179. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  180. package/es2021.en/plugins/backup/backup.css +1 -1
  181. package/es2021.en/plugins/backup/backup.js +1 -1
  182. package/es2021.en/plugins/backup/backup.min.js +1 -1
  183. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  184. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  185. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  186. package/es2021.en/plugins/change-case/change-case.js +1 -1
  187. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  188. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  189. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  190. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  191. package/es2021.en/plugins/emoji/emoji.css +1 -1
  192. package/es2021.en/plugins/emoji/emoji.js +1 -1
  193. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  194. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  195. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  196. package/es2021.en/plugins/finder/finder.css +1 -1
  197. package/es2021.en/plugins/finder/finder.js +1 -1
  198. package/es2021.en/plugins/finder/finder.min.js +1 -1
  199. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  200. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  201. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  202. package/es2021.en/plugins/google-search/google-search.js +1 -1
  203. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  204. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  205. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  206. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  207. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  208. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  209. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  210. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  211. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  212. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  213. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  214. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  215. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  216. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  217. package/es2021.en/plugins/page-break/page-break.js +1 -1
  218. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  219. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  220. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  221. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  222. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  223. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  224. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  225. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  226. package/es2021.en/plugins/style/style.css +1 -1
  227. package/es2021.en/plugins/style/style.js +1 -1
  228. package/es2021.en/plugins/style/style.min.js +1 -1
  229. package/es2021.en/plugins/templates/templates.css +1 -1
  230. package/es2021.en/plugins/templates/templates.js +1 -1
  231. package/es2021.en/plugins/templates/templates.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 +2 -2
  242. package/es5/jodit.fat.min.js +2 -2
  243. package/es5/jodit.js +273 -55
  244. package/es5/jodit.min.css +2 -2
  245. package/es5/jodit.min.js +2 -2
  246. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  247. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  248. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  249. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  250. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  251. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  252. package/es5/plugins/backup/backup.css +1 -1
  253. package/es5/plugins/backup/backup.js +1 -1
  254. package/es5/plugins/backup/backup.min.js +1 -1
  255. package/es5/plugins/button-generator/button-generator.css +1 -1
  256. package/es5/plugins/button-generator/button-generator.js +1 -1
  257. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  258. package/es5/plugins/change-case/change-case.js +1 -1
  259. package/es5/plugins/change-case/change-case.min.js +1 -1
  260. package/es5/plugins/color-picker/color-picker.css +1 -1
  261. package/es5/plugins/color-picker/color-picker.js +1 -1
  262. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  263. package/es5/plugins/emoji/emoji.css +1 -1
  264. package/es5/plugins/emoji/emoji.js +1 -1
  265. package/es5/plugins/emoji/emoji.min.js +1 -1
  266. package/es5/plugins/export-docs/export-docs.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  268. package/es5/plugins/finder/finder.css +1 -1
  269. package/es5/plugins/finder/finder.js +1 -1
  270. package/es5/plugins/finder/finder.min.js +1 -1
  271. package/es5/plugins/google-maps/google-maps.css +1 -1
  272. package/es5/plugins/google-maps/google-maps.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  274. package/es5/plugins/google-search/google-search.js +1 -1
  275. package/es5/plugins/google-search/google-search.min.js +1 -1
  276. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  277. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  278. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  279. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  281. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  282. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  283. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  284. package/es5/plugins/keyboard/keyboard.css +1 -1
  285. package/es5/plugins/keyboard/keyboard.js +1 -1
  286. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  287. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  288. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  289. package/es5/plugins/page-break/page-break.js +1 -1
  290. package/es5/plugins/page-break/page-break.min.js +1 -1
  291. package/es5/plugins/paste-code/paste-code.css +1 -1
  292. package/es5/plugins/paste-code/paste-code.js +1 -1
  293. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  294. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  295. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  296. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  297. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  298. package/es5/plugins/style/style.css +1 -1
  299. package/es5/plugins/style/style.js +1 -1
  300. package/es5/plugins/style/style.min.js +1 -1
  301. package/es5/plugins/templates/templates.css +1 -1
  302. package/es5/plugins/templates/templates.js +1 -1
  303. package/es5/plugins/templates/templates.min.js +1 -1
  304. package/es5/plugins/todo-list/todo-list.css +1 -1
  305. package/es5/plugins/todo-list/todo-list.js +1 -1
  306. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  307. package/es5/plugins/translate/translate.css +1 -1
  308. package/es5/plugins/translate/translate.js +1 -1
  309. package/es5/plugins/translate/translate.min.js +1 -1
  310. package/es5/plugins/tune-block/tune-block.css +1 -1
  311. package/es5/plugins/tune-block/tune-block.js +1 -1
  312. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  313. package/es5/polyfills.fat.min.js +1 -1
  314. package/es5/polyfills.js +1 -1
  315. package/es5/polyfills.min.js +1 -1
  316. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.15.18
4
+ * Version: v4.15.21
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -725,6 +725,25 @@ let ConfigPrototype = {};
725
725
  /**
726
726
  * Default width (in pixels) applied to images inserted into the editor
727
727
  */ this.imageDefaultWidth = 300;
728
+ /**
729
+ * Alignment given to images inserted into the editor. `'normal'` leaves
730
+ * them unaligned
731
+ */ this.imageDefaultAlign = 'normal';
732
+ /**
733
+ * Class names to align images with, instead of an inline `float` or
734
+ * `margin`. Aligning an image removes every class listed here and adds the
735
+ * chosen alignment's, which can be several separated by spaces.
736
+ *
737
+ * ```javascript
738
+ * Jodit.make('#editor', {
739
+ * imageAlignClasses: {
740
+ * left: 'align-left',
741
+ * right: 'align-right',
742
+ * center: 'align-center'
743
+ * }
744
+ * });
745
+ * ```
746
+ */ this.imageAlignClasses = null;
728
747
  /**
729
748
  * Do not display these buttons that are on the list
730
749
  *
@@ -1724,7 +1743,7 @@ __webpack_require__.r(__webpack_exports__);
1724
1743
  * ```
1725
1744
  * @packageDocumentation
1726
1745
  * @module constants
1727
- */ const APP_VERSION = "4.15.18";
1746
+ */ const APP_VERSION = "4.15.21";
1728
1747
  // prettier-ignore
1729
1748
  const ES = "es2021";
1730
1749
  const IS_ES_MODERN = true;
@@ -6283,6 +6302,7 @@ __webpack_require__.r(__webpack_exports__);
6283
6302
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
6284
6303
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
6285
6304
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
6305
+ /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
6286
6306
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
6287
6307
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
6288
6308
  /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
@@ -7373,6 +7393,7 @@ function trimChars(value, chars) {
7373
7393
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7374
7394
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
7375
7395
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
7396
+ /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
7376
7397
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
7377
7398
  /* harmony export */ });
7378
7399
  /* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
@@ -7385,9 +7406,26 @@ function trimChars(value, chars) {
7385
7406
  */
7386
7407
 
7387
7408
 
7409
+ const classNames = (value)=>(value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
7388
7410
  /**
7389
- * Align image
7390
- */ function hAlignElement(image, align) {
7411
+ * Align image, with `classes` (see `imageAlignClasses`) instead of inline
7412
+ * styles when they are given
7413
+ */ function hAlignElement(image, align, classes) {
7414
+ if (classes) {
7415
+ hAlignElement(image, 'normal');
7416
+ Object.values(classes).forEach((value)=>image.classList.remove(...classNames(value)));
7417
+ image.classList.add(...classNames(classes[align || 'normal']));
7418
+ [
7419
+ 'class',
7420
+ 'style'
7421
+ ].forEach((name)=>{
7422
+ var _a;
7423
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7424
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name, null);
7425
+ }
7426
+ });
7427
+ return;
7428
+ }
7391
7429
  if (align && align !== 'normal') {
7392
7430
  if (align !== 'center') {
7393
7431
  (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', align);
@@ -7410,6 +7448,31 @@ function trimChars(value, chars) {
7410
7448
  ;(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
7411
7449
  }
7412
7450
  }
7451
+ /**
7452
+ * The alignment `hAlignElement` has set on an element
7453
+ */ function getHAlign(elm, classes) {
7454
+ if (classes) {
7455
+ for (const align of [
7456
+ 'left',
7457
+ 'right',
7458
+ 'center',
7459
+ 'normal'
7460
+ ]){
7461
+ const names = classNames(classes[align]);
7462
+ if (names.length && names.every((name)=>elm.classList.contains(name))) {
7463
+ return align;
7464
+ }
7465
+ }
7466
+ }
7467
+ const float = (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'float').toLowerCase();
7468
+ if (float === 'left' || float === 'right') {
7469
+ return float;
7470
+ }
7471
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-right') === 'auto') {
7472
+ return 'center';
7473
+ }
7474
+ return 'normal';
7475
+ }
7413
7476
  /**
7414
7477
  * Remove text-align style for all selected children
7415
7478
  */ function clearAlign(node) {
@@ -8562,6 +8625,7 @@ const getClassName = (obj)=>{
8562
8625
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8563
8626
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8564
8627
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
8628
+ /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
8565
8629
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
8566
8630
  /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
8567
8631
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
@@ -10417,10 +10481,11 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
10417
10481
  /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
10418
10482
  /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
10419
10483
  /* harmony import */ var _helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27613);
10420
- /* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38837);
10421
- /* harmony import */ var _helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43463);
10422
- /* harmony import */ var _style_commit_style_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25639);
10423
- /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45124);
10484
+ /* harmony import */ var _helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25726);
10485
+ /* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38837);
10486
+ /* harmony import */ var _helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43463);
10487
+ /* harmony import */ var _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25639);
10488
+ /* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45124);
10424
10489
  /*!
10425
10490
  * Jodit Editor (https://xdsoft.net/jodit/)
10426
10491
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -10442,6 +10507,7 @@ function findCorrectCurrentNode(node, range, rightMode, isCollapsed, checkChild,
10442
10507
 
10443
10508
 
10444
10509
 
10510
+
10445
10511
  class Selection {
10446
10512
  /**
10447
10513
  * Short alias for this.jodit
@@ -10879,7 +10945,7 @@ class Selection {
10879
10945
  return node;
10880
10946
  }
10881
10947
  if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node)) {
10882
- const ret = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.findCorrectCurrentNode)(node, range, rightMode, sel.isCollapsed, checkChild, child);
10948
+ const ret = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.findCorrectCurrentNode)(node, range, rightMode, sel.isCollapsed, checkChild, child);
10883
10949
  node = ret.node;
10884
10950
  rightMode = ret.rightMode;
10885
10951
  }
@@ -11023,6 +11089,10 @@ class Selection {
11023
11089
  if (styles && typeof styles === 'object') {
11024
11090
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
11025
11091
  }
11092
+ const { imageDefaultAlign, imageAlignClasses } = this.j.o;
11093
+ if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
11094
+ (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
11095
+ }
11026
11096
  const onload = ()=>{
11027
11097
  if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
11028
11098
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
@@ -11147,7 +11217,7 @@ class Selection {
11147
11217
  const isSignificant = (elm)=>Boolean(elm && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'br') && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(elm) && !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTemporary(elm) && !(_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && this.j.e.fire('isInvisibleForCursor', elm) === true));
11148
11218
  // check right offset
11149
11219
  if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(container)) {
11150
- if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.cursorInTheEdgeOfString)(container, offset, start, end)) {
11220
+ if ((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_9__.cursorInTheEdgeOfString)(container, offset, start, end)) {
11151
11221
  return false;
11152
11222
  }
11153
11223
  } else {
@@ -11539,8 +11609,8 @@ class Selection {
11539
11609
  * }) // will remove `color:red` from `span`
11540
11610
  * ```
11541
11611
  */ commitStyle(options) {
11542
- ;(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_5__.assert)((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.size)(options) > 0, 'Need to pass at least one option');
11543
- const styleElm = new _style_commit_style_js__WEBPACK_IMPORTED_MODULE_7__.CommitStyle(options);
11612
+ ;(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__.assert)((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.size)(options) > 0, 'Need to pass at least one option');
11613
+ const styleElm = new _style_commit_style_js__WEBPACK_IMPORTED_MODULE_8__.CommitStyle(options);
11544
11614
  styleElm.apply(this.j);
11545
11615
  }
11546
11616
  /**
@@ -11590,7 +11660,7 @@ class Selection {
11590
11660
  }
11591
11661
  const fragment = leftRange.extractContents();
11592
11662
  const clearEmpties = (node)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.each(node, (node)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(node) && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(node));
11593
- (0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_5__.assert)(currentBox.parentNode, 'Splitting fails');
11663
+ (0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_6__.assert)(currentBox.parentNode, 'Splitting fails');
11594
11664
  try {
11595
11665
  clearEmpties(fragment);
11596
11666
  clearEmpties(currentBox);
@@ -11643,7 +11713,7 @@ class Selection {
11643
11713
  const r = range.cloneRange();
11644
11714
  r.collapse(start);
11645
11715
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeInsertNode(r, fake);
11646
- (0,_helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_6__.moveTheNodeAlongTheEdgeOutward)(fake, start, this.j.editor);
11716
+ (0,_helpers_move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_7__.moveTheNodeAlongTheEdgeOutward)(fake, start, this.j.editor);
11647
11717
  return fake;
11648
11718
  };
11649
11719
  const leftFake = moveMaxEdgeFake(true);
@@ -34385,7 +34455,10 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
34385
34455
  if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
34386
34456
  return;
34387
34457
  }
34388
- if (/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.test(data.value.trim())) {
34458
+ // Only a text block can be an empty caret container; a lone video,
34459
+ // iframe or icon has no children but is content in itself
34460
+ const lone = /^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(data.value.trim());
34461
+ if (lone && /^(p|div|h[1-6]|blockquote|pre)$/i.test(lone[1])) {
34389
34462
  data.value = '';
34390
34463
  }
34391
34464
  }
@@ -35643,6 +35716,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('color', color);
35643
35716
 
35644
35717
 
35645
35718
  _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('brush', _brush_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
35719
+ /**
35720
+ * Set a color style; an empty value removes it, and with it the `style`
35721
+ * attribute once nothing else is left in it
35722
+ */ function setColorStyle(elm, key, value) {
35723
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(elm, key, value);
35724
+ if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style')) {
35725
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
35726
+ }
35727
+ }
35646
35728
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
35647
35729
  isVisible: (editor)=>{
35648
35730
  return !editor.o.disablePlugins.includes('color');
@@ -35658,7 +35740,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
35658
35740
  }
35659
35741
  const makeColorPicker = (key)=>(0,_modules_widget_index_js__WEBPACK_IMPORTED_MODULE_4__.ColorPickerWidget)(editor, (value)=>{
35660
35742
  selected.forEach((cell)=>{
35661
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(cell, key, value);
35743
+ setColorStyle(cell, key, value);
35662
35744
  });
35663
35745
  editor.lock();
35664
35746
  editor.synchronizeValues();
@@ -35744,7 +35826,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
35744
35826
  if (!currentElement) {
35745
35827
  editor.execCommand('background', false, value);
35746
35828
  } else {
35747
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentElement, 'backgroundColor', value);
35829
+ setColorStyle(currentElement, 'backgroundColor', value);
35748
35830
  }
35749
35831
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
35750
35832
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'background');
@@ -35754,7 +35836,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
35754
35836
  if (!currentElement) {
35755
35837
  editor.execCommand('forecolor', false, value);
35756
35838
  } else {
35757
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentElement, 'color', value);
35839
+ setColorStyle(currentElement, 'color', value);
35758
35840
  }
35759
35841
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
35760
35842
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'color');
@@ -35783,10 +35865,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
35783
35865
  if (current && current !== jodit.editor && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isNode(current) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(current)) {
35784
35866
  switch(mode){
35785
35867
  case 'color':
35786
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(current, 'color', color);
35868
+ setColorStyle(current, 'color', color);
35787
35869
  break;
35788
35870
  case 'background':
35789
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(current, 'backgroundColor', color);
35871
+ setColorStyle(current, 'backgroundColor', color);
35790
35872
  break;
35791
35873
  }
35792
35874
  } else {
@@ -37773,14 +37855,28 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('file', file);
37773
37855
  */ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.saveSelectionOnBlur = true;
37774
37856
  function focus(editor) {
37775
37857
  if (editor.o.saveSelectionOnBlur) {
37858
+ // A click that brings focus back places the caret itself, and Chrome
37859
+ // has already placed it when focus fires, so restoring would move it
37860
+ // back to the old selection. The saved markers are dropped instead.
37861
+ let focusByPointer = false;
37776
37862
  editor.e.on('blur', ()=>{
37863
+ // A press that never brought the focus back must not decide
37864
+ // what the next focus does
37865
+ focusByPointer = false;
37777
37866
  if (editor.isEditorMode()) {
37778
37867
  editor.s.save(true);
37779
37868
  }
37869
+ }).on('mousedown touchstart', ()=>{
37870
+ focusByPointer = !editor.editorIsActive;
37780
37871
  }).on('focus', ()=>{
37781
37872
  if (editor.isEditorMode()) {
37782
- editor.s.restore();
37873
+ if (focusByPointer) {
37874
+ editor.s.removeMarkers();
37875
+ } else {
37876
+ editor.s.restore();
37877
+ }
37783
37878
  }
37879
+ focusByPointer = false;
37784
37880
  });
37785
37881
  }
37786
37882
  const focus = ()=>{
@@ -38807,11 +38903,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
38807
38903
  /* unused harmony export imageProcessor */
38808
38904
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
38809
38905
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
38810
- /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
38811
- /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
38812
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
38813
- /* harmony import */ var _modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(74569);
38814
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85745);
38906
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
38907
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
38908
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
38909
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
38910
+ /* harmony import */ var _modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(74569);
38911
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85745);
38815
38912
  /*!
38816
38913
  * Jodit Editor (https://xdsoft.net/jodit/)
38817
38914
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -38829,11 +38926,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageProcessor = {
38829
38926
 
38830
38927
 
38831
38928
 
38929
+
38832
38930
  const JODIT_IMAGE_PROCESSOR_BINDED = '__jodit_imageprocessor_binded';
38833
38931
  const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
38834
38932
  /**
38835
38933
  * Change editor's size after load all images
38836
- */ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
38934
+ */ class imageProcessor extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
38837
38935
  afterInit(jodit) {}
38838
38936
  beforeDestruct(jodit) {
38839
38937
  const buffer = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
@@ -38871,9 +38969,9 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
38871
38969
  if (!editor.editor) {
38872
38970
  return;
38873
38971
  }
38874
- ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.$$)('img', editor.editor).forEach((elm)=>{
38875
- if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
38876
- (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
38972
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('img', editor.editor).forEach((elm)=>{
38973
+ if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED)) {
38974
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
38877
38975
  if (!elm.complete) {
38878
38976
  editor.e.on(elm, 'load', function ElementOnLoad() {
38879
38977
  var _a;
@@ -38885,6 +38983,7 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
38885
38983
  replaceDataURIToBlobUUID(editor, elm);
38886
38984
  }
38887
38985
  editor.e.on(elm, 'mousedown touchstart', ()=>{
38986
+ removeCaretText(elm);
38888
38987
  editor.s.select(elm);
38889
38988
  });
38890
38989
  }
@@ -38905,6 +39004,24 @@ __decorate([
38905
39004
  ]),
38906
39005
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
38907
39006
  ], imageProcessor.prototype, "afterChange", null);
39007
+ /**
39008
+ * Remove the invisible-space text beside an image, which only held a caret.
39009
+ * Selecting the image replaces the caret, and with the text still after a
39010
+ * block image, Safari highlights the rest of the image's line. See #1512
39011
+ */ function removeCaretText(elm) {
39012
+ var _a;
39013
+ for (const side of [
39014
+ 'previousSibling',
39015
+ 'nextSibling'
39016
+ ]){
39017
+ let node = elm[side];
39018
+ while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(node) && !((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.replace((0,_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), ''))){
39019
+ const next = node[side];
39020
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(node);
39021
+ node = next;
39022
+ }
39023
+ }
39024
+ }
38908
39025
  function replaceDataURIToBlobUUID(editor, elm) {
38909
39026
  if (!editor.o.imageProcessor.replaceDataURIToBlobIdInView) {
38910
39027
  return;
@@ -38915,7 +39032,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
38915
39032
  const dataUri = elm.src;
38916
39033
  let blob;
38917
39034
  try {
38918
- blob = (0,_modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_5__.dataURItoBlob)(dataUri);
39035
+ blob = (0,_modules_uploader_helpers_data_uri_to_blob_js__WEBPACK_IMPORTED_MODULE_6__.dataURItoBlob)(dataUri);
38919
39036
  } catch (_a) {
38920
39037
  // A data URI the browser accepts but we cannot decode is not worth
38921
39038
  // breaking the editor over — keep the image as it is
@@ -38928,7 +39045,7 @@ function replaceDataURIToBlobUUID(editor, elm) {
38928
39045
  list[elm.src] = dataUri;
38929
39046
  editor.buffer.set(JODIT_IMAGE_BLOB_ID, list);
38930
39047
  }
38931
- _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProcessor', imageProcessor);
39048
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageProcessor', imageProcessor);
38932
39049
 
38933
39050
 
38934
39051
  /***/ }),
@@ -39227,7 +39344,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
39227
39344
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39228
39345
  /* harmony export */ readAlign: function() { return /* binding */ readAlign; }
39229
39346
  /* harmony export */ });
39230
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41180);
39347
+ /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
39231
39348
  /*!
39232
39349
  * Jodit Editor (https://xdsoft.net/jodit/)
39233
39350
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -39235,20 +39352,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
39235
39352
  */
39236
39353
  /**
39237
39354
  * @private
39238
- */ function readAlign(image, values) {
39239
- // Align
39240
- if ((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float') && [
39241
- 'left',
39242
- 'right'
39243
- ].indexOf((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'float').toLowerCase()) !== -1) {
39244
- values.align = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'float');
39245
- } else {
39246
- if ((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, 'display') === 'block' && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-left') === 'auto' && (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, 'margin-right') === 'auto') {
39247
- values.align = 'center';
39248
- } else {
39249
- values.align = '';
39250
- }
39251
- }
39355
+ */ function readAlign(image, values, classes) {
39356
+ const align = (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign)(image, classes);
39357
+ values.align = align === 'normal' ? '' : align;
39252
39358
  }
39253
39359
 
39254
39360
 
@@ -39281,7 +39387,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
39281
39387
  * @private
39282
39388
  */ async function readValuesFromImage(j, state) {
39283
39389
  const { sourceImage: image, values } = state;
39284
- (0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values);
39390
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values, j.o.imageAlignClasses);
39285
39391
  // Border radius
39286
39392
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.cssInline)(image, 'border-radius') || '0', 10) || 0;
39287
39393
  // Id
@@ -40314,7 +40420,7 @@ UIImagePositionTab = __decorate([
40314
40420
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
40315
40421
  }
40316
40422
  if (opt.image.editAlign) {
40317
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align);
40423
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
40318
40424
  }
40319
40425
  }
40320
40426
 
@@ -40379,10 +40485,12 @@ UIImagePositionTab = __decorate([
40379
40485
  marginBottom,
40380
40486
  marginLeft
40381
40487
  ];
40488
+ // Compared with the inline value, which is what `readMargins` showed, so a
40489
+ // margin from a stylesheet is not overwritten when the field is unchanged
40382
40490
  const applyMargin = (key, value)=>{
40383
- const oldValue = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, key);
40491
+ const oldValue = (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.cssInline)(image, key) || 0);
40384
40492
  const v = (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalSizeToString)(value);
40385
- if (oldValue.toString() !== v.toString()) {
40493
+ if (oldValue !== v) {
40386
40494
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_0__.css)(image, key, v);
40387
40495
  }
40388
40496
  };
@@ -41050,6 +41158,10 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
41050
41158
 
41051
41159
 
41052
41160
 
41161
+ // Images align with `imageAlignClasses`; the wrappers of iframes and media
41162
+ // keep inline styles
41163
+ const alignClasses = (editor, elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
41164
+ const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
41053
41165
  const align = {
41054
41166
  name: 'left',
41055
41167
  childTemplate: (_, __, value)=>value,
@@ -41059,6 +41171,16 @@ const align = {
41059
41171
  'Center',
41060
41172
  'Normal'
41061
41173
  ],
41174
+ update: (editor, button)=>{
41175
+ const current = currentAlign(editor, button.target);
41176
+ button.state.icon.name = current === 'normal' ? 'left' : current;
41177
+ },
41178
+ isActive: (editor, button)=>currentAlign(editor, button.target) !== 'normal',
41179
+ isChildActive: (editor, button)=>{
41180
+ var _a;
41181
+ const [value] = (_a = button.control.args) !== null && _a !== void 0 ? _a : [];
41182
+ return (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(value) && currentAlign(editor, button.target) === value.toLowerCase();
41183
+ },
41062
41184
  exec: (editor, elm, { control })=>{
41063
41185
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
41064
41186
  'img',
@@ -41071,7 +41193,7 @@ const align = {
41071
41193
  if (!command) {
41072
41194
  return false;
41073
41195
  }
41074
- ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command);
41196
+ ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, alignClasses(editor, elm));
41075
41197
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
41076
41198
  'jodit',
41077
41199
  'jodit-media'
@@ -41111,6 +41233,14 @@ const align = {
41111
41233
  'Normal'
41112
41234
  ],
41113
41235
  tooltip: 'Vertical align',
41236
+ // `vertical-align` only moves an image in the line, not a floated or block one
41237
+ isDisabled: (editor, button)=>{
41238
+ const image = button.target;
41239
+ return Boolean(image && ([
41240
+ 'left',
41241
+ 'right'
41242
+ ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
41243
+ },
41114
41244
  exec: (editor, image, { control })=>{
41115
41245
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
41116
41246
  return;
@@ -44434,7 +44564,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
44434
44564
  this.placeholderElm.innerHTML = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(editor.element, 'placeholder') || '';
44435
44565
  }
44436
44566
  editor.e.fire('placeholder', this.placeholderElm.innerHTML);
44437
- editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder', this.toggle).on(window, 'load', this.toggle);
44567
+ editor.e.off('.placeholder').on('changePlace.placeholder', this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder', this.toggle).on(window, 'load', this.toggle);
44438
44568
  this.addNativeListeners();
44439
44569
  this.toggle();
44440
44570
  };